@wisemen/wise-invoicing-web 0.3.0 → 0.4.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 (68) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-DwtfyQpx.js → ApprovalReminderSettingsViewDataProvider-IuReavOR.js} +3 -3
  2. package/dist/{BillingDocumentDetailViewDataProvider-TJUwMhtn.js → BillingDocumentDetailViewDataProvider-B3I6UIKY.js} +2201 -1728
  3. package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
  4. package/dist/{BillingDocumentPdf-PU9Ldfhs.js → BillingDocumentPdf-rFqmLUPy.js} +226 -219
  5. package/dist/{CreditNoteDetailViewDataProvider-DOPmal5D.js → CreditNoteDetailViewDataProvider-CQRnG2Fz.js} +42 -42
  6. package/dist/{CreditNotePdfViewDataProvider-BH7MaReQ.js → CreditNotePdfViewDataProvider-RytwPWH5.js} +2 -2
  7. package/dist/{CustomFieldValueText-BjRVovZL.js → CustomFieldValueText-DA0aPKwC.js} +2 -2
  8. package/dist/{DunningCaseDetailViewDataProvider-CW8ijY3H.js → DunningCaseDetailViewDataProvider-BRYbYgTw.js} +65 -65
  9. package/dist/{DunningCaseOverviewView-Cfo-4VIw.js → DunningCaseOverviewView-D0vScVF1.js} +125 -125
  10. package/dist/{DunningCaseReminderPdfViewDataProvider-Dr-CS_VQ.js → DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js} +2 -2
  11. package/dist/{DunningCaseSendDialog-BYFXJYMM.js → DunningCaseSendDialog-CV66_tMv.js} +8 -8
  12. package/dist/{InvoiceApprovalOutOfSyncIndicator-CP2GLaeh.js → InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js} +2 -2
  13. package/dist/{InvoiceApprovalOverviewView-Cjdu9iZC.js → InvoiceApprovalOverviewView-CcMqr2jH.js} +213 -213
  14. package/dist/{InvoiceApprovalStatusBadge-CcX8agTF.js → InvoiceApprovalStatusBadge-BJ3Q18bf.js} +4 -4
  15. package/dist/{InvoiceApproveDialogDataProvider-4wNAetBn.js → InvoiceApproveDialogDataProvider-DaCEHgs0.js} +7 -7
  16. package/dist/{InvoiceDetailViewDataProvider-C9O3hXGo.js → InvoiceDetailViewDataProvider-B5uZY8Qy.js} +47 -47
  17. package/dist/{InvoiceOverviewViewDataProvider-DBdw7FvZ.js → InvoiceOverviewViewDataProvider-BrgmweRE.js} +57 -57
  18. package/dist/{InvoicePdfView-CvU9bRVd.js → InvoicePdfView-CPEX7E9W.js} +1 -1
  19. package/dist/{InvoicePdfViewDataProvider-CFjHQ58K.js → InvoicePdfViewDataProvider-T4-8A2OD.js} +3 -3
  20. package/dist/{InvoicePublicPdfViewDataProvider-DDv-LdBU.js → InvoicePublicPdfViewDataProvider-BkHZoPSZ.js} +3 -3
  21. package/dist/{InvoicePublicProFormaPdfViewDataProvider-BTjJnELb.js → InvoicePublicProFormaPdfViewDataProvider-CfkArXbC.js} +3 -3
  22. package/dist/{InvoicingFileUploadProvider-Kcq7kSSt.js → InvoicingFileUploadProvider-BLBjPKqx.js} +1 -1
  23. package/dist/{IssuerSettingsViewDataProvider-BuSIVnIl.js → IssuerSettingsViewDataProvider-BStn0jFI.js} +2 -2
  24. package/dist/{ReminderSettingsViewDataProvider-CH7gSXnj.js → ReminderSettingsViewDataProvider-CjX7afDs.js} +3 -3
  25. package/dist/{api.util-CkIRZS3h.js → api.util-D6m6OY3_.js} +15 -6
  26. package/dist/{billingDocumentDetail.transformer-Bfd8geNo.js → billingDocumentDetail.transformer-Da-Nt4bI.js} +37 -29
  27. package/dist/client/index.d.ts +1 -1
  28. package/dist/client/types.gen.d.ts +16 -2
  29. package/dist/client/zod.gen.d.ts +28 -0
  30. package/dist/{creditNoteDetail.query-tLnfqsEB.js → creditNoteDetail.query-Yb8TdZNm.js} +22 -18
  31. package/dist/{dist-D5agTXFI.js → dist-BpDuRYDT.js} +132 -132
  32. package/dist/{dist-boJIIxnT.js → dist-Cdbpkd3Y.js} +1 -1
  33. package/dist/{dist-BD7Allff.js → dist-DCbLgB6Y.js} +182 -102
  34. package/dist/{i18n.lib--mzprLMR.js → i18n.lib-CKs3ExEl.js} +28 -0
  35. package/dist/index.d.ts +28 -0
  36. package/dist/index.js +33 -32
  37. package/dist/{invoice.service-B1w16_Md.js → invoice.service-DWDl9XRh.js} +214 -209
  38. package/dist/{invoiceApproval.service-BHAJmFkU.js → invoiceApproval.service-Fwlxgd9o.js} +2 -2
  39. package/dist/{invoiceApprovalStatus.util-DohOKR4q.js → invoiceApprovalStatus.util-q-zHLdFV.js} +1 -1
  40. package/dist/{invoiceCustomer.service-DpVfpQUD.js → invoiceCustomer.service-DOexR54S.js} +2 -2
  41. package/dist/{invoiceDetail.query-CfyNSXLS.js → invoiceDetail.query-B5w0Vlsy.js} +1 -1
  42. package/dist/{invoiceIndexCache.util-jHsrFwcA.js → invoiceIndexCache.util-CUlp4R7R.js} +2 -2
  43. package/dist/{invoicingConfig.composable-COn1rKRf.js → invoicingConfig.composable-DjFexycc.js} +2 -2
  44. package/dist/{issuerSettings.query-CDFk2GiP.js → issuerSettings.query-BHuLjV9P.js} +1 -1
  45. package/dist/libs/i18n.lib.d.ts +28 -0
  46. package/dist/locales/en-US.json.d.ts +14 -0
  47. package/dist/locales/nl-BE.json.d.ts +14 -0
  48. package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
  49. package/dist/models/billing-document/billingDocumentLineGroup.util.d.ts +15 -0
  50. package/dist/models/billing-document/billingDocumentLineGroup.util.spec.d.ts +1 -0
  51. package/dist/models/billing-document/billingDocumentUpdateLines.model.d.ts +1 -0
  52. package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
  53. package/dist/modules/invoice/use-cases/pdf/components/invoicePdf.types.d.ts +4 -1
  54. package/dist/modules/invoice/use-cases/pdf/utils/invoicePdf.util.d.ts +5 -0
  55. package/dist/{reminderConfig.query-DSO0ekC_.js → reminderConfig.query-C4J6m4ER.js} +1 -1
  56. package/dist/style.css +1 -1
  57. package/dist/types/apiError.type.d.ts +2 -2
  58. package/dist/ui/billing-document/table/BillingDocumentLineItemDeleteDialog.vue.d.ts +1 -0
  59. package/dist/ui/billing-document/table/BillingDocumentLineItemsInsertIndicator.vue.d.ts +3 -0
  60. package/dist/ui/billing-document/table/BillingDocumentLineItemsTableGroupRow.vue.d.ts +5 -2
  61. package/dist/ui/billing-document/table/BillingDocumentLineItemsTreeIndent.vue.d.ts +17 -0
  62. package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +78 -18
  63. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +14 -4
  64. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsKeyboardNav.composable.d.ts +6 -0
  65. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.d.ts +8 -4
  66. package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsTableDrag.composable.d.ts +16 -3
  67. package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +163 -26
  68. package/package.json +2 -2
@@ -1,13 +1,43 @@
1
- import "./api.util-CkIRZS3h.js";
1
+ import "./api.util-D6m6OY3_.js";
2
2
  import { b as e, x as t } from "./documentTitle.composable-CRJjS6p-.js";
3
- import { n } from "./invoicingConfig.composable-COn1rKRf.js";
3
+ import { n } from "./invoicingConfig.composable-DjFexycc.js";
4
4
  import { n as r } from "./address.transformer-jGddczLV.js";
5
- import { st as i } from "./dist-BD7Allff.js";
6
- import { useI18n as a } from "vue-i18n";
7
- import { Fragment as o, computed as s, createBlock as c, createCommentVNode as l, createElementBlock as u, createElementVNode as d, createTextVNode as f, createVNode as p, defineComponent as m, normalizeClass as h, openBlock as g, renderList as _, renderSlot as v, toDisplayString as y, unref as b, withCtx as x } from "vue";
8
- import { UIColumnLayout as S, UIRowLayout as C, UIText as w } from "@wisemen/vue-core-design-system";
5
+ import { dt as i } from "./dist-DCbLgB6Y.js";
6
+ import { i as a } from "./billingDocumentDetail.transformer-Da-Nt4bI.js";
7
+ import { useI18n as o } from "vue-i18n";
8
+ import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, normalizeStyle as _, openBlock as v, renderList as y, renderSlot as b, toDisplayString as x, unref as S, withCtx as C } from "vue";
9
+ import { UIColumnLayout as w, UIRowLayout as T, UIText as E } from "@wisemen/vue-core-design-system";
9
10
  //#region src/modules/invoice/use-cases/pdf/utils/invoicePdf.util.ts
