calculateSumsOfTicket method
num
calculateSumsOfTicket(
- TicketType ticketType,
- DateTime startOfMonth,
- DateTime endOfMonth
inherited
Implementation
num calculateSumsOfTicket(
TicketType ticketType, DateTime startOfMonth, DateTime endOfMonth) {
if (ticketType == ticketType &&
date.isAfter(startOfMonth) &&
date.isBefore(endOfMonth)) {
switch (ticketType) {
case TicketType.sell:
return totalPriceTaxAndPromoIncluded;
case TicketType.sellDeferred:
return totalPriceTaxAndPromoIncluded;
case TicketType.sellCovered:
return received;
case TicketType.spend:
return totalCostTaxAndPromoIncluded;
case TicketType.spendDeferred:
return totalCostTaxAndPromoIncluded;
case TicketType.spendCovered:
return received;
case TicketType.wage:
return received;
case TicketType.unknown:
print('unknow ticket type in calculateSumsOfTicket');
return 0;
default:
return 0;
}
} else {
return 0;
}
}