ztechno_core 0.0.134 → 0.0.136

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.
@@ -880,20 +880,18 @@ class InvoiceService {
880
880
  // === LINE ITEMS TABLE (Dutch law: description, quantity, unit price excl. VAT, VAT rate, total) ===
881
881
  const tableTop = doc.y;
882
882
  const col1 = 50; // Description
883
- const col2 = 280; // Qty
884
- const col3 = 330; // VAT %
883
+ const col2 = 280; // VAT %
884
+ const col3 = hideProductPrice ? 480 : 330; // Qty (wider spacing when price cols hidden)
885
885
  const col4 = 390; // Unit price (excl. VAT)
886
886
  const col5 = 480; // Total Ex. VAT
887
887
  doc.fontSize(9).font('Helvetica-Bold');
888
888
  doc.text('Product / Dienst', col1, tableTop);
889
- if (!hideProductPrice) {
890
- doc.text('Aantal', col2, tableTop);
891
- }
892
- doc.text('BTW %', col3, tableTop);
889
+ doc.text('BTW %', col2, tableTop);
890
+ doc.text('Aantal', col3, tableTop);
893
891
  if (!hideProductPrice) {
894
892
  doc.text('Prijs excl.', col4, tableTop);
893
+ doc.text('Totaal excl.', col5, tableTop);
895
894
  }
896
- doc.text('Totaal excl.', col5, tableTop);
897
895
  doc.font('Helvetica');
898
896
  doc
899
897
  .moveTo(50, tableTop + 14)
@@ -956,14 +954,12 @@ class InvoiceService {
956
954
  vatByRate[vatRate].vat += lineTotal - lineSubtotal;
957
955
  P.size(9);
958
956
  doc.text(item.description, col1, P.y, { width: 225 });
959
- if (!hideProductPrice) {
960
- doc.text(String(item.quantity), col2, P.y);
961
- }
962
- doc.text(`${vatRate.toFixed(0)}%`, col3, P.y);
957
+ doc.text(`${vatRate.toFixed(0)}%`, col2, P.y);
958
+ doc.text(`X ${item.quantity}`, col3, P.y);
963
959
  if (!hideProductPrice) {
964
960
  doc.text(this.formatMoney(Number(item.unit_price), invoice.currency), col4, P.y);
961
+ doc.text(this.formatMoney(lineSubtotal, invoice.currency), col5, P.y);
965
962
  }
966
- doc.text(this.formatMoney(lineSubtotal, invoice.currency), col5, P.y);
967
963
  P.skip(16);
968
964
  }
969
965
  P.rule().skip(10);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ztechno_core",
3
- "version": "0.0.134",
3
+ "version": "0.0.136",
4
4
  "description": "Core files for ztechno framework",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",