@wisemen/wise-invoicing-web 0.14.0 → 0.16.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 (72) hide show
  1. package/dist/{ApprovalReminderSettingsViewDataProvider-DlsyA-ZR.js → ApprovalReminderSettingsViewDataProvider-CpGYtZKw.js} +4 -4
  2. package/dist/{BillingDocumentDetailViewDataProvider-D3-X20WR.js → BillingDocumentDetailViewDataProvider-CA71dgRN.js} +1693 -1611
  3. package/dist/{BillingDocumentPdf-CcmP3N34.js → BillingDocumentPdf-CvUxfHDH.js} +10 -10
  4. package/dist/{CreditNoteDetailViewDataProvider-X-m10Sqr.js → CreditNoteDetailViewDataProvider-DK7hkA8d.js} +236 -224
  5. package/dist/{CreditNotePdfViewDataProvider-jWh6REbj.js → CreditNotePdfViewDataProvider-DcQxB1p4.js} +3 -3
  6. package/dist/{DunningCaseSendDialog-DUyOH14Q.js → DunningCaseSendDialog-BWbEi9Vr.js} +13 -13
  7. package/dist/{InvoiceApprovalOutOfSyncIndicator-DzY8gqnD.js → InvoiceApprovalOutOfSyncIndicator-CptL1bbz.js} +2 -2
  8. package/dist/{InvoiceApprovalOverviewView-CoIGxCMN.js → InvoiceApprovalOverviewView-dsTZWXyZ.js} +68 -68
  9. package/dist/{InvoiceApprovalStatusBadge-C9O_mb1l.js → InvoiceApprovalStatusBadge-6cSp2XOq.js} +5 -5
  10. package/dist/{InvoiceApproveDialogDataProvider-hVuyszuo.js → InvoiceApproveDialogDataProvider-DsxA74kh.js} +8 -8
  11. package/dist/InvoiceDeliverySendDialog-byobpQe1.js +445 -0
  12. package/dist/{InvoiceDetailViewDataProvider-DBlmJs3o.js → InvoiceDetailViewDataProvider-DgNkoQNH.js} +484 -471
  13. package/dist/{InvoicePdfView-DBVwRo3q.js → InvoicePdfView-CA-nt_Qs.js} +2 -2
  14. package/dist/{InvoicePdfViewDataProvider-CHLE3XdC.js → InvoicePdfViewDataProvider-CVgcgc9t.js} +3 -3
  15. package/dist/{InvoicePublicProFormaPdfViewDataProvider-DECBZhaP.js → InvoicePublicProFormaPdfViewDataProvider-BIhn-msJ.js} +3 -3
  16. package/dist/{InvoicingFileUploadProvider-BZRLmEsv.js → InvoicingFileUploadProvider-DFjM7Xcj.js} +2 -2
  17. package/dist/{IssuerSettingsViewDataProvider-DrXmGKtc.js → IssuerSettingsViewDataProvider-2Gk7FgL2.js} +60 -60
  18. package/dist/PeppolSettingsViewDataProvider-CLgFRfm_.js +196 -0
  19. package/dist/{api.util-BxDrxtn6.js → api.util-DMgdn9-w.js} +979 -951
  20. package/dist/{billingDocumentDetail.transformer-I1L4zrOM.js → billingDocumentDetail.transformer-DFlbGUZp.js} +3 -3
  21. package/dist/client/index.d.ts +2 -2
  22. package/dist/client/sdk.gen.d.ts +6 -4
  23. package/dist/client/types.gen.d.ts +274 -177
  24. package/dist/client/zod.gen.d.ts +3944 -4241
  25. package/dist/creditNoteDetail.query-D7J1umi4.js +127 -0
  26. package/dist/deliveryReason.util-iMVhwjiW.js +95 -0
  27. package/dist/{dist-BMzyJZTx.js → dist-B33lNwLw.js} +1 -1
  28. package/dist/{dist-Cdbpkd3Y.js → dist-ByzJNujV.js} +69 -50
  29. package/dist/{dist-BZgvL8_m.js → dist-Ck8ZEByl.js} +3 -3
  30. package/dist/{dist-BFx8U4Su.js → dist-CwkVU5yS.js} +1 -1
  31. package/dist/{documentTitle.composable-BqZWKGw1.js → documentTitle.composable-QdSLs6eT.js} +11 -7
  32. package/dist/{i18n.lib-7EI865En.js → i18n.lib-CEXUpXfo.js} +98 -2
  33. package/dist/index.d.ts +96 -0
  34. package/dist/index.js +1484 -1480
  35. package/dist/{invoice.service-DfMS-JGk.js → invoice.service-NBqJSMkg.js} +226 -236
  36. package/dist/{invoiceApproval.service-CvvAZxJH.js → invoiceApproval.service-Bk--tRnu.js} +5 -5
  37. package/dist/{invoiceApprovalStatus.util-QhwQpmWI.js → invoiceApprovalStatus.util-CYWPHuJD.js} +30 -30
  38. package/dist/{invoiceCustomer.service-DSAI1dGB.js → invoiceCustomer.service-D13Cwb13.js} +6 -6
  39. package/dist/{invoiceIndexCache.util-DduYusET.js → invoiceDeliveryStatus.util-BExQWz3m.js} +51 -124
  40. package/dist/{invoiceDetail.query-qPz6hTNU.js → invoiceDetail.query-CLvnFeZh.js} +1 -1
  41. package/dist/{invoicingConfig.composable-DT17tqnm.js → invoicingConfig.composable-BebjIIAC.js} +2 -2
  42. package/dist/{issuerSettings.query-DYmr_dfw.js → issuerSettings.query-P_gGS0ER.js} +17 -17
  43. package/dist/libs/i18n.lib.d.ts +96 -0
  44. package/dist/locales/en-US.json.d.ts +49 -1
  45. package/dist/locales/nl-BE.json.d.ts +49 -1
  46. package/dist/modules/credit-note/api/services/creditNote.service.d.ts +0 -1
  47. package/dist/modules/invoice/api/services/invoice.service.d.ts +1 -4
  48. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewBulkSendEligibility.composable.d.ts +2 -12
  49. package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewSelection.composable.d.ts +0 -10
  50. package/dist/modules/invoice/use-cases/overview/dialogs/InvoiceOverviewBulkSendDialog.vue.d.ts +4 -2
  51. package/dist/modules/invoice-delivery/api/mutations/invoiceDeliverySend.mutation.d.ts +4 -0
  52. package/dist/modules/invoice-delivery/api/mutations/invoiceReminderSend.mutation.d.ts +3 -0
  53. package/dist/modules/invoice-delivery/api/queries/invoiceDeliveries.query.d.ts +2 -0
  54. package/dist/modules/invoice-delivery/api/query-keys/invoiceDelivery.queryKeys.d.ts +7 -0
  55. package/dist/modules/invoice-delivery/api/services/invoiceDelivery.service.d.ts +9 -0
  56. package/dist/modules/invoice-delivery/components/form/InvoiceDeliveryFormEmailField.vue.d.ts +7 -0
  57. package/dist/modules/invoice-delivery/components/form/InvoiceDeliveryFormPeppolField.vue.d.ts +9 -0
  58. package/dist/modules/invoice-delivery/models/deliveryInvoiceIndex.builder.d.ts +9 -0
  59. package/dist/modules/invoice-delivery/models/invoiceDelivery.model.d.ts +43 -0
  60. package/dist/modules/invoice-delivery/models/invoiceDelivery.transformer.d.ts +7 -0
  61. package/dist/modules/invoice-delivery/models/invoiceDeliverySendForm.model.d.ts +6 -0
  62. package/dist/modules/invoice-delivery/use-cases/send/dialogs/InvoiceDeliverySendDialog.vue.d.ts +16 -0
  63. package/dist/modules/invoice-delivery/use-cases/status/components/InvoiceDeliveryStatus.vue.d.ts +6 -0
  64. package/dist/{reminderConfig.query-BoNWAhZP.js → reminderConfig.query-s-gBYoPo.js} +12 -12
  65. package/dist/style.css +1 -1
  66. package/package.json +10 -10
  67. package/dist/CustomFieldValueText-C9yV_CrJ.js +0 -219
  68. package/dist/PeppolSettingsViewDataProvider-BesduXML.js +0 -262
  69. package/dist/creditNoteDetail.query-BurujY-Y.js +0 -131
  70. package/dist/modules/credit-note/api/mutations/creditNoteSend.mutation.d.ts +0 -4
  71. package/dist/modules/invoice/api/mutations/invoiceBulkSend.mutation.d.ts +0 -5
  72. package/dist/modules/invoice/api/mutations/invoiceSend.mutation.d.ts +0 -4
@@ -1,44 +1,44 @@
1
- import { t as e } from "./i18n.lib-7EI865En.js";
2
- import { gt as t, t as n } from "./api.util-BxDrxtn6.js";
3
- import { C as r, _ as i, a, b as o, c as s, f as c, l, r as u, v as d, y as f } from "./documentTitle.composable-BqZWKGw1.js";
1
+ import { t as e } from "./i18n.lib-CEXUpXfo.js";
2
+ import { t, vt as n } from "./api.util-DMgdn9-w.js";
3
+ import { S as r, T as i, a, b as o, c as s, l as c, m as l, r as u, x as d, y as f } from "./documentTitle.composable-QdSLs6eT.js";
4
4
  import { r as p, t as m } from "./useCurrencyFormat.composable-MtZaqKnO.js";
5
- import { n as h } from "./invoicingConfig.composable-DT17tqnm.js";
5
+ import { n as h } from "./invoicingConfig.composable-BebjIIAC.js";
6
6
  import { t as g } from "./search.composable-CU9OpyUB.js";
7
- import { a as _, i as ee, n as v, o as te, t as y } from "./invoice.service-DfMS-JGk.js";
7
+ import { a as _, c as ee, i as te, n as v, t as y } from "./invoice.service-NBqJSMkg.js";
8
8
  import { n as ne } from "./address.transformer-jGddczLV.js";
9
- import { a as re, i as ie, n as b, r as ae, t as oe } from "./CustomFieldValueText-C9yV_CrJ.js";
10
- import { n as se, t as ce } from "./download.util-LyRpGWKA.js";
11
- import { $ as le, A as ue, G as de, I as fe, L as pe, S as me, T as he, Tt as ge, U as _e, V as ve, X as ye, Y as be, _ as xe, b as Se, i as Ce, nt as we, ot as x, pt as S, q as Te, t as Ee, u as De, ut as Oe, xt as ke, yt as C } from "./dist-BMzyJZTx.js";
12
- import { n as w, t as T } from "./dist-Cdbpkd3Y.js";
9
+ import { a as re, i as b, o as ie, r as ae, s as oe, t as se } from "./InvoiceDeliverySendDialog-byobpQe1.js";
10
+ import { n as ce, t as le } from "./download.util-LyRpGWKA.js";
11
+ import { $ as ue, A as de, G as fe, I as pe, L as me, S as he, T as ge, Tt as x, U as _e, V as ve, X as ye, Y as be, _ as xe, b as Se, i as Ce, nt as we, ot as Te, pt as S, q as C, t as Ee, u as De, ut as Oe, xt as ke, yt as Ae } from "./dist-B33lNwLw.js";
12
+ import { n as w, r as T } from "./dist-ByzJNujV.js";
13
13
  import { t as E } from "./formango.util-D5c2ql--.js";
14
- import { t as Ae } from "./invoiceApprovalStatus.util-QhwQpmWI.js";
15
- import { t as je } from "./invoiceCustomer.service-DSAI1dGB.js";
16
- import { a as Me, i as Ne, n as Pe, r as Fe, t as Ie } from "./invoiceIndexCache.util-DduYusET.js";
17
- import { n as Le, t as Re } from "./InvoiceApprovalStatusBadge-C9O_mb1l.js";
18
- import { t as ze } from "./issuerSettings.query-DYmr_dfw.js";
19
- import { C as Be, _ as Ve, a as He, b as Ue, c as We, d as Ge, f as Ke, g as qe, h as Je, i as Ye, l as Xe, m as Ze, n as Qe, o as $e, p as et, r as tt, s as nt, t as rt, u as it, v as at, w as ot, x as st, y as ct } from "./BillingDocumentDetailViewDataProvider-D3-X20WR.js";
20
- import { r as lt } from "./InvoicingFileUploadProvider-BZRLmEsv.js";
21
- import { i as ut, n as dt, r as ft, t as pt } from "./InvoiceApproveDialogDataProvider-hVuyszuo.js";
22
- import { t as mt } from "./invoiceDetail.query-qPz6hTNU.js";
23
- import ht, { z as D } from "zod";
14
+ import { t as je } from "./invoiceApprovalStatus.util-CYWPHuJD.js";
15
+ import { t as Me } from "./invoiceCustomer.service-D13Cwb13.js";
16
+ import { i as Ne, n as Pe, r as Fe, t as Ie } from "./invoiceDeliveryStatus.util-BExQWz3m.js";
17
+ import { n as Le, t as Re } from "./InvoiceApprovalStatusBadge-6cSp2XOq.js";
18
+ import { t as ze } from "./issuerSettings.query-P_gGS0ER.js";
19
+ import { C as Be, E as Ve, S as He, T as Ue, _ as We, a as Ge, b as Ke, c as qe, d as Je, f as Ye, g as Xe, h as Ze, i as Qe, l as $e, m as et, n as tt, o as nt, p as rt, r as it, s as at, t as ot, u as st, v as ct, x as lt, y as ut } from "./BillingDocumentDetailViewDataProvider-CA71dgRN.js";
20
+ import { r as dt } from "./InvoicingFileUploadProvider-DFjM7Xcj.js";
21
+ import { i as ft, n as pt, r as mt, t as ht } from "./InvoiceApproveDialogDataProvider-DsxA74kh.js";
22
+ import { t as gt } from "./invoiceDetail.query-CLvnFeZh.js";
23
+ import _t, { z as D } from "zod";
24
24
  import { useI18n as O } from "vue-i18n";
25
- import { Fragment as k, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createSlots as gt, createTextVNode as _t, createVNode as F, defineComponent as I, mergeModels as vt, mergeProps as L, normalizeClass as yt, openBlock as R, ref as bt, renderList as xt, resolveDynamicComponent as St, toDisplayString as z, unref as B, useModel as Ct, watch as wt, withCtx as V } from "vue";
26
- import { ApiErrorUtil as Tt, useKeysetInfiniteQuery as Et, useMutation as H, useOffsetInfiniteQuery as Dt, useQuery as Ot } from "@wisemen/vue-core-api-utils";
27
- import { RouterLink as kt, useRouter as At } from "vue-router";
28
- import { Temporal as jt } from "temporal-polyfill";
29
- import { UIAutocomplete as Mt, UIBadge as Nt, UIBadgeLabel as Pt, UIBadgeSeparator as Ft, UIButton as It, UICheckbox as Lt, UIClickableElement as Rt, UIColumnLayout as zt, UIDateField as Bt, UIDetailList as Vt, UIDetailListGroup as Ht, UIDetailListGroupItem as U, UIDetailListGroupItemLabel as W, UIDetailListGroupItemValueText as G, UIDetailListGroupSeparator as Ut, UIDialog as Wt, UIDialogBody as Gt, UIDialogFooter as K, UIDialogFooterCancel as q, UIDialogFooterSubmit as Kt, UIDialogHeader as J, UIForm as qt, UIFormDialog as Y, UIFormFieldGrid as Jt, UIFormFieldGroup as Yt, UIFormSubmitButton as Xt, UIIconButton as Zt, UINumberField as Qt, UIRowLayout as $t, UISelect as en, UITable as tn, UITableCell as nn, UITableCellInteractiveElement as rn, UIText as X, UITextField as an, UITooltip as on, UITooltipContent as sn, createAutocompleteOptions as cn, createComponent as Z, createSelectOptions as ln, defineTableColumns as un, useOverlay as dn, useToast as Q } from "@wisemen/vue-core-design-system";
25
+ import { Fragment as k, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createSlots as vt, createTextVNode as yt, createVNode as F, defineComponent as I, mergeModels as bt, mergeProps as L, normalizeClass as xt, openBlock as R, ref as St, renderList as Ct, resolveDynamicComponent as wt, toDisplayString as z, unref as B, useModel as Tt, watch as Et, withCtx as V } from "vue";
26
+ import { ApiErrorUtil as Dt, useKeysetInfiniteQuery as Ot, useMutation as H, useOffsetInfiniteQuery as kt, useQuery as At } from "@wisemen/vue-core-api-utils";
27
+ import { RouterLink as jt, useRouter as Mt } from "vue-router";
28
+ import { Temporal as Nt } from "temporal-polyfill";
29
+ import { UIAutocomplete as Pt, UIBadge as Ft, UIBadgeLabel as It, UIBadgeSeparator as Lt, UIButton as Rt, UICheckbox as zt, UIClickableElement as Bt, UIColumnLayout as Vt, UIDateField as Ht, UIDetailList as Ut, UIDetailListGroup as Wt, UIDetailListGroupItem as U, UIDetailListGroupItemLabel as W, UIDetailListGroupItemValueText as G, UIDetailListGroupSeparator as Gt, UIDialog as Kt, UIDialogBody as qt, UIDialogFooter as K, UIDialogFooterCancel as q, UIDialogFooterSubmit as Jt, UIDialogHeader as J, UIForm as Yt, UIFormDialog as Y, UIFormFieldGrid as Xt, UIFormFieldGroup as Zt, UIFormSubmitButton as Qt, UIIconButton as $t, UINumberField as en, UIRowLayout as tn, UISelect as nn, UITable as rn, UITableCell as an, UITableCellInteractiveElement as on, UIText as X, UITextField as sn, UITooltip as cn, UITooltipContent as ln, createAutocompleteOptions as un, createComponent as Z, createSelectOptions as dn, defineTableColumns as fn, useOverlay as pn, useToast as Q } from "@wisemen/vue-core-design-system";
30
30
  import { useForm as $ } from "formango";
