ztechno_core 0.0.133 → 0.0.134
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -42,6 +42,7 @@ export declare class InvoiceService {
|
|
|
42
42
|
payTokenSecret: string;
|
|
43
43
|
invoiceNumberMode?: 'sequence' | 'id';
|
|
44
44
|
invoiceNumberFormat?: (id: number) => string;
|
|
45
|
+
hideProductPrice?: boolean;
|
|
45
46
|
});
|
|
46
47
|
/** Returns the audit service for querying audit logs and timeline */
|
|
47
48
|
getAuditService(): InvoiceAuditService;
|
|
@@ -831,6 +831,7 @@ class InvoiceService {
|
|
|
831
831
|
doc.image(logoPath, 50, 50, { width: 150 }); // Left side of A4 page
|
|
832
832
|
}
|
|
833
833
|
const cfg = this.opt.siteConfig;
|
|
834
|
+
const { hideProductPrice } = this.opt;
|
|
834
835
|
// === SUPPLIER INFORMATION (right-aligned, Dutch law: name, address, BTW, KVK) ===
|
|
835
836
|
const rightCol = 320;
|
|
836
837
|
doc.fontSize(18).text(cfg.company.company, rightCol, 50, { width: 230, align: 'right' });
|
|
@@ -885,9 +886,13 @@ class InvoiceService {
|
|
|
885
886
|
const col5 = 480; // Total Ex. VAT
|
|
886
887
|
doc.fontSize(9).font('Helvetica-Bold');
|
|
887
888
|
doc.text('Product / Dienst', col1, tableTop);
|
|
888
|
-
|
|
889
|
+
if (!hideProductPrice) {
|
|
890
|
+
doc.text('Aantal', col2, tableTop);
|
|
891
|
+
}
|
|
889
892
|
doc.text('BTW %', col3, tableTop);
|
|
890
|
-
|
|
893
|
+
if (!hideProductPrice) {
|
|
894
|
+
doc.text('Prijs excl.', col4, tableTop);
|
|
895
|
+
}
|
|
891
896
|
doc.text('Totaal excl.', col5, tableTop);
|
|
892
897
|
doc.font('Helvetica');
|
|
893
898
|
doc
|
|
@@ -951,9 +956,13 @@ class InvoiceService {
|
|
|
951
956
|
vatByRate[vatRate].vat += lineTotal - lineSubtotal;
|
|
952
957
|
P.size(9);
|
|
953
958
|
doc.text(item.description, col1, P.y, { width: 225 });
|
|
954
|
-
|
|
959
|
+
if (!hideProductPrice) {
|
|
960
|
+
doc.text(String(item.quantity), col2, P.y);
|
|
961
|
+
}
|
|
955
962
|
doc.text(`${vatRate.toFixed(0)}%`, col3, P.y);
|
|
956
|
-
|
|
963
|
+
if (!hideProductPrice) {
|
|
964
|
+
doc.text(this.formatMoney(Number(item.unit_price), invoice.currency), col4, P.y);
|
|
965
|
+
}
|
|
957
966
|
doc.text(this.formatMoney(lineSubtotal, invoice.currency), col5, P.y);
|
|
958
967
|
P.skip(16);
|
|
959
968
|
}
|