@wisemen/wise-invoicing-web 0.18.0 → 0.20.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 (55) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-BZBuz6EF.js → ApprovalReminderSettingsViewDataProvider-DMWLX53_.js} +11 -11
  2. package/dist/{BillingDocumentDetailViewDataProvider-BCADHPFR.js → BillingDocumentDetailViewDataProvider-jpp-QwPi.js} +1474 -1454
  3. package/dist/{BillingDocumentPdf-ddBlGdIN.js → BillingDocumentPdf-Zw3GXZVE.js} +82 -82
  4. package/dist/{DunningCaseSendDialog-fgL9OsV8.js → DunningCaseSendDialog-CA-nzjzV.js} +23 -23
  5. package/dist/{InvoiceApprovalOutOfSyncIndicator-BoPBNXx1.js → InvoiceApprovalOutOfSyncIndicator-Dnw03isr.js} +1 -1
  6. package/dist/{InvoiceApprovalOverviewView-BIiJ6gen.js → InvoiceApprovalOverviewView-CoJXggOy.js} +140 -140
  7. package/dist/{InvoiceApprovalStatusBadge-CaVSCtI0.js → InvoiceApprovalStatusBadge-BWx3Fhuy.js} +3 -3
  8. package/dist/{InvoicePdfView-BRJaAErd.js → InvoicePdfView-Bv5aMLh6.js} +2 -2
  9. package/dist/{InvoicePublicProFormaPdfViewDataProvider-mZaggXYf.js → InvoicePublicProFormaPdfViewDataProvider-Ca7-AmAH.js} +3 -3
  10. package/dist/{InvoiceApproveDialogDataProvider-C9NhZX-D.js → InvoiceRejectDialog-Ca-4nz4U.js} +178 -178
  11. package/dist/{invoiceDeliveryStatus.util-Dp9hD1Tj.js → InvoiceStatusBadge-uXAh9ypU.js} +83 -83
  12. package/dist/{InvoicingFileUploadProvider-rU9APFrt.js → InvoicingFileUploadProvider-C3cyIUhL.js} +2 -2
  13. package/dist/IssuerSettingsViewDataProvider-C-CRF9sK.js +544 -0
  14. package/dist/{PeppolSettingsViewDataProvider-DymLdaRM.js → PeppolSettingsViewDataProvider-COQEInsh.js} +32 -32
  15. package/dist/{api.util-sW4gNny-.js → api.util-DSerLsgA.js} +666 -648
  16. package/dist/billingDocumentDetail.transformer-ClWwi8h4.js +310 -0
  17. package/dist/client/index.d.ts +2 -2
  18. package/dist/client/sdk.gen.d.ts +5 -5
  19. package/dist/client/types.gen.d.ts +81 -46
  20. package/dist/client/zod.gen.d.ts +1304 -96
  21. package/dist/{creditNoteDetail.query-DiS_-xFz.js → creditNoteDetail.query-q1b6nzu0.js} +5 -5
  22. package/dist/{InvoiceDeliverySendDialog-BICcd6Cf.js → customFieldDefinitionIndex.query-DQxer9Je.js} +236 -239
  23. package/dist/{deliveryReason.util-KBh3q_-P.js → deliveryReason.util-BlxvUaz0.js} +2 -2
  24. package/dist/{dist-C99_-gWv.js → dist-47-1LAzT.js} +6 -6
  25. package/dist/{documentTitle.composable-Dl8Cm3v3.js → documentTitle.composable-D5uPh3uG.js} +37 -35
  26. package/dist/{i18n.lib-DckceEsg.js → i18n.lib-DB15VQsH.js} +2 -0
  27. package/dist/index.d.ts +6 -0
  28. package/dist/index.js +6021 -3054
  29. package/dist/{invoice.service-2QiktTs9.js → invoice.service-BKgP2p8z.js} +199 -198
  30. package/dist/{invoiceApproval.service-DXIKgCI_.js → invoiceApproval.service-oT1fvhsW.js} +5 -4
  31. package/dist/{invoiceApprovalStatus.util-CB5pi_hm.js → invoiceApprovalStatus.util-D17DWEh1.js} +29 -29
  32. package/dist/{invoiceCustomer.service-BNQJt1KV.js → invoiceCustomer.service-CLYUR6vc.js} +2 -2
  33. package/dist/{invoiceDetail.query-MIrBYgNS.js → invoiceDetail.query-CzyZqT82.js} +1 -1
  34. package/dist/{invoicingConfig.composable-D-hxnEnh.js → invoicingConfig.composable-CzgTMtog.js} +2 -2
  35. package/dist/{issuerSettings.query-CR7EtvNm.js → issuerSettings.query-D8T34N7f.js} +27 -27
  36. package/dist/libs/i18n.lib.d.ts +2 -0
  37. package/dist/locales/en-US.json.d.ts +1 -0
  38. package/dist/locales/nl-BE.json.d.ts +1 -0
  39. package/dist/modules/invoice/api/mutations/invoiceBulkSendApproval.mutation.d.ts +2 -2
  40. package/dist/modules/invoice/api/services/invoice.service.d.ts +3 -3
  41. package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +2 -1
  42. package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +1 -0
  43. package/dist/modules/invoice/use-cases/overview/components/InvoiceOverviewBulkActionBar.vue.d.ts +2 -2
  44. package/dist/modules/invoice-approval/actions/invoiceApprovalSendRequest.action.d.ts +1 -1
  45. package/dist/modules/invoice-approval/models/invoiceApprovalIndex.model.d.ts +2 -1
  46. package/dist/{reminderConfig.query-DJmhJp6W.js → reminderConfig.query-CFmCWWlO.js} +7 -7
  47. package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +1 -1
  48. package/package.json +1 -1
  49. package/dist/CreditNoteDetailViewDataProvider-Donn5pVv.js +0 -816
  50. package/dist/CreditNotePdfViewDataProvider-c-apCeCW.js +0 -22
  51. package/dist/InvoiceDetailViewDataProvider-BppXFT6D.js +0 -2176
  52. package/dist/InvoicePdfViewDataProvider-J7NP1Dhh.js +0 -22
  53. package/dist/IssuerSettingsViewDataProvider-D13f6rvi.js +0 -544
  54. package/dist/billingDocumentDetail.transformer-DcNMzl46.js +0 -310
  55. package/dist/download.util-LyRpGWKA.js +0 -25
