toJson method
Implementation
Map<String, dynamic> toJson() => {
..._kopfJson(),
'shift': {
'number': number,
'openedAt': openedAt,
'closedAt': closedAt,
'openedByName': openedByName,
'closedByName': closedByName,
},
'openingFloatCents': openingFloatCents,
'openingFloatTakenOver': openingFloatTakenOver,
'openingDenominations': openingDenominations == null ? null : {...openingDenominations!},
'cashSalesCents': cashSalesCents,
'cashCancellationsCents': cashCancellationsCents,
'receiptCount': receiptCount,
'cancellationCount': cancellationCount,
'nonCashByMethod': [for (final u in nonCashByMethod) u.toJson()],
'movements': [for (final m in movements) m.toJson()],
'tips': [for (final t in tips) t.toJson()],
'expectedCents': expectedCents,
'countedCents': countedCents,
'countedDenominations': countedDenominations == null ? null : {...countedDenominations!},
'differenceCents': differenceCents,
'comment': comment,
'openingsWithoutSale': openingsWithoutSale,
if (discounts != null) 'discounts': [for (final r in discounts!) r.toJson()],
if (cardTipsTakenCents != null) 'cardTipsTakenCents': cardTipsTakenCents,
if (invoicePaymentCents != null) 'invoicePaymentCents': invoicePaymentCents,
if (afterCount != null) 'afterCount': afterCount!.toJson(),
if (afterCount != null) 'leftInDrawerCents': leftInDrawerCents,
if (openingCounted != null) 'openingCounted': openingCounted,
if (interimDifferenceCents != null) 'interimDifferenceCents': interimDifferenceCents,
if (differenceParts != null) 'differenceParts': [for (final t in differenceParts!) t.toJson()],
if (countedBeforePayoutCents != null) 'countedBeforePayoutCents': countedBeforePayoutCents,
if (countedBeforePayoutDenominations != null) 'countedBeforePayoutDenominations': {...countedBeforePayoutDenominations!},
};