Buchungskalender: Storno und Buchung idempotent bei Teilfehlern
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
947e9da2e3
commit
f7650fe883
5 files changed
+106
-11
No files matched your search
@@ -144,3 +144,9 @@ export async function listeRechnungen(featureId) {
|
||||
|
||||
/** Alle Anfragen (aller Kunden) mit einem Status; fuer den Fristen-Job. */
|
||||
export const listeAnfragenAlle = (status) => liste('ukAnfragen', [Query.equal('status', status)])
|
||||
|
||||
/** Vorhandene Rechnung einer Anfrage zu einer Art ('rechnung' | 'storno'); fuer idempotente Wiederholung nach Teilfehlern. */
|
||||
export async function findeRechnung(anfrageId, art) {
|
||||
const alle = await liste('ukRechnungen', [Query.equal('anfrageId', anfrageId)])
|
||||
return alle.filter((r) => r.art === art).sort((a, b) => String(a.nummer).localeCompare(String(b.nummer)))[0] ?? null
|
||||
}
|
||||
Reference in new issue
Block a user