@endora-commerce/mod-invoices 0.106.0 → 0.108.0

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.
Files changed (174) hide show
  1. package/README.md +7 -8
  2. package/dist/admin/components/InvoiceSectionTabs.d.ts +8 -0
  3. package/dist/admin/components/InvoiceSectionTabs.d.ts.map +1 -1
  4. package/dist/admin/components/InvoiceSectionTabs.js +13 -2
  5. package/dist/admin/components/InvoiceSectionTabs.js.map +1 -1
  6. package/dist/admin/document-blocks/InvoiceDivider.d.ts +5 -0
  7. package/dist/admin/document-blocks/InvoiceDivider.d.ts.map +1 -0
  8. package/dist/admin/document-blocks/InvoiceDivider.js +5 -0
  9. package/dist/admin/document-blocks/InvoiceDivider.js.map +1 -0
  10. package/dist/admin/document-blocks/InvoiceFooter.d.ts +5 -0
  11. package/dist/admin/document-blocks/InvoiceFooter.d.ts.map +1 -0
  12. package/dist/admin/document-blocks/InvoiceFooter.js +5 -0
  13. package/dist/admin/document-blocks/InvoiceFooter.js.map +1 -0
  14. package/dist/admin/document-blocks/InvoiceHeader.d.ts +5 -0
  15. package/dist/admin/document-blocks/InvoiceHeader.d.ts.map +1 -0
  16. package/dist/admin/document-blocks/InvoiceHeader.js +5 -0
  17. package/dist/admin/document-blocks/InvoiceHeader.js.map +1 -0
  18. package/dist/admin/document-blocks/InvoiceLineItems.d.ts +5 -0
  19. package/dist/admin/document-blocks/InvoiceLineItems.d.ts.map +1 -0
  20. package/dist/admin/document-blocks/InvoiceLineItems.js +5 -0
  21. package/dist/admin/document-blocks/InvoiceLineItems.js.map +1 -0
  22. package/dist/admin/document-blocks/InvoiceLogo.d.ts +5 -0
  23. package/dist/admin/document-blocks/InvoiceLogo.d.ts.map +1 -0
  24. package/dist/admin/document-blocks/InvoiceLogo.js +5 -0
  25. package/dist/admin/document-blocks/InvoiceLogo.js.map +1 -0
  26. package/dist/admin/document-blocks/InvoiceNotes.d.ts +5 -0
  27. package/dist/admin/document-blocks/InvoiceNotes.d.ts.map +1 -0
  28. package/dist/admin/document-blocks/InvoiceNotes.js +5 -0
  29. package/dist/admin/document-blocks/InvoiceNotes.js.map +1 -0
  30. package/dist/admin/document-blocks/InvoiceParties.d.ts +5 -0
  31. package/dist/admin/document-blocks/InvoiceParties.d.ts.map +1 -0
  32. package/dist/admin/document-blocks/InvoiceParties.js +5 -0
  33. package/dist/admin/document-blocks/InvoiceParties.js.map +1 -0
  34. package/dist/admin/document-blocks/InvoiceSpacer.d.ts +5 -0
  35. package/dist/admin/document-blocks/InvoiceSpacer.d.ts.map +1 -0
  36. package/dist/admin/document-blocks/InvoiceSpacer.js +5 -0
  37. package/dist/admin/document-blocks/InvoiceSpacer.js.map +1 -0
  38. package/dist/admin/document-blocks/InvoiceTotals.d.ts +5 -0
  39. package/dist/admin/document-blocks/InvoiceTotals.d.ts.map +1 -0
  40. package/dist/admin/document-blocks/InvoiceTotals.js +5 -0
  41. package/dist/admin/document-blocks/InvoiceTotals.js.map +1 -0
  42. package/dist/admin/document-blocks/InvoiceVatSummary.d.ts +5 -0
  43. package/dist/admin/document-blocks/InvoiceVatSummary.d.ts.map +1 -0
  44. package/dist/admin/document-blocks/InvoiceVatSummary.js +5 -0
  45. package/dist/admin/document-blocks/InvoiceVatSummary.js.map +1 -0
  46. package/dist/admin/index.d.ts +3 -1
  47. package/dist/admin/index.d.ts.map +1 -1
  48. package/dist/admin/index.js +62 -2
  49. package/dist/admin/index.js.map +1 -1
  50. package/dist/admin/pages/InvoiceDetail.d.ts.map +1 -1
  51. package/dist/admin/pages/InvoiceDetail.js +3 -1
  52. package/dist/admin/pages/InvoiceDetail.js.map +1 -1
  53. package/dist/admin/pages/InvoiceTemplatesRedirect.d.ts +10 -0
  54. package/dist/admin/pages/InvoiceTemplatesRedirect.d.ts.map +1 -0
  55. package/dist/admin/pages/InvoiceTemplatesRedirect.js +14 -0
  56. package/dist/admin/pages/InvoiceTemplatesRedirect.js.map +1 -0
  57. package/dist/admin/templates/invoice-puck-config.d.ts +7 -21
  58. package/dist/admin/templates/invoice-puck-config.d.ts.map +1 -1
  59. package/dist/admin/templates/invoice-puck-config.js +13 -27
  60. package/dist/admin/templates/invoice-puck-config.js.map +1 -1
  61. package/dist/backend/document/block-descriptions.d.ts +22 -0
  62. package/dist/backend/document/block-descriptions.d.ts.map +1 -0
  63. package/dist/backend/{pdf-components/descriptor.js → document/block-descriptions.js} +8 -24
  64. package/dist/backend/document/block-descriptions.js.map +1 -0
  65. package/dist/backend/document/document-templates-grant.d.ts +29 -0
  66. package/dist/backend/document/document-templates-grant.d.ts.map +1 -0
  67. package/dist/backend/document/document-templates-grant.js +45 -0
  68. package/dist/backend/document/document-templates-grant.js.map +1 -0
  69. package/dist/backend/document/invoice-document-type.d.ts +38 -0
  70. package/dist/backend/document/invoice-document-type.d.ts.map +1 -0
  71. package/dist/backend/document/invoice-document-type.js +108 -0
  72. package/dist/backend/document/invoice-document-type.js.map +1 -0
  73. package/dist/backend/document/render-invoice.d.ts +14 -0
  74. package/dist/backend/document/render-invoice.d.ts.map +1 -0
  75. package/dist/backend/document/render-invoice.js +24 -0
  76. package/dist/backend/document/render-invoice.js.map +1 -0
  77. package/dist/backend/entities/invoice.entity.d.ts +13 -0
  78. package/dist/backend/entities/invoice.entity.d.ts.map +1 -1
  79. package/dist/backend/entities/invoice.entity.js +10 -0
  80. package/dist/backend/entities/invoice.entity.js.map +1 -1
  81. package/dist/backend/index.d.ts +1 -3
  82. package/dist/backend/index.d.ts.map +1 -1
  83. package/dist/backend/index.js +76 -5
  84. package/dist/backend/index.js.map +1 -1
  85. package/dist/backend/pdf-components/sections.d.ts +7 -1
  86. package/dist/backend/pdf-components/sections.d.ts.map +1 -1
  87. package/dist/backend/pdf-components/sections.js +10 -1
  88. package/dist/backend/pdf-components/sections.js.map +1 -1
  89. package/dist/backend/pdf-components/tree-mapper.d.ts +5 -21
  90. package/dist/backend/pdf-components/tree-mapper.d.ts.map +1 -1
  91. package/dist/backend/pdf-components/tree-mapper.js +8 -44
  92. package/dist/backend/pdf-components/tree-mapper.js.map +1 -1
  93. package/dist/backend/plugin.d.ts +12 -13
  94. package/dist/backend/plugin.d.ts.map +1 -1
  95. package/dist/backend/plugin.js +4 -17
  96. package/dist/backend/plugin.js.map +1 -1
  97. package/dist/backend/routes.admin.d.ts +3 -5
  98. package/dist/backend/routes.admin.d.ts.map +1 -1
  99. package/dist/backend/routes.admin.js +8 -53
  100. package/dist/backend/routes.admin.js.map +1 -1
  101. package/dist/backend/routes.customer.d.ts +3 -5
  102. package/dist/backend/routes.customer.d.ts.map +1 -1
  103. package/dist/backend/routes.customer.js +3 -3
  104. package/dist/backend/routes.customer.js.map +1 -1
  105. package/dist/backend/services/auto-issue-reactor.d.ts.map +1 -1
  106. package/dist/backend/services/auto-issue-reactor.js +11 -0
  107. package/dist/backend/services/auto-issue-reactor.js.map +1 -1
  108. package/dist/backend/services/corrective-invoice.d.ts +90 -0
  109. package/dist/backend/services/corrective-invoice.d.ts.map +1 -1
  110. package/dist/backend/services/corrective-invoice.js +275 -63
  111. package/dist/backend/services/corrective-invoice.js.map +1 -1
  112. package/dist/backend/services/invoice-email-dispatch.d.ts +7 -3
  113. package/dist/backend/services/invoice-email-dispatch.d.ts.map +1 -1
  114. package/dist/backend/services/invoice-email-dispatch.js +2 -1
  115. package/dist/backend/services/invoice-email-dispatch.js.map +1 -1
  116. package/dist/backend/services/invoice-line-builder.d.ts +63 -13
  117. package/dist/backend/services/invoice-line-builder.d.ts.map +1 -1
  118. package/dist/backend/services/invoice-line-builder.js +79 -28
  119. package/dist/backend/services/invoice-line-builder.js.map +1 -1
  120. package/dist/backend/services/invoice-service.d.ts +14 -1
  121. package/dist/backend/services/invoice-service.d.ts.map +1 -1
  122. package/dist/backend/services/invoice-service.js +64 -54
  123. package/dist/backend/services/invoice-service.js.map +1 -1
  124. package/dist/manifest.d.ts +7 -3
  125. package/dist/manifest.d.ts.map +1 -1
  126. package/dist/manifest.js +45 -19
  127. package/dist/manifest.js.map +1 -1
  128. package/dist/migrations/20261017T075839_invoices_drop_invoice_templates.d.ts +20 -0
  129. package/dist/migrations/20261017T075839_invoices_drop_invoice_templates.d.ts.map +1 -0
  130. package/dist/migrations/20261017T075839_invoices_drop_invoice_templates.js +43 -0
  131. package/dist/migrations/20261017T075839_invoices_drop_invoice_templates.js.map +1 -0
  132. package/dist/migrations/20261024T145631_invoices_vat_summary.d.ts +18 -0
  133. package/dist/migrations/20261024T145631_invoices_vat_summary.d.ts.map +1 -0
  134. package/dist/migrations/20261024T145631_invoices_vat_summary.js +22 -0
  135. package/dist/migrations/20261024T145631_invoices_vat_summary.js.map +1 -0
  136. package/dist/migrations/index.d.ts +3 -1
  137. package/dist/migrations/index.d.ts.map +1 -1
  138. package/dist/migrations/index.js +5 -1
  139. package/dist/migrations/index.js.map +1 -1
  140. package/docs/invoices.md +44 -14
  141. package/i18n/en.json +4 -3
  142. package/i18n/pl.json +4 -3
  143. package/package.json +13 -13
  144. package/dist/admin/pages/InvoiceTemplateEditor.d.ts +0 -11
  145. package/dist/admin/pages/InvoiceTemplateEditor.d.ts.map +0 -1
  146. package/dist/admin/pages/InvoiceTemplateEditor.js +0 -189
  147. package/dist/admin/pages/InvoiceTemplateEditor.js.map +0 -1
  148. package/dist/admin/pages/InvoiceTemplatesPage.d.ts +0 -10
  149. package/dist/admin/pages/InvoiceTemplatesPage.d.ts.map +0 -1
  150. package/dist/admin/pages/InvoiceTemplatesPage.js +0 -60
  151. package/dist/admin/pages/InvoiceTemplatesPage.js.map +0 -1
  152. package/dist/admin/templates/described-blocks.d.ts +0 -67
  153. package/dist/admin/templates/described-blocks.d.ts.map +0 -1
  154. package/dist/admin/templates/described-blocks.js +0 -83
  155. package/dist/admin/templates/described-blocks.js.map +0 -1
  156. package/dist/admin/templates/invoice-builder-plugin.d.ts +0 -4
  157. package/dist/admin/templates/invoice-builder-plugin.d.ts.map +0 -1
  158. package/dist/admin/templates/invoice-builder-plugin.js +0 -12
  159. package/dist/admin/templates/invoice-builder-plugin.js.map +0 -1
  160. package/dist/backend/entities/invoice-template.entity.d.ts +0 -22
  161. package/dist/backend/entities/invoice-template.entity.d.ts.map +0 -1
  162. package/dist/backend/entities/invoice-template.entity.js +0 -84
  163. package/dist/backend/entities/invoice-template.entity.js.map +0 -1
  164. package/dist/backend/pdf-components/descriptor.d.ts +0 -29
  165. package/dist/backend/pdf-components/descriptor.d.ts.map +0 -1
  166. package/dist/backend/pdf-components/descriptor.js.map +0 -1
  167. package/dist/backend/services/invoice-pdf-renderer.d.ts +0 -57
  168. package/dist/backend/services/invoice-pdf-renderer.d.ts.map +0 -1
  169. package/dist/backend/services/invoice-pdf-renderer.js +0 -158
  170. package/dist/backend/services/invoice-pdf-renderer.js.map +0 -1
  171. package/dist/backend/services/invoice-template-service.d.ts +0 -43
  172. package/dist/backend/services/invoice-template-service.d.ts.map +0 -1
  173. package/dist/backend/services/invoice-template-service.js +0 -147
  174. package/dist/backend/services/invoice-template-service.js.map +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"manifest.js","sourceRoot":"","sources":["../src/manifest.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,oBAAoB,EAAE,4BAA4B,EAAE,MAAM,4BAA4B,CAAC;AAEhG;;;;;;;;GAQG;AAEH,MAAM,CAAC,MAAM,sBAAsB,GAAG;IACpC,aAAa,EAAE,wBAAwB;IACvC,mBAAmB,EAAE,8BAA8B;IACnD,yBAAyB,EAAE,oCAAoC;IAC/D,mBAAmB,EAAE,8BAA8B;IACnD,mBAAmB,EAAE,8BAA8B;IACnD,yBAAyB,EAAE,oCAAoC;IAC/D,0BAA0B,EAAE,qCAAqC;IACjE,4BAA4B,EAAE,uCAAuC;IACrE,mBAAmB,EAAE,8BAA8B;CAC3C,CAAC;AAEX,MAAM,CAAC,MAAM,wBAAwB,GAAG,4BAA4B,CAAC;IACnE,UAAU,EAAE,UAAU;IACtB,MAAM,EAAE,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,IAAI,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} from '@mikro-orm/migrations';
2
+ /**
3
+ * Drops `invoice_templates` (`specs/152-compare-pdf-template/`, owner answer P2).
4
+ *
5
+ * Invoice PDF layouts moved onto the `document_templates` facility: the
6
+ * invoice document type's built-in layout replaced the seeded "generic"
7
+ * template, and an operator designs further invoice templates in *Document
8
+ * templates*. Nobody had custom invoice templates, so nothing is carried over —
9
+ * the owner ruled the import out — and the table, which only this module ever
10
+ * wrote, goes with its entity, service and routes.
11
+ *
12
+ * `down` recreates the empty table with the shape the module's first migration
13
+ * gave it (the generic row the old code seeded at boot is not restored: that
14
+ * code is gone).
15
+ */
16
+ export declare class Migration20261017T075839InvoicesDropInvoiceTemplates extends Migration {
17
+ up(): Promise<void>;
18
+ down(): Promise<void>;
19
+ }
20
+ //# sourceMappingURL=20261017T075839_invoices_drop_invoice_templates.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261017T075839_invoices_drop_invoice_templates.d.ts","sourceRoot":"","sources":["../../src/migrations/20261017T075839_invoices_drop_invoice_templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;;;;;GAaG;AACH,qBAAa,oDAAqD,SAAQ,SAAS;IAClE,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CA0BrC"}
@@ -0,0 +1,43 @@
1
+ import { Migration } from '@mikro-orm/migrations';
2
+ /**
3
+ * Drops `invoice_templates` (`specs/152-compare-pdf-template/`, owner answer P2).
4
+ *
5
+ * Invoice PDF layouts moved onto the `document_templates` facility: the
6
+ * invoice document type's built-in layout replaced the seeded "generic"
7
+ * template, and an operator designs further invoice templates in *Document
8
+ * templates*. Nobody had custom invoice templates, so nothing is carried over —
9
+ * the owner ruled the import out — and the table, which only this module ever
10
+ * wrote, goes with its entity, service and routes.
11
+ *
12
+ * `down` recreates the empty table with the shape the module's first migration
13
+ * gave it (the generic row the old code seeded at boot is not restored: that
14
+ * code is gone).
15
+ */
16
+ export class Migration20261017T075839InvoicesDropInvoiceTemplates extends Migration {
17
+ async up() {
18
+ this.addSql(`drop table if exists "invoice_templates";`);
19
+ }
20
+ async down() {
21
+ this.addSql(`
22
+ create table if not exists "invoice_templates" (
23
+ "id" uuid not null,
24
+ "code" varchar(180) not null,
25
+ "name" varchar(200) not null,
26
+ "sales_channel_id" uuid null,
27
+ "content" jsonb not null,
28
+ "languages" jsonb not null,
29
+ "active" boolean not null default true,
30
+ "is_system" boolean not null default false,
31
+ "version" int not null default 1,
32
+ "created_at" timestamptz not null,
33
+ "updated_at" timestamptz not null,
34
+ constraint "invoice_templates_pkey" primary key ("id")
35
+ );
36
+ `);
37
+ this.addSql(`create index if not exists "invoice_templates_code_idx" on "invoice_templates" ("code");`);
38
+ this.addSql(`create index if not exists "invoice_templates_sales_channel_idx" on "invoice_templates" ("sales_channel_id");`);
39
+ this.addSql(`create unique index if not exists "invoice_templates_active_scope_uq" on "invoice_templates" ` +
40
+ `(coalesce("sales_channel_id", '00000000-0000-0000-0000-000000000000')) where "active";`);
41
+ }
42
+ }
43
+ //# sourceMappingURL=20261017T075839_invoices_drop_invoice_templates.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261017T075839_invoices_drop_invoice_templates.js","sourceRoot":"","sources":["../../src/migrations/20261017T075839_invoices_drop_invoice_templates.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;;;;;GAaG;AACH,MAAM,OAAO,oDAAqD,SAAQ,SAAS;IACxE,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CAAC,2CAA2C,CAAC,CAAC;IAC3D,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC;;;;;;;;;;;;;;;KAeX,CAAC,CAAC;QACH,IAAI,CAAC,MAAM,CAAC,0FAA0F,CAAC,CAAC;QACxG,IAAI,CAAC,MAAM,CACT,+GAA+G,CAChH,CAAC;QACF,IAAI,CAAC,MAAM,CACT,+FAA+F;YAC7F,wFAAwF,CAC3F,CAAC;IACJ,CAAC;CACF"}
@@ -0,0 +1,18 @@
1
+ import { Migration } from '@mikro-orm/migrations';
2
+ /**
3
+ * Issue #417 (owner rulings of 2026-10-24, review of PR #423) —
4
+ * `invoices.vat_summary`: the per-rate VAT summary a document was issued with,
5
+ * as two-place decimal strings (`[{ taxRate, netTotal, vatAmount, grossTotal }]`).
6
+ *
7
+ * Written by issuance and by a correction from 0.108.0. A document's line
8
+ * grosses are each line's own rounding and need not add up to its total, so its
9
+ * summary cannot be derived back from its lines; it is stored instead. Nullable,
10
+ * no backfill: `null` is a document issued before (or imported from an ERP),
11
+ * whose summary is derived from its stored lines exactly as it was then — so
12
+ * the presence of the column's value is what decides, never a guess.
13
+ */
14
+ export declare class Migration20261024T145631InvoicesVatSummary extends Migration {
15
+ up(): Promise<void>;
16
+ down(): Promise<void>;
17
+ }
18
+ //# sourceMappingURL=20261024T145631_invoices_vat_summary.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261024T145631_invoices_vat_summary.d.ts","sourceRoot":"","sources":["../../src/migrations/20261024T145631_invoices_vat_summary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,qBAAa,0CAA2C,SAAQ,SAAS;IACxD,EAAE,IAAI,OAAO,CAAC,IAAI,CAAC;IAInB,IAAI,IAAI,OAAO,CAAC,IAAI,CAAC;CAGrC"}
@@ -0,0 +1,22 @@
1
+ import { Migration } from '@mikro-orm/migrations';
2
+ /**
3
+ * Issue #417 (owner rulings of 2026-10-24, review of PR #423) —
4
+ * `invoices.vat_summary`: the per-rate VAT summary a document was issued with,
5
+ * as two-place decimal strings (`[{ taxRate, netTotal, vatAmount, grossTotal }]`).
6
+ *
7
+ * Written by issuance and by a correction from 0.108.0. A document's line
8
+ * grosses are each line's own rounding and need not add up to its total, so its
9
+ * summary cannot be derived back from its lines; it is stored instead. Nullable,
10
+ * no backfill: `null` is a document issued before (or imported from an ERP),
11
+ * whose summary is derived from its stored lines exactly as it was then — so
12
+ * the presence of the column's value is what decides, never a guess.
13
+ */
14
+ export class Migration20261024T145631InvoicesVatSummary extends Migration {
15
+ async up() {
16
+ this.addSql('alter table "invoices" add column if not exists "vat_summary" jsonb null;');
17
+ }
18
+ async down() {
19
+ this.addSql('alter table "invoices" drop column if exists "vat_summary";');
20
+ }
21
+ }
22
+ //# sourceMappingURL=20261024T145631_invoices_vat_summary.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"20261024T145631_invoices_vat_summary.js","sourceRoot":"","sources":["../../src/migrations/20261024T145631_invoices_vat_summary.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,uBAAuB,CAAC;AAElD;;;;;;;;;;;GAWG;AACH,MAAM,OAAO,0CAA2C,SAAQ,SAAS;IAC9D,KAAK,CAAC,EAAE;QACf,IAAI,CAAC,MAAM,CAAC,2EAA2E,CAAC,CAAC;IAC3F,CAAC;IAEQ,KAAK,CAAC,IAAI;QACjB,IAAI,CAAC,MAAM,CAAC,6DAA6D,CAAC,CAAC;IAC7E,CAAC;CACF"}
@@ -27,6 +27,8 @@ import { Migration20260817T201110InvoicesCorrectionIdempotencyKey } from './2026
27
27
  import { Migration20260903T101756InvoicesNamespaceBlockNames } from './20260903T101756_invoices_namespace_block_names.js';
28
28
  import { Migration20260914T133603InvoicesErpImportedSaleDocuments } from './20260914T133603_invoices_erp_imported_sale_documents.js';
29
29
  import { Migration20260926T230239InvoicesImportIdentity } from './20260926T230239_invoices_import_identity.js';
30
+ import { Migration20261017T075839InvoicesDropInvoiceTemplates } from './20261017T075839_invoices_drop_invoice_templates.js';
31
+ import { Migration20261024T145631InvoicesVatSummary } from './20261024T145631_invoices_vat_summary.js';
30
32
  export declare const migrations: (typeof Migration20260629T125121InvoicesModule)[];
31
- export { Migration20260629T125121InvoicesModule, Migration20260801T111000InvoicesGenericTemplateReseed, Migration20260817T201110InvoicesCorrectionIdempotencyKey, Migration20260903T101756InvoicesNamespaceBlockNames, Migration20260914T133603InvoicesErpImportedSaleDocuments, Migration20260926T230239InvoicesImportIdentity, };
33
+ export { Migration20260629T125121InvoicesModule, Migration20260801T111000InvoicesGenericTemplateReseed, Migration20260817T201110InvoicesCorrectionIdempotencyKey, Migration20260903T101756InvoicesNamespaceBlockNames, Migration20260914T133603InvoicesErpImportedSaleDocuments, Migration20260926T230239InvoicesImportIdentity, Migration20261017T075839InvoicesDropInvoiceTemplates, Migration20261024T145631InvoicesVatSummary, };
32
34
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,sCAAsC,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EAAE,qDAAqD,EAAE,MAAM,uDAAuD,CAAC;AAC9H,OAAO,EAAE,wDAAwD,EAAE,MAAM,0DAA0D,CAAC;AACpI,OAAO,EAAE,mDAAmD,EAAE,MAAM,qDAAqD,CAAC;AAC1H,OAAO,EAAE,wDAAwD,EAAE,MAAM,2DAA2D,CAAC;AACrI,OAAO,EAAE,8CAA8C,EAAE,MAAM,+CAA+C,CAAC;AAE/G,eAAO,MAAM,UAAU,mDAOtB,CAAC;AAEF,OAAO,EACL,sCAAsC,EACtC,qDAAqD,EACrD,wDAAwD,EACxD,mDAAmD,EACnD,wDAAwD,EACxD,8CAA8C,GAC/C,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,sCAAsC,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EAAE,qDAAqD,EAAE,MAAM,uDAAuD,CAAC;AAC9H,OAAO,EAAE,wDAAwD,EAAE,MAAM,0DAA0D,CAAC;AACpI,OAAO,EAAE,mDAAmD,EAAE,MAAM,qDAAqD,CAAC;AAC1H,OAAO,EAAE,wDAAwD,EAAE,MAAM,2DAA2D,CAAC;AACrI,OAAO,EAAE,8CAA8C,EAAE,MAAM,+CAA+C,CAAC;AAC/G,OAAO,EAAE,oDAAoD,EAAE,MAAM,sDAAsD,CAAC;AAC5H,OAAO,EAAE,0CAA0C,EAAE,MAAM,2CAA2C,CAAC;AAEvG,eAAO,MAAM,UAAU,mDAStB,CAAC;AAEF,OAAO,EACL,sCAAsC,EACtC,qDAAqD,EACrD,wDAAwD,EACxD,mDAAmD,EACnD,wDAAwD,EACxD,8CAA8C,EAC9C,oDAAoD,EACpD,0CAA0C,GAC3C,CAAC"}
@@ -27,6 +27,8 @@ import { Migration20260817T201110InvoicesCorrectionIdempotencyKey } from './2026
27
27
  import { Migration20260903T101756InvoicesNamespaceBlockNames } from './20260903T101756_invoices_namespace_block_names.js';
28
28
  import { Migration20260914T133603InvoicesErpImportedSaleDocuments } from './20260914T133603_invoices_erp_imported_sale_documents.js';
29
29
  import { Migration20260926T230239InvoicesImportIdentity } from './20260926T230239_invoices_import_identity.js';
30
+ import { Migration20261017T075839InvoicesDropInvoiceTemplates } from './20261017T075839_invoices_drop_invoice_templates.js';
31
+ import { Migration20261024T145631InvoicesVatSummary } from './20261024T145631_invoices_vat_summary.js';
30
32
  export const migrations = [
31
33
  Migration20260629T125121InvoicesModule,
32
34
  Migration20260801T111000InvoicesGenericTemplateReseed,
@@ -34,6 +36,8 @@ export const migrations = [
34
36
  Migration20260903T101756InvoicesNamespaceBlockNames,
35
37
  Migration20260914T133603InvoicesErpImportedSaleDocuments,
36
38
  Migration20260926T230239InvoicesImportIdentity,
39
+ Migration20261017T075839InvoicesDropInvoiceTemplates,
40
+ Migration20261024T145631InvoicesVatSummary,
37
41
  ];
38
- export { Migration20260629T125121InvoicesModule, Migration20260801T111000InvoicesGenericTemplateReseed, Migration20260817T201110InvoicesCorrectionIdempotencyKey, Migration20260903T101756InvoicesNamespaceBlockNames, Migration20260914T133603InvoicesErpImportedSaleDocuments, Migration20260926T230239InvoicesImportIdentity, };
42
+ export { Migration20260629T125121InvoicesModule, Migration20260801T111000InvoicesGenericTemplateReseed, Migration20260817T201110InvoicesCorrectionIdempotencyKey, Migration20260903T101756InvoicesNamespaceBlockNames, Migration20260914T133603InvoicesErpImportedSaleDocuments, Migration20260926T230239InvoicesImportIdentity, Migration20261017T075839InvoicesDropInvoiceTemplates, Migration20261024T145631InvoicesVatSummary, };
39
43
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,sCAAsC,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EAAE,qDAAqD,EAAE,MAAM,uDAAuD,CAAC;AAC9H,OAAO,EAAE,wDAAwD,EAAE,MAAM,0DAA0D,CAAC;AACpI,OAAO,EAAE,mDAAmD,EAAE,MAAM,qDAAqD,CAAC;AAC1H,OAAO,EAAE,wDAAwD,EAAE,MAAM,2DAA2D,CAAC;AACrI,OAAO,EAAE,8CAA8C,EAAE,MAAM,+CAA+C,CAAC;AAE/G,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,sCAAsC;IACtC,qDAAqD;IACrD,wDAAwD;IACxD,mDAAmD;IACnD,wDAAwD;IACxD,8CAA8C;CAC/C,CAAC;AAEF,OAAO,EACL,sCAAsC,EACtC,qDAAqD,EACrD,wDAAwD,EACxD,mDAAmD,EACnD,wDAAwD,EACxD,8CAA8C,GAC/C,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/migrations/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AAEH,OAAO,EAAE,sCAAsC,EAAE,MAAM,sCAAsC,CAAC;AAC9F,OAAO,EAAE,qDAAqD,EAAE,MAAM,uDAAuD,CAAC;AAC9H,OAAO,EAAE,wDAAwD,EAAE,MAAM,0DAA0D,CAAC;AACpI,OAAO,EAAE,mDAAmD,EAAE,MAAM,qDAAqD,CAAC;AAC1H,OAAO,EAAE,wDAAwD,EAAE,MAAM,2DAA2D,CAAC;AACrI,OAAO,EAAE,8CAA8C,EAAE,MAAM,+CAA+C,CAAC;AAC/G,OAAO,EAAE,oDAAoD,EAAE,MAAM,sDAAsD,CAAC;AAC5H,OAAO,EAAE,0CAA0C,EAAE,MAAM,2CAA2C,CAAC;AAEvG,MAAM,CAAC,MAAM,UAAU,GAAG;IACxB,sCAAsC;IACtC,qDAAqD;IACrD,wDAAwD;IACxD,mDAAmD;IACnD,wDAAwD;IACxD,8CAA8C;IAC9C,oDAAoD;IACpD,0CAA0C;CAC3C,CAAC;AAEF,OAAO,EACL,sCAAsC,EACtC,qDAAqD,EACrD,wDAAwD,EACxD,mDAAmD,EACnD,wDAAwD,EACxD,8CAA8C,EAC9C,oDAAoD,EACpD,0CAA0C,GAC3C,CAAC"}
package/docs/invoices.md CHANGED
@@ -25,6 +25,29 @@ dependency-light renderer, persists the bytes through the `assets` module,
25
25
  and writes the asset id back onto the Order. Failures emit
26
26
  `invoice.generation_failed.v1` for an admin retry queue.
27
27
 
28
+ ### Unit prices and line values
29
+
30
+ An invoice line carries the order line's **unit net price at up to four decimal places**
31
+ (`invoice_lines.unit_net_price`, `numeric(14,4)`), and its net value is the unit price × the
32
+ quantity rounded half-up to two places once — the order line's own net. The PDF's *Cena netto*
33
+ column shows the unit price with its significant places, up to four (0,0125), and two when the third
34
+ and fourth are zero; the value columns and the totals show two. A Polish invoice may state a unit
35
+ price this precisely: the VAT Act names the unit net price without fixing its decimal places.
36
+
37
+ ### What a VAT invoice records as paid, and when it is not issued
38
+
39
+ A VAT invoice records as paid what was kept from the order's payments: each
40
+ captured payment attempt less what was refunded from it. An order recorded as
41
+ paid with nothing captured (a confirmed bank transfer), or with `payments`
42
+ absent, is paid its stored total.
43
+
44
+ An order whose payments were **refunded in full before it was invoiced** — the
45
+ refunds equal what was captured and cover the whole order total — is not
46
+ invoiced: there is no sale left to document. Issuing answers
47
+ `422 INVOICE_ORDER_REFUNDED` and draws no number; automatic issuance skips the
48
+ order and logs the reason. An order refunded only in part is invoiced, with
49
+ what was kept as paid.
50
+
28
51
  ## Entities
29
52
 
30
53
  `Invoice` (number, issued/dated timestamps, asset reference,
@@ -97,17 +120,24 @@ misconfiguration must not become a storefront outage.
97
120
  - **e-invoicing** — for KSeF / Peppol / similar, plug a sender adapter
98
121
  that consumes `invoice.issued.v1` events.
99
122
 
100
- ## PDF templates (page builder)
101
-
102
- Admin route `/invoices/templates` edits a Puck tree of invoice sections
103
- (`InvoiceHeader`, `InvoiceParties`, line/VAT tables, totals, notes, KSeF,
104
- plus layout blocks: spacer, divider, logo, footer). Section props
105
- personalize typography, column visibility, and labels; missing props keep
106
- the historical default layout.
107
-
108
- - `GET /api/v1/admin/invoice-templates/:id/preview` — PDF of the **saved**
109
- template content for that id (sample invoice fixture).
110
- - `POST /api/v1/admin/invoice-templates/:id/preview` — same, with a draft
111
- `{ data }` body so authors can preview unsaved canvas state.
112
- - Runtime issue path still uses `resolveTree(salesChannelId)` (active
113
- channel/global template).
123
+ ## PDF templates
124
+
125
+ Invoice PDF layouts are designed in **Document templates → Invoice** (the
126
+ **Templates** tab of **Invoices** opens it; the former `/invoices/templates`
127
+ addresses redirect there). The invoice blocks — header, parties, line items,
128
+ VAT summary, totals, notes, spacer, divider, logo, footer — plus blocks other
129
+ installed modules contribute to invoices (a KSeF section) are the invoice
130
+ template's palette. Every invoice PDF — the administrator and customer
131
+ downloads, the regenerate, and the PDF attached to the invoice e-mail — is
132
+ produced from the default invoice template of the invoice's sales channel,
133
+ else the default for all channels, else the built-in invoice layout. Invoice
134
+ PDFs are printed in Polish.
135
+
136
+ The KSeF number is printed exactly once: by a placed block that prints it, or
137
+ otherwise by the header.
138
+
139
+ The former invoice-template administration API (`/api/v1/admin/invoice-templates*`)
140
+ is withdrawn; invoice templates are managed through
141
+ `/api/v1/admin/document-templates`. Invoicing cannot be switched on without
142
+ Document templates, and Document templates cannot be switched off while
143
+ invoicing is on.
package/i18n/en.json CHANGED
@@ -10,13 +10,12 @@
10
10
  "settings.storefrontBaseUrl.label": "Storefront base URL (invoice email links)",
11
11
  "actions.openInvoices.label": "Open invoices",
12
12
  "actions.openInvoices.description": "View and manage issued invoices and corrections",
13
- "actions.invoiceTemplates.label": "Invoice templates",
14
- "actions.invoiceTemplates.description": "Customize the invoice PDF layout (WYSIWYG)",
15
13
  "list.title": "Invoices",
16
14
  "errors.INVOICE_NOT_READY": "The invoice for this order is not ready yet. It becomes available once it has been issued.",
17
15
  "errors.INVOICE_NUMBER_PATTERN_COLLIDES": "This numbering pattern can produce the same document number as another sales channel. Invoice numbers must be unique across the whole platform.",
18
16
  "errors.INVOICE_NUMBER_PATTERN_COLLIDES.other_channel": "This numbering pattern can produce the same document number as sales channel \"{channel}\". Invoice numbers are unique across the whole platform, so give this channel a pattern the other one cannot repeat — adding the channel token is the usual way.",
19
17
  "errors.INVOICE_NUMBER_PATTERN_COLLIDES.no_sequence_token": "This numbering pattern has no sequence token, so every document in this channel would be given the same number. The field description lists the tokens you can use.",
18
+ "errors.INVOICE_ORDER_REFUNDED": "This order's payments were refunded in full before it was invoiced, so there is no sale left to invoice. Nothing was issued.",
20
19
  "errors.INVOICE_NUMBER_ALREADY_ISSUED": "This document number is already in use. Invoice numbers are unique across the whole platform.",
21
20
  "errors.INVOICE_NUMBER_ALREADY_ISSUED.other_channel": "Invoice number {number} is already used by sales channel \"{channel}\". Give this channel its own numbering pattern before issuing again — nothing was issued.",
22
21
  "errors.INVOICE_NUMBER_ALREADY_ISSUED.same_channel": "Invoice number {number} has already been issued in this sales channel, so its numbering pattern is producing repeats — nothing was issued.",
@@ -41,5 +40,7 @@
41
40
  "blocks.invoiceLogo.description": "The seller logo.",
42
41
  "blocks.invoiceFooter.label": "Footer / legal",
43
42
  "blocks.invoiceFooter.description": "The legal footer printed at the bottom of the invoice.",
44
- "blocks.category.invoice": "Invoice sections"
43
+ "blocks.category.invoice": "Invoice sections",
44
+ "documentTypes.invoice.label": "Invoice",
45
+ "documentTypes.invoice.description": "The invoice PDF: downloaded by administrators and customers, and attached to the invoice e-mail."
45
46
  }
package/i18n/pl.json CHANGED
@@ -10,13 +10,12 @@
10
10
  "settings.storefrontBaseUrl.label": "Bazowy URL Storefront (linki w mailach z fakturą)",
11
11
  "actions.openInvoices.label": "Otwórz faktury",
12
12
  "actions.openInvoices.description": "Przeglądaj i zarządzaj wystawionymi fakturami i korektami",
13
- "actions.invoiceTemplates.label": "Szablony faktur",
14
- "actions.invoiceTemplates.description": "Dostosuj wygląd PDF faktury (WYSIWYG)",
15
13
  "list.title": "Faktury",
16
14
  "errors.INVOICE_NOT_READY": "Faktura do tego zamówienia nie jest jeszcze gotowa. Będzie dostępna po jej wystawieniu.",
17
15
  "errors.INVOICE_NUMBER_PATTERN_COLLIDES": "Ten wzorzec numeracji może wygenerować taki sam numer dokumentu jak inny kanał sprzedaży. Numery faktur muszą być unikalne w całej platformie.",
18
16
  "errors.INVOICE_NUMBER_PATTERN_COLLIDES.other_channel": "Ten wzorzec numeracji może wygenerować taki sam numer dokumentu jak kanał sprzedaży \"{channel}\". Numery faktur są unikalne w całej platformie, więc nadaj temu kanałowi wzorzec, którego tamten nie może powtórzyć — zwykle wystarczy dodać token kanału.",
19
17
  "errors.INVOICE_NUMBER_PATTERN_COLLIDES.no_sequence_token": "Ten wzorzec numeracji nie zawiera tokenu sekwencji, więc każdy dokument w tym kanale otrzymałby ten sam numer. Dostępne tokeny są wymienione w opisie pola.",
18
+ "errors.INVOICE_ORDER_REFUNDED": "Płatności za to zamówienie zostały w całości zwrócone przed wystawieniem faktury, więc nie ma sprzedaży do zafakturowania. Niczego nie wystawiono.",
20
19
  "errors.INVOICE_NUMBER_ALREADY_ISSUED": "Ten numer dokumentu jest już zajęty. Numery faktur są unikalne w całej platformie.",
21
20
  "errors.INVOICE_NUMBER_ALREADY_ISSUED.other_channel": "Numer faktury {number} jest już używany przez kanał sprzedaży \"{channel}\". Nadaj temu kanałowi własny wzorzec numeracji przed ponowną próbą — nic nie zostało wystawione.",
22
21
  "errors.INVOICE_NUMBER_ALREADY_ISSUED.same_channel": "Numer faktury {number} został już wystawiony w tym kanale sprzedaży, więc jego wzorzec numeracji generuje powtórzenia — nic nie zostało wystawione.",
@@ -41,5 +40,7 @@
41
40
  "blocks.invoiceLogo.description": "Logo sprzedawcy.",
42
41
  "blocks.invoiceFooter.label": "Stopka / informacje prawne",
43
42
  "blocks.invoiceFooter.description": "Stopka prawna drukowana na dole faktury.",
44
- "blocks.category.invoice": "Sekcje faktury"
43
+ "blocks.category.invoice": "Sekcje faktury",
44
+ "documentTypes.invoice.label": "Faktura",
45
+ "documentTypes.invoice.description": "PDF faktury: pobierany przez administratorów i klientów oraz dołączany do e-maila z fakturą."
45
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@endora-commerce/mod-invoices",
3
- "version": "0.106.0",
3
+ "version": "0.108.0",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "description": "Invoice generation, numbering, PDF templates, corrections, and email delivery.",
@@ -62,12 +62,12 @@
62
62
  "react": "^19",
63
63
  "react-router-dom": "^7",
64
64
  "zod": "^4",
65
- "@endora-commerce/admin-kit": "0.106.0",
66
- "@endora-commerce/contracts": "0.106.0",
67
- "@endora-commerce/email-components": "0.106.0",
68
- "@endora-commerce/page-builder-admin": "0.106.0",
69
- "@endora-commerce/page-builder-core": "0.106.0",
70
- "@endora-commerce/platform": "0.106.0"
65
+ "@endora-commerce/admin-kit": "0.108.0",
66
+ "@endora-commerce/contracts": "0.108.0",
67
+ "@endora-commerce/email-components": "0.108.0",
68
+ "@endora-commerce/page-builder-admin": "0.108.0",
69
+ "@endora-commerce/page-builder-core": "0.108.0",
70
+ "@endora-commerce/platform": "0.108.0"
71
71
  },
72
72
  "peerDependenciesMeta": {
73
73
  "@endora-commerce/admin-kit": {
@@ -106,12 +106,12 @@
106
106
  "typescript": "^5.9.3",
107
107
  "vitest": "^4.1.11",
108
108
  "zod": "^4.2.0",
109
- "@endora-commerce/admin-kit": "0.106.0",
110
- "@endora-commerce/contracts": "0.106.0",
111
- "@endora-commerce/page-builder-admin": "0.106.0",
112
- "@endora-commerce/email-components": "0.106.0",
113
- "@endora-commerce/page-builder-core": "0.106.0",
114
- "@endora-commerce/platform": "0.106.0"
109
+ "@endora-commerce/admin-kit": "0.108.0",
110
+ "@endora-commerce/contracts": "0.108.0",
111
+ "@endora-commerce/email-components": "0.108.0",
112
+ "@endora-commerce/page-builder-admin": "0.108.0",
113
+ "@endora-commerce/page-builder-core": "0.108.0",
114
+ "@endora-commerce/platform": "0.108.0"
115
115
  },
116
116
  "scripts": {
117
117
  "build": "tsc -p tsconfig.build.json && tsc -p tsconfig.ui.json",
@@ -1,11 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- import '@puckeditor/core/puck.css';
3
- /** Admin editor for an invoice PDF template (feature 047, US6). */
4
- export declare function InvoiceTemplateEditor(): ReactNode;
5
- /**
6
- * The registry loads a route component through a dynamic-import factory and
7
- * reads its default export (feature 091, FR-013). The named export stays: it is
8
- * the spelling this module's own code and its tests use.
9
- */
10
- export default InvoiceTemplateEditor;
11
- //# sourceMappingURL=InvoiceTemplateEditor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InvoiceTemplateEditor.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/InvoiceTemplateEditor.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA6C,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAGlF,OAAO,2BAA2B,CAAC;AAmEnC,mEAAmE;AACnE,wBAAgB,qBAAqB,IAAI,SAAS,CA8OjD;AAED;;;;GAIG;AACH,eAAe,qBAAqB,CAAC"}
@@ -1,189 +0,0 @@
1
- import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
- import { useCallback, useEffect, useMemo, useState } from 'react';
3
- import { useParams, useNavigate, Link } from 'react-router-dom';
4
- import { Puck } from '@puckeditor/core';
5
- import '@puckeditor/core/puck.css';
6
- import { apiBaseUrl, apiClient, ApiError, cn } from '@endora-commerce/admin-kit/lib';
7
- import { Alert, AlertDescription, Button, Card, CardContent, PageHeader, SaveButtonGroup } from '@endora-commerce/admin-kit/ui';
8
- import { useTranslation } from '@endora-commerce/admin-kit/i18n';
9
- import { PageBuilderHeaderActions } from '@endora-commerce/page-builder-admin';
10
- import { PageBuilderOverlayBridge } from '@endora-commerce/page-builder-admin';
11
- import { countBlockNames } from '@endora-commerce/page-builder-core';
12
- import { PUCK_LEGACY_DND, PUCK_LEGACY_VIEWPORTS, withPuckLegacySideBar, } from '@endora-commerce/page-builder-core/editor';
13
- import { invoicePuckConfig, invoicePuckPalette } from '../templates/invoice-puck-config.js';
14
- import { withDescribedInvoiceBlocks, } from '../templates/described-blocks.js';
15
- import { createInvoiceBuilderEditorPlugin } from '../templates/invoice-builder-plugin.js';
16
- const emptyData = { root: { props: {} }, content: [] };
17
- const LANGUAGE = 'pl-PL';
18
- /**
19
- * `apiBaseUrl` and not `import.meta.env`: this file compiles under `tsc` inside
20
- * its own package, where Vite's client types are not in scope, and the kit
21
- * publishes the resolved value — with this exact fallback — for exactly this
22
- * (feature 091).
23
- */
24
- const API_BASE = apiBaseUrl;
25
- const invoiceBuilderPlugins = withPuckLegacySideBar([createInvoiceBuilderEditorPlugin()]);
26
- /**
27
- * This module's own config: the namespaced renderer map plus its one derived
28
- * section (feature 096, T303). The config Puck renders is this merged with the
29
- * served descriptor and the stored document's names
30
- * (`withDescribedInvoiceBlocks`, `specs/134-paid-module-extraction/` T138).
31
- */
32
- const localConfig = { ...invoicePuckConfig, categories: invoicePuckPalette };
33
- /**
34
- * Fill missing props from each component's `defaultProps`. Persisted trees
35
- * (esp. older seeds) often only store `{ id }`, which leaves radio/select
36
- * fields unselected in the Puck sidebar even though canvas fallbacks work.
37
- */
38
- function hydrateInvoiceDefaults(data) {
39
- const components = invoicePuckConfig.components ?? {};
40
- const content = (data.content ?? []).map((node) => {
41
- const defaults = components[node.type]?.defaultProps;
42
- if (!defaults)
43
- return node;
44
- const props = node.props;
45
- const merged = { ...defaults };
46
- for (const [key, value] of Object.entries(props)) {
47
- if (value !== undefined)
48
- merged[key] = value;
49
- }
50
- return { ...node, props: merged };
51
- });
52
- return { ...data, content };
53
- }
54
- /** Admin editor for an invoice PDF template (feature 047, US6). */
55
- export function InvoiceTemplateEditor() {
56
- const t = useTranslation('core');
57
- const { id = '' } = useParams();
58
- const navigate = useNavigate();
59
- const [tpl, setTpl] = useState(null);
60
- const [draft, setDraft] = useState(emptyData);
61
- const [loaded, setLoaded] = useState(false);
62
- const [error, setError] = useState(null);
63
- const [notice, setNotice] = useState(null);
64
- const [fullscreen, setFullscreen] = useState(false);
65
- const [canvasEpoch, setCanvasEpoch] = useState(0);
66
- const [previewBusy, setPreviewBusy] = useState(false);
67
- /**
68
- * The served descriptor — `null` until it arrives or when it cannot be
69
- * fetched, in which case the editor keeps its own blocks and gives every
70
- * stored block it cannot render a placeholder; it never drops a node (T138).
71
- */
72
- const [descriptor, setDescriptor] = useState(null);
73
- useEffect(() => {
74
- let cancelled = false;
75
- apiClient
76
- .get('/api/v1/admin/invoice-templates/page-builder/config')
77
- .then((res) => {
78
- if (!cancelled)
79
- setDescriptor(res.data);
80
- })
81
- .catch(() => {
82
- if (!cancelled)
83
- setDescriptor(null);
84
- });
85
- return () => {
86
- cancelled = true;
87
- };
88
- }, []);
89
- // Keyed on the sorted set of stored names, as the CMS editor's merge is: a
90
- // keystroke moves the document, not the names, so typing does not rebuild
91
- // the Puck config.
92
- const storedNamesKey = [...countBlockNames(draft).keys()].sort().join('\n');
93
- const puckConfig = useMemo(() => {
94
- const text = {
95
- standIn: ({ label, owner }) => t('invoiceTemplates.describedBlock.standIn', { label, owner }),
96
- placeholder: ({ owner, name }) => owner === null
97
- ? t('invoiceTemplates.describedBlock.placeholderNoOwner', { name })
98
- : t('invoiceTemplates.describedBlock.placeholder', { owner }),
99
- };
100
- return withDescribedInvoiceBlocks(localConfig, descriptor, storedNamesKey === '' ? [] : storedNamesKey.split('\n'), text);
101
- }, [descriptor, storedNamesKey, t]);
102
- useEffect(() => {
103
- if (!fullscreen)
104
- return undefined;
105
- const onKey = (e) => {
106
- if (e.key === 'Escape')
107
- setFullscreen(false);
108
- };
109
- window.addEventListener('keydown', onKey);
110
- return () => window.removeEventListener('keydown', onKey);
111
- }, [fullscreen]);
112
- const load = useCallback(async () => {
113
- try {
114
- const res = await apiClient.get(`/api/v1/admin/invoice-templates/${id}`);
115
- setTpl(res.data);
116
- const tree = res.data.content.languages?.[LANGUAGE] ?? emptyData;
117
- setDraft(hydrateInvoiceDefaults(tree));
118
- setLoaded(true);
119
- }
120
- catch (err) {
121
- setError(err instanceof ApiError ? err.envelope.error.message : 'Failed to load template.');
122
- }
123
- }, [id]);
124
- useEffect(() => {
125
- void load();
126
- }, [load]);
127
- const applyCanvasData = useCallback((next) => {
128
- setDraft(next);
129
- setCanvasEpoch((n) => n + 1);
130
- }, []);
131
- const save = useCallback(async () => {
132
- if (!tpl)
133
- return false;
134
- setError(null);
135
- setNotice(null);
136
- try {
137
- const res = await apiClient.put(`/api/v1/admin/invoice-templates/${tpl.id}/content/${LANGUAGE}`, { version: tpl.version, data: draft });
138
- setTpl((prev) => (prev ? { ...prev, version: res.data.version } : prev));
139
- setNotice(t('invoiceTemplates.saved'));
140
- return true;
141
- }
142
- catch (err) {
143
- setError(err instanceof ApiError ? err.envelope.error.message : 'Failed to save.');
144
- return false;
145
- }
146
- }, [tpl, draft, t]);
147
- const saveAndExit = useCallback(async () => {
148
- if (await save())
149
- navigate('/invoices/templates');
150
- }, [save, navigate]);
151
- const previewPdf = useCallback(async () => {
152
- if (!tpl)
153
- return;
154
- setPreviewBusy(true);
155
- setError(null);
156
- try {
157
- const res = await fetch(`${API_BASE.replace(/\/+$/, '')}/api/v1/admin/invoice-templates/${tpl.id}/preview`, {
158
- method: 'POST',
159
- credentials: 'include',
160
- headers: { 'Content-Type': 'application/json', Accept: 'application/pdf' },
161
- body: JSON.stringify({ data: draft }),
162
- });
163
- if (!res.ok) {
164
- throw new Error(t('invoiceTemplates.previewError'));
165
- }
166
- const blob = await res.blob();
167
- const url = URL.createObjectURL(blob);
168
- window.open(url, '_blank', 'noopener,noreferrer');
169
- window.setTimeout(() => URL.revokeObjectURL(url), 60_000);
170
- }
171
- catch (err) {
172
- setError(err instanceof Error ? err.message : t('invoiceTemplates.previewError'));
173
- }
174
- finally {
175
- setPreviewBusy(false);
176
- }
177
- }, [tpl, draft, t]);
178
- return (_jsxs(_Fragment, { children: [_jsx(PageHeader, { title: tpl?.name ?? t('invoiceTemplates.editTitle'), description: t('invoiceTemplates.editDescription'), actions: _jsxs("div", { className: "flex gap-2", children: [_jsx(Button, { variant: "outline", size: "sm", asChild: true, children: _jsx(Link, { to: "/invoices/templates", children: t('common.action.back') }) }), tpl ? (_jsx(Button, { type: "button", variant: "outline", size: "sm", disabled: previewBusy, onClick: () => void previewPdf(), children: previewBusy ? t('invoiceTemplates.previewLoading') : t('invoiceTemplates.preview') })) : null, _jsx(SaveButtonGroup, { size: "sm", onSave: () => void save(), onSaveAndExit: () => void saveAndExit(), saveLabel: t('common.action.save'), savingLabel: t('common.action.save'), saveAndExitLabel: t('common.action.saveAndExit') })] }) }), error ? (_jsx(Alert, { variant: "destructive", className: "mb-4", children: _jsx(AlertDescription, { children: error }) })) : null, notice ? (_jsx(Alert, { className: "mb-4", children: _jsx(AlertDescription, { children: notice }) })) : null, _jsx(Card, { children: _jsx(CardContent, { className: "pt-6", children: _jsx("div", { className: cn('cms-page-builder space-y-3', fullscreen && 'fixed inset-0 z-50 flex flex-col overflow-auto bg-background p-4'), children: _jsx("div", { className: cn('overflow-hidden rounded-md border', fullscreen ? 'min-h-0 flex-1' : 'min-h-[560px]'), children: loaded ? (_jsx(Puck, { config: puckConfig, data: draft, onChange: setDraft, plugins: invoiceBuilderPlugins, viewports: PUCK_LEGACY_VIEWPORTS, dnd: PUCK_LEGACY_DND, overrides: {
179
- headerActions: () => (_jsx(PageBuilderHeaderActions, { fullscreen: fullscreen, onToggleFullscreen: () => setFullscreen((f) => !f), currentData: draft, onClearCanvas: () => applyCanvasData(emptyData), t: t })),
180
- componentOverlay: ({ children, hover, isSelected, componentId, componentType, }) => (_jsx(PageBuilderOverlayBridge, { hover: hover, isSelected: isSelected, componentId: componentId, componentType: componentType, children: children })),
181
- } }, `${id}:${LANGUAGE}:${canvasEpoch}`)) : (_jsx("div", { className: "flex min-h-[560px] items-center justify-center text-sm text-muted-foreground", children: t('invoiceTemplates.loading') })) }) }) }) })] }));
182
- }
183
- /**
184
- * The registry loads a route component through a dynamic-import factory and
185
- * reads its default export (feature 091, FR-013). The named export stays: it is
186
- * the spelling this module's own code and its tests use.
187
- */
188
- export default InvoiceTemplateEditor;
189
- //# sourceMappingURL=InvoiceTemplateEditor.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InvoiceTemplateEditor.js","sourceRoot":"","sources":["../../../src/admin/pages/InvoiceTemplateEditor.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,OAAO,EAAE,QAAQ,EAAkB,MAAM,OAAO,CAAC;AAClF,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,IAAI,EAAa,MAAM,kBAAkB,CAAC;AACnD,OAAO,2BAA2B,CAAC;AACnC,OAAO,EAAE,UAAU,EAAE,SAAS,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,gCAAgC,CAAC;AACrF,OAAO,EAAE,KAAK,EAAE,g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e,CAAC,SAAS,CAAC,EACrD,CAAC,EAAE,CAAC,GACJ,CACH;oCACD,gBAAgB,EAAE,CAAC,EACjB,QAAQ,EACR,KAAK,EACL,UAAU,EACV,WAAW,EACX,aAAa,GACd,EAAE,EAAE,CAAC,CACJ,KAAC,wBAAwB,IACvB,KAAK,EAAE,KAAK,EACZ,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,WAAW,EACxB,aAAa,EAAE,aAAa,YAE3B,QAAQ,GACgB,CAC5B;iCACF,IAjCI,GAAG,EAAE,IAAI,QAAQ,IAAI,WAAW,EAAE,CAkCvC,CACH,CAAC,CAAC,CAAC,CACF,cAAK,SAAS,EAAC,8EAA8E,YAC1F,CAAC,CAAC,0BAA0B,CAAC,GAC1B,CACP,GACG,GACF,GACM,GACT,IACN,CACJ,CAAC;AACJ,CAAC;AAED;;;;GAIG;AACH,eAAe,qBAAqB,CAAC"}
@@ -1,10 +0,0 @@
1
- import { type ReactNode } from 'react';
2
- /** Admin invoice templates list + create (feature 047, US6). */
3
- export declare function InvoiceTemplatesPage(): ReactNode;
4
- /**
5
- * The registry loads a route component through a dynamic-import factory and
6
- * reads its default export (feature 091, FR-013). The named export stays: it is
7
- * the spelling this module's own code and its tests use.
8
- */
9
- export default InvoiceTemplatesPage;
10
- //# sourceMappingURL=InvoiceTemplatesPage.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"InvoiceTemplatesPage.d.ts","sourceRoot":"","sources":["../../../src/admin/pages/InvoiceTemplatesPage.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAiBzE,gEAAgE;AAChE,wBAAgB,oBAAoB,IAAI,SAAS,CA4HhD;AAED;;;;GAIG;AACH,eAAe,oBAAoB,CAAC"}