Skip to content
Snippets Groups Projects
Commit 8f62c42f authored by Sara Prifti's avatar Sara Prifti
Browse files

Added check method for discount

parent 055fd8ef
Branches Ying
No related tags found
No related merge requests found
......@@ -65,7 +65,8 @@ public class DataService {
public static boolean discountCanBeApplied(DiscountCard discountCard, TicketValidationRequest ticketValidationRequest){
boolean applyDiscount=false;
if(discountCard.getId().equals(ticketValidationRequest.getDiscountCardId())){
if(ticketValidationRequest.getZone().getValue().equals("30d")|| ticketValidationRequest.getZone().getValue().equals("1y")){
if(ticketValidationRequest.getDisabled()){
//if(ticketValidationRequest.get.getValue().equals("30d")|| ticketValidationRequest.getZone().getValue().equals("1y")){
//apply type 25 and 50
applyDiscount=true;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment