update
This commit is contained in:
@@ -451,7 +451,7 @@ export default function BestellungDetail() {
|
||||
|
||||
// ── Line items table ──
|
||||
const steuersatz = (parseFloat(String(bestellung.steuersatz)) || 20) / 100;
|
||||
const hasPrices = positionen.some((p) => p.einzelpreis != null);
|
||||
const hasPrices = positionen.some((p) => p.einzelpreis != null && p.einzelpreis > 0);
|
||||
|
||||
const totalNetto = positionen.reduce((sum, p) => {
|
||||
const ep = p.einzelpreis != null ? parseFloat(String(p.einzelpreis)) : 0;
|
||||
@@ -482,7 +482,7 @@ export default function BestellungDetail() {
|
||||
head: [['Bezeichnung', 'Art.-Nr.', 'Menge', 'Einzelpreis', 'Gesamt']],
|
||||
body: rows,
|
||||
startY: curY,
|
||||
theme: 'grid',
|
||||
theme: 'striped',
|
||||
headStyles: { fillColor: [66, 66, 66], textColor: 255, fontStyle: 'bold' },
|
||||
alternateRowStyles: { fillColor: [245, 245, 245] },
|
||||
margin: { left: 10, right: 10 },
|
||||
@@ -525,7 +525,7 @@ export default function BestellungDetail() {
|
||||
head: [['Bezeichnung', 'Art.-Nr.', 'Menge']],
|
||||
body: rows,
|
||||
startY: curY,
|
||||
theme: 'grid',
|
||||
theme: 'striped',
|
||||
headStyles: { fillColor: [66, 66, 66], textColor: 255, fontStyle: 'bold' },
|
||||
alternateRowStyles: { fillColor: [245, 245, 245] },
|
||||
margin: { left: 10, right: 10 },
|
||||
@@ -897,19 +897,9 @@ export default function BestellungDetail() {
|
||||
</TableRow>
|
||||
</React.Fragment>
|
||||
) : (
|
||||
<TableRow key={p.id}>
|
||||
<TableCell>
|
||||
<Box>
|
||||
{p.bezeichnung}
|
||||
{p.spezifikationen && p.spezifikationen.length > 0 && (
|
||||
<Box sx={{ pl: 2, mt: 0.5 }}>
|
||||
{p.spezifikationen.map((spec, i) => (
|
||||
<Typography key={i} variant="caption" color="text.secondary" display="block">• {spec}</Typography>
|
||||
))}
|
||||
</Box>
|
||||
)}
|
||||
</Box>
|
||||
</TableCell>
|
||||
<React.Fragment key={p.id}>
|
||||
<TableRow>
|
||||
<TableCell>{p.bezeichnung}</TableCell>
|
||||
<TableCell>{p.artikelnummer || '–'}</TableCell>
|
||||
<TableCell align="right">{p.menge}</TableCell>
|
||||
<TableCell>{p.einheit}</TableCell>
|
||||
@@ -931,6 +921,16 @@ export default function BestellungDetail() {
|
||||
)}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
{p.spezifikationen && p.spezifikationen.length > 0 && (
|
||||
<TableRow>
|
||||
<TableCell colSpan={7} sx={{ pt: 0, pb: 1, pl: 4, borderTop: 'none' }}>
|
||||
{p.spezifikationen.map((spec, i) => (
|
||||
<Typography key={i} variant="caption" color="text.secondary" display="block">• {spec}</Typography>
|
||||
))}
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
)}
|
||||
</React.Fragment>
|
||||
),
|
||||
)}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user