total property

num get total

Implementation

num get total {
  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 total');
      return 0;
    default:
      return 0;
  }
}