@@ -1,15 +1,27 @@
1
- import "./api.util-sW4gNny-.js";
2
- import { C as e, S as t } from "./documentTitle.composable-Dl8Cm3v3.js";
1
+ import "./api.util-DSerLsgA.js";
2
+ import { C as e, w as t } from "./documentTitle.composable-D5uPh3uG.js";
3
3
  import { n, t as r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
4
- import { n as i } from "./invoicingConfig.composable-D-hxnEnh.js";
4
+ import { n as i } from "./invoicingConfig.composable-CzgTMtog.js";
5
5
  import { n as a } from "./address.transformer-jGddczLV.js";
6
- import { bt as o } from "./dist-B33lNwLw.js";
7
- import { i as s } from "./billingDocumentDetail.transformer-DcNMzl46.js";
6
+ import { i as o } from "./billingDocumentDetail.transformer-ClWwi8h4.js";
7
+ import { bt as s } from "./dist-B33lNwLw.js";
8
8
  import { useI18n as c } from "vue-i18n";
9
9
  import { Fragment as l, computed as u, createBlock as d, createCommentVNode as f, createElementBlock as p, createElementVNode as m, createTextVNode as h, createVNode as g, defineComponent as _, normalizeClass as v, normalizeStyle as y, openBlock as b, renderList as x, renderSlot as S, toDisplayString as C, unref as w, withCtx as T } from "vue";
10
10
  import { UIColumnLayout as E, UIRowLayout as D, UISeparator as O, UIText as k } from "@wisemen/vue-core-design-system";
11
- //#region src/modules/invoice/use-cases/pdf/utils/invoicePdf.util.ts
12
- var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F = 16, I = 14, L = /\r?\n/u, R = class {
11
+ //#region src/models/billing-document/billingDocumentAdvancePayment.util.ts
12
+ var A = class {
13
+ static getAmountAfterAdvance(e, t) {
14
+ let i = n(r(t.amount, t.precision), e.precision);
15
+ return {
16
+ ...e,
17
+ amount: e.amount - i
18
+ };
19
+ }
20
+ }, j = class {
21
+ static sortByVatRate(e) {
22
+ return e.toSorted((e, t) => Number(e.vatRate) - Number(t.vatRate));
23
+ }
24
+ }, M = "-", N = 32, P = 512, F = 640, I = 576, L = 704, ee = 52, R = 34, z = 16, B = 14, V = /\r?\n/u, H = class {
13
25
  static appendRows(e, t, n, r, i) {
14
26
  let a = [...t.map((e) => ({
15
27
  kind: "line",
@@ -29,7 +41,7 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
29
41
  name: t.group.name,
30
42
  depth: r,
31
43
  description: t.group.description,
32
- total: this.getGroupTotal(s.flattenLines([t.group]), i),
44
+ total: this.getGroupTotal(o.flattenLines([t.group]), i),
33
45
  type: "group"
34
46
  }), this.appendRows(e, t.group.lines, t.group.groups, r + 1, i));
35
47
  }
@@ -55,11 +67,11 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
55
67
  }
56
68
  static estimateGroupRowHeight(e) {
57
69
  let t = [e.name, e.description].filter((e) => e !== null && e.trim() !== "").reduce((e, t) => e + this.getWrappedTextLineCount(t), 0);
58
- return Math.max(j, F + t * I);
70
+ return Math.max(N, z + t * B);
59
71
  }
60
72
  static estimateLineHeight(e) {
61
73
  let t = this.getWrappedItemLineCount(e);
62
- return Math.max(j, F + t * I);
74
+ return Math.max(N, z + t * B);
63
75
  }
64
76
  static estimateRowHeight(e) {
65
77
  return e.type === "group" ? this.estimateGroupRowHeight(e) : this.estimateLineHeight(e.line);
@@ -80,7 +92,7 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
80
92
  return `${this.formatNumber(e, t)}%`;
81
93
  }
82
94
  static formatPlainDate(e, t) {
83
- return e === null ? A : new Intl.DateTimeFormat(t, {
95
+ return e === null ? M : new Intl.DateTimeFormat(t, {
84
96
  day: "2-digit",
85
97
  month: "2-digit",
86
98
  timeZone: "UTC",
@@ -109,8 +121,8 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
109
121
  };
110
122
  }
111
123
  static getLastPageRowBudget(e) {
112
- let t = e.headerType === "first" ? ee : M;
113
- return e.hasRemarks ? t - P : t;
124
+ let t = e.headerType === "first" ? P : I;
125
+ return e.hasRemarks ? t - ee : t;
114
126
  }
115
127
  static getTotalRowsHeight(e) {
116
128
  return e.reduce((e, t) => e + this.estimateRowHeight(t), 0);
@@ -120,13 +132,13 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
120
132
  }
121
133
  static getWrappedTextLineCount(e) {
122
134
  let t = e.trim();
123
- return t === "" ? 1 : t.split(L).reduce((e, t) => e + Math.max(1, Math.ceil(t.length / ne)), 0);
135
+ return t === "" ? 1 : t.split(V).reduce((e, t) => e + Math.max(1, Math.ceil(t.length / R)), 0);
124
136
  }
125
137
  static paginatePrefixRows(e) {
126
138
  if (e.length === 0) return [];
127
- let t = [], n = e, r = this.takeRowsForBudget(n, te);
139
+ let t = [], n = e, r = this.takeRowsForBudget(n, F);
128
140
  for (t.push(r), n = n.slice(r.length); n.length > 0;) {
129
- let e = this.takeRowsForBudget(n, N);
141
+ let e = this.takeRowsForBudget(n, L);
130
142
  t.push(e), n = n.slice(e.length);
131
143
  }
132
144
  return t;
@@ -173,7 +185,7 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
173
185
  }
174
186
  return n;
175
187
  }
176
- }, z = /* @__PURE__ */ _({
188
+ }, U = /* @__PURE__ */ _({
177
189
  __name: "InvoicePdfFooterSection",
178
190
  props: { invoice: {} },
179
191
  setup(e) {
@@ -186,7 +198,7 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
186
198
  }].filter((e) => e.value !== "")), i = u(() => [
187
199
  {
188
200
  label: n.t("wise_invoicing.invoice.pdf.footer.address"),
189
- value: R.getAddressLines(t.invoice.issuer.address).join(", ")
201
+ value: H.getAddressLines(t.invoice.issuer.address).join(", ")
190
202
  },
191
203
  {
192
204
  label: n.t("wise_invoicing.invoice.pdf.footer.vat_number"),
@@ -257,17 +269,17 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
257
269
  _: 1
258
270
  }));
259
271
  }
260
- }), B = /* @__PURE__ */ _({
272
+ }), W = /* @__PURE__ */ _({
261
273
  __name: "InvoicePdfHeaderSection",
262
274
  props: {
263
275
  invoice: {},
264
276
  pageType: {}
265
277
  },
266
- setup(t) {
267
- let n = t, r = c(), a = i(), s = u(() => r.locale.value || "en-US"), m = u(() => n.invoice.type === e.CREDIT_NOTE), h = u(() => m.value ? n.invoice.sequence === null ? r.t("wise_invoicing.credit_note.detail.fallback_title") : `${r.t("wise_invoicing.invoice.type.credit_note")} ${n.invoice.sequence}` : n.invoice.sequence ?? r.t("wise_invoicing.invoice.detail.fallback_title")), _ = u(() => {
278
+ setup(e) {
279
+ let n = e, r = c(), a = i(), o = u(() => r.locale.value || "en-US"), m = u(() => n.invoice.type === t.CREDIT_NOTE), h = u(() => m.value ? n.invoice.sequence === null ? r.t("wise_invoicing.credit_note.detail.fallback_title") : `${r.t("wise_invoicing.invoice.type.credit_note")} ${n.invoice.sequence}` : n.invoice.sequence ?? r.t("wise_invoicing.invoice.detail.fallback_title")), _ = u(() => {
268
280
  let e = n.invoice.originalInvoice?.sequence;
269
281
  return !m.value || n.pageType !== "first" || e === null ? null : `${r.t("wise_invoicing.invoice.type.standard")} ${e}`;
270
- }), v = u(() => (n.invoice.issuer.name ?? r.t("wise_invoicing.common.not_available")).split(" ").filter((e) => e !== "").slice(0, 2).map((e) => e.toUpperCase())), y = u(() => R.getAddressLines(n.invoice.customer.address)), S = u(() => {
282
+ }), v = u(() => (n.invoice.issuer.name ?? r.t("wise_invoicing.common.not_available")).split(" ").filter((e) => e !== "").slice(0, 2).map((e) => e.toUpperCase())), y = u(() => H.getAddressLines(n.invoice.customer.address)), S = u(() => {
271
283
  let e = n.invoice.customer.vatNumber;
272
284
  return e ? `${r.t("wise_invoicing.invoice.pdf.footer.vat_number")}: ${e}` : null;
273
285
  }), C = u(() => n.invoice.customer.name !== null || y.value.length > 0 || n.invoice.customer.email !== null || S.value !== null), O = u(() => {
@@ -284,7 +296,7 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
284
296
  }), e;
285
297
  });
286
298
  function A(e) {
287
- return R.formatPlainDate(e, s.value);
299
+ return H.formatPlainDate(e, o.value);
288
300
  }
289
301
  return (e, t) => (b(), d(w(E), {
290
302
  as: "header",
@@ -325,7 +337,7 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
325
337
  gap: "xxs",
326
338
  class: "text-xs text-secondary"
327
339
  }, {
328
- default: T(() => [g(w(o), {
340
+ default: T(() => [g(w(s), {
329
341
  "aria-hidden": "true",
330
342
  class: "size-3 shrink-0 text-secondary"
331
343
  }), g(w(k), {
@@ -426,33 +438,33 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
426
438
  _: 1
427
439
  }));
428
440
  }
429
- }), V = /* @__PURE__ */ _({
441
+ }), G = /* @__PURE__ */ _({
430
442
  __name: "InvoicePdfTableCell",
431
443
  props: { bold: { type: Boolean } },
432
444
  setup(e) {
433
445
  let t = e;
434
446
  return (e, n) => (b(), p("td", { class: v([t.bold && "font-semibold", "px-lg py-sm text-right align-middle text-xxs whitespace-nowrap text-primary"]) }, [S(e.$slots, "default")], 2));
435
447
  }
436
- }), H = { class: "border-b border-secondary bg-secondary px-lg py-xs text-right text-xxs font-semibold text-primary" }, U = /* @__PURE__ */ _({
448
+ }), K = { class: "border-b border-secondary bg-secondary px-lg py-xs text-right text-xxs font-semibold text-primary" }, q = /* @__PURE__ */ _({
437
449
  __name: "InvoicePdfTableHeaderCell",
438
450
  props: { label: {} },
439
451
  setup(e) {
440
452
  let t = e;
441
- return (e, n) => (b(), p("th", H, C(t.label), 1));
453
+ return (e, n) => (b(), p("th", K, C(t.label), 1));
442
454
  }
443
- }), 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 = {
455
+ }), J = { class: "mt-2xl w-full" }, Y = { class: "w-full table-fixed border-separate border-spacing-0 overflow-hidden rounded-xs border border-secondary" }, X = {
444
456
  key: 0,
445
457
  class: "w-[8%]"
446
- }, q = { class: "table-header-group" }, J = {
458
+ }, Z = { class: "table-header-group" }, Q = {
447
459
  key: 0,
448
460
  class: "break-inside-avoid bg-secondary [page-break-inside:avoid]"
449
- }, Y = ["colspan"], X = { class: "font-semibold" }, re = {
461
+ }, te = ["colspan"], ne = { class: "font-semibold" }, re = {
450
462
  key: 0,
451
463
  class: "ml-xs text-tertiary"
452
464
  }, ie = {
453
465
  key: 0,
454
466
  class: "mt-xxs whitespace-pre-line text-tertiary"
455
- }, ae = { key: 0 }, oe = ["colspan"], se = /* @__PURE__ */ _({
467
+ }, ae = { key: 0 }, oe = ["colspan"], $ = /* @__PURE__ */ _({
456
468
  __name: "InvoicePdfLinesTable",
457
469
  props: {
458
470
  isCreditNote: { type: Boolean },
@@ -461,26 +473,26 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
461
473
  setup(e) {
462
474
  let t = e, n = c(), r = i(), a = n.locale, o = u(() => r.isUnitVisible.value ? 7 : 6);
463
475
  function s(e) {
464
- return R.formatMonetary(e, a.value);
476
+ return H.formatMonetary(e, a.value);
465
477
  }
466
478
  function _(e) {
467
- return e === null ? "" : R.formatMonetary(e, a.value);
479
+ return e === null ? "" : H.formatMonetary(e, a.value);
468
480
  }
469
481
  function S(e) {
470
482
  let n = t.isCreditNote ? {
471
483
  ...e,
472
484
  amount: -e.amount
473
485
  } : e;
474
- return R.formatMonetary(n, a.value);
486
+ return H.formatMonetary(n, a.value);
475
487
  }
476
488
  function E(e) {
477
- return R.formatMonetary(R.getDisplayLineGrossAmount(e.grossAmount, {
489
+ return H.formatMonetary(H.getDisplayLineGrossAmount(e.grossAmount, {
478
490
  isCreditNote: t.isCreditNote,
479
491
  isDiscount: e.isDiscount
480
492
  }), a.value);
481
493
  }
482
494
  function D(e) {
483
- return R.formatNumber(t.isCreditNote ? -e : e, a.value);
495
+ return H.formatNumber(t.isCreditNote ? -e : e, a.value);
484
496
  }
485
497
  function O(e) {
486
498
  return e.toString(a.value);
@@ -488,36 +500,36 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
488
500
  function k(e) {
489
501
  return { paddingLeft: `calc(var(--spacing-lg) + ${e} * var(--spacing-md))` };
490
502
  }
491
- return (e, i) => (b(), p("div", W, [m("table", G, [
503
+ return (e, i) => (b(), p("div", J, [m("table", Y, [
492
504
  m("colgroup", null, [
493
505
  i[0] ||= m("col", { class: "w-auto" }, null, -1),
494
- w(r).isUnitVisible.value ? (b(), p("col", K)) : f("", !0),
506
+ w(r).isUnitVisible.value ? (b(), p("col", X)) : f("", !0),
495
507
  i[1] ||= m("col", { class: "w-[8%]" }, null, -1),
496
508
  i[2] ||= m("col", { class: "w-[14%]" }, null, -1),
497
509
  i[3] ||= m("col", { class: "w-[16%]" }, null, -1),
498
510
  i[4] ||= m("col", { class: "w-[4%]" }, null, -1),
499
511
  i[5] ||= m("col", { class: "w-[12%]" }, null, -1)
500
512
  ]),
501
- m("thead", q, [m("tr", null, [
502
- g(U, {
513
+ m("thead", Z, [m("tr", null, [
514
+ g(q, {
503
515
  label: w(n).t("wise_invoicing.invoice.detail.line_items.item"),
504
516
  class: "text-left!"
505
517
  }, null, 8, ["label"]),
506
- w(r).isUnitVisible.value ? (b(), d(U, {
518
+ w(r).isUnitVisible.value ? (b(), d(q, {
507
519
  key: 0,
508
520
  label: w(n).t("wise_invoicing.invoice.detail.line_items.unit")
509
521
  }, null, 8, ["label"])) : f("", !0),
510
- g(U, { label: w(n).t("wise_invoicing.invoice.detail.line_items.qty") }, null, 8, ["label"]),
511
- g(U, { label: w(n).t("wise_invoicing.invoice.detail.line_items.unit_price") }, null, 8, ["label"]),
512
- g(U, { label: w(n).t("wise_invoicing.invoice.detail.line_items.price_excl_vat") }, null, 8, ["label"]),
513
- g(U, { label: w(n).t("wise_invoicing.invoice.detail.line_items.vat") }, null, 8, ["label"]),
514
- g(U, { label: w(n).t("wise_invoicing.invoice.detail.line_items.total") }, null, 8, ["label"])
522
+ g(q, { label: w(n).t("wise_invoicing.invoice.detail.line_items.qty") }, null, 8, ["label"]),
523
+ g(q, { label: w(n).t("wise_invoicing.invoice.detail.line_items.unit_price") }, null, 8, ["label"]),
524
+ g(q, { label: w(n).t("wise_invoicing.invoice.detail.line_items.price_excl_vat") }, null, 8, ["label"]),
525
+ g(q, { label: w(n).t("wise_invoicing.invoice.detail.line_items.vat") }, null, 8, ["label"]),
526
+ g(q, { label: w(n).t("wise_invoicing.invoice.detail.line_items.total") }, null, 8, ["label"])
515
527
  ])]),
516
- m("tbody", null, [(b(!0), p(l, null, x(t.rows, (e, t) => (b(), p(l, { key: e.type === "group" ? e.uuid : e.line.uuid }, [e.type === "group" ? (b(), p("tr", J, [m("td", {
528
+ m("tbody", null, [(b(!0), p(l, null, x(t.rows, (e, t) => (b(), p(l, { key: e.type === "group" ? e.uuid : e.line.uuid }, [e.type === "group" ? (b(), p("tr", Q, [m("td", {
517
529
  style: y(k(e.depth)),
518
530
  colspan: o.value - 1,
519
531
  class: "border-y border-secondary py-sm pr-lg align-middle text-xxs wrap-break-word text-primary"
520
- }, [m("span", X, C(e.name), 1), e.description !== null && e.description !== "" ? (b(), p("span", re, C(e.description), 1)) : f("", !0)], 12, Y), m("td", { class: v([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"]) }, C(_(e.total)), 3)])) : (b(), p("tr", {
532
+ }, [m("span", ne, C(e.name), 1), e.description !== null && e.description !== "" ? (b(), p("span", re, C(e.description), 1)) : f("", !0)], 12, te), m("td", { class: v([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"]) }, C(_(e.total)), 3)])) : (b(), p("tr", {
521
533
  key: 1,
522
534
  class: v([t % 2 == 1 ? "bg-secondary" : "bg-primary", "break-inside-avoid [page-break-inside:avoid]"])
523
535
  }, [
@@ -525,27 +537,27 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
525
537
  style: y(k(e.depth)),
526
538
  class: "py-sm pr-lg align-middle text-xxs font-medium wrap-break-word text-primary"
527
539
  }, [m("div", null, C(e.line.name), 1), e.line.description !== null && e.line.description !== "" ? (b(), p("div", ie, C(e.line.description), 1)) : f("", !0)], 4),
528
- w(r).isUnitVisible.value ? (b(), d(V, { key: 0 }, {
540
+ w(r).isUnitVisible.value ? (b(), d(G, { key: 0 }, {
529
541
  default: T(() => [h(C(e.line.unit), 1)]),
530
542
  _: 2
531
543
  }, 1024)) : f("", !0),
532
- g(V, null, {
544
+ g(G, null, {
533
545
  default: T(() => [h(C(D(e.line.quantity)), 1)]),
534
546
  _: 2
535
547
  }, 1024),
536
- g(V, null, {
548
+ g(G, null, {
537
549
  default: T(() => [h(C(s(e.line.unitPrice)), 1)]),
538
550
  _: 2
539
551
  }, 1024),
540
- g(V, null, {
552
+ g(G, null, {
541
553
  default: T(() => [h(C(S(e.line.netAmount)), 1)]),
542
554
  _: 2
543
555
  }, 1024),
544
- g(V, null, {
556
+ g(G, null, {
545
557
  default: T(() => [h(C(O(e.line.vatRatePercentage)), 1)]),
546
558
  _: 2
547
559
  }, 1024),
548
- g(V, { bold: !0 }, {
560
+ g(G, { bold: !0 }, {
549
561
  default: T(() => [h(C(E(e.line)), 1)]),
550
562
  _: 2
551
563
  }, 1024)
@@ -555,19 +567,7 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
555
567
  }, C(w(n).t("wise_invoicing.invoice.detail.line_items.empty")), 9, oe)])) : f("", !0)])
556
568
  ])]));
557
569
  }
558
- }), Z = class {
559
- static getAmountAfterAdvance(e, t) {
560
- let i = n(r(t.amount, t.precision), e.precision);
561
- return {
562
- ...e,
563
- amount: e.amount - i
564
- };
565
- }
566
- }, Q = class {
567
- static sortByVatRate(e) {
568
- return e.toSorted((e, t) => Number(e.vatRate) - Number(t.vatRate));
569
- }
570
- }, ce = { class: "grid grid-cols-[auto_1px_auto] items-end gap-x-2xl align-bottom" }, le = { class: "grid h-min grid-cols-[auto_auto_auto] gap-x-lg gap-y-sm text-xs" }, $ = {
570
+ }), se = { class: "grid grid-cols-[auto_1px_auto] items-end gap-x-2xl align-bottom" }, ce = { class: "grid h-min grid-cols-[auto_auto_auto] gap-x-lg gap-y-sm text-xs" }, le = {
571
571
  key: 0,
572
572
  class: "mt-4xl text-xs text-primary"
573
573
  }, ue = /* @__PURE__ */ _({
@@ -576,8 +576,8 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
576
576
  hasLines: { type: Boolean },
577
577
  invoice: {}
578
578
  },
579
- setup(t) {
580
- let n = t, r = c(), i = u(() => r.locale.value || "en-US"), a = u(() => n.invoice.type === e.CREDIT_NOTE);
579
+ setup(e) {
580
+ let n = e, r = c(), i = u(() => r.locale.value || "en-US"), a = u(() => n.invoice.type === t.CREDIT_NOTE);
581
581
  function o(e) {
582
582
  return {
583
583
  ...e,
@@ -585,10 +585,10 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
585
585
  };
586
586
  }
587
587
  function s(e) {
588
- return R.formatMonetary(a.value ? o(e) : e, i.value);
588
+ return H.formatMonetary(a.value ? o(e) : e, i.value);
589
589
  }
590
590
  let d = u(() => {
591
- let e = Q.sortByVatRate(n.invoice.vatSummaries).map((e) => ({
591
+ let e = j.sortByVatRate(n.invoice.vatSummaries).map((e) => ({
592
592
  key: `${e.vatRate}`,
593
593
  label: y(e.vatRate),
594
594
  netValue: s(e.netAmount),
@@ -600,19 +600,19 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
600
600
  netValue: s(n.invoice.effectiveNet),
601
601
  vatValue: s(n.invoice.vatAmount)
602
602
  }), e;
603
- }), h = u(() => n.invoice.totalDiscountAmount === null ? "-" : `-${R.formatMonetary(n.invoice.totalDiscountAmount, i.value)}`), _ = u(() => {
603
+ }), h = u(() => n.invoice.totalDiscountAmount === null ? "-" : `-${H.formatMonetary(n.invoice.totalDiscountAmount, i.value)}`), _ = u(() => {
604
604
  let { advancePaymentAmount: e, grossAmount: t } = n.invoice;
605
605
  return e === null ? null : {
606
606
  advancePayment: `-${s(e)}`,
607
- amountDue: s(Z.getAmountAfterAdvance(t, e))
607
+ amountDue: s(A.getAmountAfterAdvance(t, e))
608
608
  };
609
609
  });
610
610
  function y(e) {
611
611
  let t = n.invoice.lines.find((t) => t.vatRate === e);
612
612
  return t === void 0 ? r.t("wise_invoicing.invoice.detail.totals.vat") : t.vatRatePercentage.toString(i.value);
613
613
  }
614
- return (e, t) => (b(), p("div", { class: v([n.hasLines ? "mt-xl" : "mt-4xl", "break-inside-avoid [page-break-inside:avoid]"]) }, [m("div", ce, [
615
- m("div", le, [
614
+ return (e, t) => (b(), p("div", { class: v([n.hasLines ? "mt-xl" : "mt-4xl", "break-inside-avoid [page-break-inside:avoid]"]) }, [m("div", se, [
615
+ m("div", ce, [
616
616
  t[0] ||= m("span", { class: "min-w-12" }, null, -1),
617
617
  g(w(k), {
618
618
  text: w(r).t("wise_invoicing.invoice.detail.totals.excl_vat"),
@@ -734,7 +734,7 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
734
734
  ]),
735
735
  _: 1
736
736
  })
737
- ]), n.invoice.externalRemarks ? (b(), p("section", $, [g(w(k), {
737
+ ]), n.invoice.externalRemarks ? (b(), p("section", le, [g(w(k), {
738
738
  text: w(r).t("wise_invoicing.invoice.pdf.summary.remarks"),
739
739
  truncate: !1,
740
740
  as: "h2",
@@ -762,8 +762,8 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
762
762
  watermark: {}
763
763
  },
764
764
  setup(n) {
765
- let r = n, i = u(() => r.billingDocument.status === t.DRAFT || r.billingDocument.status === t.READY), a = u(() => r.billingDocument.type === e.CREDIT_NOTE), o = u(() => R.buildRows(r.billingDocument, { isCreditNote: a.value })), s = u(() => {
766
- let e = R.paginateRows(o.value, { hasRemarks: r.billingDocument.externalRemarks !== null && r.billingDocument.externalRemarks.trim() !== "" });
765
+ let r = n, i = u(() => r.billingDocument.status === e.DRAFT || r.billingDocument.status === e.READY), a = u(() => r.billingDocument.type === t.CREDIT_NOTE), o = u(() => H.buildRows(r.billingDocument, { isCreditNote: a.value })), s = u(() => {
766
+ let e = H.paginateRows(o.value, { hasRemarks: r.billingDocument.externalRemarks !== null && r.billingDocument.externalRemarks.trim() !== "" });
767
767
  return e.map((t, n) => ({
768
768
  isLastPage: n === e.length - 1,
769
769
  headerType: n === 0 ? "first" : "continuation",
@@ -779,11 +779,11 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
779
779
  key: 0,
780
780
  label: r.watermark
781
781
  }, null, 8, ["label"])) : f("", !0),
782
- g(B, {
782
+ g(W, {
783
783
  invoice: r.billingDocument,
784
784
  "page-type": e.headerType
785
785
  }, null, 8, ["invoice", "page-type"]),
786
- e.rows.length > 0 || r.billingDocument.lines.length === 0 ? (b(), d(se, {
786
+ e.rows.length > 0 || r.billingDocument.lines.length === 0 ? (b(), d($, {
787
787
  key: 1,
788
788
  "is-credit-note": a.value,
789
789
  rows: e.rows
@@ -793,10 +793,10 @@ var A = "-", j = 32, ee = 512, te = 640, M = 576, N = 704, P = 52, ne = 34, F =
793
793
  "has-lines": e.rows.length > 0 || r.billingDocument.lines.length === 0,
794
794
  invoice: r.billingDocument
795
795
  }, null, 8, ["has-lines", "invoice"])) : f("", !0),
796
- g(z, { invoice: r.billingDocument }, null, 8, ["invoice"]),
796
+ g(U, { invoice: r.billingDocument }, null, 8, ["invoice"]),
797
797
  m("span", pe, C(t + 1) + "/" + C(s.value.length), 1)
798
798
  ], 2))), 128));
799
799
  }
800
800
  });
801
801
  //#endregion
802
- export { Q as n, Z as r, me as t };
802
+ export { j as n, A as r, me as t };
@@ -1,8 +1,8 @@
1
- import { it as e, rt as t, t as n } from "./api.util-sW4gNny-.js";
1
+ import { it as e, rt as t, t as n } from "./api.util-DSerLsgA.js";
2
2
  import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
3
- import { n as i } from "./invoicingConfig.composable-D-hxnEnh.js";
4
- import { n as a, r as o, t as s } from "./reminderConfig.query-DJmhJp6W.js";
5
- import { Tt as c, ft as l, m as u } from "./dist-B33lNwLw.js";
3
+ import { n as i } from "./invoicingConfig.composable-CzgTMtog.js";
4
+ import { Tt as a, ft as o, m as s } from "./dist-B33lNwLw.js";
5
+ import { n as c, r as l, t as u } from "./reminderConfig.query-CFmCWWlO.js";
6
6
  import { t as d } from "./customerUuid.model-ClN4Vi9n.js";
7
7
  import { z as f } from "zod";
8
8
  import { useI18n as p } from "vue-i18n";
@@ -59,7 +59,7 @@ function K(e) {
59
59
  return ee("dunningCaseDetail", {
60
60
  staleTime: G,
61
61
  params: { dunningCaseUuid: e },
62
- queryFn: () => o.getByUuid(e.value)
62
+ queryFn: () => l.getByUuid(e.value)
63
63
  });
64
64
  }
65
65
  f.uuid().brand("DunningCaseUuid"), f.uuid().brand("DunningCaseReminderUuid");
@@ -84,7 +84,7 @@ function J(e, t) {
84
84
  //#region src/modules/dunning-case/api/mutations/dunningCaseReminderRetry.mutation.ts
85
85
  function Y() {
86
86
  return j({
87
- queryFn: (e) => o.retry(e.params.dunningCaseReminderUuid),
87
+ queryFn: (e) => l.retry(e.params.dunningCaseReminderUuid),
88
88
  queryKeysToInvalidate: {
89
89
  dunningCaseDetail: {},
90
90
  dunningCaseIndex: {}
@@ -101,7 +101,7 @@ var X = /* @__PURE__ */ S({
101
101
  },
102
102
  setup(e) {
103
103
  let t = e, n = p(), r = {
104
- icon: l,
104
+ icon: o,
105
105
  type: "icon"
106
106
  };
107
107
  return (e, i) => t.blockedReason === null ? t.status === "failed" ? (w(), g(O(P), {
@@ -125,7 +125,7 @@ var X = /* @__PURE__ */ S({
125
125
  //#region src/modules/dunning-case/api/mutations/dunningCaseSend.mutation.ts
126
126
  function Z() {
127
127
  return j({
128
- queryFn: (e) => o.send(e.params.dunningCaseUuid),
128
+ queryFn: (e) => l.send(e.params.dunningCaseUuid),
129
129
  queryKeysToInvalidate: {
130
130
  dunningCaseDetail: { dunningCaseUuid: (e) => e.dunningCaseUuid },
131
131
  dunningCaseIndex: {}
@@ -184,7 +184,7 @@ var ue = { class: "min-w-0" }, de = { class: "flex min-w-0 items-center gap-sm"
184
184
  },
185
185
  setup(e) {
186
186
  let t = e, n = p(), i = r();
187
- return (e, r) => (w(), v("div", { class: C([{ "border-t border-secondary": t.hasSeparator }, "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-lg px-lg py-xs"]) }, [y("div", ue, [y("div", de, [y("p", fe, D(t.invoice.sequence), 1), t.invoice.isDisputed ? (w(), v("span", pe, " · " + D(O(n).t("module.dunning_case.detail.protested")), 1)) : O(Q)(t.invoice) ? (w(), v("span", me, " (" + D(O(n).t("module.dunning_case.send.not_yet_due")) + ") ", 1)) : (w(), v("span", he, [x(a, {
187
+ return (e, r) => (w(), v("div", { class: C([{ "border-t border-secondary": t.hasSeparator }, "grid grid-cols-[minmax(0,1fr)_auto] items-center gap-lg px-lg py-xs"]) }, [y("div", ue, [y("div", de, [y("p", fe, D(t.invoice.sequence), 1), t.invoice.isDisputed ? (w(), v("span", pe, " · " + D(O(n).t("module.dunning_case.detail.protested")), 1)) : O(Q)(t.invoice) ? (w(), v("span", me, " (" + D(O(n).t("module.dunning_case.send.not_yet_due")) + ") ", 1)) : (w(), v("span", he, [x(c, {
188
188
  level: t.invoice.level,
189
189
  size: "sm"
190
190
  }, null, 8, ["level"])]))])]), y("p", ge, D(t.invoice.isDisputed ? "—" : O(i).formatMonetary(t.invoice.balanceDueAmount)), 1)], 2));
@@ -238,7 +238,7 @@ function Ae(e) {
238
238
  return e === "fr-BE" || e === "nl-BE" ? e : "en-US";
239
239
  }
240
240
  function je(e) {
241
- let t = p(), n = s();
241
+ let t = p(), n = u();
242
242
  return h(() => {
243
243
  let r = e.value;
244
244
  return r === null || !n.result.value.isOk() ? null : n.result.value.getValue().find((e) => e.sequence === r)?.template[Ae(t.locale.value)].subject || null;
@@ -271,20 +271,20 @@ var Ne = {
271
271
  },
272
272
  emits: ["close"],
273
273
  setup(e, { emit: t }) {
274
- let n = e, r = t, a = p(), o = H(), s = i(), l = Z(), d = K(h(() => n.dunningCaseUuid)), b = h(() => d.result.value.isOk() ? d.result.value.getValue() : null), S = Me(h(() => b.value?.customer.uuid ?? null)), C = je(h(() => b.value?.level ?? null)), T = h(() => {
274
+ let n = e, r = t, o = p(), c = H(), l = i(), u = Z(), d = K(h(() => n.dunningCaseUuid)), b = h(() => d.result.value.isOk() ? d.result.value.getValue() : null), S = Me(h(() => b.value?.customer.uuid ?? null)), C = je(h(() => b.value?.level ?? null)), T = h(() => {
275
275
  let e = b.value?.customer.uuid;
276
- return e === void 0 ? null : s.getCustomerDetailRoute(e);
277
- }), E = h(() => b.value === null ? 0 : ce(b.value.invoices).length), k = h(() => typeof S.defaultEmail.value == "string" ? a.t("module.dunning_case.send.grouped_to", { email: S.defaultEmail.value }) : S.isMissing.value ? a.t("module.dunning_case.send.no_default_recipient") : a.t("module.dunning_case.send.description")), j = U({
276
+ return e === void 0 ? null : l.getCustomerDetailRoute(e);
277
+ }), E = h(() => b.value === null ? 0 : ce(b.value.invoices).length), k = h(() => typeof S.defaultEmail.value == "string" ? o.t("module.dunning_case.send.grouped_to", { email: S.defaultEmail.value }) : S.isMissing.value ? o.t("module.dunning_case.send.no_default_recipient") : o.t("module.dunning_case.send.description")), j = U({
278
278
  schema: f.object({}),
279
279
  onSubmit: async () => {
280
280
  if (S.isMissing.value) {
281
- o.show({ message: a.t("module.dunning_case.send.no_default_recipient_blocked") });
281
+ c.show({ message: o.t("module.dunning_case.send.no_default_recipient_blocked") });
282
282
  return;
283
283
  }
284
- let e = await l.execute({ params: { dunningCaseUuid: n.dunningCaseUuid } });
285
- e.isErr() ? o.apiError(e.error) : (o.show({
284
+ let e = await u.execute({ params: { dunningCaseUuid: n.dunningCaseUuid } });
285
+ e.isErr() ? c.apiError(e.error) : (c.show({
286
286
  duration: Infinity,
287
- message: a.t("module.dunning_case.send.success", { customer: b.value?.customer.name ?? "" })
287
+ message: o.t("module.dunning_case.send.success", { customer: b.value?.customer.name ?? "" })
288
288
  }), n.onSent?.(), r("close"));
289
289
  }
290
290
  });
@@ -295,13 +295,13 @@ var Ne = {
295
295
  }, {
296
296
  default: A(() => [
297
297
  x(O(B), {
298
- title: O(a).t("module.dunning_case.send.title", {
298
+ title: O(o).t("module.dunning_case.send.title", {
299
299
  customer: b.value?.customer.name ?? "",
300
300
  level: b.value?.level ?? ""
301
301
  }),
302
302
  description: k.value,
303
303
  "has-separator": !1,
304
- icon: O(c)
304
+ icon: O(a)
305
305
  }, null, 8, [
306
306
  "title",
307
307
  "description",
@@ -309,7 +309,7 @@ var Ne = {
309
309
  ]),
310
310
  x(O(I), null, {
311
311
  default: A(() => [x(O(F), { gap: "lg" }, {
312
- default: A(() => [O(d).isLoading.value ? (w(), v("p", Ne, D(O(a).t("module.dunning_case.common.loading")), 1)) : b.value === null ? _("", !0) : (w(), v(m, { key: 1 }, [
312
+ default: A(() => [O(d).isLoading.value ? (w(), v("p", Ne, D(O(o).t("module.dunning_case.common.loading")), 1)) : b.value === null ? _("", !0) : (w(), v(m, { key: 1 }, [
313
313
  O(S).isMissing.value ? (w(), g(ke, {
314
314
  key: 0,
315
315
  "customer-detail-route": T.value
@@ -318,7 +318,7 @@ var Ne = {
318
318
  "dunning-case": b.value,
319
319
  subject: O(C)
320
320
  }, null, 8, ["dunning-case", "subject"]),
321
- y("div", Pe, [x(O(u), { class: "mt-xxs size-(--spacing-xl) shrink-0" }), y("p", Fe, D(O(a).t("module.dunning_case.send.impact", {
321
+ y("div", Pe, [x(O(s), { class: "mt-xxs size-(--spacing-xl) shrink-0" }), y("p", Fe, D(O(o).t("module.dunning_case.send.impact", {
322
322
  count: E.value,
323
323
  level: b.value.level
324
324
  })), 1)])
@@ -329,10 +329,10 @@ var Ne = {
329
329
  }),
330
330
  x(O(L), { "has-separator": !1 }, {
331
331
  right: A(() => [x(O(R)), x(O(z), {
332
- "icon-right": O(c),
332
+ "icon-right": O(a),
333
333
  "is-disabled": b.value === null || O(S).isPending.value || O(S).isMissing.value,
334
334
  "is-loading": O(j).isSubmitting.value,
335
- label: O(a).t("module.dunning_case.send.send_now"),
335
+ label: O(o).t("module.dunning_case.send.send_now"),
336
336
  onClick: O(j).submit
337
337
  }, null, 8, [
338
338
  "icon-right",
@@ -1,5 +1,5 @@
1
1
  import { ft as e } from "./dist-B33lNwLw.js";
2
- import { t } from "./invoiceCustomer.service-BNQJt1KV.js";
2
+ import { t } from "./invoiceCustomer.service-CLYUR6vc.js";
3
3
  import { useI18n as n } from "vue-i18n";
4
4
  import { computed as r, createBlock as i, createVNode as a, defineComponent as o, openBlock as s, unref as c, withCtx as l } from "vue";
5
5
  import { useOffsetInfiniteQuery as u } from "@wisemen/vue-core-api-utils";