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
No related branches found
No related tags found
No related merge requests found
...@@ -65,7 +65,8 @@ public class DataService { ...@@ -65,7 +65,8 @@ public class DataService {
public static boolean discountCanBeApplied(DiscountCard discountCard, TicketValidationRequest ticketValidationRequest){ public static boolean discountCanBeApplied(DiscountCard discountCard, TicketValidationRequest ticketValidationRequest){
boolean applyDiscount=false; boolean applyDiscount=false;
if(discountCard.getId().equals(ticketValidationRequest.getDiscountCardId())){ 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 //apply type 25 and 50
applyDiscount=true; applyDiscount=true;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment