Show Netto on every invoice, not just non-exempt ones
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:
Marco
2026-07-23 20:58:16 +00:00
parent 83ece1efef
commit 31978d5ea2
2 changed files with 27 additions and 0 deletions
+11
View File
@@ -84,6 +84,8 @@ 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 — same as invoicePdf.tsx's own row.
nettoRow: { flexDirection: "row", justifyContent: "space-between", paddingVertical: 2, marginTop: 6 },
// Same "enthält X% MwSt." annotation-under-Gesamt framing as
// invoicePdf.tsx now uses, fixing the identical double-counting bug this
// file had: the old layout showed Versand as its own row AND ALSO
@@ -335,6 +337,15 @@ function CorrectionInvoiceDocument({ kind, order, seller }: { kind: CorrectionIn
<Text style={styles.grandTotalLabel}>Gesamt</Text>
<Text style={styles.grandTotalValue}>-{formatPrice(grandTotal)}</Text>
</View>
{/* Netto — same reasoning as invoicePdf.tsx's own row: a
single well-defined figure (Gesamt minus every rate's own
tax, summed) regardless of how many rates are present.
Shown on every correction invoice (Storno and Gutschrift
alike), not just non-exempt ones. */}
<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}>
{order.vatExempt ? (
<Text style={styles.vatNoteLabel}>Steuerfreie innergemeinschaftliche Lieferung (§4 Nr. 1b UStG)</Text>
+16
View File
@@ -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