update
This commit is contained in:
@@ -451,7 +451,7 @@ export default function BestellungDetail() {
|
|||||||
|
|
||||||
// ── Line items table ──
|
// ── Line items table ──
|
||||||
const steuersatz = (parseFloat(String(bestellung.steuersatz)) || 20) / 100;
|
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 totalNetto = positionen.reduce((sum, p) => {
|
||||||
const ep = p.einzelpreis != null ? parseFloat(String(p.einzelpreis)) : 0;
|
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']],
|
head: [['Bezeichnung', 'Art.-Nr.', 'Menge', 'Einzelpreis', 'Gesamt']],
|
||||||
body: rows,
|
body: rows,
|
||||||
startY: curY,
|
startY: curY,
|
||||||
theme: 'grid',
|
theme: 'striped',
|
||||||
headStyles: { fillColor: [66, 66, 66], textColor: 255, fontStyle: 'bold' },
|
headStyles: { fillColor: [66, 66, 66], textColor: 255, fontStyle: 'bold' },
|
||||||
alternateRowStyles: { fillColor: [245, 245, 245] },
|
alternateRowStyles: { fillColor: [245, 245, 245] },
|
||||||
margin: { left: 10, right: 10 },
|
margin: { left: 10, right: 10 },
|
||||||
@@ -525,7 +525,7 @@ export default function BestellungDetail() {
|
|||||||
head: [['Bezeichnung', 'Art.-Nr.', 'Menge']],
|
head: [['Bezeichnung', 'Art.-Nr.', 'Menge']],
|
||||||
body: rows,
|
body: rows,
|
||||||
startY: curY,
|
startY: curY,
|
||||||
theme: 'grid',
|
theme: 'striped',
|
||||||
headStyles: { fillColor: [66, 66, 66], textColor: 255, fontStyle: 'bold' },
|
headStyles: { fillColor: [66, 66, 66], textColor: 255, fontStyle: 'bold' },
|
||||||
alternateRowStyles: { fillColor: [245, 245, 245] },
|
alternateRowStyles: { fillColor: [245, 245, 245] },
|
||||||
margin: { left: 10, right: 10 },
|
margin: { left: 10, right: 10 },
|
||||||
@@ -897,19 +897,9 @@ export default function BestellungDetail() {
|
|||||||
</TableRow>
|
</TableRow>
|
||||||
</React.Fragment>
|
</React.Fragment>
|
||||||
) : (
|
) : (
|
||||||
<TableRow key={p.id}>
|
<React.Fragment key={p.id}>
|
||||||
<TableCell>
|
<TableRow>
|
||||||
<Box>
|
<TableCell>{p.bezeichnung}</TableCell>
|
||||||
{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>
|
|
||||||
<TableCell>{p.artikelnummer || '–'}</TableCell>
|
<TableCell>{p.artikelnummer || '–'}</TableCell>
|
||||||
<TableCell align="right">{p.menge}</TableCell>
|
<TableCell align="right">{p.menge}</TableCell>
|
||||||
<TableCell>{p.einheit}</TableCell>
|
<TableCell>{p.einheit}</TableCell>
|
||||||
@@ -931,6 +921,16 @@ export default function BestellungDetail() {
|
|||||||
)}
|
)}
|
||||||
</TableCell>
|
</TableCell>
|
||||||
</TableRow>
|
</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