fix(shop): map correct orderSnapshot and labels in InvoicePDF and routes
All checks were successful
Staging Build / build (push) Successful in 2m51s

This commit is contained in:
DanielS
2026-07-22 17:20:16 +02:00
parent f130f24c86
commit 66d5d8fc98
3 changed files with 5 additions and 9 deletions

View File

@@ -82,11 +82,9 @@ export async function GET(
const buffer = await renderToBuffer(
React.createElement(InvoicePDF, {
orderNumber: order.order_number || `AE-${id.slice(0, 8)}`,
dateStr: formattedDate,
order: order,
orderSnapshot: order.order_data,
customer: order.customer_data,
orderData: order.order_data,
totalPrice: Number(order.total_price),
})
);

View File

@@ -82,11 +82,9 @@ export async function GET(
const buffer = await renderToBuffer(
React.createElement(InvoicePDF, {
orderNumber: order.order_number || `AE-${id.slice(0, 8)}`,
dateStr: formattedDate,
order: order,
orderSnapshot: order.order_data,
customer: order.customer_data,
orderData: order.order_data,
totalPrice: Number(order.total_price),
})
);

View File

@@ -176,7 +176,7 @@ export const InvoicePDF = ({ order, orderSnapshot, customer }: any) => {
<View key={groupIdx} style={{ marginBottom: 12, borderWidth: 1, borderColor: '#e2e8f0', borderRadius: 4, padding: 8, backgroundColor: '#f8fafc' }}>
<View style={{ borderBottomWidth: 1, borderBottomColor: '#cbd5e1', paddingBottom: 4, marginBottom: 6 }}>
<Text style={{ fontSize: 10, fontWeight: 'bold', color: '#1e3a8a' }}>
Kasse: {deviceName}
{deviceName === 'Zusatzleistung' ? 'Backoffice' : `Kasse: ${deviceName}`}
</Text>
</View>
{devItems.map((item: any, idx: number) => (