Show Netto on every invoice, not just non-exempt ones
Validate e-invoices / mustang (push) Successful in 23s
Validate e-invoices / mustang (push) Successful in 23s
Netto/Gesamt/MwSt breakdown was gated on !order.vatExempt — on a vatExempt (innergemeinschaftliche Lieferung) invoice, Netto happens to equal Gesamt exactly (0% tax), which read as redundant next to the exemption note, so the row was skipped there. Turns out that's wrong: the ask was for Netto on every invoice this shop issues, B2B/exempt included, for layout consistency — not conditional on the tax rate. Same fix in both invoicePdf.tsx and correctionInvoicePdf.tsx (the latter covers both Storno and Gutschrift via the same summary code). Verified by rendering all three cases (normal 19% invoice, exempt B2B invoice, Storno correction) and visually inspecting the output. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -76,6 +76,9 @@ const styles = StyleSheet.create({
|
||||
grandTotalRow: { flexDirection: "row", justifyContent: "space-between", paddingTop: 8, marginTop: 6, borderTopWidth: 1, borderTopColor: BORDER },
|
||||
grandTotalLabel: { fontSize: 12, fontFamily: "Helvetica-Bold" },
|
||||
grandTotalValue: { fontSize: 12, fontFamily: "Helvetica-Bold" },
|
||||
// Netto, right under Gesamt — a bit of top margin to read as its own
|
||||
// line following the total, not crowded against the divider above it.
|
||||
nettoRow: { flexDirection: "row", justifyContent: "space-between", paddingVertical: 2, marginTop: 6 },
|
||||
// "Enthält X% MwSt.: Y €" annotations under Gesamt — same "contained
|
||||
// within the total, not an additional deduction" framing the website's
|
||||
// own VatBreakdown component already uses on /cart and /checkout.
|
||||
@@ -380,6 +383,19 @@ export function InvoiceDocument({ order, seller }: { order: InvoiceOrder; seller
|
||||
<Text style={styles.grandTotalLabel}>Gesamt</Text>
|
||||
<Text style={styles.grandTotalValue}>{formatPrice(order.total)}</Text>
|
||||
</View>
|
||||
{/* Netto (Gesamt minus every rate's own tax, summed — a
|
||||
single well-defined figure regardless of how many
|
||||
distinct rates the order actually has) — businesses read
|
||||
this off the invoice directly for their own input-tax
|
||||
deduction instead of having to compute Gesamt minus MwSt
|
||||
by hand. Shown on every invoice, not just B2B/non-exempt
|
||||
ones — on a vatExempt order Netto and Gesamt happen to be
|
||||
the same figure (0% tax), but the row stays for layout
|
||||
consistency across every invoice this shop issues. */}
|
||||
<View style={styles.nettoRow}>
|
||||
<Text style={styles.summaryLabel}>Netto</Text>
|
||||
<Text style={styles.summaryValue}>{formatPrice(rateGroups.reduce((sum, g) => sum + g.net, 0))}</Text>
|
||||
</View>
|
||||
<View style={styles.vatNotes}>
|
||||
{/* Exempt orders already have every item at 0% (see this
|
||||
file's own InvoiceOrder.vatExempt comment) — "enthält
|
||||
|
||||
Reference in New Issue
Block a user