numPromo property

num? get numPromo

Implementation

num? get numPromo {
  switch (ticketType) {
    case TicketType.sell:
      return totalPricePromoVal;

    case TicketType.sellDeferred:
      return totalPricePromoVal;

    case TicketType.sellCovered:
      return promo;

    case TicketType.spend:
      return totalCostPromoVal;

    case TicketType.spendDeferred:
      return totalCostPromoVal;

    case TicketType.spendCovered:
      return promo;

    case TicketType.stockIn:
      return 0;

    case TicketType.stockOut:
      return 0;

    case TicketType.inventory:
      return 0;

    default:
      return null; // == "Type de ticket inconnu"
  }
}