openStaffTipCents function

int openStaffTipCents(
  1. KasseneckReceipt receipt, {
  2. int? nowMs,
})

Noch nicht storniertes Mitarbeiter-Trinkgeld in Cent. Groesser 0 heisst: das Storno fragt „Trinkgeld auch zurueckgeben?" (auch beim Teilstorno). Inhaber-Trinkgeld ist Umsatz und folgt der Ware.

Implementation

int openStaffTipCents(KasseneckReceipt receipt, {int? nowMs}) => _offenesTrinkgeld(receipt, nowMs)
    .fold(0, (s, p) => s + p.quantity * receipt.items[p.index].priceCents);