feat(zahlung): eigener Step "Zahlung" vor der Uebersicht
- Neuer Workflow-Step "Zahlung" zeigt ausgelieferte Artikel mit Menge und Preis, Betragsaufstellung, Zahlungsstatus und einen grossen Button "Zahlung abwickeln" (fest unten) - Zahlungs-Modal: grosser offener Betrag, Methoden als Cards aus den Backend-Stammdaten, bei EC-Karte gross die Kundennummer; schliesst nur ueber Abbrechen, "Zahlung erhalten" oder "Lieferung abbrechen" (mit Grund) - Bestaetigung wird am Server protokolliert (RecordDeliveryPayment); bis dahin sind "Weiter" und die Uebersicht gesperrt, ausser es ist nichts offen (bereits bezahlt). Aendert sich der Betrag danach, wird die Zahlung als veraltet markiert und muss erneut abgewickelt werden - Uebersicht zeigt die abgewickelte Zahlung statt eigener Methodenauswahl; Unterschrift-Flow ohne doppelte Inkasso-Stufe; Abschluss sendet Methode und Inkasso-Flag der gueltigen Zahlung - DeliveryPaymentStatus als einzige Quelle fuer offenen Betrag (gleiche Formel wie Backend); Artikelliste/Betragskarte als geteilte Widgets; Begruendungs-Dialog geteilt mit Info-Step - API-Client aus aktueller Backend-Spec neu generiert - Tests fuer Zahlungsstatus und Modal Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@ -0,0 +1,35 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:holzleitner_api/holzleitner_api.dart';
|
||||
|
||||
// tests for CompletedDeliveriesResponse
|
||||
void main() {
|
||||
final instance = CompletedDeliveriesResponseBuilder();
|
||||
// TODO add properties to the builder and call build()
|
||||
|
||||
group(CompletedDeliveriesResponse, () {
|
||||
// Anzahl der abgeschlossenen Lieferungen im Bereich.
|
||||
// int count
|
||||
test('to test the property `count`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Die abgeschlossenen Lieferungen, aufsteigend nach Abschluss-Zeitpunkt.
|
||||
// BuiltList<CompletedDeliveryItem> deliveries
|
||||
test('to test the property `deliveries`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Wirksame untere Grenze (ISO `YYYY-MM-DD`) oder `null` (offen).
|
||||
// String from
|
||||
test('to test the property `from`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Wirksame obere Grenze (ISO `YYYY-MM-DD`) oder `null` (offen).
|
||||
// String to
|
||||
test('to test the property `to`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:holzleitner_api/holzleitner_api.dart';
|
||||
|
||||
// tests for CompletedDeliveryItem
|
||||
void main() {
|
||||
final instance = CompletedDeliveryItemBuilder();
|
||||
// TODO add properties to the builder and call build()
|
||||
|
||||
group(CompletedDeliveryItem, () {
|
||||
// ERP-Belegnummer der Lieferung.
|
||||
// String belegnummer
|
||||
test('to test the property `belegnummer`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// `true`, wenn an der Lieferung Positionen verändert wurden — eine Zeile wurde entfernt oder in der Menge reduziert (Stück-Gutschrift) **oder** es liegt eine aktive Geld-Gutschrift vor.
|
||||
// bool positionsModified
|
||||
test('to test the property `positionsModified`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
89
packages/holzleitner_api/test/delivery_details_test.dart
Normal file
89
packages/holzleitner_api/test/delivery_details_test.dart
Normal file
@ -0,0 +1,89 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:holzleitner_api/holzleitner_api.dart';
|
||||
|
||||
// tests for DeliveryDetails
|
||||
void main() {
|
||||
final instance = DeliveryDetailsBuilder();
|
||||
// TODO add properties to the builder and call build()
|
||||
|
||||
group(DeliveryDetails, () {
|
||||
// Nur die von den Positionen referenzierten Artikel.
|
||||
// BuiltList<Article> articles
|
||||
test('to test the property `articles`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Die zu `contactSources` gehörenden Einzel-Kanäle. Join per `sourceId`.
|
||||
// BuiltList<ContactChannel> contactChannels
|
||||
test('to test the property `contactChannels`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Kontaktquellen der Lieferung (Liefer-/Rechnungsadresse, Ansprechpartner …).
|
||||
// BuiltList<ContactSource> contactSources
|
||||
test('to test the property `contactSources`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Aktuelle Betrags-Gutschrift (`null`, wenn keine aktiv).
|
||||
// DeliveryCredit credit
|
||||
test('to test the property `credit`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Der Kunde der Lieferung (`null`, falls unauffindbar — sollte nicht vorkommen).
|
||||
// Customer customer
|
||||
test('to test the property `customer`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Ansprechpartner des Kunden.
|
||||
// BuiltList<CustomerContact> customerContacts
|
||||
test('to test the property `customerContacts`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Die Lieferung selbst inkl. Positionen (mit Scan-Ständen) und `sortOrder`.
|
||||
// DeliveryWithItems delivery
|
||||
test('to test the property `delivery`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Für diese Lieferung gesetzte Service-Werte.
|
||||
// BuiltList<DeliveryServiceValue> deliveryServices
|
||||
test('to test the property `deliveryServices`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Notizen der Lieferung, aufsteigend nach `createdAt`.
|
||||
// BuiltList<DeliveryNote> notes
|
||||
test('to test the property `notes`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Jüngste protokollierte Zahlungsabwicklung (`None` = keine).
|
||||
// DeliveryPayment payment
|
||||
test('to test the property `payment`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Aktive Service-Definitionen (Stammdaten).
|
||||
// BuiltList<Service> services
|
||||
test('to test the property `services`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Die Tour, zu der die Lieferung gehört.
|
||||
// Tour tour
|
||||
test('to test the property `tour`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Nur die von den Positionen referenzierten Lager.
|
||||
// BuiltList<Warehouse> warehouses
|
||||
test('to test the property `warehouses`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,16 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:holzleitner_api/holzleitner_api.dart';
|
||||
|
||||
// tests for DeliveryPaymentResponse
|
||||
void main() {
|
||||
final instance = DeliveryPaymentResponseBuilder();
|
||||
// TODO add properties to the builder and call build()
|
||||
|
||||
group(DeliveryPaymentResponse, () {
|
||||
// DeliveryPayment payment
|
||||
test('to test the property `payment`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
53
packages/holzleitner_api/test/delivery_payment_test.dart
Normal file
53
packages/holzleitner_api/test/delivery_payment_test.dart
Normal file
@ -0,0 +1,53 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:holzleitner_api/holzleitner_api.dart';
|
||||
|
||||
// tests for DeliveryPayment
|
||||
void main() {
|
||||
final instance = DeliveryPaymentBuilder();
|
||||
// TODO add properties to the builder and call build()
|
||||
|
||||
group(DeliveryPayment, () {
|
||||
// Abgewickelter Betrag in Cent (offener Betrag bei Bestätigung).
|
||||
// int amountCents
|
||||
test('to test the property `amountCents`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String deliveryId
|
||||
test('to test the property `deliveryId`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String id
|
||||
test('to test the property `id`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Snapshot des Methoden-Codes (`cash`, `ec_card`, `invoice`, …).
|
||||
// String paymentMethodCode
|
||||
test('to test the property `paymentMethodCode`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String paymentMethodId
|
||||
test('to test the property `paymentMethodId`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// DateTime recordedAt
|
||||
test('to test the property `recordedAt`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String recordedByCarId
|
||||
test('to test the property `recordedByCarId`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// int recordedByPersonalnummer
|
||||
test('to test the property `recordedByPersonalnummer`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,60 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:holzleitner_api/holzleitner_api.dart';
|
||||
|
||||
// tests for PendingReviewResponse
|
||||
void main() {
|
||||
final instance = PendingReviewResponseBuilder();
|
||||
// TODO add properties to the builder and call build()
|
||||
|
||||
group(PendingReviewResponse, () {
|
||||
// Entfernte/teil-gutgeschriebene Positionen.
|
||||
// BuiltList<ReviewedItemResponse> creditedItems
|
||||
test('to test the property `creditedItems`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String customerName
|
||||
test('to test the property `customerName`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String deliveryId
|
||||
test('to test the property `deliveryId`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// int erpBelegartId
|
||||
test('to test the property `erpBelegartId`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String erpBelegnummer
|
||||
test('to test the property `erpBelegnummer`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Zeitpunkt der letzten beleg-ändernden Aktion (RFC 3339).
|
||||
// String lastChangeAt
|
||||
test('to test the property `lastChangeAt`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Geld-Gutschrift in Cent (0 = keine).
|
||||
// int moneyCreditCents
|
||||
test('to test the property `moneyCreditCents`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String moneyCreditReason
|
||||
test('to test the property `moneyCreditReason`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Tourdatum (ISO `YYYY-MM-DD`).
|
||||
// String tourDate
|
||||
test('to test the property `tourDate`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:holzleitner_api/holzleitner_api.dart';
|
||||
|
||||
// tests for PositionsModifiedResponse
|
||||
void main() {
|
||||
final instance = PositionsModifiedResponseBuilder();
|
||||
// TODO add properties to the builder and call build()
|
||||
|
||||
group(PositionsModifiedResponse, () {
|
||||
// ERP-Belegnummer, nach der gefragt wurde.
|
||||
// String belegnummer
|
||||
test('to test the property `belegnummer`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// `true`, wenn an der Lieferung Positionen verändert wurden — eine Zeile wurde entfernt oder in der Menge reduziert (Stück-Gutschrift) **oder** es liegt eine aktive Geld-Gutschrift vor.
|
||||
// bool positionsModified
|
||||
test('to test the property `positionsModified`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:holzleitner_api/holzleitner_api.dart';
|
||||
|
||||
// tests for RecordDeliveryPaymentRequest
|
||||
void main() {
|
||||
final instance = RecordDeliveryPaymentRequestBuilder();
|
||||
// TODO add properties to the builder and call build()
|
||||
|
||||
group(RecordDeliveryPaymentRequest, () {
|
||||
// Fahrzeug des Akteurs (Audit-Spur). Muss zum Account gehören.
|
||||
// String authorCarId
|
||||
test('to test the property `authorCarId`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Idempotenz-Schlüssel — pro Bestätigung genau einmal vergeben.
|
||||
// String clientEventId
|
||||
test('to test the property `clientEventId`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Betrag in Cent, den der Fahrer in der App gesehen und bestätigt hat. Der Server berechnet den offenen Betrag selbst und lehnt ab, wenn er davon abweicht — so landet nie ein Betrag im Protokoll, den der Fahrer nicht gesehen hat.
|
||||
// int expectedAmountCents
|
||||
test('to test the property `expectedAmountCents`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Gewählte Zahlungsmethode. Muss existieren und aktiv sein.
|
||||
// String paymentMethodId
|
||||
test('to test the property `paymentMethodId`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,23 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:holzleitner_api/holzleitner_api.dart';
|
||||
|
||||
// tests for ResolveReviewRequest
|
||||
void main() {
|
||||
final instance = ResolveReviewRequestBuilder();
|
||||
// TODO add properties to the builder and call build()
|
||||
|
||||
group(ResolveReviewRequest, () {
|
||||
// Optionale Notiz zur getroffenen Entscheidung.
|
||||
// String note
|
||||
test('to test the property `note`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// Bearbeiter (Name/Kürzel), der die Prüfung bestätigt.
|
||||
// String resolvedBy
|
||||
test('to test the property `resolvedBy`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
import 'package:test/test.dart';
|
||||
import 'package:holzleitner_api/holzleitner_api.dart';
|
||||
|
||||
// tests for ReviewedItemResponse
|
||||
void main() {
|
||||
final instance = ReviewedItemResponseBuilder();
|
||||
// TODO add properties to the builder and call build()
|
||||
|
||||
group(ReviewedItemResponse, () {
|
||||
// String articleName
|
||||
test('to test the property `articleName`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String artikelNr
|
||||
test('to test the property `artikelNr`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// int belegzeilenNr
|
||||
test('to test the property `belegzeilenNr`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// int creditedQuantity
|
||||
test('to test the property `creditedQuantity`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// String reason
|
||||
test('to test the property `reason`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
// int requiredQuantity
|
||||
test('to test the property `requiredQuantity`', () async {
|
||||
// TODO
|
||||
});
|
||||
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user