feat(documents): Auftragsbestätigung ohne Rechnungszeile und ohne Anhängernummer
- Beträge-Tabelle der Auftragsbestätigung enthält kein „Rechnung JA/NEIN“ mehr - Mietgegenstand nennt nur noch die Gattung: „Kühlanhänger“ bzw. „Truhe“ (document_subject_plain()), auch im Verwendungszweck der Anzahlung - Der Mietvertrag bleibt unverändert (dort weiter mit Nummer und Variante)
This commit is contained in:
parent
bdd0539afc
commit
2cf24226f4
1 changed files with 13 additions and 4 deletions
|
|
@ -652,6 +652,16 @@ function deposit_due_date(?string $fromIso = null): string
|
|||
return $cursor->format('Y-m-d');
|
||||
}
|
||||
|
||||
/**
|
||||
* Nur die Gattung des Mietgegenstandes – ohne Anhänger-/Truhennummer.
|
||||
* Für die Auftragsbestätigung: „Kühlanhänger“ oder „Truhe“.
|
||||
*/
|
||||
function document_subject_plain(array $booking): string
|
||||
{
|
||||
$label = (string) ($booking['trailer_label'] ?? '');
|
||||
return mb_stripos($label, 'truhe') !== false ? 'Truhe' : 'Kühlanhänger';
|
||||
}
|
||||
|
||||
/**
|
||||
* Bezeichnung des Mietgegenstandes, ohne doppelte Wörter
|
||||
* ("Kühlanhänger 1", "Kühltruhe 1", "Kühlanhänger: WM Meyer").
|
||||
|
|
@ -876,7 +886,7 @@ function document_confirmation_pdf(array $booking, string $variant): string
|
|||
|
||||
$y = document_pdf_heading($pdf, $y, 'Bestätigte Buchung');
|
||||
$rows = [
|
||||
['Mietgegenstand', document_subject_line($booking, $texts)],
|
||||
['Mietgegenstand', document_subject_plain($booking)],
|
||||
['Art', document_variant_label($variant)],
|
||||
['Mietzeitraum', 'von ' . fmt_date_with_time((string) $booking['start_date'], $booking['start_time'] ?? null)
|
||||
. ' bis ' . fmt_date_with_time((string) $booking['end_date'], $booking['end_time'] ?? null)],
|
||||
|
|
@ -910,7 +920,6 @@ function document_confirmation_pdf(array $booking, string $variant): string
|
|||
}
|
||||
$priceRows[] = ['Gesamtbetrag', fmt_money($grand), true];
|
||||
$priceRows[] = ['Bei Übergabe zu zahlen', fmt_money(max(0, $grand - $paid)), true];
|
||||
$priceRows[] = ['Rechnung', booking_invoice_display($booking)];
|
||||
$y = document_pdf_rows($pdf, $y, $priceRows);
|
||||
|
||||
if ($account !== null) {
|
||||
|
|
@ -923,8 +932,8 @@ function document_confirmation_pdf(array $booking, string $variant): string
|
|||
['Kontoinhaber', $account['holder']],
|
||||
['Bank', $account['bank']],
|
||||
['IBAN', $account['iban']],
|
||||
['Verwendungszweck', 'Kühlanhänger ' . fmt_date((string) $booking['start_date']) . ' · '
|
||||
. (string) $booking['customer_name']],
|
||||
['Verwendungszweck', document_subject_plain($booking) . ' ' . fmt_date((string) $booking['start_date'])
|
||||
. ' · ' . (string) $booking['customer_name']],
|
||||
], 150.0);
|
||||
$warning = 'Bitte beachten: Erst nach Eingang der Anzahlung auf dem genannten Konto ist der Termin '
|
||||
. 'verbindlich reserviert. Erfolgt innerhalb der Frist kein Zahlungseingang, behalten wir uns vor, '
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue