{
  "_note": "Shared cases for the shift helpers (npm @kreiseck/kasseneck-api and Dart kasseneck_api): sumDenominations (cents value as key, count as value; null = not a valid count) and parseCentsAllowZero (typed amount -> cents; null = invalid input) and shiftTipLines (tips of one employee -> lines; carried over from earlier shifts first, only when not 0; earned = received immediately + retained, always shown; retained, paid out, refunded by the employee herself and open only when not 0; everything 0 -> no lines). Never round, never guess.",
  "sumDenominations": [
    { "denominations": {}, "expected": 0 },
    { "denominations": { "100": 1, "200": 1, "500": 1, "2000": 1 }, "expected": 2800 },
    { "denominations": { "2000": 2, "5000": 1, "20000": 1 }, "expected": 29000 },
    { "denominations": { "1": 3, "2": 1, "5": 4 }, "expected": 25 },
    { "denominations": { "50000": 2 }, "expected": 100000 },
    { "denominations": { "1000": 0, "500": 0 }, "expected": 0 },
    { "denominations": { "10000": 100000 }, "expected": 1000000000 },
    { "denominations": { "300": 1 }, "expected": null },
    { "denominations": { "0": 1 }, "expected": null },
    { "denominations": { "100000": 1 }, "expected": null },
    { "denominations": { "1000": -1 }, "expected": null },
    { "denominations": { "1000": 1.5 }, "expected": null },
    { "denominations": { "1000": "2" }, "expected": null },
    { "denominations": { "1000": 100001 }, "expected": null },
    { "denominations": { "10.00": 1 }, "expected": null },
    { "denominations": { "0500": 1 }, "expected": null },
    { "denominations": { "": 1 }, "expected": null },
    { "denominations": null, "expected": null },
    { "denominations": [], "expected": null }
  ],
  "parseCentsAllowZero": [
    { "text": "0", "expected": 0 },
    { "text": "0,00", "expected": 0 },
    { "text": "0.0", "expected": 0 },
    { "text": "1", "expected": 100 },
    { "text": "12", "expected": 1200 },
    { "text": "12,5", "expected": 1250 },
    { "text": "12.5", "expected": 1250 },
    { "text": "12,05", "expected": 1205 },
    { "text": "0,01", "expected": 1 },
    { "text": " 290,00 ", "expected": 29000 },
    { "text": "1000", "expected": 100000 },
    { "text": "007", "expected": 700 },
    { "text": "", "expected": null },
    { "text": "   ", "expected": null },
    { "text": ",50", "expected": null },
    { "text": "12,", "expected": null },
    { "text": "12,345", "expected": null },
    { "text": "1.000", "expected": null },
    { "text": "1.000,00", "expected": null },
    { "text": "1 000", "expected": null },
    { "text": "-5", "expected": null },
    { "text": "+5", "expected": null },
    { "text": "1e3", "expected": null },
    { "text": "12,5 €", "expected": null },
    { "text": "€ 12", "expected": null },
    { "text": "abc", "expected": null },
    { "text": "99999999999999999999", "expected": null }
  ],
  "shiftTipLines": [
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "receivedImmediatelyCents": 400, "retainedCents": 0, "paidOutCents": 0, "openCents": 400 }, "expected": [{ "key": "shift_receipt.tip_earned", "cents": 400 }, { "key": "shift_receipt.tip_open", "cents": 400 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "receivedImmediatelyCents": 400, "retainedCents": 150, "paidOutCents": 250, "openCents": 150 }, "expected": [{ "key": "shift_receipt.tip_earned", "cents": 550 }, { "key": "shift_receipt.tip_retained", "cents": 150 }, { "key": "shift_receipt.tip_paid_out", "cents": 250 }, { "key": "shift_receipt.tip_open", "cents": 150 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "receivedImmediatelyCents": 400, "retainedCents": 0, "paidOutCents": 400, "openCents": 0 }, "expected": [{ "key": "shift_receipt.tip_earned", "cents": 400 }, { "key": "shift_receipt.tip_paid_out", "cents": 400 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Anna Chef", "receivedImmediatelyCents": 0, "retainedCents": 0, "paidOutCents": 0, "openCents": 300 }, "expected": [{ "key": "shift_receipt.tip_earned", "cents": 0 }, { "key": "shift_receipt.tip_open", "cents": 300 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "receivedImmediatelyCents": 0, "retainedCents": 250, "paidOutCents": 0, "openCents": 0 }, "expected": [{ "key": "shift_receipt.tip_earned", "cents": 250 }, { "key": "shift_receipt.tip_retained", "cents": 250 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "receivedImmediatelyCents": 0, "retainedCents": 0, "paidOutCents": 0, "openCents": 0 }, "expected": [] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "receivedImmediatelyCents": -200, "retainedCents": 0, "paidOutCents": 0, "openCents": 0 }, "expected": [{ "key": "shift_receipt.tip_earned", "cents": -200 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "receivedImmediatelyCents": 200, "retainedCents": -200, "paidOutCents": 0, "openCents": 0 }, "expected": [{ "key": "shift_receipt.tip_earned", "cents": 0 }, { "key": "shift_receipt.tip_retained", "cents": -200 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "receivedImmediatelyCents": 0, "retainedCents": 0, "paidOutCents": 150, "openCents": -150 }, "expected": [{ "key": "shift_receipt.tip_earned", "cents": 0 }, { "key": "shift_receipt.tip_paid_out", "cents": 150 }, { "key": "shift_receipt.tip_open", "cents": -150 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "receivedImmediatelyCents": 400, "retainedCents": 0, "paidOutCents": 0, "refundedByEmployeeCents": 200, "openCents": 600 }, "expected": [{ "key": "shift_receipt.tip_earned", "cents": 400 }, { "key": "shift_receipt.tip_refunded_by_employee", "cents": 200 }, { "key": "shift_receipt.tip_open", "cents": 600 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "receivedImmediatelyCents": 400, "retainedCents": 0, "paidOutCents": 300, "refundedByEmployeeCents": 200, "openCents": 300 }, "expected": [{ "key": "shift_receipt.tip_earned", "cents": 400 }, { "key": "shift_receipt.tip_paid_out", "cents": 300 }, { "key": "shift_receipt.tip_refunded_by_employee", "cents": 200 }, { "key": "shift_receipt.tip_open", "cents": 300 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "carriedOverCents": 600, "receivedImmediatelyCents": 900, "retainedCents": 0, "paidOutCents": 0, "refundedByEmployeeCents": 0, "openCents": 1500 }, "expected": [{ "key": "shift_receipt.tip_carried_over", "cents": 600 }, { "key": "shift_receipt.tip_earned", "cents": 900 }, { "key": "shift_receipt.tip_open", "cents": 1500 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "carriedOverCents": 600, "receivedImmediatelyCents": 900, "retainedCents": 0, "paidOutCents": 1000, "refundedByEmployeeCents": 0, "openCents": 500 }, "expected": [{ "key": "shift_receipt.tip_carried_over", "cents": 600 }, { "key": "shift_receipt.tip_earned", "cents": 900 }, { "key": "shift_receipt.tip_paid_out", "cents": 1000 }, { "key": "shift_receipt.tip_open", "cents": 500 }] },
    { "tip": { "registerUserId": "ru_kellner", "name": "Ben Kellner", "carriedOverCents": 600, "receivedImmediatelyCents": 700, "retainedCents": 0, "paidOutCents": 1000, "refundedByEmployeeCents": 200, "openCents": 500 }, "expected": [{ "key": "shift_receipt.tip_carried_over", "cents": 600 }, { "key": "shift_receipt.tip_earned", "cents": 700 }, { "key": "shift_receipt.tip_paid_out", "cents": 1000 }, { "key": "shift_receipt.tip_refunded_by_employee", "cents": 200 }, { "key": "shift_receipt.tip_open", "cents": 500 }] }
  ],
  "durationText": [
    { "minutes": 0, "expected": "0 Min." },
    { "minutes": 1, "expected": "1 Min." },
    { "minutes": 59, "expected": "59 Min." },
    { "minutes": 60, "expected": "1 Std." },
    { "minutes": 61, "expected": "1 Std. 1 Min." },
    { "minutes": 512, "expected": "8 Std. 32 Min." },
    { "minutes": 480, "expected": "8 Std." },
    { "minutes": 1439, "expected": "23 Std. 59 Min." },
    { "minutes": 1440, "expected": "1 Tag" },
    { "minutes": 1500, "expected": "1 Tag 1 Std." },
    { "minutes": 1620, "expected": "1 Tag 3 Std." },
    { "minutes": 2880, "expected": "2 Tage" },
    { "minutes": 2940, "expected": "2 Tage 1 Std." },
    { "minutes": 10080, "expected": "7 Tage" },
    { "minutes": -5, "expected": "0 Min." },
    { "minutes": 90.9, "expected": "1 Std. 30 Min." }
  ]
}
