0.36.0: Status Intern mit I-Nummern und Ordner 05 Intern, Eckdaten unten und einklappbar
Some checks failed
Prüfung / tests (push) Has been cancelled
Prüfung / container (push) Has been cancelled

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AmyPfuNc4sCRfaF3oURXZz
This commit is contained in:
Claude
2026-10-24 05:49:21 +00:00
parent cfd36f5fd3
commit f3dd3678f6
19 changed files with 87 additions and 24 deletions

View File

@@ -31,7 +31,7 @@ export async function legeZahlungsplanAn(c: Client, projektId: string, umsatz: n
export async function zahlungsplaeneAutomatisch(c: Client, woche: Arbeitswoche): Promise<void> {
const neu = await c.query<{ id: string; umsatz_netto: string }>(
`select p.id, p.umsatz_netto from projekt p
where p.zahlungsplan is null and p.umsatz_netto > 0
where p.zahlungsplan is null and p.umsatz_netto > 0 and p.status <> 'intern'
and exists (select 1 from vorgang v join abschnitt a on a.id = v.abschnitt_id where a.projekt_id = p.id)
and not exists (select 1 from zahlung z where z.projekt_id = p.id)`);
for (const p of neu.rows) await legeZahlungsplanAn(c, p.id, Number(p.umsatz_netto), woche);