clientDebit method
Implementation
@action
double clientDebit(int herderId, DateTime date) => tickets.isEmpty
? 0
: tickets
.where((t) => t.contactId == herderId)
.where((t) => t.status == true)
.where((t) => t.date.isBefore(date))
.where((t) => t.ticketType == TicketType.sellDeferred)
.fold(0, (prev, e) => prev + e.totalPriceTaxAndPromoIncluded);