10
- var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16, P = 14, F = /\r?\n/u, I = class {
11
+ var D = "-", O = 32, k = 512, A = 640, j = 576, M = 704, N = 52, P = 34, F = 16, I = 14, L = /\r?\n/u, R = class {
12
+ static appendRows(e, t, n, r, i) {
13
+ let o = [...t.map((e) => ({
14
+ kind: "line",
15
+ line: e,
16
+ position: e.position
17
+ })), ...n.map((e) => ({
18
+ group: e,
19
+ kind: "group",
20
+ position: e.position
21
+ }))].toSorted((e, t) => e.position - t.position);
22
+ for (let t of o) {
23
+ if (t.kind === "line") {
24
+ e.push({
25
+ depth: r,
26
+ line: t.line,
27
+ type: "line"
28
+ });
29
+ continue;
30
+ }
31
+ e.push({
32
+ uuid: t.group.uuid,
33
+ name: t.group.name,
34
+ depth: r,
35
+ description: t.group.description,
36
+ total: this.getGroupTotal(a.flattenLines([t.group]), i),
37
+ type: "group"
38
+ }), this.appendRows(e, t.group.lines, t.group.groups, r + 1, i);
39
+ }
40
+ }
11
41
  static avoidGroupRowOrphans(e) {
12
42
  let t = e.map((e) => [...e]);
13
43
  for (let e = 0; e < t.length - 1; e += 1) {
@@ -25,46 +55,16 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
25
55
  return n.length > 0 ? n : [[]];
26
56
  }
27
57
  static buildRows(e, t) {
28
- let n = [...e.ungroupedLines.map((e) => ({
29
- kind: "line",
30
- line: e,
31
- position: e.position
32
- })), ...e.groups.map((e) => ({
33
- group: e,
34
- kind: "group",
35
- position: e.position
36
- }))].toSorted((e, t) => e.position - t.position), r = [];
37
- for (let e of n) {
38
- if (e.kind === "line") {
39
- r.push({
40
- isGrouped: !1,
41
- line: e.line,
42
- type: "line"
43
- });
44
- continue;
45
- }
46
- r.push({
47
- uuid: e.group.uuid,
48
- name: e.group.name,
49
- description: e.group.description,
50
- total: this.getGroupTotal(e.group.lines, t),
51
- type: "group"
52
- });
53
- for (let t of e.group.lines.toSorted((e, t) => e.position - t.position)) r.push({
54
- isGrouped: !0,
55
- line: t,
56
- type: "line"
57
- });
58
- }
59
- return r;
58
+ let n = [];
59
+ return this.appendRows(n, e.ungroupedLines, e.groups, 0, t), n;
60
60
  }
61
61
  static estimateGroupRowHeight(e) {
62
62
  let t = [e.name, e.description].filter((e) => e !== null && e.trim() !== "").reduce((e, t) => e + this.getWrappedTextLineCount(t), 0);
63
- return Math.max(E, N + t * P);
63
+ return Math.max(O, F + t * I);
64
64
  }
65
65
  static estimateLineHeight(e) {
66
66
  let t = this.getWrappedItemLineCount(e);
67
- return Math.max(E, N + t * P);
67
+ return Math.max(O, F + t * I);
68
68
  }
69
69
  static estimateRowHeight(e) {
70
70
  return e.type === "group" ? this.estimateGroupRowHeight(e) : this.estimateLineHeight(e.line);
@@ -85,7 +85,7 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
85
85
  return `${this.formatNumber(e, t)}%`;
86
86
  }
87
87
  static formatPlainDate(e, t) {
88
- return e === null ? T : new Intl.DateTimeFormat(t, {
88
+ return e === null ? D : new Intl.DateTimeFormat(t, {
89
89
  day: "2-digit",
90
90
  month: "2-digit",
91
91
  timeZone: "UTC",
@@ -114,8 +114,8 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
114
114
  };
115
115
  }
116
116
  static getLastPageRowBudget(e) {
117
- let t = e.headerType === "first" ? D : k;
118
- return e.hasRemarks ? t - j : t;
117
+ let t = e.headerType === "first" ? k : j;
118
+ return e.hasRemarks ? t - N : t;
119
119
  }
120
120
  static getTotalRowsHeight(e) {
121
121
  return e.reduce((e, t) => e + this.estimateRowHeight(t), 0);
@@ -125,13 +125,13 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
125
125
  }
126
126
  static getWrappedTextLineCount(e) {
127
127
  let t = e.trim();
128
- return t === "" ? 1 : t.split(F).reduce((e, t) => e + Math.max(1, Math.ceil(t.length / M)), 0);
128
+ return t === "" ? 1 : t.split(L).reduce((e, t) => e + Math.max(1, Math.ceil(t.length / P)), 0);
129
129
  }
130
130
  static paginatePrefixRows(e) {
131
131
  if (e.length === 0) return [];
132
- let t = [], n = e, r = this.takeRowsForBudget(n, O);
132
+ let t = [], n = e, r = this.takeRowsForBudget(n, A);
133
133
  for (t.push(r), n = n.slice(r.length); n.length > 0;) {
134
- let e = this.takeRowsForBudget(n, A);
134
+ let e = this.takeRowsForBudget(n, M);
135
135
  t.push(e), n = n.slice(e.length);
136
136
  }
137
137
  return t;
@@ -178,20 +178,20 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
178
178
  }
179
179
  return n;
180
180
  }
181
- }, L = /* @__PURE__ */ m({
181
+ }, z = /* @__PURE__ */ h({
182
182
  __name: "InvoicePdfFooterSection",
183
183
  props: { invoice: {} },
184
184
  setup(e) {
185
- let t = e, n = a(), r = s(() => [{
185
+ let t = e, n = o(), r = c(() => [{
186
186
  label: n.t("wise_invoicing.invoice.pdf.footer.email"),
187
187
  value: t.invoice.issuer.email ?? ""
188
188
  }, {
189
189
  label: n.t("wise_invoicing.invoice.pdf.footer.phone"),
190
190
  value: t.invoice.issuer.phoneNumber ?? ""
191
- }].filter((e) => e.value !== "")), i = s(() => [
191
+ }].filter((e) => e.value !== "")), i = c(() => [
192
192
  {
193
193
  label: n.t("wise_invoicing.invoice.pdf.footer.address"),
194
- value: I.getAddressLines(t.invoice.issuer.address).join(", ")
194
+ value: R.getAddressLines(t.invoice.issuer.address).join(", ")
195
195
  },
196
196
  {
197
197
  label: n.t("wise_invoicing.invoice.pdf.footer.vat_number"),
@@ -202,38 +202,38 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
202
202
  value: t.invoice.issuer.bankAccountNumber ?? t.invoice.issuer.alternativeBankAccountNumber ?? ""
203
203
  }
204
204
  ].filter((e) => e.value !== ""));
205
- return (e, a) => (g(), c(b(S), {
205
+ return (e, a) => (v(), l(S(w), {
206
206
  as: "footer",
207
207
  align: "center",
208
208
  justify: "center",
209
209
  gap: "none",
210
210
  class: "mt-auto w-full break-inside-avoid [page-break-inside:avoid]"
211
211
  }, {
212
- default: x(() => [
213
- p(b(C), {
212
+ default: C(() => [
213
+ m(S(T), {
214
214
  align: "center",
215
215
  gap: "md"
216
216
  }, {
217
- default: x(() => [
218
- a[0] ||= d("span", { class: "flex-1 border-t border-secondary" }, null, -1),
219
- p(b(w), {
220
- text: t.invoice.issuer.name ?? b(n).t("wise_invoicing.common.not_available"),
217
+ default: C(() => [
218
+ a[0] ||= f("span", { class: "flex-1 border-t border-secondary" }, null, -1),
219
+ m(S(E), {
220
+ text: t.invoice.issuer.name ?? S(n).t("wise_invoicing.common.not_available"),
221
221
  truncate: !1,
222
222
  as: "p",
223
223
  class: "text-xs font-semibold text-primary"
224
224
  }, null, 8, ["text"]),
225
- a[1] ||= d("span", { class: "flex-1 border-t border-secondary" }, null, -1)
225
+ a[1] ||= f("span", { class: "flex-1 border-t border-secondary" }, null, -1)
226
226
  ]),
227
227
  _: 1
228
228
  }),
229
- r.value.length > 0 ? (g(), c(b(C), {
229
+ r.value.length > 0 ? (v(), l(S(T), {
230
230
  key: 0,
231
231
  justify: "center",
232
232
  gap: "xs",
233
233
  class: "mt-xxs",
234
234
  wrap: ""
235
235
  }, {
236
- default: x(() => [(g(!0), u(o, null, _(r.value, (e) => (g(), c(b(w), {
236
+ default: C(() => [(v(!0), d(s, null, y(r.value, (e) => (v(), l(S(E), {
237
237
  key: e.label,
238
238
  text: `${e.label}: ${e.value}`,
239
239
  truncate: !1,
@@ -241,15 +241,15 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
241
241
  class: "text-xxs text-primary"
242
242
  }, null, 8, ["text"]))), 128))]),
243
243
  _: 1
244
- })) : l("", !0),
245
- i.value.length > 0 ? (g(), c(b(C), {
244
+ })) : u("", !0),
245
+ i.value.length > 0 ? (v(), l(S(T), {
246
246
  key: 1,
247
247
  justify: "center",
248
248
  gap: "xs",
249
249
  class: "mt-xxs",
250
250
  wrap: ""
251
251
  }, {
252
- default: x(() => [(g(!0), u(o, null, _(i.value, (e) => (g(), c(b(w), {
252
+ default: C(() => [(v(!0), d(s, null, y(i.value, (e) => (v(), l(S(E), {
253
253
  key: e.label,
254
254
  text: `${e.label}: ${e.value}`,
255
255
  truncate: !1,
@@ -257,123 +257,123 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
257
257
  class: "text-xxs text-primary"
258
258
  }, null, 8, ["text"]))), 128))]),
259
259
  _: 1
260
- })) : l("", !0)
260
+ })) : u("", !0)
261
261
  ]),
262
262
  _: 1
263
263
  }));
264
264
  }
265
- }), R = /* @__PURE__ */ m({
265
+ }), B = /* @__PURE__ */ h({
266
266
  __name: "InvoicePdfHeaderSection",
267
267
  props: {
268
268
  invoice: {},
269
269
  pageType: {}
270
270
  },
271
271
  setup(e) {
272
- let r = e, d = a(), f = n(), m = s(() => d.locale.value || "en-US"), h = s(() => r.invoice.type === t.CREDIT_NOTE), v = s(() => h.value ? r.invoice.sequence === null ? d.t("wise_invoicing.credit_note.detail.fallback_title") : `${d.t("wise_invoicing.invoice.type.credit_note")} ${r.invoice.sequence}` : r.invoice.sequence ?? d.t("wise_invoicing.invoice.detail.fallback_title")), y = s(() => {
272
+ let r = e, a = o(), f = n(), p = c(() => a.locale.value || "en-US"), h = c(() => r.invoice.type === t.CREDIT_NOTE), g = c(() => h.value ? r.invoice.sequence === null ? a.t("wise_invoicing.credit_note.detail.fallback_title") : `${a.t("wise_invoicing.invoice.type.credit_note")} ${r.invoice.sequence}` : r.invoice.sequence ?? a.t("wise_invoicing.invoice.detail.fallback_title")), _ = c(() => {
273
273
  let e = r.invoice.originalInvoice?.sequence;
274
- return !h.value || r.pageType !== "first" || e === null ? null : `${d.t("wise_invoicing.invoice.type.standard")} ${e}`;
275
- }), T = s(() => (r.invoice.issuer.name ?? d.t("wise_invoicing.common.not_available")).split(" ").filter((e) => e !== "").slice(0, 2).map((e) => e.toUpperCase())), E = s(() => I.getAddressLines(r.invoice.customer.address)), D = s(() => {
274
+ return !h.value || r.pageType !== "first" || e === null ? null : `${a.t("wise_invoicing.invoice.type.standard")} ${e}`;
275
+ }), b = c(() => (r.invoice.issuer.name ?? a.t("wise_invoicing.common.not_available")).split(" ").filter((e) => e !== "").slice(0, 2).map((e) => e.toUpperCase())), x = c(() => R.getAddressLines(r.invoice.customer.address)), D = c(() => {
276
276
  let e = r.invoice.customer.vatNumber;
277
- return e ? `${d.t("wise_invoicing.invoice.pdf.footer.vat_number")}: ${e}` : null;
278
- }), O = s(() => r.invoice.customer.name !== null || E.value.length > 0 || r.invoice.customer.email !== null || D.value !== null), k = s(() => {
277
+ return e ? `${a.t("wise_invoicing.invoice.pdf.footer.vat_number")}: ${e}` : null;
278
+ }), O = c(() => r.invoice.customer.name !== null || x.value.length > 0 || r.invoice.customer.email !== null || D.value !== null), k = c(() => {
279
279
  let e = [{
280
- label: d.t("wise_invoicing.invoice.detail.header.invoice_date"),
280
+ label: a.t("wise_invoicing.invoice.detail.header.invoice_date"),
281
281
  value: A(r.invoice.issueOn)
282
282
  }, {
283
- label: d.t("wise_invoicing.invoice.detail.header.due_date"),
283
+ label: a.t("wise_invoicing.invoice.detail.header.due_date"),
284
284
  value: A(r.invoice.dueOn)
285
285
  }];
286
286
  return r.pageType === "first" && f.isDeliveryDateVisible.value && e.push({
287
- label: d.t("wise_invoicing.invoice.detail.header.delivery_date"),
287
+ label: a.t("wise_invoicing.invoice.detail.header.delivery_date"),
288
288
  value: A(r.invoice.deliveredOn)
289
289
  }), e;
290
290
  });
291
291
  function A(e) {
292
- return I.formatPlainDate(e, m.value);
292
+ return R.formatPlainDate(e, p.value);
293
293
  }
294
- return (e, t) => (g(), c(b(S), {
294
+ return (e, t) => (v(), l(S(w), {
295
295
  as: "header",
296
296
  gap: "none",
297
297
  class: "w-full break-inside-avoid [page-break-inside:avoid]"
298
298
  }, {
299
- default: x(() => [p(b(S), {
300
- "aria-label": r.invoice.issuer.name ?? b(d).t("wise_invoicing.common.not_available"),
299
+ default: C(() => [m(S(w), {
300
+ "aria-label": r.invoice.issuer.name ?? S(a).t("wise_invoicing.common.not_available"),
301
301
  align: "center",
302
302
  gap: "none",
303
303
  class: "w-full leading-none font-bold text-primary"
304
304
  }, {
305
- default: x(() => [(g(!0), u(o, null, _(T.value, (e) => (g(), c(b(w), {
305
+ default: C(() => [(v(!0), d(s, null, y(b.value, (e) => (v(), l(S(E), {
306
306
  key: e,
307
307
  text: e,
308
308
  truncate: !1,
309
309
  as: "span"
310
310
  }, null, 8, ["text"]))), 128))]),
311
311
  _: 1
312
- }, 8, ["aria-label"]), p(b(S), {
312
+ }, 8, ["aria-label"]), m(S(w), {
313
313
  gap: r.pageType === "first" ? "2xl" : "xl",
314
314
  class: "w-full"
315
315
  }, {
316
- default: x(() => [p(b(C), {
316
+ default: C(() => [m(S(T), {
317
317
  justify: "between",
318
318
  align: "start",
319
319
  gap: "2xl",
320
320
  class: "w-full"
321
321
  }, {
322
- default: x(() => [p(b(S), {
322
+ default: C(() => [m(S(w), {
323
323
  gap: "none",
324
324
  class: "min-w-px"
325
325
  }, {
326
- default: x(() => [
327
- y.value === null ? l("", !0) : (g(), c(b(C), {
326
+ default: C(() => [
327
+ _.value === null ? u("", !0) : (v(), l(S(T), {
328
328
  key: 0,
329
329
  align: "center",
330
330
  gap: "xxs",
331
331
  class: "text-xs text-secondary"
332
332
  }, {
333
- default: x(() => [p(b(i), {
333
+ default: C(() => [m(S(i), {
334
334
  "aria-hidden": "true",
335
335
  class: "size-3 shrink-0 text-secondary"
336
- }), p(b(w), {
337
- text: y.value,
336
+ }), m(S(E), {
337
+ text: _.value,
338
338
  truncate: !1,
339
339
  as: "p",
340
340
  class: "text-xs text-secondary"
341
341
  }, null, 8, ["text"])]),
342
342
  _: 1
343
343
  })),
344
- p(b(w), {
345
- text: v.value,
344
+ m(S(E), {
345
+ text: g.value,
346
346
  truncate: !1,
347
347
  as: "h1",
348
348
  class: "text-lg font-semibold text-primary"
349
349
  }, null, 8, ["text"]),
350
- r.invoice.subject ? (g(), c(b(w), {
350
+ r.invoice.subject ? (v(), l(S(E), {
351
351
  key: 1,
352
352
  text: r.invoice.subject,
353
353
  truncate: !1,
354
354
  as: "p",
355
355
  class: "max-w-100! text-xs wrap-break-word text-secondary"
356
- }, null, 8, ["text"])) : l("", !0)
356
+ }, null, 8, ["text"])) : u("", !0)
357
357
  ]),
358
358
  _: 1
359
- }), p(b(S), {
359
+ }), m(S(w), {
360
360
  as: "dl",
361
361
  gap: "none",
362
362
  class: "w-48 text-xs text-primary"
363
363
  }, {
364
- default: x(() => [(g(!0), u(o, null, _(k.value, (e) => (g(), c(b(C), {
364
+ default: C(() => [(v(!0), d(s, null, y(k.value, (e) => (v(), l(S(T), {
365
365
  key: e.label,
366
366
  justify: "between",
367
367
  align: "start",
368
368
  gap: "xl",
369
369
  class: "w-full"
370
370
  }, {
371
- default: x(() => [p(b(w), {
371
+ default: C(() => [m(S(E), {
372
372
  text: e.label,
373
373
  truncate: !1,
374
374
  as: "dt",
375
375
  class: "font-medium text-primary"
376
- }, null, 8, ["text"]), p(b(w), {
376
+ }, null, 8, ["text"]), m(S(E), {
377
377
  text: e.value,
378
378
  truncate: !1,
379
379
  as: "dd",
@@ -384,39 +384,39 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
384
384
  _: 1
385
385
  })]),
386
386
  _: 1
387
- }), r.pageType === "first" && O.value ? (g(), c(b(S), {
387
+ }), r.pageType === "first" && O.value ? (v(), l(S(w), {
388
388
  key: 0,
389
389
  as: "section",
390
390
  gap: "xxs",
391
391
  class: "break-inside-avoid [page-break-inside:avoid]"
392
392
  }, {
393
- default: x(() => [
394
- p(b(w), {
395
- text: b(d).t("wise_invoicing.invoice.pdf.client"),
393
+ default: C(() => [
394
+ m(S(E), {
395
+ text: S(a).t("wise_invoicing.invoice.pdf.client"),
396
396
  truncate: !1,
397
397
  as: "h2",
398
398
  class: "text-xs font-semibold text-primary"
399
399
  }, null, 8, ["text"]),
400
- p(b(w), {
400
+ m(S(E), {
401
401
  text: r.invoice.customer.name ?? "-",
402
402
  truncate: !1,
403
403
  as: "p",
404
404
  class: "text-xs text-secondary"
405
405
  }, null, 8, ["text"]),
406
- (g(!0), u(o, null, _(E.value, (e) => (g(), c(b(w), {
406
+ (v(!0), d(s, null, y(x.value, (e) => (v(), l(S(E), {
407
407
  key: e,
408
408
  text: e,
409
409
  truncate: !1,
410
410
  as: "p",
411
411
  class: "text-xs text-secondary"
412
412
  }, null, 8, ["text"]))), 128)),
413
- p(b(w), {
413
+ m(S(E), {
414
414
  text: r.invoice.customer.email ?? "-",
415
415
  truncate: !1,
416
416
  as: "p",
417
417
  class: "text-xs text-secondary"
418
418
  }, null, 8, ["text"]),
419
- D.value === null ? l("", !0) : (g(), c(b(w), {
419
+ D.value === null ? u("", !0) : (v(), l(S(E), {
420
420
  key: 0,
421
421
  text: D.value,
422
422
  truncate: !1,
@@ -425,126 +425,133 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
425
425
  }, null, 8, ["text"]))
426
426
  ]),
427
427
  _: 1
428
- })) : l("", !0)]),
428
+ })) : u("", !0)]),
429
429
  _: 1
430
430
  }, 8, ["gap"])]),
431
431
  _: 1
432
432
  }));
433
433
  }
434
- }), z = /* @__PURE__ */ m({
434
+ }), V = /* @__PURE__ */ h({
435
435
  __name: "InvoicePdfTableCell",
436
436
  props: { bold: { type: Boolean } },
437
437
  setup(e) {
438
438
  let t = e;
439
- return (e, n) => (g(), u("td", { class: h([t.bold && "font-semibold", "px-lg py-sm text-right align-middle text-xxs whitespace-nowrap text-primary"]) }, [v(e.$slots, "default")], 2));
439
+ return (e, n) => (v(), d("td", { class: g([t.bold && "font-semibold", "px-lg py-sm text-right align-middle text-xxs whitespace-nowrap text-primary"]) }, [b(e.$slots, "default")], 2));
440
440
  }
441
- }), B = { class: "border-b border-secondary bg-secondary px-lg py-xs text-right text-xxs font-semibold text-primary" }, V = /* @__PURE__ */ m({
441
+ }), H = { class: "border-b border-secondary bg-secondary px-lg py-xs text-right text-xxs font-semibold text-primary" }, U = /* @__PURE__ */ h({
442
442
  __name: "InvoicePdfTableHeaderCell",
443
443
  props: { label: {} },
444
444
  setup(e) {
445
445
  let t = e;
446
- return (e, n) => (g(), u("th", B, y(t.label), 1));
446
+ return (e, n) => (v(), d("th", H, x(t.label), 1));
447
447
  }
448
- }), H = { class: "mt-2xl w-full" }, U = { class: "w-full table-fixed border-separate border-spacing-0 overflow-hidden rounded-xs border border-secondary" }, W = { class: "table-header-group" }, G = {
448
+ }), W = { class: "mt-2xl w-full" }, G = { class: "w-full table-fixed border-separate border-spacing-0 overflow-hidden rounded-xs border border-secondary" }, K = { class: "table-header-group" }, q = {
449
449
  key: 0,
450
450
  class: "break-inside-avoid bg-secondary [page-break-inside:avoid]"
451
- }, K = {
452
- colspan: "6",
453
- class: "border-y border-secondary px-lg py-sm align-middle text-xxs wrap-break-word text-primary"
454
- }, q = { class: "font-semibold" }, J = {
451
+ }, J = { class: "font-semibold" }, Y = {
455
452
  key: 0,
456
453
  class: "ml-xs text-tertiary"
457
- }, Y = { class: "border-y border-secondary px-lg py-sm text-right align-middle text-xxs font-semibold whitespace-nowrap text-primary" }, X = {
454
+ }, X = {
458
455
  key: 0,
459
456
  class: "mt-xxs whitespace-pre-line text-tertiary"
460
457
  }, Z = { key: 0 }, Q = {
461
458
  colspan: "7",
462
459
  class: "px-lg py-sm text-center text-xxs text-secondary"
463
- }, ee = /* @__PURE__ */ m({
460
+ }, ee = /* @__PURE__ */ h({
464
461
  __name: "InvoicePdfLinesTable",
465
462
  props: {
466
463
  isCreditNote: { type: Boolean },
467
464
  rows: {}
468
465
  },
469
466
  setup(e) {
470
- let t = e, n = a(), r = n.locale;
467
+ let t = e, n = o(), r = n.locale;
471
468
  function i(e) {
472
- return I.formatMonetary(e, r.value);
469
+ return R.formatMonetary(e, r.value);
473
470
  }
474
- function s(e) {
475
- return e === null ? "" : I.formatMonetary(e, r.value);
471
+ function a(e) {
472
+ return e === null ? "" : R.formatMonetary(e, r.value);
476
473
  }
477
474
  function c(e) {
478
475
  let n = t.isCreditNote ? {
479
476
  ...e,
480
477
  amount: -e.amount
481
478
  } : e;
482
- return I.formatMonetary(n, r.value);
479
+ return R.formatMonetary(n, r.value);
483
480
  }
484
- function m(e) {
485
- return I.formatMonetary(I.getDisplayLineGrossAmount(e.grossAmount, {
481
+ function l(e) {
482
+ return R.formatMonetary(R.getDisplayLineGrossAmount(e.grossAmount, {
486
483
  isCreditNote: t.isCreditNote,
487
484
  isDiscount: e.isDiscount
488
485
  }), r.value);
489
486
  }
490
- function v(e) {
491
- return I.formatNumber(t.isCreditNote ? -e : e, r.value);
487
+ function h(e) {
488
+ return R.formatNumber(t.isCreditNote ? -e : e, r.value);
492
489
  }
493
- function S(e) {
490
+ function b(e) {
494
491
  return e.toString(r.value);
495
492
  }
496
- return (e, r) => (g(), u("div", H, [d("table", U, [
497
- r[0] ||= d("colgroup", null, [
498
- d("col", { class: "w-auto" }),
499
- d("col", { class: "w-[8%]" }),
500
- d("col", { class: "w-[8%]" }),
501
- d("col", { class: "w-[14%]" }),
502
- d("col", { class: "w-[16%]" }),
503
- d("col", { class: "w-[4%]" }),
504
- d("col", { class: "w-[12%]" })
493
+ function w(e) {
494
+ return { paddingLeft: `calc(var(--spacing-lg) + ${e} * var(--spacing-md))` };
495
+ }
496
+ return (e, r) => (v(), d("div", W, [f("table", G, [
497
+ r[0] ||= f("colgroup", null, [
498
+ f("col", { class: "w-auto" }),
499
+ f("col", { class: "w-[8%]" }),
500
+ f("col", { class: "w-[8%]" }),
501
+ f("col", { class: "w-[14%]" }),
502
+ f("col", { class: "w-[16%]" }),
503
+ f("col", { class: "w-[4%]" }),
504
+ f("col", { class: "w-[12%]" })
505
505
  ], -1),
506
- d("thead", W, [d("tr", null, [
507
- p(V, {
508
- label: b(n).t("wise_invoicing.invoice.detail.line_items.item"),
506
+ f("thead", K, [f("tr", null, [
507
+ m(U, {
508
+ label: S(n).t("wise_invoicing.invoice.detail.line_items.item"),
509
509
  class: "text-left!"
510
510
  }, null, 8, ["label"]),
511
- p(V, { label: b(n).t("wise_invoicing.invoice.detail.line_items.unit") }, null, 8, ["label"]),
512
- p(V, { label: b(n).t("wise_invoicing.invoice.detail.line_items.qty") }, null, 8, ["label"]),
513
- p(V, { label: b(n).t("wise_invoicing.invoice.detail.line_items.unit_price") }, null, 8, ["label"]),
514
- p(V, { label: b(n).t("wise_invoicing.invoice.detail.line_items.price_excl_vat") }, null, 8, ["label"]),
515
- p(V, { label: b(n).t("wise_invoicing.invoice.detail.line_items.vat") }, null, 8, ["label"]),
516
- p(V, { label: b(n).t("wise_invoicing.invoice.detail.line_items.total") }, null, 8, ["label"])
511
+ m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.unit") }, null, 8, ["label"]),
512
+ m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.qty") }, null, 8, ["label"]),
513
+ m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.unit_price") }, null, 8, ["label"]),
514
+ m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.price_excl_vat") }, null, 8, ["label"]),
515
+ m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.vat") }, null, 8, ["label"]),
516
+ m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.total") }, null, 8, ["label"])
517
517
  ])]),
518
- d("tbody", null, [(g(!0), u(o, null, _(t.rows, (e, t) => (g(), u(o, { key: e.type === "group" ? e.uuid : e.line.uuid }, [e.type === "group" ? (g(), u("tr", G, [d("td", K, [d("span", q, y(e.name), 1), e.description !== null && e.description !== "" ? (g(), u("span", J, y(e.description), 1)) : l("", !0)]), d("td", Y, y(s(e.total)), 1)])) : (g(), u("tr", {
518
+ f("tbody", null, [(v(!0), d(s, null, y(t.rows, (e, t) => (v(), d(s, { key: e.type === "group" ? e.uuid : e.line.uuid }, [e.type === "group" ? (v(), d("tr", q, [f("td", {
519
+ style: _(w(e.depth)),
520
+ colspan: "6",
521
+ class: "border-y border-secondary py-sm pr-lg align-middle text-xxs wrap-break-word text-primary"
522
+ }, [f("span", J, x(e.name), 1), e.description !== null && e.description !== "" ? (v(), d("span", Y, x(e.description), 1)) : u("", !0)], 4), f("td", { class: g([e.depth === 0 ? "font-semibold text-primary" : "\n font-medium text-secondary\n ", "border-y border-secondary px-lg py-sm text-right align-middle text-xxs whitespace-nowrap"]) }, x(a(e.total)), 3)])) : (v(), d("tr", {
519
523
  key: 1,
520
- class: h([t % 2 == 1 ? "bg-secondary" : "bg-primary", "break-inside-avoid [page-break-inside:avoid]"])
524
+ class: g([t % 2 == 1 ? "bg-secondary" : "bg-primary", "break-inside-avoid [page-break-inside:avoid]"])
521
525
  }, [
522
- d("td", { class: h([e.isGrouped ? "py-sm pr-lg pl-2xl" : "px-lg py-sm", "align-middle text-xxs font-medium wrap-break-word text-primary"]) }, [d("div", null, y(e.line.name), 1), e.line.description !== null && e.line.description !== "" ? (g(), u("div", X, y(e.line.description), 1)) : l("", !0)], 2),
523
- p(z, null, {
524
- default: x(() => [f(y(e.line.unit), 1)]),
526
+ f("td", {
527
+ style: _(w(e.depth)),
528
+ class: "py-sm pr-lg align-middle text-xxs font-medium wrap-break-word text-primary"
529
+ }, [f("div", null, x(e.line.name), 1), e.line.description !== null && e.line.description !== "" ? (v(), d("div", X, x(e.line.description), 1)) : u("", !0)], 4),
530
+ m(V, null, {
531
+ default: C(() => [p(x(e.line.unit), 1)]),
525
532
  _: 2
526
533
  }, 1024),
527
- p(z, null, {
528
- default: x(() => [f(y(v(e.line.quantity)), 1)]),
534
+ m(V, null, {
535
+ default: C(() => [p(x(h(e.line.quantity)), 1)]),
529
536
  _: 2
530
537
  }, 1024),
531
- p(z, null, {
532
- default: x(() => [f(y(i(e.line.unitPrice)), 1)]),
538
+ m(V, null, {
539
+ default: C(() => [p(x(i(e.line.unitPrice)), 1)]),
533
540
  _: 2
534
541
  }, 1024),
535
- p(z, null, {
536
- default: x(() => [f(y(c(e.line.netAmount)), 1)]),
542
+ m(V, null, {
543
+ default: C(() => [p(x(c(e.line.netAmount)), 1)]),
537
544
  _: 2
538
545
  }, 1024),
539
- p(z, null, {
540
- default: x(() => [f(y(S(e.line.vatRatePercentage)), 1)]),
546
+ m(V, null, {
547
+ default: C(() => [p(x(b(e.line.vatRatePercentage)), 1)]),
541
548
  _: 2
542
549
  }, 1024),
543
- p(z, { bold: !0 }, {
544
- default: x(() => [f(y(m(e.line)), 1)]),
550
+ m(V, { bold: !0 }, {
551
+ default: C(() => [p(x(l(e.line)), 1)]),
545
552
  _: 2
546
553
  }, 1024)
547
- ], 2))], 64))), 128)), t.rows.length === 0 ? (g(), u("tr", Z, [d("td", Q, y(b(n).t("wise_invoicing.invoice.detail.line_items.empty")), 1)])) : l("", !0)])
554
+ ], 2))], 64))), 128)), t.rows.length === 0 ? (v(), d("tr", Z, [f("td", Q, x(S(n).t("wise_invoicing.invoice.detail.line_items.empty")), 1)])) : u("", !0)])
548
555
  ])]));
549
556
  }
550
557
  }), $ = class {
@@ -554,70 +561,70 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
554
561
  }, te = { class: "grid grid-cols-[auto_1px_auto] items-end gap-x-2xl align-bottom" }, ne = { class: "grid h-min grid-cols-[auto_auto_auto] gap-x-lg gap-y-sm text-xs" }, re = {
555
562
  key: 0,
556
563
  class: "mt-4xl text-xs text-primary"
557
- }, ie = /* @__PURE__ */ m({
564
+ }, ie = /* @__PURE__ */ h({
558
565
  __name: "InvoicePdfSummarySection",
559
566
  props: {
560
567
  hasLines: { type: Boolean },
561
568
  invoice: {}
562
569
  },
563
570
  setup(e) {
564
- let n = e, r = a(), i = s(() => r.locale.value || "en-US"), c = s(() => n.invoice.type === t.CREDIT_NOTE);
565
- function f(e) {
571
+ let n = e, r = o(), i = c(() => r.locale.value || "en-US"), a = c(() => n.invoice.type === t.CREDIT_NOTE);
572
+ function l(e) {
566
573
  return {
567
574
  ...e,
568
575
  amount: -e.amount
569
576
  };
570
577
  }
571
- function m(e) {
572
- return I.formatMonetary(c.value ? f(e) : e, i.value);
578
+ function p(e) {
579
+ return R.formatMonetary(a.value ? l(e) : e, i.value);
573
580
  }
574
- let v = s(() => {
581
+ let h = c(() => {
575
582
  let e = $.sortByVatRate(n.invoice.vatSummaries).map((e) => ({
576
583
  key: `${e.vatRate}`,
577
- label: T(e.vatRate),
578
- netValue: m(e.netAmount),
579
- vatValue: m(e.vatAmount)
584
+ label: b(e.vatRate),
585
+ netValue: p(e.netAmount),
586
+ vatValue: p(e.vatAmount)
580
587
  }));
581
588
  return e.push({
582
589
  key: "subtotal",
583
590
  label: r.t("wise_invoicing.invoice.pdf.summary.subtotal"),
584
- netValue: m(n.invoice.effectiveNet),
585
- vatValue: m(n.invoice.vatAmount)
591
+ netValue: p(n.invoice.effectiveNet),
592
+ vatValue: p(n.invoice.vatAmount)
586
593
  }), e;
587
- }), y = s(() => n.invoice.totalDiscountAmount === null ? "-" : `-${I.formatMonetary(n.invoice.totalDiscountAmount, i.value)}`);
588
- function T(e) {
594
+ }), _ = c(() => n.invoice.totalDiscountAmount === null ? "-" : `-${R.formatMonetary(n.invoice.totalDiscountAmount, i.value)}`);
595
+ function b(e) {
589
596
  let t = n.invoice.lines.find((t) => t.vatRate === e);
590
597
  return t === void 0 ? r.t("wise_invoicing.invoice.detail.totals.vat") : t.vatRatePercentage.toString(i.value);
591
598
  }
592
- return (e, t) => (g(), u("div", { class: h([n.hasLines ? "mt-xl" : "mt-4xl", "break-inside-avoid [page-break-inside:avoid]"]) }, [d("div", te, [
593
- d("div", ne, [
594
- t[0] ||= d("span", { class: "min-w-12" }, null, -1),
595
- p(b(w), {
596
- text: b(r).t("wise_invoicing.invoice.detail.totals.excl_vat"),
599
+ return (e, t) => (v(), d("div", { class: g([n.hasLines ? "mt-xl" : "mt-4xl", "break-inside-avoid [page-break-inside:avoid]"]) }, [f("div", te, [
600
+ f("div", ne, [
601
+ t[0] ||= f("span", { class: "min-w-12" }, null, -1),
602
+ m(S(E), {
603
+ text: S(r).t("wise_invoicing.invoice.detail.totals.excl_vat"),
597
604
  truncate: !1,
598
605
  as: "span",
599
606
  class: "text-right font-medium text-secondary"
600
607
  }, null, 8, ["text"]),
601
- p(b(w), {
602
- text: b(r).t("wise_invoicing.invoice.detail.totals.vat"),
608
+ m(S(E), {
609
+ text: S(r).t("wise_invoicing.invoice.detail.totals.vat"),
603
610
  truncate: !1,
604
611
  as: "span",
605
612
  class: "text-right font-medium text-secondary"
606
613
  }, null, 8, ["text"]),
607
- (g(!0), u(o, null, _(v.value, (e) => (g(), u(o, { key: e.key }, [
608
- p(b(w), {
614
+ (v(!0), d(s, null, y(h.value, (e) => (v(), d(s, { key: e.key }, [
615
+ m(S(E), {
609
616
  text: e.label,
610
617
  truncate: !1,
611
618
  as: "span",
612
619
  class: "font-medium text-secondary"
613
620
  }, null, 8, ["text"]),
614
- p(b(w), {
621
+ m(S(E), {
615
622
  text: e.netValue,
616
623
  truncate: !1,
617
624
  as: "span",
618
625
  class: "text-right font-medium whitespace-nowrap text-primary"
619
626
  }, null, 8, ["text"]),
620
- p(b(w), {
627
+ m(S(E), {
621
628
  text: e.vatValue,
622
629
  truncate: !1,
623
630
  as: "span",
@@ -625,38 +632,38 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
625
632
  }, null, 8, ["text"])
626
633
  ], 64))), 128))
627
634
  ]),
628
- t[2] ||= d("span", { class: "h-24 w-px bg-tertiary" }, null, -1),
629
- p(b(S), { class: "w-full" }, {
630
- default: x(() => [
631
- p(b(C), {
635
+ t[2] ||= f("span", { class: "h-24 w-px bg-tertiary" }, null, -1),
636
+ m(S(w), { class: "w-full" }, {
637
+ default: C(() => [
638
+ m(S(T), {
632
639
  justify: "between",
633
640
  class: "w-full text-xs"
634
641
  }, {
635
- default: x(() => [p(b(w), {
636
- text: b(r).t("wise_invoicing.invoice.pdf.summary.total_discount"),
642
+ default: C(() => [m(S(E), {
643
+ text: S(r).t("wise_invoicing.invoice.pdf.summary.total_discount"),
637
644
  truncate: !1,
638
645
  as: "span",
639
646
  class: "font-medium text-secondary"
640
- }, null, 8, ["text"]), p(b(w), {
641
- text: y.value,
647
+ }, null, 8, ["text"]), m(S(E), {
648
+ text: _.value,
642
649
  truncate: !1,
643
650
  as: "span",
644
651
  class: "text-right font-medium whitespace-nowrap text-primary"
645
652
  }, null, 8, ["text"])]),
646
653
  _: 1
647
654
  }),
648
- t[1] ||= d("span", { class: "w-full border-t border-tertiary" }, null, -1),
649
- p(b(C), {
655
+ t[1] ||= f("span", { class: "w-full border-t border-tertiary" }, null, -1),
656
+ m(S(T), {
650
657
  class: "w-full",
651
658
  justify: "between"
652
659
  }, {
653
- default: x(() => [p(b(w), {
654
- text: b(r).t("wise_invoicing.invoice.detail.totals.total_incl_vat"),
660
+ default: C(() => [m(S(E), {
661
+ text: S(r).t("wise_invoicing.invoice.detail.totals.total_incl_vat"),
655
662
  truncate: !1,
656
663
  as: "span",
657
664
  class: "text-xs font-medium text-secondary"
658
- }, null, 8, ["text"]), p(b(w), {
659
- text: m(n.invoice.grossAmount),
665
+ }, null, 8, ["text"]), m(S(E), {
666
+ text: p(n.invoice.grossAmount),
660
667
  truncate: !1,
661
668
  as: "span",
662
669
  class: "text-sm font-semibold whitespace-nowrap text-primary"
@@ -666,68 +673,68 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
666
673
  ]),
667
674
  _: 1
668
675
  })
669
- ]), n.invoice.externalRemarks ? (g(), u("section", re, [p(b(w), {
670
- text: b(r).t("wise_invoicing.invoice.pdf.summary.remarks"),
676
+ ]), n.invoice.externalRemarks ? (v(), d("section", re, [m(S(E), {
677
+ text: S(r).t("wise_invoicing.invoice.pdf.summary.remarks"),
671
678
  truncate: !1,
672
679
  as: "h2",
673
680
  class: "font-medium"
674
- }, null, 8, ["text"]), p(b(w), {
681
+ }, null, 8, ["text"]), m(S(E), {
675
682
  text: n.invoice.externalRemarks,
676
683
  truncate: !1,
677
684
  as: "p"
678
- }, null, 8, ["text"])])) : l("", !0)], 2));
685
+ }, null, 8, ["text"])])) : u("", !0)], 2));
679
686
  }
680
687
  }), ae = {
681
688
  "aria-hidden": "true",
682
689
  class: "pointer-events-none absolute inset-0 flex transform-[rotate(-34deg)] items-center justify-center text-[42mm] leading-none font-bold whitespace-nowrap text-primary uppercase opacity-[0.05] select-none"
683
- }, oe = /* @__PURE__ */ m({
690
+ }, oe = /* @__PURE__ */ h({
684
691
  __name: "InvoicePdfWatermark",
685
692
  props: { label: {} },
686
693
  setup(e) {
687
- let t = e, n = a();
688
- return (e, r) => (g(), u("div", ae, y(t.label ?? b(n).t("wise_invoicing.invoice.status.draft")), 1));
694
+ let t = e, n = o();
695
+ return (e, r) => (v(), d("div", ae, x(t.label ?? S(n).t("wise_invoicing.invoice.status.draft")), 1));
689
696
  }
690
- }), se = { class: "absolute right-9 bottom-9 text-xs leading-none font-medium text-tertiary" }, ce = /* @__PURE__ */ m({
697
+ }), se = { class: "absolute right-9 bottom-9 text-xs leading-none font-medium text-tertiary" }, ce = /* @__PURE__ */ h({
691
698
  __name: "BillingDocumentPdf",
692
699
  props: {
693
700
  billingDocument: {},
694
701
  watermark: {}
695
702
  },
696
703
  setup(n) {
697
- let r = n, i = s(() => r.billingDocument.status === e.DRAFT || r.billingDocument.status === e.READY), a = s(() => r.billingDocument.type === t.CREDIT_NOTE), f = s(() => I.buildRows(r.billingDocument, { isCreditNote: a.value })), m = s(() => {
698
- let e = I.paginateRows(f.value, { hasRemarks: r.billingDocument.externalRemarks !== null && r.billingDocument.externalRemarks.trim() !== "" });
704
+ let r = n, i = c(() => r.billingDocument.status === e.DRAFT || r.billingDocument.status === e.READY), a = c(() => r.billingDocument.type === t.CREDIT_NOTE), o = c(() => R.buildRows(r.billingDocument, { isCreditNote: a.value })), p = c(() => {
705
+ let e = R.paginateRows(o.value, { hasRemarks: r.billingDocument.externalRemarks !== null && r.billingDocument.externalRemarks.trim() !== "" });
699
706
  return e.map((t, n) => ({
700
707
  isLastPage: n === e.length - 1,
701
708
  headerType: n === 0 ? "first" : "continuation",
702
709
  rows: t
703
710
  }));
704
711
  });
705
- return (e, t) => (g(!0), u(o, null, _(m.value, (e, t) => (g(), u("article", {
712
+ return (e, t) => (v(!0), d(s, null, y(p.value, (e, t) => (v(), d("article", {
706
713
  key: `invoice-pdf-page-${t}`,
707
- class: h([t > 0 ? "\n mt-4xl\n print:mt-0\n " : "", "relative mx-auto box-border flex h-[297mm] w-[210mm] break-after-page flex-col overflow-hidden bg-primary px-5xl pt-5xl pb-2xl text-primary shadow-card [-webkit-print-color-adjust:exact] [page-break-after:always] [print-color-adjust:exact] last:break-after-auto last:[page-break-after:auto] print:mx-none print:min-h-auto print:w-auto print:shadow-none"])
714
+ class: g([t > 0 ? "\n mt-4xl\n print:mt-0\n " : "", "relative mx-auto box-border flex h-[297mm] w-[210mm] break-after-page flex-col overflow-hidden bg-primary px-5xl pt-5xl pb-2xl text-primary shadow-card [-webkit-print-color-adjust:exact] [page-break-after:always] [print-color-adjust:exact] last:break-after-auto last:[page-break-after:auto] print:mx-none print:min-h-auto print:w-auto print:shadow-none"])
708
715
  }, [
709
- i.value ? (g(), c(oe, {
716
+ i.value ? (v(), l(oe, {
710
717
  key: 0,
711
718
  label: r.watermark
712
- }, null, 8, ["label"])) : l("", !0),
713
- p(R, {
719
+ }, null, 8, ["label"])) : u("", !0),
720
+ m(B, {
714
721
  invoice: r.billingDocument,
715
722
  "page-type": e.headerType
716
723
  }, null, 8, ["invoice", "page-type"]),
717
- e.rows.length > 0 || r.billingDocument.lines.length === 0 ? (g(), c(ee, {
724
+ e.rows.length > 0 || r.billingDocument.lines.length === 0 ? (v(), l(ee, {
718
725
  key: 1,
719
726
  "is-credit-note": a.value,
720
727
  rows: e.rows
721
- }, null, 8, ["is-credit-note", "rows"])) : l("", !0),
722
- e.isLastPage ? (g(), c(ie, {
728
+ }, null, 8, ["is-credit-note", "rows"])) : u("", !0),
729
+ e.isLastPage ? (v(), l(ie, {
723
730
  key: 2,
724
731
  "has-lines": e.rows.length > 0 || r.billingDocument.lines.length === 0,
725
732
  invoice: r.billingDocument
726
- }, null, 8, ["has-lines", "invoice"])) : l("", !0),
727
- p(L, { invoice: r.billingDocument }, null, 8, ["invoice"]),
728
- d("span", se, y(t + 1) + "/" + y(m.value.length), 1)
733
+ }, null, 8, ["has-lines", "invoice"])) : u("", !0),
734
+ m(z, { invoice: r.billingDocument }, null, 8, ["invoice"]),
735
+ f("span", se, x(t + 1) + "/" + x(p.value.length), 1)
729
736
  ], 2))), 128));
730
737
  }
731
738
  });
732
739
  //#endregion
733
- export { $ as n, I as r, ce as t };
740
+ export { $ as n, R as r, ce as t };