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