21 lines
634 B
Dart
21 lines
634 B
Dart
/// Aktuelle Betrags-Gutschrift einer Lieferung (Geld-Nachlass, unabhängig von
|
|
/// Stückzahl). Server-seitig aus dem append-only `delivery_credit_audit`
|
|
/// abgeleitet (jüngstes Ereignis); existiert nur, solange der letzte Stand
|
|
/// `set` ist.
|
|
class DeliveryCredit {
|
|
const DeliveryCredit({
|
|
required this.deliveryId,
|
|
required this.amountCents,
|
|
required this.reason,
|
|
});
|
|
|
|
final String deliveryId;
|
|
|
|
/// Betrag in Cent (> 0, ≤ 15000).
|
|
final int amountCents;
|
|
final String reason;
|
|
|
|
/// Betrag in ganzen Euro (die Gutschrift läuft in 10-€-Schritten).
|
|
int get amountEuros => (amountCents / 100).round();
|
|
}
|