Phase 2: structured iban/bic instead of free-text bankDetails
InvoiceSeller.bankDetails becomes iban/bic (EN16931 wants discrete PaymentMeans data, not a paragraph a human formatted by hand). The footer's bank-details line also drops the misleading "(für Überweisung)" qualifier — it was never actually conditional on the order's payment method (only on whether the field was set at all), just worded as if it were. Now shown whenever iban or bic is set, regardless of payment method. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
+9
-1
@@ -334,7 +334,15 @@ export function InvoiceDocument({ order, seller }: { order: InvoiceOrder; seller
|
||||
{seller.registerCourt && seller.registerNumber ? ` · ${seller.registerCourt} · ${seller.registerNumber}` : ""}
|
||||
{seller.managingDirector ? ` · Geschäftsführung: ${seller.managingDirector}` : ""}
|
||||
</Text>
|
||||
{seller.bankDetails ? <Text style={{ marginTop: 4 }}>Bankverbindung (für Überweisung): {seller.bankDetails}</Text> : null}
|
||||
{/* Always shown when set, regardless of payment method — not
|
||||
gated on "Überweisung" specifically (a customer who paid by
|
||||
card can still want the seller's bank details for other
|
||||
reasons, e.g. a refund) — see this package's README. */}
|
||||
{(seller.iban || seller.bic) && (
|
||||
<Text style={{ marginTop: 4 }}>
|
||||
Bankverbindung: {[seller.iban && `IBAN ${seller.iban}`, seller.bic && `BIC ${seller.bic}`].filter(Boolean).join(" · ")}
|
||||
</Text>
|
||||
)}
|
||||
</View>
|
||||
</Page>
|
||||
</Document>
|
||||
|
||||
Reference in New Issue
Block a user