feat(admin): Anzahlungskonten in der Verwaltung pflegen (zwei IBANs)
- Migration 016_deposit_accounts.sql: Tabelle deposit_accounts (label, holder, bank, iban, sort_order), gefüllt mit Postbank (DE12 …1261 30) und Sparkasse (DE83 3206 0362 3303 2140 10); bookings.deposit_account -> deposit_account_id mit Fremdschlüssel (ON DELETE SET NULL), Altbestand wird aufs erste Konto gemappt; schema.sql nachgezogen - Neue Seite Verwaltung → Konten (/admin/accounts): anlegen, ändern, löschen (Löschen nur ohne Buchungsbezug), Anzeige der Verwendung je Konto - Buchungsformular wählt aus dieser Liste (Anzeige mit IBAN-Ende), Validierung prüft IBAN-Format, Auftragsbestätigung druckt das gewählte Konto - deposit_accounts()/deposit_account() lesen aus der DB (Cache wird nach Änderungen verworfen); Konfigurations-Override entfällt - Anleitung (Abschnitt 3 und 15), README, config.example.php und ROADMAP (Feature 25) aktualisiert
This commit is contained in:
parent
bf85a64a79
commit
cc8d7330f8
15 changed files with 478 additions and 76 deletions
|
|
@ -203,10 +203,10 @@ $returnTo = '/bookings/' . (int) $booking['id'];
|
|||
<div><dt>Gesamtbetrag</dt><dd><?= e(fmt_money((int) $booking['total_cents'])) ?></dd></div>
|
||||
<div><dt>Anzahlung</dt><dd><?= e(fmt_money((int) $booking['deposit_cents'])) ?><?php
|
||||
if ((int) ($booking['deposit_required'] ?? 0) === 1 && (int) $booking['deposit_cents'] > 0) {
|
||||
$depositTarget = deposit_account((string) ($booking['deposit_account'] ?? ''));
|
||||
$depositTarget = deposit_account((int) ($booking['deposit_account_id'] ?? 0));
|
||||
echo ' · fällig bis ' . e(fmt_date(deposit_due_date()));
|
||||
if ($depositTarget !== null) {
|
||||
echo ' auf ' . e((string) $depositTarget['label']);
|
||||
echo ' auf ' . e(deposit_account_label($depositTarget));
|
||||
}
|
||||
}
|
||||
?></dd></div>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue