update
This commit is contained in:
@@ -488,11 +488,9 @@ export default function BestellungDetail() {
|
|||||||
margin: { left: 10, right: 10 },
|
margin: { left: 10, right: 10 },
|
||||||
styles: { fontSize: 9, cellPadding: 2 },
|
styles: { fontSize: 9, cellPadding: 2 },
|
||||||
columnStyles: {
|
columnStyles: {
|
||||||
0: { cellWidth: 60 },
|
2: { halign: 'right' },
|
||||||
1: { cellWidth: 28 },
|
3: { halign: 'right' },
|
||||||
2: { cellWidth: 25, halign: 'right' },
|
4: { halign: 'right' },
|
||||||
3: { cellWidth: 30, halign: 'right' },
|
|
||||||
4: { cellWidth: 30, halign: 'right' },
|
|
||||||
},
|
},
|
||||||
didParseCell: (data: any) => {
|
didParseCell: (data: any) => {
|
||||||
if (data.section === 'body') {
|
if (data.section === 'body') {
|
||||||
@@ -504,6 +502,17 @@ export default function BestellungDetail() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
didDrawCell: (data: any) => {
|
||||||
|
if (data.section === 'body' && data.column.index === 0) {
|
||||||
|
const cell0 = String(data.row.raw?.[0] ?? '');
|
||||||
|
if (!cell0.startsWith(' •') && data.row.index > 0) {
|
||||||
|
const { doc, row, settings } = data;
|
||||||
|
doc.setDrawColor(200, 200, 200);
|
||||||
|
doc.setLineWidth(0.2);
|
||||||
|
doc.line(settings.margin.left, row.y, doc.internal.pageSize.width - settings.margin.right, row.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
foot: [
|
foot: [
|
||||||
['', '', '', 'Netto:', formatCurrency(totalNetto)],
|
['', '', '', 'Netto:', formatCurrency(totalNetto)],
|
||||||
['', '', '', `Brutto (${bestellung.steuersatz ?? 20}% USt.):`, formatCurrency(totalBrutto)],
|
['', '', '', `Brutto (${bestellung.steuersatz ?? 20}% USt.):`, formatCurrency(totalBrutto)],
|
||||||
@@ -531,9 +540,7 @@ export default function BestellungDetail() {
|
|||||||
margin: { left: 10, right: 10 },
|
margin: { left: 10, right: 10 },
|
||||||
styles: { fontSize: 9, cellPadding: 2 },
|
styles: { fontSize: 9, cellPadding: 2 },
|
||||||
columnStyles: {
|
columnStyles: {
|
||||||
0: { cellWidth: 100 },
|
2: { halign: 'right' },
|
||||||
1: { cellWidth: 40 },
|
|
||||||
2: { cellWidth: 33, halign: 'right' },
|
|
||||||
},
|
},
|
||||||
didParseCell: (data: any) => {
|
didParseCell: (data: any) => {
|
||||||
if (data.section === 'body') {
|
if (data.section === 'body') {
|
||||||
@@ -545,6 +552,17 @@ export default function BestellungDetail() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
didDrawCell: (data: any) => {
|
||||||
|
if (data.section === 'body' && data.column.index === 0) {
|
||||||
|
const cell0 = String(data.row.raw?.[0] ?? '');
|
||||||
|
if (!cell0.startsWith(' •') && data.row.index > 0) {
|
||||||
|
const { doc, row, settings } = data;
|
||||||
|
doc.setDrawColor(200, 200, 200);
|
||||||
|
doc.setLineWidth(0.2);
|
||||||
|
doc.line(settings.margin.left, row.y, doc.internal.pageSize.width - settings.margin.right, row.y);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
didDrawPage: addPdfFooter(doc, settings),
|
didDrawPage: addPdfFooter(doc, settings),
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user