fix(pdf): add gap and minWidth to prevent label-value collision in total rows
All checks were successful
Staging Build / build (push) Successful in 2m41s

This commit is contained in:
DanielS
2026-07-07 09:09:14 +02:00
parent e00acac626
commit cce9812bbc

View File

@@ -230,11 +230,11 @@ export const InvoicePDF = ({ order, orderSnapshot, customer }: any) => {
<Text>zzgl. {taxRate}% USt:</Text>
<Text>{new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(oneTimeTax)}</Text>
</View>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginTop: 5, borderTopWidth: 1, borderTopColor: '#000', paddingTop: 5 }}>
<Text style={styles.totalLabel}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginTop: 5, borderTopWidth: 1, borderTopColor: '#000', paddingTop: 5, gap: 15 }}>
<Text style={[styles.totalLabel, { flexShrink: 1 }]}>
{monthlyNet > 0 ? 'Gesamtbetrag einmalig (brutto):' : 'Gesamtbetrag (brutto):'}
</Text>
<Text style={styles.totalLabel}>
<Text style={[styles.totalLabel, { minWidth: 90, textAlign: 'right' }]}>
{new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(oneTimeGross)}
</Text>
</View>
@@ -258,11 +258,11 @@ export const InvoicePDF = ({ order, orderSnapshot, customer }: any) => {
<Text>zzgl. {taxRate}% USt:</Text>
<Text>{new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(monthlyTax)} / mtl.</Text>
</View>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginTop: 5, borderTopWidth: 1, borderTopColor: '#000', paddingTop: 5 }}>
<Text style={styles.totalLabel}>
<View style={{ flexDirection: 'row', justifyContent: 'space-between', marginTop: 5, borderTopWidth: 1, borderTopColor: '#000', paddingTop: 5, gap: 15 }}>
<Text style={[styles.totalLabel, { flexShrink: 1 }]}>
{oneTimeNet > 0 ? 'Gesamtbetrag monatlich (brutto):' : 'Gesamtbetrag (brutto):'}
</Text>
<Text style={styles.totalLabel}>
<Text style={[styles.totalLabel, { minWidth: 90, textAlign: 'right' }]}>
{new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR' }).format(monthlyGross)} / mtl.
</Text>
</View>