31
31
  //#region src/modules/invoice/use-cases/detail/components/InvoiceApprovalBanner.vue?vue&type=script&setup=true&lang.ts
32
- var fn = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, pn = { class: "flex flex-col gap-xs pr-4xl" }, mn = {
32
+ var mn = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, hn = { class: "flex flex-col gap-xs pr-4xl" }, gn = {
33
33
  key: 0,
34
34
  class: "text-xs text-tertiary"
35
- }, hn = {
35
+ }, _n = {
36
36
  key: 0,
37
37
  class: "flex flex-wrap items-center gap-lg"
38
- }, gn = {
38
+ }, vn = {
39
39
  key: 0,
40
40
  class: "absolute top-(--spacing-sm) right-(--spacing-sm) flex items-center gap-xxs rounded-full bg-error-solid px-sm py-xxs"
41
- }, _n = /* @__PURE__ */ I({
41
+ }, yn = /* @__PURE__ */ I({
42
42
  __name: "InvoiceApprovalBanner",
43
43
  props: {
44
44
  isOutOfSync: { type: Boolean },
@@ -52,75 +52,75 @@ var fn = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, pn = { class: "flex f
52
52
  "viewProForma"
53
53
  ],
54
54
  setup(e, { emit: t }) {
55
- let n = e, r = t, a = O(), o = w(), s = A(() => n.approval?.sentAt ?? null), c = A(() => s.value !== null), l = A(() => n.approval?.status === i.REJECTED), u = A(() => s.value === null ? "" : o.toDate(s.value)), d = A(() => l.value ? "error" : n.isOutOfSync ? "warning" : "info"), f = A(() => n.isOutOfSync ? a.t("wise_invoicing.invoice.approval_banner.out_of_sync", { date: u.value }) : a.t("wise_invoicing.invoice.approval_banner.sent", { date: u.value })), p = A(() => {
56
- if (n.isOutOfSync) return a.t("wise_invoicing.invoice.approval_banner.out_of_sync_supporting");
57
- if (n.rejection === null || n.approval?.status === i.APPROVED) return null;
58
- let e = a.t(Ae.getRejectionReasonTranslationKey(n.rejection.reason));
59
- return a.t(l.value ? "wise_invoicing.invoice.approval_banner.rejected_reason" : "wise_invoicing.invoice.approval_banner.previously_rejected_reason", { reason: n.rejection.remark === null ? e : `${e} — ${n.rejection.remark}` });
60
- }), m = A(() => l.value || n.approval?.status !== i.REQUESTED ? null : n.approval.level), h = A(() => {
55
+ let n = e, r = t, i = O(), a = T(), o = A(() => n.approval?.sentAt ?? null), s = A(() => o.value !== null), c = A(() => n.approval?.status === f.REJECTED), l = A(() => o.value === null ? "" : a.toDate(o.value)), u = A(() => c.value ? "error" : n.isOutOfSync ? "warning" : "info"), d = A(() => n.isOutOfSync ? i.t("wise_invoicing.invoice.approval_banner.out_of_sync", { date: l.value }) : i.t("wise_invoicing.invoice.approval_banner.sent", { date: l.value })), p = A(() => {
56
+ if (n.isOutOfSync) return i.t("wise_invoicing.invoice.approval_banner.out_of_sync_supporting");
57
+ if (n.rejection === null || n.approval?.status === f.APPROVED) return null;
58
+ let e = i.t(je.getRejectionReasonTranslationKey(n.rejection.reason));
59
+ return i.t(c.value ? "wise_invoicing.invoice.approval_banner.rejected_reason" : "wise_invoicing.invoice.approval_banner.previously_rejected_reason", { reason: n.rejection.remark === null ? e : `${e} — ${n.rejection.remark}` });
60
+ }), m = A(() => c.value || n.approval?.status !== f.REQUESTED ? null : n.approval.level), h = A(() => {
61
61
  let e = m.value;
62
- return e === null ? "" : a.t(Ae.getReminderLevelTranslationKey(e));
62
+ return e === null ? "" : i.t(je.getReminderLevelTranslationKey(e));
63
63
  }), g = A(() => {
64
64
  let e = n.approval?.reminderSentAt ?? null;
65
- return m.value === null || e === null ? null : a.t("wise_invoicing.invoice.approval_banner.last_reminder_sent", { time: o.toRelativeTime(e) });
65
+ return m.value === null || e === null ? null : i.t("wise_invoicing.invoice.approval_banner.last_reminder_sent", { time: a.toRelativeTime(e) });
66
66
  }), _ = A(() => ({
67
67
  error: "border-error-subtle bg-error-primary",
68
68
  info: "border-primary bg-primary-alt",
69
69
  warning: "border-warning-300 bg-warning-primary"
70
- })[d.value]), ee = A(() => ({
70
+ })[u.value]), ee = A(() => ({
71
71
  error: "rounded-full bg-error-secondary",
72
72
  info: "rounded-lg border border-primary bg-primary shadow-xs",
73
73
  warning: "rounded-full bg-warning-secondary"
74
- })[d.value]), v = A(() => ({
74
+ })[u.value]), te = A(() => ({
75
75
  error: "text-error-primary",
76
76
  info: "text-tertiary",
77
77
  warning: "text-warning-primary"
78
- })[d.value]), te = A(() => d.value === "info" ? ge : we), y = A(() => ({
78
+ })[u.value]), v = A(() => u.value === "info" ? x : we), y = A(() => ({
79
79
  error: "text-error-primary",
80
80
  info: "text-brand-secondary",
81
81
  warning: "text-tertiary"
82
- })[d.value]);
83
- return (e, t) => c.value ? (R(), N("div", {
82
+ })[u.value]);
83
+ return (e, t) => s.value ? (R(), N("div", {
84
84
  key: 0,
85
- class: yt([_.value, "relative flex items-start gap-xl rounded-xl border p-xl shadow-xs"])
85
+ class: xt([_.value, "relative flex items-start gap-xl rounded-xl border p-xl shadow-xs"])
86
86
  }, [
87
- P("span", { class: yt([ee.value, "flex size-(--spacing-4xl) shrink-0 items-center justify-center"]) }, [(R(), j(St(te.value), { class: yt([v.value, "size-(--spacing-xl)"]) }, null, 8, ["class"]))], 2),
88
- P("div", fn, [P("div", pn, [F(B(X), {
89
- text: f.value,
87
+ P("span", { class: xt([ee.value, "flex size-(--spacing-4xl) shrink-0 items-center justify-center"]) }, [(R(), j(wt(v.value), { class: xt([te.value, "size-(--spacing-xl)"]) }, null, 8, ["class"]))], 2),
88
+ P("div", mn, [P("div", hn, [F(B(X), {
89
+ text: d.value,
90
90
  class: "text-xs font-semibold text-secondary"
91
- }, null, 8, ["text"]), p.value === null ? M("", !0) : (R(), N("p", mn, [_t(z(p.value) + " ", 1), n.proFormaFile !== null && n.isOutOfSync ? (R(), j(B(Rt), { key: 0 }, {
91
+ }, null, 8, ["text"]), p.value === null ? M("", !0) : (R(), N("p", gn, [yt(z(p.value) + " ", 1), n.proFormaFile !== null && n.isOutOfSync ? (R(), j(B(Bt), { key: 0 }, {
92
92
  default: V(() => [P("button", {
93
- class: yt([y.value, "underline-offset-2 hover:underline"]),
93
+ class: xt([y.value, "underline-offset-2 hover:underline"]),
94
94
  type: "button",
95
95
  onClick: t[0] ||= (e) => r("viewProForma")
96
- }, z(B(a).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 3)]),
96
+ }, z(B(i).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 3)]),
97
97
  _: 1
98
- })) : M("", !0)]))]), n.isOutOfSync || n.proFormaFile !== null ? (R(), N("div", hn, [n.isOutOfSync ? (R(), N(k, { key: 0 }, [F(B(Rt), null, {
98
+ })) : M("", !0)]))]), n.isOutOfSync || n.proFormaFile !== null ? (R(), N("div", _n, [n.isOutOfSync ? (R(), N(k, { key: 0 }, [F(B(Bt), null, {
99
99
  default: V(() => [P("button", {
100
100
  class: "text-xs font-semibold text-tertiary underline-offset-2 hover:underline",
101
101
  type: "button",
102
102
  onClick: t[1] ||= (e) => r("revertChanges")
103
- }, z(B(a).t("wise_invoicing.invoice.approval_banner.revert_changes")), 1)]),
103
+ }, z(B(i).t("wise_invoicing.invoice.approval_banner.revert_changes")), 1)]),
104
104
  _: 1
105
- }), F(B(Rt), null, {
105
+ }), F(B(Bt), null, {
106
106
  default: V(() => [P("button", {
107
107
  class: "text-xs font-semibold text-warning-primary underline-offset-2 hover:underline",
108
108
  type: "button",
109
109
  onClick: t[2] ||= (e) => r("sendNewRequest")
110
- }, z(B(a).t("wise_invoicing.invoice.approval_banner.send_new_request")), 1)]),
110
+ }, z(B(i).t("wise_invoicing.invoice.approval_banner.send_new_request")), 1)]),
111
111
  _: 1
112
- })], 64)) : (R(), N(k, { key: 1 }, [n.proFormaFile === null ? M("", !0) : (R(), j(B(Rt), { key: 0 }, {
112
+ })], 64)) : (R(), N(k, { key: 1 }, [n.proFormaFile === null ? M("", !0) : (R(), j(B(Bt), { key: 0 }, {
113
113
  default: V(() => [P("button", {
114
- class: yt([y.value, "text-xs font-semibold underline-offset-2 hover:underline"]),
114
+ class: xt([y.value, "text-xs font-semibold underline-offset-2 hover:underline"]),
115
115
  type: "button",
116
116
  onClick: t[3] ||= (e) => r("viewProForma")
117
- }, z(B(a).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 3)]),
117
+ }, z(B(i).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 3)]),
118
118
  _: 1
119
119
  }))], 64))])) : M("", !0)]),
120
- l.value ? (R(), N("span", gn, [F(B(le), { class: "size-(--spacing-lg) shrink-0 text-white" }), F(B(X), {
121
- text: B(a).t("wise_invoicing.invoice.approval_status.rejected"),
120
+ c.value ? (R(), N("span", vn, [F(B(ue), { class: "size-(--spacing-lg) shrink-0 text-white" }), F(B(X), {
121
+ text: B(i).t("wise_invoicing.invoice.approval_status.rejected"),
122
122
  class: "text-xs text-white"
123
- }, null, 8, ["text"])])) : m.value !== null && g.value !== null ? (R(), j(B(on), {
123
+ }, null, 8, ["text"])])) : m.value !== null && g.value !== null ? (R(), j(B(cn), {
124
124
  key: 1,
125
125
  "popover-side-offset": 8,
126
126
  class: "absolute top-(--spacing-sm) right-(--spacing-sm)",
@@ -134,7 +134,7 @@ var fn = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, pn = { class: "flex f
134
134
  size: "sm",
135
135
  tone: "warning"
136
136
  }, null, 8, ["label", "level"])]),
137
- content: V(() => [F(B(sn), null, {
137
+ content: V(() => [F(B(ln), null, {
138
138
  default: V(() => [F(B(X), {
139
139
  text: g.value,
140
140
  class: "text-sm text-primary"
@@ -156,7 +156,7 @@ var fn = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, pn = { class: "flex f
156
156
  });
157
157
  //#endregion
158
158
  //#region src/modules/invoice/api/mutations/invoiceUpdate.mutation.ts
159
- function vn() {
159
+ function bn() {
160
160
  return H({
161
161
  queryFn: (e) => y.update(e.params.invoiceUuid, e.body),
162
162
  queryKeysToInvalidate: {
@@ -167,15 +167,15 @@ function vn() {
167
167
  }
168
168
  //#endregion
169
169
  //#region src/modules/invoice/components/InvoiceDeliveryStatusBadge.vue
170
- var yn = /* @__PURE__ */ I({
170
+ var xn = /* @__PURE__ */ I({
171
171
  __name: "InvoiceDeliveryStatusBadge",
172
172
  props: {
173
173
  deliveryStatus: {},
174
174
  size: { default: "sm" }
175
175
  },
176
176
  setup(e) {
177
- let t = e, n = O(), r = A(() => Pe.getMetadata(t.deliveryStatus)), i = A(() => n.t(r.value.translationKey));
178
- return (e, n) => (R(), j(B(Nt), {
177
+ let t = e, n = O(), r = A(() => Ie.getMetadata(t.deliveryStatus)), i = A(() => n.t(r.value.translationKey));
178
+ return (e, n) => (R(), j(B(Ft), {
179
179
  label: i.value,
180
180
  color: r.value.tone,
181
181
  size: t.size,
@@ -186,7 +186,7 @@ var yn = /* @__PURE__ */ I({
186
186
  "size"
187
187
  ]));
188
188
  }
189
- }), bn = D.string().nullable(), xn = D.object({ subject: bn }), Sn = /* @__PURE__ */ I({
189
+ }), Sn = D.string().nullable(), Cn = D.object({ subject: Sn }), wn = /* @__PURE__ */ I({
190
190
  __name: "InvoiceDetailHeaderSection",
191
191
  props: {
192
192
  isDisputed: { type: Boolean },
@@ -197,11 +197,11 @@ var yn = /* @__PURE__ */ I({
197
197
  },
198
198
  emits: ["togglePdfView"],
199
199
  setup(e, { emit: t }) {
200
- let n = e, r = t, i = O(), a = Q(), o = vn(), s = A(() => new Be(n.invoice.status)), c = A(() => s.value.color), l = A(() => i.t(s.value.translationKey)), u = A(() => n.invoice.deliveryStatus !== d.UNSENT), f = A(() => Pe.isSent(n.invoice.deliveryStatus)), p = A(() => !n.invoice.isEditable), m = $({
200
+ let n = e, r = t, i = O(), a = Q(), s = bn(), c = A(() => new Ue(n.invoice.status)), l = A(() => c.value.color), u = A(() => i.t(c.value.translationKey)), d = A(() => n.invoice.deliveryStatus !== o.UNSENT), f = A(() => Ie.isSent(n.invoice.deliveryStatus)), p = A(() => !n.invoice.isEditable), m = $({
201
201
  initialState: { subject: n.invoice.subject },
202
- schema: xn,
202
+ schema: Cn,
203
203
  onSubmit: async (e) => {
204
- let t = await o.execute({
204
+ let t = await s.execute({
205
205
  body: {
206
206
  ...v.toForm(n.invoice),
207
207
  subject: e.subject
@@ -211,21 +211,21 @@ var yn = /* @__PURE__ */ I({
211
211
  t.isErr() && a.apiError(t.error);
212
212
  }
213
213
  }), h = m.register("subject");
214
- return ot({ form: m }), (e, t) => (R(), j(B(qt), {
214
+ return Ve({ form: m }), (e, t) => (R(), j(B(Yt), {
215
215
  form: B(m),
216
216
  "prompt-on-unsaved-changes": !1
217
217
  }, {
218
- default: V(() => [F(at, {
218
+ default: V(() => [F(ut, {
219
219
  "fallback-title": B(i).t("wise_invoicing.invoice.detail.fallback_title"),
220
220
  "is-disabled": p.value,
221
221
  sequence: n.invoice.sequence,
222
- "status-color": c.value,
223
- "status-label": l.value,
222
+ "status-color": l.value,
223
+ "status-label": u.value,
224
224
  icon: B(we),
225
225
  "subject-field": B(h),
226
226
  "subject-placeholder": B(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
227
227
  }, {
228
- actions: V(() => [F(Ve, {
228
+ actions: V(() => [F(ct, {
229
229
  "is-pdf-view-active": n.isPdfViewActive,
230
230
  "menu-groups": n.menuGroups,
231
231
  "primary-buttons": n.primaryButtons,
@@ -235,13 +235,13 @@ var yn = /* @__PURE__ */ I({
235
235
  "menu-groups",
236
236
  "primary-buttons"
237
237
  ])]),
238
- status: V(() => [F(B($t), {
238
+ status: V(() => [F(B(tn), {
239
239
  gap: "xs",
240
240
  class: "flex-wrap items-start"
241
241
  }, {
242
242
  default: V(() => [
243
- F(Ne, { "lifecycle-status": n.invoice.lifecycleStatus }, null, 8, ["lifecycle-status"]),
244
- F(Fe, {
243
+ F(Fe, { "lifecycle-status": n.invoice.lifecycleStatus }, null, 8, ["lifecycle-status"]),
244
+ F(Pe, {
245
245
  "is-sent": f.value,
246
246
  "balance-due-amount": n.invoice.balanceDueAmount,
247
247
  "gross-amount": n.invoice.grossAmount,
@@ -256,9 +256,9 @@ var yn = /* @__PURE__ */ I({
256
256
  "settlement-status",
257
257
  "total-credited-amount"
258
258
  ]),
259
- n.invoice.isOverdue ? (R(), j(ct, { key: 0 })) : M("", !0),
260
- n.isDisputed ? (R(), j(Me, { key: 1 })) : M("", !0),
261
- u.value ? (R(), j(yn, {
259
+ n.invoice.isOverdue ? (R(), j(Ke, { key: 0 })) : M("", !0),
260
+ n.isDisputed ? (R(), j(Ne, { key: 1 })) : M("", !0),
261
+ d.value ? (R(), j(xn, {
262
262
  key: 2,
263
263
  "delivery-status": n.invoice.deliveryStatus
264
264
  }, null, 8, ["delivery-status"])) : M("", !0),
@@ -288,12 +288,12 @@ var yn = /* @__PURE__ */ I({
288
288
  _: 1
289
289
  }, 8, ["form"]));
290
290
  }
291
- }), Cn = { class: "grid w-full grid-cols-1 gap-md lg:grid-cols-3" }, wn = /* @__PURE__ */ I({
291
+ }), Tn = { class: "grid w-full grid-cols-1 gap-md lg:grid-cols-3" }, En = /* @__PURE__ */ I({
292
292
  __name: "InvoiceDetailLinkedCreditNotesSection",
293
293
  props: { invoice: {} },
294
294
  setup(e) {
295
295
  let t = e, n = O(), r = p(), i = A(() => t.invoice.creditNotes.map((e) => {
296
- let t = new Be(e.status);
296
+ let t = new Ue(e.status);
297
297
  return {
298
298
  uuid: e.uuid,
299
299
  title: e.sequence === null ? n.t("wise_invoicing.invoice.detail.credit_notes.untitled") : n.t("wise_invoicing.invoice.detail.credit_notes.card_title", { sequence: e.sequence }),
@@ -308,7 +308,7 @@ var yn = /* @__PURE__ */ I({
308
308
  amount: e.grossAmount.amount > 0 ? -e.grossAmount.amount : e.grossAmount.amount
309
309
  };
310
310
  }
311
- return (e, t) => i.value.length > 0 ? (R(), j(B(zt), {
311
+ return (e, t) => i.value.length > 0 ? (R(), j(B(Vt), {
312
312
  key: 0,
313
313
  as: "section",
314
314
  gap: "md",
@@ -318,7 +318,7 @@ var yn = /* @__PURE__ */ I({
318
318
  text: B(n).t("wise_invoicing.invoice.detail.credit_notes.title"),
319
319
  as: "h2",
320
320
  class: "text-sm font-semibold text-primary"
321
- }, null, 8, ["text"]), P("div", Cn, [(R(!0), N(k, null, xt(i.value, (e) => (R(), j(B(kt), {
321
+ }, null, 8, ["text"]), P("div", Tn, [(R(!0), N(k, null, Ct(i.value, (e) => (R(), j(B(jt), {
322
322
  key: e.uuid,
323
323
  to: {
324
324
  name: "invoicing-credit-note-detail",
@@ -326,7 +326,7 @@ var yn = /* @__PURE__ */ I({
326
326
  },
327
327
  class: "min-w-0 rounded-lg border border-secondary bg-primary p-lg transition-colors hover:bg-secondary"
328
328
  }, {
329
- default: V(() => [F(B($t), {
329
+ default: V(() => [F(B(tn), {
330
330
  align: "center",
331
331
  gap: "md",
332
332
  class: "min-w-0"
@@ -336,13 +336,13 @@ var yn = /* @__PURE__ */ I({
336
336
  text: e.title,
337
337
  class: "min-w-0 flex-1 truncate text-xs font-semibold text-primary"
338
338
  }, null, 8, ["text"]),
339
- F(B(Nt), {
339
+ F(B(Ft), {
340
340
  label: e.statusLabel,
341
341
  color: e.statusColor,
342
342
  size: "sm",
343
343
  variant: "translucent"
344
344
  }, null, 8, ["label", "color"]),
345
- F(B(Nt), {
345
+ F(B(Ft), {
346
346
  label: e.amountLabel,
347
347
  variant: "translucent",
348
348
  size: "sm"
@@ -355,10 +355,10 @@ var yn = /* @__PURE__ */ I({
355
355
  _: 1
356
356
  })) : M("", !0);
357
357
  }
358
- }), Tn = D.object({
359
- deliveredOn: T.nullable(),
360
- dueOn: T,
361
- issuedOn: T,
358
+ }), Dn = D.object({
359
+ deliveredOn: w.nullable(),
360
+ dueOn: w,
361
+ issuedOn: w,
362
362
  customFields: D.array(D.custom()),
363
363
  externalRemarks: D.string().nullable(),
364
364
  poNumber: D.string().nullable(),
@@ -373,13 +373,13 @@ var yn = /* @__PURE__ */ I({
373
373
  message: e.global.t("invoicing.invoice.validation.due_date_after_issue_date"),
374
374
  path: ["dueOn"]
375
375
  });
376
- }), En = /* @__PURE__ */ I({
376
+ }), On = /* @__PURE__ */ I({
377
377
  __name: "InvoiceDetailRemarksSection",
378
378
  props: { invoice: {} },
379
379
  setup(e) {
380
- let t = e, n = O(), r = Q(), i = vn(), a = $({
380
+ let t = e, n = O(), r = Q(), i = bn(), a = $({
381
381
  initialState: A(() => v.toForm(t.invoice)),
382
- schema: Tn,
382
+ schema: Dn,
383
383
  onSubmit: async (e) => {
384
384
  let n = await i.execute({
385
385
  body: e,
@@ -388,11 +388,11 @@ var yn = /* @__PURE__ */ I({
388
388
  n.isErr() && r.apiError(n.error);
389
389
  }
390
390
  }), o = a.register("externalRemarks"), s = A(() => !t.invoice.isEditable);
391
- return ot({ form: a }), (e, t) => (R(), j(B(qt), {
391
+ return Ve({ form: a }), (e, t) => (R(), j(B(Yt), {
392
392
  form: B(a),
393
393
  "prompt-on-unsaved-changes": !1
394
394
  }, {
395
- default: V(() => [F(qe, {
395
+ default: V(() => [F(We, {
396
396
  "is-disabled": s.value,
397
397
  placeholder: B(n).t("wise_invoicing.invoice.detail.remarks.placeholder"),
398
398
  "remarks-field": B(o),
@@ -409,23 +409,23 @@ var yn = /* @__PURE__ */ I({
409
409
  });
410
410
  //#endregion
411
411
  //#region src/modules/invoice/api/queries/invoiceActivityLogIndex.query.ts
412
- function Dn(e) {
413
- return Et("invoiceActivityLogIndex", {
412
+ function kn(e) {
413
+ return Ot("invoiceActivityLogIndex", {
414
414
  params: { invoiceUuid: e },
415
415
  queryFn: (t) => y.getActivityLogs(e.value, { pagination: t })
416
416
  });
417
417
  }
418
418
  //#endregion
419
419
  //#region src/modules/invoice/use-cases/detail/components/sidebar/InvoiceDetailSidebarActivityTab.vue
420
- var On = /* @__PURE__ */ I({
420
+ var An = /* @__PURE__ */ I({
421
421
  __name: "InvoiceDetailSidebarActivityTab",
422
422
  props: { invoice: {} },
423
423
  setup(e) {
424
- let t = e, n = O(), { hasNextPage: r, isFetchingNextPage: i, isLoading: a, fetchNextPage: o, result: s } = Dn(A(() => t.invoice.uuid)), c = A(() => s.value.unwrapOr({
424
+ let t = e, n = O(), { hasNextPage: r, isFetchingNextPage: i, isLoading: a, fetchNextPage: o, result: s } = kn(A(() => t.invoice.uuid)), c = A(() => s.value.unwrapOr({
425
425
  data: [],
426
426
  meta: { next: null }
427
427
  }).data);
428
- return (e, s) => (R(), j(Je, {
428
+ return (e, s) => (R(), j(Xe, {
429
429
  "current-billing-document": {
430
430
  role: B(u).INVOICE,
431
431
  uuid: t.invoice.uuid
@@ -446,9 +446,9 @@ var On = /* @__PURE__ */ I({
446
446
  "is-loading"
447
447
  ]));
448
448
  }
449
- }), kn = /* @__PURE__ */ I({
449
+ }), jn = /* @__PURE__ */ I({
450
450
  __name: "CustomFieldFieldset",
451
- props: /*@__PURE__*/ vt({
451
+ props: /*@__PURE__*/ bt({
452
452
  isDisabled: { type: Boolean },
453
453
  currency: {},
454
454
  definitions: {},
@@ -460,19 +460,19 @@ var On = /* @__PURE__ */ I({
460
460
  }),
461
461
  emits: ["update:modelValue"],
462
462
  setup(e) {
463
- let t = e, n = Ct(e, "modelValue");
463
+ let t = e, n = Tt(e, "modelValue");
464
464
  function r(e) {
465
- return se.findByDefinition(n.value, e);
465
+ return ce.findByDefinition(n.value, e);
466
466
  }
467
467
  function i(e, t) {
468
- n.value = se.upsert(n.value, e, t);
468
+ n.value = ce.upsert(n.value, e, t);
469
469
  }
470
- return (e, n) => t.definitions.length > 0 ? (R(), j(B(zt), {
470
+ return (e, n) => t.definitions.length > 0 ? (R(), j(B(Vt), {
471
471
  key: 0,
472
472
  gap: t.size === "sm" ? "xs" : "md",
473
473
  align: "stretch"
474
474
  }, {
475
- default: V(() => [(R(!0), N(k, null, xt(t.definitions, (e) => (R(), j(Xe, {
475
+ default: V(() => [(R(!0), N(k, null, Ct(t.definitions, (e) => (R(), j(st, {
476
476
  key: e.uuid,
477
477
  currency: t.currency,
478
478
  definition: e,
@@ -496,15 +496,15 @@ var On = /* @__PURE__ */ I({
496
496
  });
497
497
  //#endregion
498
498
  //#region src/modules/invoice/api/queries/invoiceCustomerDetail.query.ts
499
- function An(e) {
500
- return Ot("invoiceCustomerDetail", {
499
+ function Mn(e) {
500
+ return At("invoiceCustomerDetail", {
501
501
  params: { customerUuid: e },
502
- queryFn: () => je.getByUuid(e.value)
502
+ queryFn: () => Me.getByUuid(e.value)
503
503
  });
504
504
  }
505
505
  //#endregion
506
506
  //#region src/modules/invoice/models/invoice/update/invoicePreparer.transformer.ts
507
- var jn = class {
507
+ var Nn = class {
508
508
  static fromDto(e) {
509
509
  let t = `${e.firstName ?? ""} ${e.lastName ?? ""}`.trim();
510
510
  return {
@@ -512,28 +512,28 @@ var jn = class {
512
512
  name: t === "" ? e.email ?? e.uuid : t
513
513
  };
514
514
  }
515
- }, Mn = class {
515
+ }, Pn = class {
516
516
  static toDto(e) {
517
517
  return {
518
518
  pagination: e.pagination,
519
- search: te.toDto(e.search)
519
+ search: ee.toDto(e.search)
520
520
  };
521
521
  }
522
- }, Nn = class {
522
+ }, Fn = class {
523
523
  static async getAll(e) {
524
- return (await n.fromPromise(t({ query: Mn.toDto(e) }))).map((e) => ({
525
- data: e.data.items.map(jn.fromDto),
524
+ return (await t.fromPromise(n({ query: Pn.toDto(e) }))).map((e) => ({
525
+ data: e.data.items.map(Nn.fromDto),
526
526
  meta: e.data.meta
527
527
  }));
528
528
  }
529
529
  };
530
530
  //#endregion
531
531
  //#region src/modules/invoice/api/queries/invoiceUserSearch.query.ts
532
- function Pn(e) {
532
+ function In(e) {
533
533
  let t = A(() => ({ search: e.params.search?.value }));
534
- return Dt("invoiceUserSearch", {
534
+ return kt("invoiceUserSearch", {
535
535
  params: { queryParams: t },
536
- queryFn: (t) => Nn.getAll({
536
+ queryFn: (t) => Fn.getAll({
537
537
  pagination: t,
538
538
  search: e.params.search?.value ?? ""
539
539
  })
@@ -541,7 +541,7 @@ function Pn(e) {
541
541
  }
542
542
  //#endregion
543
543
  //#region src/modules/invoice/components/form/InvoiceFormPreparedByField.vue
544
- var Fn = /* @__PURE__ */ I({
544
+ var Ln = /* @__PURE__ */ I({
545
545
  __name: "InvoiceFormPreparedByField",
546
546
  props: {
547
547
  isLoading: { type: Boolean },
@@ -550,14 +550,14 @@ var Fn = /* @__PURE__ */ I({
550
550
  },
551
551
  emits: ["nextPage", "updateSearch"],
552
552
  setup(e, { emit: t }) {
553
- let n = e, r = t, i = O(), a = A(() => cn(n.users));
553
+ let n = e, r = t, i = O(), a = A(() => un(n.users));
554
554
  function o(e) {
555
555
  return e.name;
556
556
  }
557
557
  function s(e) {
558
558
  e !== null && (n.field.setValue(e), r("updateSearch", ""));
559
559
  }
560
- return (e, t) => (R(), j(B(Mt), L(B(E)(n.field), {
560
+ return (e, t) => (R(), j(B(Pt), L(B(E)(n.field), {
561
561
  "display-fn": o,
562
562
  "is-loading": n.isLoading,
563
563
  "is-required": !0,
@@ -575,7 +575,7 @@ var Fn = /* @__PURE__ */ I({
575
575
  "placeholder"
576
576
  ]));
577
577
  }
578
- }), In = /* @__PURE__ */ I({
578
+ }), Rn = /* @__PURE__ */ I({
579
579
  __name: "InvoiceUpdateDialog",
580
580
  props: {
581
581
  customFieldDefinitions: {},
@@ -583,18 +583,18 @@ var Fn = /* @__PURE__ */ I({
583
583
  },
584
584
  emits: ["close"],
585
585
  setup(e, { emit: t }) {
586
- let n = e, r = t, i = O(), a = Q(), o = vn(), s = ze(), c = h(), l = g({ debounceMs: 250 }), u = Pn({ params: { search: l.debouncedSearch } }), d = A(() => u.result.value.match({
586
+ let n = e, r = t, i = O(), a = Q(), o = bn(), s = ze(), c = h(), l = g({ debounceMs: 250 }), u = In({ params: { search: l.debouncedSearch } }), d = A(() => u.result.value.match({
587
587
  err: () => [],
588
588
  loading: () => [],
589
589
  ok: (e) => e.data
590
- })), f = An(A(() => n.invoice.customer.uuid)), p = A(() => {
590
+ })), f = Mn(A(() => n.invoice.customer.uuid)), p = A(() => {
591
591
  let e = f.result.value;
592
592
  if (e.isOk()) return e.getValue().defaultPaymentTermDays;
593
593
  let t = s.result.value;
594
594
  return t.isOk() ? t.getValue().defaultPaymentTermDays ?? 0 : 0;
595
595
  }), m = $({
596
596
  initialState: A(() => v.toForm(n.invoice)),
597
- schema: Tn,
597
+ schema: Dn,
598
598
  onSubmit: async (e) => {
599
599
  let t = await o.execute({
600
600
  body: e,
@@ -605,10 +605,10 @@ var Fn = /* @__PURE__ */ I({
605
605
  onSubmitError: () => {
606
606
  a.unableToSave();
607
607
  }
608
- }), _ = m.register("issuedOn"), ee = m.register("dueOn"), te = m.register("deliveredOn"), y = m.register("poNumber"), ne = m.register("preparedBy"), re = m.register("subject"), ie = m.register("customFields"), b = A({
609
- get: () => ie.modelValue.value ?? [],
608
+ }), _ = m.register("issuedOn"), ee = m.register("dueOn"), te = m.register("deliveredOn"), y = m.register("poNumber"), ne = m.register("preparedBy"), re = m.register("subject"), b = m.register("customFields"), ie = A({
609
+ get: () => b.modelValue.value ?? [],
610
610
  set: (e) => {
611
- ie.setValue(e);
611
+ b.setValue(e);
612
612
  }
613
613
  });
614
614
  function ae(e) {
@@ -624,30 +624,30 @@ var Fn = /* @__PURE__ */ I({
624
624
  }, {
625
625
  default: V(() => [
626
626
  F(B(J), {
627
- icon: B(C),
627
+ icon: B(Ae),
628
628
  "is-description-hidden": !0,
629
629
  title: B(i).t("wise_invoicing.invoice.detail.header.edit_info"),
630
630
  description: ""
631
631
  }, null, 8, ["icon", "title"]),
632
- F(B(Gt), null, {
633
- default: V(() => [F(B(Yt), null, {
634
- default: V(() => [F(B(Jt), {
632
+ F(B(qt), null, {
633
+ default: V(() => [F(B(Zt), null, {
634
+ default: V(() => [F(B(Xt), {
635
635
  lg: 2,
636
636
  sm: 1
637
637
  }, {
638
638
  default: V(() => [
639
- F(B(Bt), L(B(E)(B(_)), {
639
+ F(B(Ht), L(B(E)(B(_)), {
640
640
  label: B(i).t("wise_invoicing.invoice.detail.header.invoice_date"),
641
641
  "is-required": !0,
642
642
  "onUpdate:modelValue": ae
643
643
  }), null, 16, ["label"]),
644
- F(B(Bt), L(B(E)(B(ee)), {
644
+ F(B(Ht), L(B(E)(B(ee)), {
645
645
  label: B(i).t("wise_invoicing.invoice.detail.header.due_date"),
646
646
  "is-required": !0,
647
647
  "min-date": B(_).modelValue.value
648
648
  }), null, 16, ["label", "min-date"]),
649
- B(c).isDeliveryDateVisible.value ? (R(), j(B(Bt), L({ key: 0 }, B(E)(B(te)), { label: B(i).t("wise_invoicing.invoice.detail.header.delivery_date") }), null, 16, ["label"])) : M("", !0),
650
- F(Fn, {
649
+ B(c).isDeliveryDateVisible.value ? (R(), j(B(Ht), L({ key: 0 }, B(E)(B(te)), { label: B(i).t("wise_invoicing.invoice.detail.header.delivery_date") }), null, 16, ["label"])) : M("", !0),
650
+ F(Ln, {
651
651
  field: B(ne),
652
652
  "is-loading": B(u).isLoading.value,
653
653
  users: d.value,
@@ -659,16 +659,16 @@ var Fn = /* @__PURE__ */ I({
659
659
  "users",
660
660
  "onNextPage"
661
661
  ]),
662
- F(B(an), L(B(E)(B(y)), { label: B(i).t("wise_invoicing.invoice.detail.header.po_number") }), null, 16, ["label"]),
663
- F(B(an), L(B(E)(B(re)), {
662
+ F(B(sn), L(B(E)(B(y)), { label: B(i).t("wise_invoicing.invoice.detail.header.po_number") }), null, 16, ["label"]),
663
+ F(B(sn), L(B(E)(B(re)), {
664
664
  label: B(i).t("wise_invoicing.invoice.detail.header.subject"),
665
665
  placeholder: B(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
666
666
  }), null, 16, ["label", "placeholder"])
667
667
  ]),
668
668
  _: 1
669
- }), F(kn, {
670
- modelValue: b.value,
671
- "onUpdate:modelValue": t[0] ||= (e) => b.value = e,
669
+ }), F(jn, {
670
+ modelValue: ie.value,
671
+ "onUpdate:modelValue": t[0] ||= (e) => ie.value = e,
672
672
  currency: n.invoice.currency,
673
673
  definitions: n.customFieldDefinitions,
674
674
  "is-disabled": !0,
@@ -685,23 +685,23 @@ var Fn = /* @__PURE__ */ I({
685
685
  _: 1
686
686
  }),
687
687
  F(B(K), null, {
688
- right: V(() => [F(B(q), { label: "cancel" }), F(B(Kt), { label: B(i).t("wise_invoicing.invoice.detail.header.edit_info") }, null, 8, ["label"])]),
688
+ right: V(() => [F(B(q), { label: "cancel" }), F(B(Jt), { label: B(i).t("wise_invoicing.invoice.detail.header.edit_info") }, null, 8, ["label"])]),
689
689
  _: 1
690
690
  })
691
691
  ]),
692
692
  _: 1
693
693
  }, 8, ["form"]));
694
694
  }
695
- }), Ln = /* @__PURE__ */ I({
695
+ }), zn = /* @__PURE__ */ I({
696
696
  __name: "InvoiceDetailSidebarInfoTab",
697
697
  props: {
698
698
  customFieldDefinitions: {},
699
699
  invoice: {}
700
700
  },
701
701
  setup(e) {
702
- let t = e, n = O(), r = w(), i = h(), a = dn().create(In), o = A(() => t.invoice.isEditable), s = A(() => ae.filterByEntityType(t.customFieldDefinitions, l.INVOICE)), c = A(() => se.listByDefinitions(t.customFieldDefinitions, t.invoice.customFields)), u = A(() => {
702
+ let t = e, n = O(), r = T(), i = h(), a = pn().create(Rn), o = A(() => t.invoice.isEditable), s = A(() => re.filterByEntityType(t.customFieldDefinitions, c.INVOICE)), l = A(() => ce.listByDefinitions(t.customFieldDefinitions, t.invoice.customFields)), u = A(() => {
703
703
  if (!t.invoice.isOverdue) return null;
704
- let e = t.invoice.dueOn.toZonedDateTime(jt.Now.timeZoneId()).toInstant();
704
+ let e = t.invoice.dueOn.toZonedDateTime(Nt.Now.timeZoneId()).toInstant();
705
705
  return r.toRelativeTime(e);
706
706
  });
707
707
  async function d() {
@@ -713,9 +713,9 @@ var Fn = /* @__PURE__ */ I({
713
713
  function f(e) {
714
714
  return e === null ? "-" : r.formatPlainDate(e);
715
715
  }
716
- return (e, r) => (R(), j(B(Vt), { class: "px-2xl py-xl" }, {
716
+ return (e, r) => (R(), j(B(Ut), { class: "px-2xl py-xl" }, {
717
717
  default: V(() => [
718
- F(B(Ht), { label: B(n).t("wise_invoicing.invoice.detail.sidebar.general") }, gt({
718
+ F(B(Wt), { label: B(n).t("wise_invoicing.invoice.detail.sidebar.general") }, vt({
719
719
  default: V(() => [
720
720
  F(B(U), null, {
721
721
  default: V(() => [F(B(W), {
@@ -726,7 +726,7 @@ var Fn = /* @__PURE__ */ I({
726
726
  }),
727
727
  F(B(U), null, {
728
728
  default: V(() => [F(B(W), {
729
- icon: B(Te),
729
+ icon: B(C),
730
730
  label: B(n).t("wise_invoicing.invoice.detail.header.po_number")
731
731
  }, null, 8, ["icon", "label"]), F(B(G), { text: t.invoice.poNumber ?? "-" }, null, 8, ["text"])]),
732
732
  _: 1
@@ -754,11 +754,11 @@ var Fn = /* @__PURE__ */ I({
754
754
  "icon",
755
755
  "label",
756
756
  "variant"
757
- ]), F(B($t), { gap: "xs" }, {
757
+ ]), F(B(tn), { gap: "xs" }, {
758
758
  default: V(() => [F(B(G), {
759
759
  text: f(t.invoice.dueOn),
760
760
  variant: t.invoice.isOverdue ? "error" : "default"
761
- }, null, 8, ["text", "variant"]), u.value === null ? M("", !0) : (R(), j(B(Nt), {
761
+ }, null, 8, ["text", "variant"]), u.value === null ? M("", !0) : (R(), j(B(Ft), {
762
762
  key: 0,
763
763
  label: u.value,
764
764
  color: "error",
@@ -771,16 +771,16 @@ var Fn = /* @__PURE__ */ I({
771
771
  }),
772
772
  B(i).isDeliveryDateVisible.value ? (R(), j(B(U), { key: 0 }, {
773
773
  default: V(() => [F(B(W), {
774
- icon: B(ge),
774
+ icon: B(x),
775
775
  label: B(n).t("wise_invoicing.invoice.detail.header.delivery_date")
776
776
  }, null, 8, ["icon", "label"]), F(B(G), { text: f(t.invoice.deliveredOn) }, null, 8, ["text"])]),
777
777
  _: 1
778
778
  })) : M("", !0),
779
- (R(!0), N(k, null, xt(c.value, (e) => (R(), j(B(U), { key: e.definition.uuid }, {
779
+ (R(!0), N(k, null, Ct(l.value, (e) => (R(), j(B(U), { key: e.definition.uuid }, {
780
780
  default: V(() => [F(B(W), {
781
781
  icon: B(Ze)[e.definition.type],
782
- label: B(ae).getLabel(e.definition, B(n).locale.value)
783
- }, null, 8, ["icon", "label"]), F(oe, {
782
+ label: B(re).getLabel(e.definition, B(n).locale.value)
783
+ }, null, 8, ["icon", "label"]), F(ae, {
784
784
  definition: e.definition,
785
785
  value: e.value
786
786
  }, null, 8, ["definition", "value"])]),
@@ -790,8 +790,8 @@ var Fn = /* @__PURE__ */ I({
790
790
  _: 2
791
791
  }, [o.value ? {
792
792
  name: "actions",
793
- fn: V(() => [F(B(Zt), {
794
- icon: B(ue),
793
+ fn: V(() => [F(B($t), {
794
+ icon: B(de),
795
795
  label: B(n).t("wise_invoicing.invoice.detail.header.edit_info"),
796
796
  variant: "tertiary",
797
797
  onClick: d
@@ -799,8 +799,8 @@ var Fn = /* @__PURE__ */ I({
799
799
  key: "0"
800
800
  } : void 0]), 1032, ["label"]),
801
801
  F(et, { "original-invoice": t.invoice.originalInvoice }, null, 8, ["original-invoice"]),
802
- F(B(Ut)),
803
- F(B(Ht), {
802
+ F(B(Gt)),
803
+ F(B(Wt), {
804
804
  label: B(n).t("wise_invoicing.invoice.detail.header.bill_to"),
805
805
  "collapse-options": {
806
806
  isCollapsible: !0,
@@ -832,8 +832,8 @@ var Fn = /* @__PURE__ */ I({
832
832
  })]),
833
833
  _: 1
834
834
  }, 8, ["label", "collapse-options"]),
835
- F(B(Ut)),
836
- F(B(Ht), {
835
+ F(B(Gt)),
836
+ F(B(Wt), {
837
837
  label: B(n).t("wise_invoicing.invoice.detail.header.bill_from"),
838
838
  "collapse-options": {
839
839
  isCollapsible: !0,
@@ -854,20 +854,20 @@ var Fn = /* @__PURE__ */ I({
854
854
  _: 1
855
855
  }));
856
856
  }
857
- }), Rn = /* @__PURE__ */ I({
857
+ }), Bn = /* @__PURE__ */ I({
858
858
  __name: "InvoiceDetailSidebar",
859
859
  props: {
860
860
  customFieldDefinitions: {},
861
861
  invoice: {}
862
862
  },
863
863
  setup(e) {
864
- let t = e, n = O(), r = w(), i = A(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.invoice.updatedAt) }));
865
- return (e, n) => (R(), j(Ke, {
864
+ let t = e, n = O(), r = T(), i = A(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.invoice.updatedAt) }));
865
+ return (e, n) => (R(), j(rt, {
866
866
  "billing-document": t.invoice,
867
867
  "updated-footer": i.value
868
868
  }, {
869
- activity: V(() => [F(On, { invoice: t.invoice }, null, 8, ["invoice"])]),
870
- info: V(() => [F(Ln, {
869
+ activity: V(() => [F(An, { invoice: t.invoice }, null, 8, ["invoice"])]),
870
+ info: V(() => [F(zn, {
871
871
  "custom-field-definitions": t.customFieldDefinitions,
872
872
  invoice: t.invoice
873
873
  }, null, 8, ["custom-field-definitions", "invoice"])]),
@@ -877,15 +877,15 @@ var Fn = /* @__PURE__ */ I({
877
877
  });
878
878
  //#endregion
879
879
  //#region src/modules/invoice/api/queries/invoicePaymentIndex.query.ts
880
- function zn(e) {
881
- return Ot("invoicePaymentIndex", {
880
+ function Vn(e) {
881
+ return At("invoicePaymentIndex", {
882
882
  params: { invoiceUuid: e },
883
883
  queryFn: () => y.getPayments(e.value)
884
884
  });
885
885
  }
886
886
  //#endregion
887
887
  //#region src/modules/invoice/use-cases/detail/components/table/InvoiceDetailPaymentActionsCell.vue
888
- var Bn = /* @__PURE__ */ I({
888
+ var Hn = /* @__PURE__ */ I({
889
889
  __name: "InvoiceDetailPaymentActionsCell",
890
890
  props: {
891
891
  payment: {},
@@ -893,40 +893,40 @@ var Bn = /* @__PURE__ */ I({
893
893
  },
894
894
  setup(e) {
895
895
  let t = e, n = O();
896
- return (e, i) => (R(), j(B(nn), null, {
897
- default: V(() => [F(B(rn), null, {
898
- default: V(() => [t.payment.source === B(r).MANUAL ? (R(), j(B(Zt), {
896
+ return (e, r) => (R(), j(B(an), null, {
897
+ default: V(() => [F(B(on), null, {
898
+ default: V(() => [t.payment.source === B(i).MANUAL ? (R(), j(B($t), {
899
899
  key: 0,
900
900
  label: B(n).t("wise_invoicing.invoice.detail.payments.delete.title"),
901
901
  icon: B(ve),
902
902
  size: "sm",
903
903
  variant: "tertiary",
904
- onClick: i[0] ||= (e) => t.onDelete(t.payment)
904
+ onClick: r[0] ||= (e) => t.onDelete(t.payment)
905
905
  }, null, 8, ["label", "icon"])) : M("", !0)]),
906
906
  _: 1
907
907
  })]),
908
908
  _: 1
909
909
  }));
910
910
  }
911
- }), Vn = /* @__PURE__ */ I({
911
+ }), Un = /* @__PURE__ */ I({
912
912
  __name: "InvoiceDetailPaymentManualCell",
913
913
  props: { payment: {} },
914
914
  setup(e) {
915
915
  let t = e;
916
- return (e, n) => (R(), j(B(nn), null, {
917
- default: V(() => [t.payment.source === B(r).MANUAL ? (R(), j(B(Ce), {
916
+ return (e, n) => (R(), j(B(an), null, {
917
+ default: V(() => [t.payment.source === B(i).MANUAL ? (R(), j(B(Ce), {
918
918
  key: 0,
919
919
  class: "size-4 text-brand-600"
920
920
  })) : M("", !0)]),
921
921
  _: 1
922
922
  }));
923
923
  }
924
- }), Hn = /* @__PURE__ */ I({
924
+ }), Wn = /* @__PURE__ */ I({
925
925
  __name: "InvoiceDetailPaymentsTableTextCell",
926
926
  props: { text: {} },
927
927
  setup(e) {
928
928
  let t = e;
929
- return (e, n) => (R(), j(B(nn), null, {
929
+ return (e, n) => (R(), j(B(an), null, {
930
930
  default: V(() => [F(B(X), {
931
931
  text: t.text ?? "-",
932
932
  class: "text-sm/5 text-primary"
@@ -937,9 +937,9 @@ var Bn = /* @__PURE__ */ I({
937
937
  });
938
938
  //#endregion
939
939
  //#region src/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.ts
940
- function Un(e) {
941
- let t = O(), n = w(), r = p();
942
- return A(() => un()([
940
+ function Gn(e) {
941
+ let t = O(), n = T(), r = p();
942
+ return A(() => fn()([
943
943
  {
944
944
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.date"),
945
945
  key: "date",
@@ -947,7 +947,7 @@ function Un(e) {
947
947
  max: "12rem",
948
948
  min: "12rem"
949
949
  },
950
- component: (e) => Z(Hn, { text: n.formatPlainDate(e.date) })
950
+ component: (e) => Z(Wn, { text: n.formatPlainDate(e.date) })
951
951
  },
952
952
  {
953
953
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.reference"),
@@ -956,7 +956,7 @@ function Un(e) {
956
956
  max: "14rem",
957
957
  min: "12rem"
958
958
  },
959
- component: (e) => Z(Hn, { text: e.paymentReference ?? "—" })
959
+ component: (e) => Z(Wn, { text: e.paymentReference ?? "—" })
960
960
  },
961
961
  {
962
962
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.remark"),
@@ -965,7 +965,7 @@ function Un(e) {
965
965
  max: "1fr",
966
966
  min: "12rem"
967
967
  },
968
- component: (e) => Z(Hn, { text: e.remarks ?? "—" })
968
+ component: (e) => Z(Wn, { text: e.remarks ?? "—" })
969
969
  },
970
970
  {
971
971
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.manual"),
@@ -974,7 +974,7 @@ function Un(e) {
974
974
  max: "6rem",
975
975
  min: "6rem"
976
976
  },
977
- component: (e) => Z(Vn, { payment: e })
977
+ component: (e) => Z(Un, { payment: e })
978
978
  },
979
979
  {
980
980
  headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.amount"),
@@ -983,7 +983,7 @@ function Un(e) {
983
983
  max: "10rem",
984
984
  min: "10rem"
985
985
  },
986
- component: (e) => Z(Hn, { text: r.formatMonetary(e.amount) })
986
+ component: (e) => Z(Wn, { text: r.formatMonetary(e.amount) })
987
987
  },
988
988
  {
989
989
  headerLabel: "",
@@ -992,7 +992,7 @@ function Un(e) {
992
992
  max: "5rem",
993
993
  min: "5rem"
994
994
  },
995
- component: (t) => Z(Bn, {
995
+ component: (t) => Z(Hn, {
996
996
  payment: t,
997
997
  onDelete: e.onDelete
998
998
  })
@@ -1001,7 +1001,7 @@ function Un(e) {
1001
1001
  }
1002
1002
  //#endregion
1003
1003
  //#region src/modules/invoice/api/mutations/invoicePaymentCreate.mutation.ts
1004
- function Wn() {
1004
+ function Kn() {
1005
1005
  return H({
1006
1006
  queryFn: (e) => y.createPayment(e.params.invoiceUuid, e.body),
1007
1007
  queryKeysToInvalidate: {
@@ -1014,19 +1014,19 @@ function Wn() {
1014
1014
  }
1015
1015
  //#endregion
1016
1016
  //#region src/modules/invoice/models/invoice/payment/invoicePaymentCreateForm.model.ts
1017
- var Gn = D.object({
1017
+ var qn = D.object({
1018
1018
  amount: D.number().positive(),
1019
1019
  currency: D.enum(s),
1020
- date: ee,
1020
+ date: te,
1021
1021
  paymentReference: D.string().nullable(),
1022
1022
  precision: D.number().int().nonnegative(),
1023
1023
  remarks: D.string().nullable()
1024
- }), Kn = { class: "pr-md text-xs text-secondary" }, qn = /* @__PURE__ */ I({
1024
+ }), Jn = { class: "pr-md text-xs text-secondary" }, Yn = /* @__PURE__ */ I({
1025
1025
  __name: "InvoicePaymentCreateDialog",
1026
1026
  props: { invoice: {} },
1027
1027
  emits: ["close"],
1028
1028
  setup(e, { emit: t }) {
1029
- let n = e, r = t, i = O(), a = Q(), o = p(), s = Wn(), c = A(() => o.getSymbol(n.invoice.grossAmount.currency)), l = A(() => m(1, n.invoice.grossAmount.precision)), u = $({
1029
+ let n = e, r = t, i = O(), a = Q(), o = p(), s = Kn(), c = A(() => o.getSymbol(n.invoice.grossAmount.currency)), l = A(() => m(1, n.invoice.grossAmount.precision)), u = $({
1030
1030
  initialState: {
1031
1031
  amount: null,
1032
1032
  currency: n.invoice.grossAmount.currency,
@@ -1035,7 +1035,7 @@ var Gn = D.object({
1035
1035
  precision: n.invoice.grossAmount.precision,
1036
1036
  remarks: null
1037
1037
  },
1038
- schema: Gn,
1038
+ schema: qn,
1039
1039
  onSubmit: async (e) => {
1040
1040
  let t = await s.execute({
1041
1041
  body: e,
@@ -1056,38 +1056,38 @@ var Gn = D.object({
1056
1056
  F(B(J), {
1057
1057
  title: B(i).t("wise_invoicing.invoice.detail.payments.create.title"),
1058
1058
  description: B(i).t("wise_invoicing.invoice.detail.payments.create.description"),
1059
- icon: B(fe)
1059
+ icon: B(pe)
1060
1060
  }, null, 8, [
1061
1061
  "title",
1062
1062
  "description",
1063
1063
  "icon"
1064
1064
  ]),
1065
- F(B(Gt), null, {
1066
- default: V(() => [F(B(Yt), null, {
1067
- default: V(() => [F(B(Jt), {
1065
+ F(B(qt), null, {
1066
+ default: V(() => [F(B(Zt), null, {
1067
+ default: V(() => [F(B(Xt), {
1068
1068
  lg: 2,
1069
1069
  sm: 1
1070
1070
  }, {
1071
1071
  default: V(() => [
1072
- F(B(Qt), L(B(E)(B(d)), {
1072
+ F(B(en), L(B(E)(B(d)), {
1073
1073
  "is-required": !0,
1074
1074
  label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.amount"),
1075
1075
  min: l.value,
1076
1076
  step: l.value
1077
1077
  }), {
1078
- right: V(() => [P("span", Kn, z(c.value.symbol), 1)]),
1078
+ right: V(() => [P("span", Jn, z(c.value.symbol), 1)]),
1079
1079
  _: 1
1080
1080
  }, 16, [
1081
1081
  "label",
1082
1082
  "min",
1083
1083
  "step"
1084
1084
  ]),
1085
- F(B(Bt), L(B(E)(B(f)), {
1085
+ F(B(Ht), L(B(E)(B(f)), {
1086
1086
  "is-required": !0,
1087
1087
  label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.date")
1088
1088
  }), null, 16, ["label"]),
1089
- F(B(an), L(B(E)(B(h)), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.reference") }), null, 16, ["label"]),
1090
- F(B(an), L(B(E)(B(g)), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.remarks") }), null, 16, ["label"])
1089
+ F(B(sn), L(B(E)(B(h)), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.reference") }), null, 16, ["label"]),
1090
+ F(B(sn), L(B(E)(B(g)), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.remarks") }), null, 16, ["label"])
1091
1091
  ]),
1092
1092
  _: 1
1093
1093
  })]),
@@ -1096,7 +1096,7 @@ var Gn = D.object({
1096
1096
  _: 1
1097
1097
  }),
1098
1098
  F(B(K), null, {
1099
- right: V(() => [F(B(q)), F(B(Xt), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.submit") }, null, 8, ["label"])]),
1099
+ right: V(() => [F(B(q)), F(B(Qt), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.submit") }, null, 8, ["label"])]),
1100
1100
  _: 1
1101
1101
  })
1102
1102
  ]),
@@ -1106,7 +1106,7 @@ var Gn = D.object({
1106
1106
  });
1107
1107
  //#endregion
1108
1108
  //#region src/modules/invoice/api/mutations/invoicePaymentDelete.mutation.ts
1109
- function Jn() {
1109
+ function Xn() {
1110
1110
  return H({
1111
1111
  queryFn: (e) => y.deletePayment(e.params.invoiceUuid, e.params.paymentUuid),
1112
1112
  queryKeysToInvalidate: {
@@ -1119,7 +1119,7 @@ function Jn() {
1119
1119
  }
1120
1120
  //#endregion
1121
1121
  //#region src/modules/invoice/use-cases/detail/dialogs/InvoicePaymentDeleteDialog.vue
1122
- var Yn = /* @__PURE__ */ I({
1122
+ var Zn = /* @__PURE__ */ I({
1123
1123
  __name: "InvoicePaymentDeleteDialog",
1124
1124
  props: {
1125
1125
  invoiceUuid: {},
@@ -1127,8 +1127,8 @@ var Yn = /* @__PURE__ */ I({
1127
1127
  },
1128
1128
  emits: ["close"],
1129
1129
  setup(e, { emit: t }) {
1130
- let n = e, r = t, i = O(), a = Q(), o = p(), s = Jn(), c = A(() => o.formatMonetary(n.payment.amount)), l = $({
1131
- schema: ht.object({}),
1130
+ let n = e, r = t, i = O(), a = Q(), o = p(), s = Xn(), c = A(() => o.formatMonetary(n.payment.amount)), l = $({
1131
+ schema: _t.object({}),
1132
1132
  onSubmit: async () => {
1133
1133
  let e = await s.execute({ params: {
1134
1134
  invoiceUuid: n.invoiceUuid,
@@ -1146,7 +1146,7 @@ var Yn = /* @__PURE__ */ I({
1146
1146
  title: B(i).t("wise_invoicing.invoice.detail.payments.delete.title"),
1147
1147
  description: B(i).t("wise_invoicing.invoice.detail.payments.delete.description", { amount: c.value })
1148
1148
  }, null, 8, ["title", "description"]), F(B(K), null, {
1149
- right: V(() => [F(B(q)), F(B(Kt), {
1149
+ right: V(() => [F(B(q)), F(B(Jt), {
1150
1150
  "is-destructive": !0,
1151
1151
  label: B(i).t("wise_invoicing.invoice.detail.payments.delete.submit")
1152
1152
  }, null, 8, ["label"])]),
@@ -1155,11 +1155,11 @@ var Yn = /* @__PURE__ */ I({
1155
1155
  _: 1
1156
1156
  }, 8, ["form"]));
1157
1157
  }
1158
- }), Xn = /* @__PURE__ */ I({
1158
+ }), Qn = /* @__PURE__ */ I({
1159
1159
  __name: "InvoiceDetailPaymentsSection",
1160
1160
  props: { invoice: {} },
1161
1161
  setup(e) {
1162
- let t = e, n = O(), r = p(), i = A(() => t.invoice.uuid), a = A(() => t.invoice.balanceDueAmount === null ? null : r.formatMonetary(t.invoice.balanceDueAmount)), { isLoading: o, result: s } = zn(i), c = dn(), l = c.create(qn), u = c.create(Yn), d = A(() => s.value.match({
1162
+ let t = e, n = O(), r = p(), i = A(() => t.invoice.uuid), a = A(() => t.invoice.balanceDueAmount === null ? null : r.formatMonetary(t.invoice.balanceDueAmount)), { isLoading: o, result: s } = Vn(i), c = pn(), l = c.create(Yn), u = c.create(Zn), d = A(() => s.value.match({
1163
1163
  err: () => [],
1164
1164
  loading: () => [],
1165
1165
  ok: (e) => e
@@ -1177,40 +1177,40 @@ var Yn = /* @__PURE__ */ I({
1177
1177
  payment: e
1178
1178
  });
1179
1179
  }
1180
- let _ = Un({ onDelete: g });
1181
- return (e, t) => (R(), j($e, null, {
1182
- default: V(() => [F(B($t), {
1180
+ let _ = Gn({ onDelete: g });
1181
+ return (e, t) => (R(), j(at, null, {
1182
+ default: V(() => [F(B(tn), {
1183
1183
  justify: "between",
1184
1184
  class: "w-full gap-lg border-b border-secondary px-lg py-md"
1185
1185
  }, {
1186
- default: V(() => [F(B($t), { gap: "sm" }, {
1186
+ default: V(() => [F(B(tn), { gap: "sm" }, {
1187
1187
  default: V(() => [F(B(X), {
1188
1188
  text: B(n).t("wise_invoicing.invoice.detail.payments.title"),
1189
1189
  as: "h2",
1190
1190
  class: "text-sm font-semibold text-primary"
1191
- }, null, 8, ["text"]), a.value === null ? M("", !0) : (R(), j(B(Nt), {
1191
+ }, null, 8, ["text"]), a.value === null ? M("", !0) : (R(), j(B(Ft), {
1192
1192
  key: 0,
1193
1193
  color: "gray",
1194
1194
  size: "sm",
1195
1195
  variant: "outline"
1196
1196
  }, {
1197
1197
  default: V(() => [
1198
- F(B(Pt), { label: B(n).t("wise_invoicing.invoice.detail.payments.balance_due") }, null, 8, ["label"]),
1199
- F(B(Ft)),
1200
- F(B(Pt), { label: a.value }, null, 8, ["label"])
1198
+ F(B(It), { label: B(n).t("wise_invoicing.invoice.detail.payments.balance_due") }, null, 8, ["label"]),
1199
+ F(B(Lt)),
1200
+ F(B(It), { label: a.value }, null, 8, ["label"])
1201
1201
  ]),
1202
1202
  _: 1
1203
1203
  }))]),
1204
1204
  _: 1
1205
- }), m.value ? (R(), j(B(It), {
1205
+ }), m.value ? (R(), j(B(Rt), {
1206
1206
  key: 0,
1207
1207
  label: B(n).t("wise_invoicing.invoice.detail.payments.add"),
1208
- "icon-left": B(x),
1208
+ "icon-left": B(Te),
1209
1209
  size: "sm",
1210
1210
  onClick: h
1211
1211
  }, null, 8, ["label", "icon-left"])) : M("", !0)]),
1212
1212
  _: 1
1213
- }), F(B(tn), {
1213
+ }), F(B(rn), {
1214
1214
  "active-filter-count": 0,
1215
1215
  columns: B(_),
1216
1216
  data: d.value,
@@ -1233,7 +1233,7 @@ var Yn = /* @__PURE__ */ I({
1233
1233
  });
1234
1234
  //#endregion
1235
1235
  //#region src/modules/invoice/api/mutations/invoiceUpdateLines.mutation.ts
1236
- function Zn() {
1236
+ function $n() {
1237
1237
  return H({
1238
1238
  queryFn: (e) => y.updateLines(e.params.invoiceUuid, e.body),
1239
1239
  queryKeysToInvalidate: { invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid } }
@@ -1241,7 +1241,7 @@ function Zn() {
1241
1241
  }
1242
1242
  //#endregion
1243
1243
  //#region src/modules/invoice/api/mutations/invoiceApplyDiscount.mutation.ts
1244
- function Qn() {
1244
+ function er() {
1245
1245
  return H({
1246
1246
  queryFn: (e) => y.applyDiscount(e.params.invoiceUuid, e.body),
1247
1247
  queryKeysToInvalidate: { invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid } }
@@ -1249,24 +1249,24 @@ function Qn() {
1249
1249
  }
1250
1250
  //#endregion
1251
1251
  //#region src/modules/invoice/models/invoice/update/invoiceApplyDiscountForm.model.ts
1252
- var $n = D.object({
1252
+ var tr = D.object({
1253
1253
  currency: D.enum(s),
1254
1254
  precision: D.number().int().nonnegative(),
1255
- type: D.enum(c),
1255
+ type: D.enum(l),
1256
1256
  value: D.number()
1257
- }).refine((e) => e.type !== c.PERCENTAGE || e.value <= 100, { path: ["value"] }), er = { class: "pr-md text-xs text-secondary" }, tr = /* @__PURE__ */ I({
1257
+ }).refine((e) => e.type !== l.PERCENTAGE || e.value <= 100, { path: ["value"] }), nr = { class: "pr-md text-xs text-secondary" }, rr = /* @__PURE__ */ I({
1258
1258
  __name: "InvoiceApplyDiscountDialog",
1259
1259
  props: { invoice: {} },
1260
1260
  emits: ["close"],
1261
1261
  setup(e, { emit: t }) {
1262
- let n = e, r = t, i = O(), a = Q(), o = p(), s = Qn(), l = A(() => ln([c.PERCENTAGE, c.AMOUNT])), u = $({
1262
+ let n = e, r = t, i = O(), a = Q(), o = p(), s = er(), c = A(() => dn([l.PERCENTAGE, l.AMOUNT])), u = $({
1263
1263
  initialState: {
1264
1264
  currency: n.invoice.grossAmount.currency,
1265
1265
  precision: n.invoice.grossAmount.precision,
1266
- type: c.PERCENTAGE,
1266
+ type: l.PERCENTAGE,
1267
1267
  value: null
1268
1268
  },
1269
- schema: $n,
1269
+ schema: tr,
1270
1270
  onSubmit: async (e) => {
1271
1271
  let t = await s.execute({
1272
1272
  body: e,
@@ -1277,7 +1277,7 @@ var $n = D.object({
1277
1277
  onSubmitError: () => {
1278
1278
  a.unableToSave();
1279
1279
  }
1280
- }), d = u.register("value"), f = u.register("type"), m = A(() => f.modelValue.value === c.PERCENTAGE), h = A(() => f.modelValue.value === c.AMOUNT), g = A(() => o.getSymbol(n.invoice.grossAmount.currency));
1280
+ }), d = u.register("value"), f = u.register("type"), m = A(() => f.modelValue.value === l.PERCENTAGE), h = A(() => f.modelValue.value === l.AMOUNT), g = A(() => o.getSymbol(n.invoice.grossAmount.currency));
1281
1281
  function _(e) {
1282
1282
  return i.t(`wise_invoicing.invoice.detail.global_discount.type.${e}`);
1283
1283
  }
@@ -1296,20 +1296,20 @@ var $n = D.object({
1296
1296
  "description",
1297
1297
  "icon"
1298
1298
  ]),
1299
- F(B(Gt), null, {
1300
- default: V(() => [F(B(Yt), null, {
1301
- default: V(() => [F(B(Jt), {
1299
+ F(B(qt), null, {
1300
+ default: V(() => [F(B(Zt), null, {
1301
+ default: V(() => [F(B(Xt), {
1302
1302
  lg: 2,
1303
1303
  sm: 1
1304
1304
  }, {
1305
1305
  default: V(() => [
1306
- F(B(en), L(B(E)(B(f)), {
1306
+ F(B(nn), L(B(E)(B(f)), {
1307
1307
  "display-fn": _,
1308
1308
  "is-required": !0,
1309
- items: l.value,
1309
+ items: c.value,
1310
1310
  label: B(i).t("wise_invoicing.invoice.detail.global_discount.type.label")
1311
1311
  }), null, 16, ["items", "label"]),
1312
- m.value ? (R(), j(B(Qt), L({ key: 0 }, B(E)(B(d)), {
1312
+ m.value ? (R(), j(B(en), L({ key: 0 }, B(E)(B(d)), {
1313
1313
  hint: B(i).t("wise_invoicing.invoice.detail.global_discount.amount.hint"),
1314
1314
  "is-required": !0,
1315
1315
  label: B(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
@@ -1320,13 +1320,13 @@ var $n = D.object({
1320
1320
  right: V(() => [...t[1] ||= [P("span", { class: "pr-md text-xs text-secondary" }, " % ", -1)]]),
1321
1321
  _: 1
1322
1322
  }, 16, ["hint", "label"])) : M("", !0),
1323
- h.value ? (R(), j(B(Qt), L({ key: 1 }, B(E)(B(d)), {
1323
+ h.value ? (R(), j(B(en), L({ key: 1 }, B(E)(B(d)), {
1324
1324
  "is-required": !0,
1325
1325
  label: B(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
1326
1326
  min: .01,
1327
1327
  step: .01
1328
1328
  }), {
1329
- right: V(() => [P("span", er, z(g.value.symbol), 1)]),
1329
+ right: V(() => [P("span", nr, z(g.value.symbol), 1)]),
1330
1330
  _: 1
1331
1331
  }, 16, ["label"])) : M("", !0)
1332
1332
  ]),
@@ -1337,21 +1337,21 @@ var $n = D.object({
1337
1337
  _: 1
1338
1338
  }),
1339
1339
  F(B(K), null, {
1340
- right: V(() => [F(B(q)), F(B(Kt), { label: B(i).t("wise_invoicing.invoice.detail.global_discount.confirm") }, null, 8, ["label"])]),
1340
+ right: V(() => [F(B(q)), F(B(Jt), { label: B(i).t("wise_invoicing.invoice.detail.global_discount.confirm") }, null, 8, ["label"])]),
1341
1341
  _: 1
1342
1342
  })
1343
1343
  ]),
1344
1344
  _: 1
1345
1345
  }, 8, ["form"]));
1346
1346
  }
1347
- }), nr = /* @__PURE__ */ I({
1347
+ }), ir = /* @__PURE__ */ I({
1348
1348
  __name: "InvoiceLineItemsTableSection",
1349
1349
  props: {
1350
1350
  customFieldDefinitions: {},
1351
1351
  invoice: {}
1352
1352
  },
1353
1353
  setup(e) {
1354
- let t = e, n = A(() => t.invoice), r = h(), i = Zn(), a = A(() => t.invoice.isEditable), o = Ye({
1354
+ let t = e, n = A(() => t.invoice), r = h(), i = $n(), a = A(() => t.invoice.isEditable), o = Ge({
1355
1355
  isSaving: A(() => i.isLoading.value),
1356
1356
  billingDocument: () => n.value,
1357
1357
  canEdit: a,
@@ -1360,19 +1360,19 @@ var $n = D.object({
1360
1360
  body: e,
1361
1361
  params: { invoiceUuid: t.invoice.uuid }
1362
1362
  })
1363
- }), s = dn().create(tr);
1363
+ }), s = pn().create(rr);
1364
1364
  function c() {
1365
1365
  s.open({ invoice: t.invoice });
1366
1366
  }
1367
- return Ge(o), (e, n) => (R(), j($e, null, {
1367
+ return Ye(o), (e, n) => (R(), j(at, null, {
1368
1368
  default: V(() => [
1369
- F(nt, {
1369
+ F(qe, {
1370
1370
  "show-apply-discount": B(r).isGlobalDiscountEnabled.value,
1371
1371
  onApplyDiscount: c
1372
1372
  }, null, 8, ["show-apply-discount"]),
1373
- F(We),
1374
- F(He, { "billing-document": t.invoice }, null, 8, ["billing-document"]),
1375
- F(it)
1373
+ F($e),
1374
+ F(nt, { "billing-document": t.invoice }, null, 8, ["billing-document"]),
1375
+ F(Je)
1376
1376
  ]),
1377
1377
  _: 1
1378
1378
  }));
@@ -1380,7 +1380,7 @@ var $n = D.object({
1380
1380
  });
1381
1381
  //#endregion
1382
1382
  //#region src/modules/invoice/api/mutations/invoiceCreateCreditNote.mutation.ts
1383
- function rr() {
1383
+ function ar() {
1384
1384
  return H({
1385
1385
  queryFn: (e) => y.createCreditNote(e.params.invoiceUuid),
1386
1386
  queryKeysToInvalidate: {
@@ -1391,7 +1391,7 @@ function rr() {
1391
1391
  }
1392
1392
  //#endregion
1393
1393
  //#region src/modules/invoice/api/mutations/invoiceDuplicate.mutation.ts
1394
- function ir() {
1394
+ function or() {
1395
1395
  return H({
1396
1396
  queryFn: (e) => y.duplicate(e.params.invoiceUuid),
1397
1397
  queryKeysToInvalidate: { invoiceIndex: {} }
@@ -1399,7 +1399,7 @@ function ir() {
1399
1399
  }
1400
1400
  //#endregion
1401
1401
  //#region src/modules/invoice/api/mutations/invoiceFinalize.mutation.ts
1402
- function ar() {
1402
+ function sr() {
1403
1403
  return H({
1404
1404
  queryFn: (e) => y.finalize(e.params.invoiceUuid),
1405
1405
  queryKeysToInvalidate: {
@@ -1410,7 +1410,7 @@ function ar() {
1410
1410
  }
1411
1411
  //#endregion
1412
1412
  //#region src/modules/invoice/api/mutations/invoiceMarkAsDraft.mutation.ts
1413
- function or() {
1413
+ function cr() {
1414
1414
  return H({
1415
1415
  queryFn: (e) => y.markAsDraft(e.params.invoiceUuid),
1416
1416
  queryKeysToInvalidate: {
@@ -1421,7 +1421,7 @@ function or() {
1421
1421
  }
1422
1422
  //#endregion
1423
1423
  //#region src/modules/invoice/api/mutations/invoiceMarkAsPaid.mutation.ts
1424
- function sr() {
1424
+ function lr() {
1425
1425
  return H({
1426
1426
  queryFn: (e) => y.markAsPaid(e.params.invoiceUuid),
1427
1427
  queryKeysToInvalidate: {
@@ -1432,7 +1432,7 @@ function sr() {
1432
1432
  }
1433
1433
  //#endregion
1434
1434
  //#region src/modules/invoice/api/mutations/invoiceMarkAsPriorApprovalRequired.mutation.ts
1435
- function cr() {
1435
+ function ur() {
1436
1436
  return H({
1437
1437
  queryFn: (e) => y.markAsPriorApprovalRequired(e.params.invoiceUuid),
1438
1438
  queryKeysToInvalidate: {
@@ -1445,7 +1445,7 @@ function cr() {
1445
1445
  }
1446
1446
  //#endregion
1447
1447
  //#region src/modules/invoice/api/mutations/invoiceMarkAsProtested.mutation.ts
1448
- function lr() {
1448
+ function dr() {
1449
1449
  return H({
1450
1450
  queryFn: (e) => y.markAsProtested(e.params.invoiceUuid),
1451
1451
  queryKeysToInvalidate: {
@@ -1456,7 +1456,7 @@ function lr() {
1456
1456
  }
1457
1457
  //#endregion
1458
1458
  //#region src/modules/invoice/api/mutations/invoiceMarkAsReady.mutation.ts
1459
- function ur() {
1459
+ function fr() {
1460
1460
  return H({
1461
1461
  queryFn: (e) => y.markAsReady(e.params.invoiceUuid),
1462
1462
  queryKeysToInvalidate: {
@@ -1466,19 +1466,8 @@ function ur() {
1466
1466
  });
1467
1467
  }
1468
1468
  //#endregion
1469
- //#region src/modules/invoice/api/mutations/invoiceSend.mutation.ts
1470
- function dr() {
1471
- return H({
1472
- queryFn: (e) => y.send(e.params.invoiceUuid),
1473
- queryKeysToInvalidate: {
1474
- invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
1475
- invoiceIndex: {}
1476
- }
1477
- });
1478
- }
1479
- //#endregion
1480
1469
  //#region src/modules/invoice/api/mutations/invoiceUnmarkAsPriorApprovalRequired.mutation.ts
1481
- function fr() {
1470
+ function pr() {
1482
1471
  return H({
1483
1472
  queryFn: (e) => y.unmarkAsPriorApprovalRequired(e.params.invoiceUuid),
1484
1473
  queryKeysToInvalidate: {
@@ -1491,7 +1480,7 @@ function fr() {
1491
1480
  }
1492
1481
  //#endregion
1493
1482
  //#region src/modules/invoice/api/mutations/invoiceWithdrawProtest.mutation.ts
1494
- function pr() {
1483
+ function mr() {
1495
1484
  return H({
1496
1485
  queryFn: (e) => y.withdrawProtest(e.params.invoiceUuid),
1497
1486
  queryKeysToInvalidate: {
@@ -1502,7 +1491,7 @@ function pr() {
1502
1491
  }
1503
1492
  //#endregion
1504
1493
  //#region src/modules/invoice/api/mutations/invoiceRestoreFromProForma.mutation.ts
1505
- function mr() {
1494
+ function hr() {
1506
1495
  return H({
1507
1496
  queryFn: (e) => y.restoreFromProForma(e.params.invoiceUuid),
1508
1497
  queryKeysToInvalidate: {
@@ -1515,7 +1504,7 @@ function mr() {
1515
1504
  }
1516
1505
  //#endregion
1517
1506
  //#region src/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalRevertDialog.vue
1518
- var hr = /* @__PURE__ */ I({
1507
+ var gr = /* @__PURE__ */ I({
1519
1508
  __name: "InvoiceApprovalRevertDialog",
1520
1509
  props: {
1521
1510
  invoiceUuid: {},
@@ -1523,7 +1512,7 @@ var hr = /* @__PURE__ */ I({
1523
1512
  },
1524
1513
  emits: ["close", "reverted"],
1525
1514
  setup(e, { emit: t }) {
1526
- let n = e, r = t, i = O(), a = Q(), o = w(), s = mr(), c = A(() => n.sentAt === null ? "" : o.toDate(n.sentAt)), l = $({
1515
+ let n = e, r = t, i = O(), a = Q(), o = T(), s = hr(), c = A(() => n.sentAt === null ? "" : o.toDate(n.sentAt)), l = $({
1527
1516
  initialState: {},
1528
1517
  schema: D.object({}),
1529
1518
  onSubmit: async () => {
@@ -1549,7 +1538,7 @@ var hr = /* @__PURE__ */ I({
1549
1538
  "description",
1550
1539
  "icon"
1551
1540
  ]), F(B(K), null, {
1552
- default: V(() => [F(B(q)), F(B(Kt), { label: B(i).t("wise_invoicing.invoice.approval_revert.submit") }, null, 8, ["label"])]),
1541
+ default: V(() => [F(B(q)), F(B(Jt), { label: B(i).t("wise_invoicing.invoice.approval_revert.submit") }, null, 8, ["label"])]),
1553
1542
  _: 1
1554
1543
  })]),
1555
1544
  _: 1
@@ -1558,7 +1547,7 @@ var hr = /* @__PURE__ */ I({
1558
1547
  });
1559
1548
  //#endregion
1560
1549
  //#region src/modules/invoice/api/mutations/invoiceDelete.mutation.ts
1561
- function gr() {
1550
+ function _r() {
1562
1551
  return H({
1563
1552
  queryFn: (e) => y.delete(e.params.invoiceUuid),
1564
1553
  queryKeysToInvalidate: { invoiceIndex: {} }
@@ -1566,13 +1555,13 @@ function gr() {
1566
1555
  }
1567
1556
  //#endregion
1568
1557
  //#region src/modules/invoice/use-cases/detail/dialogs/InvoiceDeleteDialog.vue
1569
- var _r = /* @__PURE__ */ I({
1558
+ var vr = /* @__PURE__ */ I({
1570
1559
  __name: "InvoiceDeleteDialog",
1571
1560
  props: { invoice: {} },
1572
1561
  emits: ["close", "deleted"],
1573
1562
  setup(e, { emit: t }) {
1574
- let n = e, r = t, i = O(), a = At(), o = Q(), s = gr(), c = $({
1575
- schema: ht.object({}),
1563
+ let n = e, r = t, i = O(), a = Mt(), o = Q(), s = _r(), c = $({
1564
+ schema: _t.object({}),
1576
1565
  onSubmit: async () => {
1577
1566
  let e = await s.execute({ params: { invoiceUuid: n.invoice.uuid } });
1578
1567
  e.isErr() ? o.apiError(e.error) : (o.show({ message: i.t("wise_invoicing.invoice.delete.success_toast") }), r("deleted"), r("close"), await a.push({ name: "invoicing-invoice-overview" }));
@@ -1587,7 +1576,7 @@ var _r = /* @__PURE__ */ I({
1587
1576
  title: B(i).t("wise_invoicing.invoice.delete.title"),
1588
1577
  description: B(i).t("wise_invoicing.invoice.delete.description")
1589
1578
  }, null, 8, ["title", "description"]), F(B(K), null, {
1590
- right: V(() => [F(B(q), { label: "cancel" }), F(B(Kt), {
1579
+ right: V(() => [F(B(q), { label: "cancel" }), F(B(Jt), {
1591
1580
  "is-destructive": !0,
1592
1581
  label: B(i).t("wise_invoicing.invoice.delete.submit_button")
1593
1582
  }, null, 8, ["label"])]),
@@ -1596,7 +1585,7 @@ var _r = /* @__PURE__ */ I({
1596
1585
  _: 1
1597
1586
  }, 8, ["form"]));
1598
1587
  }
1599
- }), vr = { class: "flex flex-col gap-lg px-2xl" }, yr = /* @__PURE__ */ I({
1588
+ }), yr = { class: "flex flex-col gap-lg px-2xl" }, br = /* @__PURE__ */ I({
1600
1589
  __name: "InvoiceFinalizeOutOfSyncDialog",
1601
1590
  props: {
1602
1591
  sentAt: {},
@@ -1610,7 +1599,7 @@ var _r = /* @__PURE__ */ I({
1610
1599
  "viewProForma"
1611
1600
  ],
1612
1601
  setup(e, { emit: t }) {
1613
- let n = e, r = t, i = O(), a = w(), o = bt(!1), s = A(() => n.sentAt === null ? "" : a.toDate(n.sentAt));
1602
+ let n = e, r = t, i = O(), a = T(), o = St(!1), s = A(() => n.sentAt === null ? "" : a.toDate(n.sentAt));
1614
1603
  function c() {
1615
1604
  r("finalizeAnyway"), r("close");
1616
1605
  }
@@ -1620,7 +1609,7 @@ var _r = /* @__PURE__ */ I({
1620
1609
  function u() {
1621
1610
  r("sendNewRequest"), r("close");
1622
1611
  }
1623
- return (e, t) => (R(), j(B(Wt), {
1612
+ return (e, t) => (R(), j(B(Kt), {
1624
1613
  size: "sm",
1625
1614
  onClose: t[2] ||= (e) => r("close")
1626
1615
  }, {
@@ -1635,7 +1624,7 @@ var _r = /* @__PURE__ */ I({
1635
1624
  "description",
1636
1625
  "icon"
1637
1626
  ]),
1638
- P("div", vr, [n.proFormaFile === null ? M("", !0) : (R(), j(B(Rt), {
1627
+ P("div", yr, [n.proFormaFile === null ? M("", !0) : (R(), j(B(Bt), {
1639
1628
  key: 0,
1640
1629
  class: "self-start"
1641
1630
  }, {
@@ -1645,23 +1634,23 @@ var _r = /* @__PURE__ */ I({
1645
1634
  onClick: t[0] ||= (e) => r("viewProForma")
1646
1635
  }, z(B(i).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 1)]),
1647
1636
  _: 1
1648
- })), F(B(Lt), {
1637
+ })), F(B(zt), {
1649
1638
  modelValue: o.value,
1650
1639
  "onUpdate:modelValue": t[1] ||= (e) => o.value = e,
1651
1640
  label: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.acknowledge")
1652
1641
  }, null, 8, ["modelValue", "label"])]),
1653
1642
  F(B(K), null, {
1654
- left: V(() => [F(B(It), {
1655
- "icon-right": B(ge),
1643
+ left: V(() => [F(B(Rt), {
1644
+ "icon-right": B(x),
1656
1645
  label: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.send_new_request"),
1657
1646
  variant: "tertiary",
1658
1647
  onClick: u
1659
1648
  }, null, 8, ["icon-right", "label"])]),
1660
- right: V(() => [F(B(It), {
1649
+ right: V(() => [F(B(Rt), {
1661
1650
  label: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.revert_changes"),
1662
1651
  variant: "secondary",
1663
1652
  onClick: l
1664
- }, null, 8, ["label"]), F(B(It), {
1653
+ }, null, 8, ["label"]), F(B(Rt), {
1665
1654
  "disabled-reason": o.value ? null : B(i).t("wise_invoicing.invoice.finalize_out_of_sync.acknowledge_required"),
1666
1655
  "is-destructive": !0,
1667
1656
  "is-disabled": !o.value,
@@ -1679,36 +1668,36 @@ var _r = /* @__PURE__ */ I({
1679
1668
  _: 1
1680
1669
  }));
1681
1670
  }
1682
- }), br = "customer_has_no_approval_email", xr = /* @__PURE__ */ new Set([
1671
+ }), xr = "customer_has_no_approval_email", Sr = /* @__PURE__ */ new Set([
1683
1672
  a.AWAITING_APPROVAL,
1684
1673
  a.EXPIRED,
1685
1674
  a.REMINDER_1,
1686
1675
  a.REMINDER_2
1687
1676
  ]);
1688
- async function Sr(e) {
1677
+ async function Cr(e) {
1689
1678
  if (e === null) return;
1690
- let t = await lt.getDownloadUrl(e.uuid);
1679
+ let t = await dt.getDownloadUrl(e.uuid);
1691
1680
  t !== null && window.open(t, "_blank", "noopener");
1692
1681
  }
1693
- function Cr(e) {
1694
- let t = O(), n = Q(), r = At(), s = h(), c = dn(), l = c.create(_r), u = c.create(pt), p = c.create(ft), m = c.create(hr), g = c.create(ut), _ = c.create(yr), ee = c.create(Ue), v = dr(), te = rr(), ne = ir(), re = ar(), ie = or(), ae = sr(), oe = cr(), se = lr(), le = ur(), ue = dt(), fe = fr(), Se = pr(), { shouldSkipConfirmation: we } = st(), x = bt(null), S = A(() => b.getMetadata(e.value.status)), Te = A(() => x.value ?? e.value.isDisputed), Ee = A(() => e.value.status !== o.DRAFT && e.value.status !== o.READY), De = A(() => e.value.lifecycleStatus === f.FINALIZED);
1695
- function C(e) {
1696
- return S.value.actions.includes(e);
1682
+ function wr(e) {
1683
+ let t = O(), n = Q(), i = Mt(), s = h(), c = pn(), l = c.create(vr), u = c.create(ht), p = c.create(mt), m = c.create(gr), g = c.create(ft), _ = c.create(br), ee = c.create(lt), te = c.create(se), v = Be(), ne = ar(), re = or(), ie = sr(), ae = cr(), oe = lr(), ce = ur(), ue = dr(), de = fr(), pe = pt(), Se = pr(), we = mr(), { shouldSkipConfirmation: Te } = He(), S = St(null), C = A(() => b.getMetadata(e.value.status)), Ee = A(() => S.value ?? e.value.isDisputed), De = A(() => e.value.status !== r.DRAFT && e.value.status !== r.READY), Ae = A(() => e.value.lifecycleStatus === d.FINALIZED);
1684
+ function w(e) {
1685
+ return C.value.actions.includes(e);
1697
1686
  }
1698
- let w = A(() => Ae.getDisplayStatus({
1687
+ let T = A(() => je.getDisplayStatus({
1699
1688
  approval: e.value.approval,
1700
1689
  requiresPriorApproval: e.value.requiresPriorApproval
1701
- })), T = A(() => {
1702
- let e = w.value;
1690
+ })), E = A(() => {
1691
+ let e = T.value;
1703
1692
  return e === null || e === a.APPROVED ? null : e;
1704
- }), E = A(() => T.value === null ? null : t.t("wise_invoicing.invoice.finalize.blocked_by_approval", { status: t.t(Ae.getMetadata(T.value).translationKey) })), je = A(() => S.value.isEditable && !e.value.requiresPriorApproval), Me = A(() => S.value.isEditable && e.value.requiresPriorApproval && !e.value.hasApprovalHistory), Ne = A(() => S.value.isEditable && e.value.requiresPriorApproval && (w.value !== a.APPROVED || e.value.hasChangesSinceApprovalSent)), Pe = A(() => Ne.value && C("finalize") && !e.value.hasApprovalHistory), Fe = A(() => S.value.isEditable && e.value.approval !== null && Ae.canMarkAsApproved(e.value.approval.status)), Le = A(() => S.value.isEditable && e.value.approvalUuid !== null && xr.has(w.value)), Re = A(() => w.value === a.APPROVED && e.value.hasChangesSinceApprovalSent), ze = A(() => S.value.isEditable && e.value.approval?.status === i.REQUESTED);
1705
- async function Be() {
1693
+ }), Me = A(() => E.value === null ? null : t.t("wise_invoicing.invoice.finalize.blocked_by_approval", { status: t.t(je.getMetadata(E.value).translationKey) })), Ne = A(() => C.value.isEditable && !e.value.requiresPriorApproval), Pe = A(() => C.value.isEditable && e.value.requiresPriorApproval && !e.value.hasApprovalHistory), Fe = A(() => C.value.isEditable && e.value.requiresPriorApproval && (T.value !== a.APPROVED || e.value.hasChangesSinceApprovalSent)), Ie = A(() => Fe.value && w("finalize") && !e.value.hasApprovalHistory), Le = A(() => C.value.isEditable && e.value.approval !== null && je.canMarkAsApproved(e.value.approval.status)), Re = A(() => C.value.isEditable && e.value.approvalUuid !== null && Sr.has(T.value)), ze = A(() => T.value === a.APPROVED && e.value.hasChangesSinceApprovalSent), Ve = A(() => C.value.isEditable && e.value.approval?.status === f.REQUESTED);
1694
+ async function Ue() {
1706
1695
  e.value.approvalUuid !== null && await g.open({
1707
1696
  approvalUuid: e.value.approvalUuid,
1708
1697
  invoiceUuid: e.value.uuid
1709
1698
  });
1710
1699
  }
1711
- async function Ve(t) {
1700
+ async function We(t) {
1712
1701
  await m.open({
1713
1702
  invoiceUuid: e.value.uuid,
1714
1703
  sentAt: e.value.approval?.sentAt ?? null,
@@ -1717,29 +1706,29 @@ function Cr(e) {
1717
1706
  }
1718
1707
  });
1719
1708
  }
1720
- async function He() {
1721
- await Sr(e.value.approvalProFormaFile);
1709
+ async function Ge() {
1710
+ await Cr(e.value.approvalProFormaFile);
1722
1711
  }
1723
- async function We() {
1712
+ async function Ke() {
1724
1713
  e.value.approvalUuid !== null && await u.open({
1725
1714
  approvalUuid: e.value.approvalUuid,
1726
1715
  invoiceUuid: e.value.uuid
1727
1716
  });
1728
1717
  }
1729
- async function Ge() {
1718
+ async function qe() {
1730
1719
  e.value.approvalUuid !== null && await p.open({
1731
1720
  approvalUuid: e.value.approvalUuid,
1732
1721
  invoiceUuid: e.value.uuid
1733
1722
  });
1734
1723
  }
1735
- async function Ke() {
1736
- let r = await ue.execute({ params: {
1724
+ async function Je() {
1725
+ let r = await pe.execute({ params: {
1737
1726
  invoiceUuid: e.value.uuid,
1738
1727
  hasActiveApproval: e.value.approval !== null
1739
1728
  } });
1740
1729
  if (r.isErr()) {
1741
1730
  let i = s.getCustomerDetailRoute(e.value.customer.uuid);
1742
- if (Tt.isExpectedApiError(r.error) && Tt.getApiErrorCode(r.error) === br) {
1731
+ if (Dt.isExpectedApiError(r.error) && Dt.getApiErrorCode(r.error) === xr) {
1743
1732
  n.show({
1744
1733
  link: i === null ? void 0 : {
1745
1734
  label: t.t("wise_invoicing.invoice.send_approval.view_customer_action"),
@@ -1756,74 +1745,84 @@ function Cr(e) {
1756
1745
  reference: e.value.sequence ?? e.value.subject ?? t.t("wise_invoicing.invoice.detail.fallback_title")
1757
1746
  }) });
1758
1747
  }
1759
- async function qe() {
1760
- let r = await oe.execute({ params: { invoiceUuid: e.value.uuid } });
1748
+ async function Ye() {
1749
+ let r = await ce.execute({ params: { invoiceUuid: e.value.uuid } });
1761
1750
  r.isErr() ? n.apiError(r.error) : n.show({ message: t.t("wise_invoicing.invoice.mark_as_needs_approval.success") });
1762
1751
  }
1763
- async function Je() {
1764
- let r = await fe.execute({ params: { invoiceUuid: e.value.uuid } });
1752
+ async function Xe() {
1753
+ let r = await Se.execute({ params: { invoiceUuid: e.value.uuid } });
1765
1754
  r.isErr() ? n.apiError(r.error) : n.show({ message: t.t("wise_invoicing.invoice.unmark_as_needs_approval.success") });
1766
1755
  }
1767
- wt(() => e.value.isDisputed, (e) => {
1768
- x.value === e && (x.value = null);
1756
+ Et(() => e.value.isDisputed, (e) => {
1757
+ S.value === e && (S.value = null);
1769
1758
  });
1770
- async function Ye() {
1771
- let r = await re.execute({ params: { invoiceUuid: e.value.uuid } });
1759
+ async function Ze() {
1760
+ let r = await ie.execute({ params: { invoiceUuid: e.value.uuid } });
1772
1761
  return r.isErr() ? (n.apiError(r.error), !1) : (n.show({ message: t.t("wise_invoicing.invoice.finalize.success") }), !0);
1773
1762
  }
1774
- async function Xe() {
1775
- Re.value ? await _.open({
1763
+ async function Qe() {
1764
+ ze.value ? await _.open({
1776
1765
  sentAt: e.value.approval?.sentAt ?? null,
1777
1766
  proFormaFile: e.value.approvalProFormaFile,
1778
1767
  onFinalizeAnyway: () => {
1779
- Ye();
1768
+ Ze();
1780
1769
  },
1781
1770
  onRevertChanges: () => {
1782
- Ve({ onReverted: () => {
1783
- Ye();
1771
+ We({ onReverted: () => {
1772
+ Ze();
1784
1773
  } });
1785
1774
  },
1786
1775
  onSendNewRequest: () => {
1787
- Ke();
1776
+ Je();
1788
1777
  },
1789
1778
  onViewProForma: () => {
1790
- He();
1779
+ Ge();
1791
1780
  }
1792
- }) : we.value ? await Ye() : await ee.open({
1781
+ }) : Te.value ? await Ze() : await ee.open({
1793
1782
  billingDocumentType: "invoice",
1794
- onConfirm: Ye
1783
+ onConfirm: Ze
1795
1784
  });
1796
1785
  }
1797
- async function Ze() {
1798
- let r = await le.execute({ params: { invoiceUuid: e.value.uuid } });
1786
+ async function $e() {
1787
+ let r = await de.execute({ params: { invoiceUuid: e.value.uuid } });
1799
1788
  r.isErr() ? n.apiError(r.error) : n.show({ message: t.t("wise_invoicing.invoice.mark_as_ready.success") });
1800
1789
  }
1801
- async function Qe() {
1802
- let r = await ie.execute({ params: { invoiceUuid: e.value.uuid } });
1790
+ async function et() {
1791
+ let r = await ae.execute({ params: { invoiceUuid: e.value.uuid } });
1803
1792
  r.isErr() ? n.apiError(r.error) : n.show({ message: t.t("wise_invoicing.invoice.mark_as_draft.success") });
1804
1793
  }
1805
- async function $e() {
1806
- let r = await ae.execute({ params: { invoiceUuid: e.value.uuid } });
1794
+ async function tt() {
1795
+ let r = await oe.execute({ params: { invoiceUuid: e.value.uuid } });
1807
1796
  r.isErr() ? n.apiError(r.error) : n.show({ message: t.t("wise_invoicing.invoice.mark_as_paid.success") });
1808
1797
  }
1809
- async function et() {
1810
- x.value = !0;
1811
- let r = await se.execute({ params: { invoiceUuid: e.value.uuid } });
1812
- r.isErr() ? (x.value = null, n.apiError(r.error)) : n.show({ message: t.t("wise_invoicing.invoice.mark_as_disputed.success") });
1798
+ async function nt() {
1799
+ S.value = !0;
1800
+ let r = await ue.execute({ params: { invoiceUuid: e.value.uuid } });
1801
+ r.isErr() ? (S.value = null, n.apiError(r.error)) : n.show({ message: t.t("wise_invoicing.invoice.mark_as_disputed.success") });
1813
1802
  }
1814
- async function tt() {
1815
- x.value = !1;
1816
- let r = await Se.execute({ params: { invoiceUuid: e.value.uuid } });
1817
- r.isErr() ? (x.value = null, n.apiError(r.error)) : n.show({ message: t.t("wise_invoicing.invoice.withdraw_dispute.success") });
1803
+ async function rt() {
1804
+ S.value = !1;
1805
+ let r = await we.execute({ params: { invoiceUuid: e.value.uuid } });
1806
+ r.isErr() ? (S.value = null, n.apiError(r.error)) : n.show({ message: t.t("wise_invoicing.invoice.withdraw_dispute.success") });
1818
1807
  }
1819
- async function nt() {
1808
+ async function it() {
1809
+ await te.open({
1810
+ invoiceUuid: e.value.uuid,
1811
+ documents: [{
1812
+ uuid: e.value.uuid,
1813
+ label: e.value.sequence ?? e.value.subject ?? t.t("wise_invoicing.invoice.detail.fallback_title")
1814
+ }]
1815
+ });
1816
+ }
1817
+ async function at() {
1818
+ if (v.isLoading.value) return;
1820
1819
  let r = await v.execute({ params: { invoiceUuid: e.value.uuid } });
1821
- r.isErr() ? n.apiError(r.error) : (Ie.reflectBulkAction([e.value.uuid], { deliveryStatus: d.SENT }), n.show({ message: t.t("wise_invoicing.invoice.send.success") }));
1820
+ r.isErr() ? n.apiError(r.error) : n.show({ message: t.t("wise_invoicing.delivery.reminder.sent") });
1822
1821
  }
1823
- async function rt() {
1822
+ async function ot() {
1824
1823
  await l.open({ invoice: e.value });
1825
1824
  }
1826
- async function it() {
1825
+ async function st() {
1827
1826
  let r = await y.getByUuid(e.value.uuid);
1828
1827
  if (r.isErr()) {
1829
1828
  n.apiError(r.error);
@@ -1834,185 +1833,192 @@ function Cr(e) {
1834
1833
  n.show({ message: t.t("wise_invoicing.invoice.download_pdf.generation_in_progress") });
1835
1834
  return;
1836
1835
  }
1837
- let a = await lt.getDownloadUrl(i.uuid);
1838
- a !== null && ce.downloadUrl(a, i.name);
1836
+ let a = await dt.getDownloadUrl(i.uuid);
1837
+ a !== null && le.downloadUrl(a, i.name);
1839
1838
  }
1840
- async function at() {
1841
- let i = await ne.execute({ params: { invoiceUuid: e.value.uuid } });
1842
- i.isErr() ? n.apiError(i.error) : n.show({
1839
+ async function ct() {
1840
+ let r = await re.execute({ params: { invoiceUuid: e.value.uuid } });
1841
+ r.isErr() ? n.apiError(r.error) : n.show({
1843
1842
  button: {
1844
1843
  label: t.t("wise_invoicing.invoice.duplicate.view_action"),
1845
1844
  onClick: () => {
1846
- r.push({
1845
+ i.push({
1847
1846
  name: "invoicing-invoice-detail",
1848
- params: { invoiceUuid: i.value }
1847
+ params: { invoiceUuid: r.value }
1849
1848
  });
1850
1849
  }
1851
1850
  },
1852
1851
  message: t.t("wise_invoicing.invoice.duplicate.success")
1853
1852
  });
1854
1853
  }
1855
- async function ot() {
1856
- let i = await te.execute({ params: { invoiceUuid: e.value.uuid } });
1857
- i.isErr() ? n.apiError(i.error) : n.show({
1854
+ async function ut() {
1855
+ let r = await ne.execute({ params: { invoiceUuid: e.value.uuid } });
1856
+ r.isErr() ? n.apiError(r.error) : n.show({
1858
1857
  button: {
1859
1858
  label: t.t("wise_invoicing.credit_note.create.view_action"),
1860
1859
  onClick: () => {
1861
- r.push({
1860
+ i.push({
1862
1861
  name: "invoicing-credit-note-detail",
1863
- params: { creditNoteUuid: i.value }
1862
+ params: { creditNoteUuid: r.value }
1864
1863
  });
1865
1864
  }
1866
1865
  },
1867
1866
  message: t.t("wise_invoicing.credit_note.create.success")
1868
1867
  });
1869
1868
  }
1870
- let ct = A(() => [
1869
+ let gt = A(() => [
1871
1870
  {
1872
- isLoading: v.isLoading.value,
1873
- iconLeft: ge,
1871
+ isLoading: !1,
1872
+ iconLeft: x,
1874
1873
  key: "send",
1875
1874
  label: t.t("wise_invoicing.invoice.detail.actions.send"),
1876
1875
  variant: "primary",
1877
- visible: e.value.status === o.FINALIZED,
1878
- onClick: nt
1876
+ visible: e.value.lifecycleStatus === d.FINALIZED,
1877
+ onClick: it
1879
1878
  },
1880
1879
  {
1881
- isLoading: le.isLoading.value,
1880
+ isLoading: de.isLoading.value,
1882
1881
  iconRight: Ce,
1883
1882
  key: "markAsReady",
1884
1883
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
1885
- visible: C("markAsReady"),
1886
- onClick: Ze
1884
+ visible: w("markAsReady"),
1885
+ onClick: $e
1887
1886
  },
1888
1887
  {
1889
1888
  isLoading: !1,
1890
1889
  iconLeft: ke,
1891
1890
  key: "markAsApproved",
1892
1891
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_approved"),
1893
- visible: Fe.value,
1894
- onClick: We
1892
+ visible: Le.value,
1893
+ onClick: Ke
1895
1894
  },
1896
1895
  {
1897
- isLoading: ue.isLoading.value,
1898
- iconLeft: ge,
1896
+ isLoading: pe.isLoading.value,
1897
+ iconLeft: x,
1899
1898
  key: "sendApprovalRequest",
1900
1899
  label: t.t("wise_invoicing.invoice.detail.actions.send_approval_request"),
1901
1900
  variant: "primary",
1902
- visible: Pe.value,
1903
- onClick: Ke
1901
+ visible: Ie.value,
1902
+ onClick: Je
1904
1903
  },
1905
1904
  {
1906
- isDisabled: T.value !== null,
1907
- isLoading: re.isLoading.value,
1908
- disabledReason: E.value,
1909
- iconLeft: pe,
1905
+ isDisabled: E.value !== null,
1906
+ isLoading: ie.isLoading.value,
1907
+ disabledReason: Me.value,
1908
+ iconLeft: me,
1910
1909
  key: "finalize",
1911
1910
  label: t.t("wise_invoicing.invoice.detail.actions.finalize"),
1912
- variant: T.value === null ? "primary" : "secondary",
1913
- visible: C("finalize") && !Pe.value,
1914
- onClick: Xe
1911
+ variant: E.value === null ? "primary" : "secondary",
1912
+ visible: w("finalize") && !Ie.value,
1913
+ onClick: Qe
1915
1914
  }
1916
- ].filter((e) => e.visible)), mt = A(() => {
1915
+ ].filter((e) => e.visible)), _t = A(() => {
1917
1916
  let n = [
1918
1917
  {
1919
1918
  icon: Oe,
1920
1919
  key: "markAsProtested",
1921
1920
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_disputed"),
1922
- visible: De.value && !Te.value,
1923
- onSelect: et
1921
+ visible: Ae.value && !Ee.value,
1922
+ onSelect: nt
1924
1923
  },
1925
1924
  {
1926
1925
  icon: ke,
1927
1926
  key: "markAsPaid",
1928
1927
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_paid"),
1929
- visible: C("markAsPaid"),
1930
- onSelect: $e
1928
+ visible: w("markAsPaid"),
1929
+ onSelect: tt
1931
1930
  },
1932
1931
  {
1933
1932
  icon: Ce,
1934
1933
  key: "withdrawProtest",
1935
1934
  label: t.t("wise_invoicing.invoice.detail.actions.withdraw_dispute"),
1936
- visible: De.value && Te.value,
1937
- onSelect: tt
1935
+ visible: Ae.value && Ee.value,
1936
+ onSelect: rt
1938
1937
  }
1939
- ], r = [
1940
- o.FINALIZED,
1941
- o.PAID,
1942
- o.SENT,
1943
- o.OVERDUE,
1944
- o.PROTESTED
1945
- ].includes(e.value.status), i = [
1938
+ ], i = [
1939
+ r.FINALIZED,
1940
+ r.PAID,
1941
+ r.SENT,
1942
+ r.OVERDUE,
1943
+ r.PROTESTED
1944
+ ].includes(e.value.status), a = [
1946
1945
  {
1947
- icon: he,
1946
+ icon: x,
1947
+ key: "sendReminder",
1948
+ label: t.t("wise_invoicing.delivery.reminder.action"),
1949
+ visible: e.value.lifecycleStatus === d.FINALIZED && [o.SENT, o.VIEWED].includes(e.value.deliveryStatus),
1950
+ onSelect: at
1951
+ },
1952
+ {
1953
+ icon: ge,
1948
1954
  key: "downloadPdf",
1949
1955
  label: t.t("wise_invoicing.common.download_pdf"),
1950
- visible: Ee.value,
1951
- onSelect: it
1956
+ visible: De.value,
1957
+ onSelect: st
1952
1958
  },
1953
1959
  {
1954
1960
  icon: _e,
1955
1961
  key: "backToDraft",
1956
1962
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
1957
- visible: C("markAsDraft"),
1958
- onSelect: Qe
1963
+ visible: w("markAsDraft"),
1964
+ onSelect: et
1959
1965
  },
1960
1966
  {
1961
1967
  icon: xe,
1962
1968
  key: "duplicate",
1963
1969
  label: t.t("wise_invoicing.invoice.detail.actions.duplicate"),
1964
1970
  visible: !0,
1965
- onSelect: at
1971
+ onSelect: ct
1966
1972
  },
1967
1973
  {
1968
1974
  icon: be,
1969
1975
  key: "rejectApproval",
1970
1976
  label: t.t("wise_invoicing.invoice.detail.actions.reject_approval"),
1971
- visible: ze.value,
1972
- onSelect: Ge
1977
+ visible: Ve.value,
1978
+ onSelect: qe
1973
1979
  },
1974
1980
  {
1975
- icon: ge,
1981
+ icon: x,
1976
1982
  key: "sendApprovalRequest",
1977
1983
  label: t.t("wise_invoicing.invoice.detail.actions.send_approval_request"),
1978
- visible: Ne.value && !Pe.value,
1979
- onSelect: Ke
1984
+ visible: Fe.value && !Ie.value,
1985
+ onSelect: Je
1980
1986
  },
1981
1987
  {
1982
- icon: me,
1988
+ icon: he,
1983
1989
  key: "markAsNeedsApproval",
1984
1990
  label: t.t("wise_invoicing.invoice.detail.actions.mark_as_needs_approval"),
1985
- visible: je.value,
1986
- onSelect: qe
1991
+ visible: Ne.value,
1992
+ onSelect: Ye
1987
1993
  },
1988
1994
  {
1989
1995
  icon: _e,
1990
1996
  key: "unmarkAsNeedsApproval",
1991
1997
  label: t.t("wise_invoicing.invoice.detail.actions.unmark_as_needs_approval"),
1992
- visible: Me.value,
1993
- onSelect: Je
1998
+ visible: Pe.value,
1999
+ onSelect: Xe
1994
2000
  }
1995
- ], a = [
2001
+ ], s = [
1996
2002
  {
1997
- icon: de,
2003
+ icon: fe,
1998
2004
  key: "archiveApproval",
1999
2005
  label: t.t("wise_invoicing.invoice.detail.actions.archive_approval"),
2000
- visible: Le.value,
2001
- onSelect: Be
2006
+ visible: Re.value,
2007
+ onSelect: Ue
2002
2008
  },
2003
2009
  {
2004
2010
  icon: ye,
2005
2011
  key: "createCreditNote",
2006
2012
  label: t.t("wise_invoicing.invoice.detail.header.cancel_with_credit_note"),
2007
- visible: r,
2008
- onSelect: ot
2013
+ visible: i,
2014
+ onSelect: ut
2009
2015
  },
2010
2016
  {
2011
2017
  icon: ve,
2012
2018
  key: "delete",
2013
2019
  label: t.t("wise_invoicing.invoice.detail.actions.delete"),
2014
- visible: S.value.isEditable,
2015
- onSelect: rt
2020
+ visible: C.value.isEditable,
2021
+ onSelect: ot
2016
2022
  }
2017
2023
  ];
2018
2024
  return [
@@ -2021,51 +2027,51 @@ function Cr(e) {
2021
2027
  key: "lifecycle"
2022
2028
  },
2023
2029
  {
2024
- items: i.filter((e) => e.visible),
2030
+ items: a.filter((e) => e.visible),
2025
2031
  key: "secondary"
2026
2032
  },
2027
2033
  {
2028
- items: a.filter((e) => e.visible),
2034
+ items: s.filter((e) => e.visible),
2029
2035
  key: "destructive"
2030
2036
  }
2031
2037
  ].filter((e) => e.items.length > 0);
2032
2038
  });
2033
2039
  return {
2034
- isActionMenuVisible: A(() => mt.value.length > 0),
2035
- isDisputed: Te,
2036
- menuGroups: mt,
2037
- primaryButtons: ct,
2038
- onRevertApprovalChanges: Ve,
2039
- onSendApprovalRequest: Ke,
2040
- onViewProForma: He
2040
+ isActionMenuVisible: A(() => _t.value.length > 0),
2041
+ isDisputed: Ee,
2042
+ menuGroups: _t,
2043
+ primaryButtons: gt,
2044
+ onRevertApprovalChanges: We,
2045
+ onSendApprovalRequest: Je,
2046
+ onViewProForma: Ge
2041
2047
  };
2042
2048
  }
2043
2049
  //#endregion
2044
2050
  //#region src/modules/invoice/use-cases/detail/views/InvoiceDetailView.vue
2045
- var wr = /* @__PURE__ */ I({
2051
+ var Tr = /* @__PURE__ */ I({
2046
2052
  __name: "InvoiceDetailView",
2047
2053
  props: {
2048
2054
  customFieldDefinitions: {},
2049
2055
  invoice: {}
2050
2056
  },
2051
2057
  setup(e) {
2052
- let t = e, n = O(), r = bt(!1), i = A(() => ae.filterByView(t.customFieldDefinitions, re.INVOICE_DETAIL)), { isDisputed: a, menuGroups: o, primaryButtons: s, onRevertApprovalChanges: c, onSendApprovalRequest: l, onViewProForma: u } = Cr(A(() => t.invoice)), d = A(() => [{
2058
+ let t = e, n = O(), r = St(!1), i = A(() => re.filterByView(t.customFieldDefinitions, oe.INVOICE_DETAIL)), { isDisputed: a, menuGroups: o, primaryButtons: s, onRevertApprovalChanges: c, onSendApprovalRequest: l, onViewProForma: u } = wr(A(() => t.invoice)), f = A(() => [{
2053
2059
  label: n.t("wise_invoicing.invoice.overview.title"),
2054
2060
  to: { name: "invoicing-invoice-overview" }
2055
2061
  }, { label: t.invoice.sequence ?? t.invoice.subject ?? n.t("wise_invoicing.invoice.detail.fallback_title") }]);
2056
- return (e, f) => (R(), j(tt, {
2062
+ return (e, p) => (R(), j(it, {
2057
2063
  "billing-document": t.invoice,
2058
- breadcrumbs: d.value,
2064
+ breadcrumbs: f.value,
2059
2065
  title: B(n).t("wise_invoicing.invoice.detail.fallback_title")
2060
2066
  }, {
2061
- header: V(() => [F(Sn, {
2067
+ header: V(() => [F(wn, {
2062
2068
  invoice: t.invoice,
2063
2069
  "is-disputed": B(a),
2064
2070
  "menu-groups": B(o),
2065
2071
  "primary-buttons": B(s),
2066
2072
  "is-pdf-view-active": r.value,
2067
2073
  class: "w-full",
2068
- onTogglePdfView: f[0] ||= (e) => r.value = !r.value
2074
+ onTogglePdfView: p[0] ||= (e) => r.value = !r.value
2069
2075
  }, null, 8, [
2070
2076
  "invoice",
2071
2077
  "is-disputed",
@@ -2073,48 +2079,55 @@ var wr = /* @__PURE__ */ I({
2073
2079
  "primary-buttons",
2074
2080
  "is-pdf-view-active"
2075
2081
  ])]),
2076
- default: V(() => [B(b).isEditable(t.invoice.status) ? (R(), j(_n, {
2077
- key: 0,
2078
- approval: t.invoice.approval,
2079
- "is-out-of-sync": t.invoice.hasChangesSinceApprovalSent,
2080
- "pro-forma-file": t.invoice.approvalProFormaFile,
2081
- rejection: t.invoice.rejection,
2082
- class: "w-full",
2083
- onRevertChanges: B(c),
2084
- onSendNewRequest: B(l),
2085
- onViewProForma: B(u)
2086
- }, null, 8, [
2087
- "approval",
2088
- "is-out-of-sync",
2089
- "pro-forma-file",
2090
- "rejection",
2091
- "onRevertChanges",
2092
- "onSendNewRequest",
2093
- "onViewProForma"
2094
- ])) : M("", !0), r.value ? (R(), j(Qe, {
2095
- key: 1,
2096
- "billing-document": t.invoice,
2097
- class: "w-full"
2098
- }, null, 8, ["billing-document"])) : (R(), N(k, { key: 2 }, [
2099
- F(nr, {
2100
- "custom-field-definitions": i.value,
2101
- invoice: t.invoice
2102
- }, null, 8, ["custom-field-definitions", "invoice"]),
2103
- B(b).isEditable(t.invoice.status) ? M("", !0) : (R(), j(Xn, {
2082
+ default: V(() => [
2083
+ t.invoice.lifecycleStatus === B(d).FINALIZED ? (R(), j(Qe, {
2104
2084
  key: 0,
2105
- invoice: t.invoice,
2106
- class: "w-full"
2107
- }, null, 8, ["invoice"])),
2108
- F(wn, {
2109
- invoice: t.invoice,
2110
- class: "w-full"
2111
- }, null, 8, ["invoice"]),
2112
- F(En, {
2113
- invoice: t.invoice,
2085
+ "invoice-uuid": t.invoice.uuid
2086
+ }, null, 8, ["invoice-uuid"])) : M("", !0),
2087
+ B(b).isEditable(t.invoice.status) ? (R(), j(yn, {
2088
+ key: 1,
2089
+ approval: t.invoice.approval,
2090
+ "is-out-of-sync": t.invoice.hasChangesSinceApprovalSent,
2091
+ "pro-forma-file": t.invoice.approvalProFormaFile,
2092
+ rejection: t.invoice.rejection,
2093
+ class: "w-full",
2094
+ onRevertChanges: B(c),
2095
+ onSendNewRequest: B(l),
2096
+ onViewProForma: B(u)
2097
+ }, null, 8, [
2098
+ "approval",
2099
+ "is-out-of-sync",
2100
+ "pro-forma-file",
2101
+ "rejection",
2102
+ "onRevertChanges",
2103
+ "onSendNewRequest",
2104
+ "onViewProForma"
2105
+ ])) : M("", !0),
2106
+ r.value ? (R(), j(tt, {
2107
+ key: 2,
2108
+ "billing-document": t.invoice,
2114
2109
  class: "w-full"
2115
- }, null, 8, ["invoice"])
2116
- ], 64))]),
2117
- sidebar: V(() => [F(Rn, {
2110
+ }, null, 8, ["billing-document"])) : (R(), N(k, { key: 3 }, [
2111
+ F(ir, {
2112
+ "custom-field-definitions": i.value,
2113
+ invoice: t.invoice
2114
+ }, null, 8, ["custom-field-definitions", "invoice"]),
2115
+ B(b).isEditable(t.invoice.status) ? M("", !0) : (R(), j(Qn, {
2116
+ key: 0,
2117
+ invoice: t.invoice,
2118
+ class: "w-full"
2119
+ }, null, 8, ["invoice"])),
2120
+ F(En, {
2121
+ invoice: t.invoice,
2122
+ class: "w-full"
2123
+ }, null, 8, ["invoice"]),
2124
+ F(On, {
2125
+ invoice: t.invoice,
2126
+ class: "w-full"
2127
+ }, null, 8, ["invoice"])
2128
+ ], 64))
2129
+ ]),
2130
+ sidebar: V(() => [F(Bn, {
2118
2131
  "custom-field-definitions": i.value,
2119
2132
  invoice: t.invoice
2120
2133
  }, null, 8, ["custom-field-definitions", "invoice"])]),
@@ -2125,20 +2138,20 @@ var wr = /* @__PURE__ */ I({
2125
2138
  "title"
2126
2139
  ]));
2127
2140
  }
2128
- }), Tr = /* @__PURE__ */ I({
2141
+ }), Er = /* @__PURE__ */ I({
2129
2142
  __name: "InvoiceDetailViewDataProvider",
2130
2143
  props: { invoiceUuid: {} },
2131
2144
  setup(e) {
2132
2145
  let t = e, n = O(), r = A(() => [{
2133
2146
  label: n.t("wise_invoicing.invoice.overview.title"),
2134
2147
  to: { name: "invoicing-invoice-overview" }
2135
- }]), i = mt(A(() => t.invoiceUuid)), a = ie();
2136
- return (e, t) => (R(), j(rt, {
2148
+ }]), i = gt(A(() => t.invoiceUuid)), a = ie();
2149
+ return (e, t) => (R(), j(ot, {
2137
2150
  "custom-field-definitions-query": B(a),
2138
2151
  query: B(i),
2139
2152
  "loading-breadcrumbs": r.value
2140
2153
  }, {
2141
- default: V(({ billingDocument: e, customFieldDefinitions: t }) => [F(wr, {
2154
+ default: V(({ billingDocument: e, customFieldDefinitions: t }) => [F(Tr, {
2142
2155
  "custom-field-definitions": t,
2143
2156
  invoice: e
2144
2157
  }, null, 8, ["custom-field-definitions", "invoice"])]),
@@ -2151,4 +2164,4 @@ var wr = /* @__PURE__ */ I({
2151
2164
  }
2152
2165
  });
2153
2166
  //#endregion
2154
- export { Tr as default };
2167
+ export { Er as default };