@wisemen/wise-invoicing-web 0.4.0 → 0.6.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.
- package/dist/{ApprovalReminderSettingsViewDataProvider-IuReavOR.js → ApprovalReminderSettingsViewDataProvider-r9DcFi76.js} +4 -4
- package/dist/{BillingDocumentDetailViewDataProvider-B3I6UIKY.js → BillingDocumentDetailViewDataProvider-CsqBeAiA.js} +1496 -1418
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-rFqmLUPy.js → BillingDocumentPdf-thrvzGfh.js} +266 -205
- package/dist/{CreditNoteDetailViewDataProvider-CQRnG2Fz.js → CreditNoteDetailViewDataProvider-D6IMBwLn.js} +242 -242
- package/dist/{CreditNotePdfViewDataProvider-RytwPWH5.js → CreditNotePdfViewDataProvider-C4z1NE3Q.js} +2 -2
- package/dist/{CustomFieldValueText-DA0aPKwC.js → CustomFieldValueText-BRpCwCqJ.js} +37 -22
- package/dist/{DunningCaseDetailViewDataProvider-BRYbYgTw.js → DunningCaseDetailViewDataProvider-DTotyRX8.js} +5 -5
- package/dist/{DunningCaseOverviewView-D0vScVF1.js → DunningCaseOverviewView-kDq7UY5e.js} +5 -5
- package/dist/{DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js → DunningCaseReminderPdfViewDataProvider-DgKA-7lX.js} +1 -1
- package/dist/{DunningCaseSendDialog-CV66_tMv.js → DunningCaseSendDialog-DVfBVtgr.js} +12 -12
- package/dist/{InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js → InvoiceApprovalOutOfSyncIndicator-DPlrqqOs.js} +1 -1
- package/dist/{InvoiceApprovalOverviewView-CcMqr2jH.js → InvoiceApprovalOverviewView-B6naRElx.js} +8 -8
- package/dist/{InvoiceApprovalStatusBadge-BJ3Q18bf.js → InvoiceApprovalStatusBadge-CDc_Pwsm.js} +3 -3
- package/dist/{InvoiceApproveDialogDataProvider-DaCEHgs0.js → InvoiceApproveDialogDataProvider-CK6ij8X1.js} +7 -7
- package/dist/{InvoiceDetailViewDataProvider-B5uZY8Qy.js → InvoiceDetailViewDataProvider-BKurQPAV.js} +369 -369
- package/dist/{InvoiceOverviewViewDataProvider-BrgmweRE.js → InvoiceOverviewViewDataProvider-ChoyCi5L.js} +368 -368
- package/dist/{InvoicePdfView-CPEX7E9W.js → InvoicePdfView-DLEKQ29O.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-T4-8A2OD.js → InvoicePdfViewDataProvider-C-b7iXiH.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-BkHZoPSZ.js → InvoicePublicPdfViewDataProvider-DZ4WQsvi.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-CfkArXbC.js → InvoicePublicProFormaPdfViewDataProvider-CsF8fPlp.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-BLBjPKqx.js → InvoicingFileUploadProvider-t64Qiyn6.js} +2 -2
- package/dist/{IssuerSettingsViewDataProvider-BStn0jFI.js → IssuerSettingsViewDataProvider-Cc8R6ekd.js} +51 -46
- package/dist/PeppolSettingsViewDataProvider-DpVIfFVG.js +276 -0
- package/dist/{ReminderSettingsViewDataProvider-CjX7afDs.js → ReminderSettingsViewDataProvider-QOh3LpMX.js} +63 -63
- package/dist/{api.util-D6m6OY3_.js → api.util-Do9BEwG4.js} +735 -641
- package/dist/{billingDocumentDetail.transformer-Da-Nt4bI.js → billingDocumentDetail.transformer-BAOQ3Zrg.js} +3 -2
- package/dist/client/index.d.ts +2 -2
- package/dist/client/sdk.gen.d.ts +4 -1
- package/dist/client/types.gen.d.ts +218 -40
- package/dist/client/zod.gen.d.ts +2575 -72
- package/dist/{creditNoteDetail.query-Yb8TdZNm.js → creditNoteDetail.query-C1rr54m1.js} +15 -15
- package/dist/{dist-BpDuRYDT.js → dist-CZAOPudv.js} +1 -1
- package/dist/{documentTitle.composable-CRJjS6p-.js → documentTitle.composable-C3k1m0Nz.js} +28 -26
- package/dist/{i18n.lib-CKs3ExEl.js → i18n.lib-Bkz_R954.js} +56 -2
- package/dist/index.d.ts +55 -0
- package/dist/index.js +161 -156
- package/dist/{invoice.service-DWDl9XRh.js → invoice.service-DrI2ULIR.js} +39 -38
- package/dist/{invoiceApproval.service-Fwlxgd9o.js → invoiceApproval.service-Dpxiru7l.js} +7 -7
- package/dist/{invoiceApprovalStatus.util-q-zHLdFV.js → invoiceApprovalStatus.util-CdOAcPzv.js} +2 -2
- package/dist/{invoiceCustomer.service-DOexR54S.js → invoiceCustomer.service-RRFosiYR.js} +6 -6
- package/dist/{invoiceDetail.query-B5w0Vlsy.js → invoiceDetail.query-BmtHdfj0.js} +1 -1
- package/dist/{invoiceIndexCache.util-CUlp4R7R.js → invoiceIndexCache.util-DKtJorc_.js} +3 -3
- package/dist/{invoicingConfig.composable-DjFexycc.js → invoicingConfig.composable-CMTYHHS9.js} +2 -2
- package/dist/{issuerSettings.query-BHuLjV9P.js → issuerSettings.query-CKDhoStt.js} +2 -2
- package/dist/libs/i18n.lib.d.ts +54 -0
- package/dist/locales/en-US.json.d.ts +28 -1
- package/dist/locales/nl-BE.json.d.ts +28 -1
- package/dist/models/billing-document/billingDocumentAdvancePayment.util.d.ts +9 -0
- package/dist/models/billing-document/billingDocumentAdvancePayment.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
- package/dist/modules/custom-field/components/customFieldList.spec.d.ts +1 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.model.d.ts +6 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.transformer.spec.d.ts +1 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldDefinition.util.d.ts +6 -0
- package/dist/modules/custom-field/models/custom-field-definition/customFieldViewKey.model.d.ts +9 -0
- package/dist/modules/custom-field/test/builders/customFieldDefinition.builder.d.ts +2 -1
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
- package/dist/modules/invoice-delivery/api/mutations/peppolConnectionUpdate.mutation.d.ts +6 -0
- package/dist/modules/invoice-delivery/api/queries/peppolConnection.query.d.ts +1 -0
- package/dist/modules/invoice-delivery/api/query-keys/invoiceDelivery.queryKeys.d.ts +6 -0
- package/dist/modules/invoice-delivery/api/services/peppolConnection.service.d.ts +8 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormApiKeyField.vue.d.ts +8 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormCompanyField.vue.d.ts +11 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormEnabledField.vue.d.ts +7 -0
- package/dist/modules/invoice-delivery/components/form/PeppolConnectionFormProviderField.vue.d.ts +9 -0
- package/dist/modules/invoice-delivery/index.d.ts +1 -0
- package/dist/modules/invoice-delivery/models/deliveryReason.util.d.ts +6 -0
- package/dist/modules/invoice-delivery/models/peppolConnection.model.d.ts +18 -0
- package/dist/modules/invoice-delivery/models/peppolConnection.transformer.d.ts +9 -0
- package/dist/modules/invoice-delivery/models/peppolConnectionForm.model.d.ts +9 -0
- package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsView.vue.d.ts +7 -0
- package/dist/modules/invoice-delivery/use-cases/settings/views/PeppolSettingsViewDataProvider.vue.d.ts +3 -0
- package/dist/modules/settings/routes/settings.routes.d.ts +7 -0
- package/dist/{reminderConfig.query-C4J6m4ER.js → reminderConfig.query-yImUS5qt.js} +22 -22
- package/dist/style.css +1 -1
- package/dist/types/queryKey.type.d.ts +2 -1
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTableGroupRow.vue.d.ts +4 -0
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTreeIndent.vue.d.ts +4 -2
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +0 -18
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +0 -3
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableField.vue.d.ts +3 -0
- package/dist/ui/billing-document/table/field/BillingDocumentLineItemsTableTextField.vue.d.ts +1 -0
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +6 -0
- package/package.json +1 -1
package/dist/{InvoiceDetailViewDataProvider-B5uZY8Qy.js → InvoiceDetailViewDataProvider-BKurQPAV.js}
RENAMED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
import { t as e } from "./i18n.lib-
|
|
2
|
-
import { t,
|
|
3
|
-
import { C as r, _ as i, a, b as o, c as s, f as c, l, r as u, v as d, y as f } from "./documentTitle.composable-
|
|
1
|
+
import { t as e } from "./i18n.lib-Bkz_R954.js";
|
|
2
|
+
import { pt as t, t as n } from "./api.util-Do9BEwG4.js";
|
|
3
|
+
import { C as r, _ as i, a, b as o, c as s, f as c, l, r as u, v as d, y as f } from "./documentTitle.composable-C3k1m0Nz.js";
|
|
4
4
|
import { r as p, t as m } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
5
|
-
import { n as h } from "./invoicingConfig.composable-
|
|
5
|
+
import { n as h } from "./invoicingConfig.composable-CMTYHHS9.js";
|
|
6
6
|
import { t as g } from "./search.composable-CU9OpyUB.js";
|
|
7
|
-
import { a as _, i as ee, n as v, o as te, t as y } from "./invoice.service-
|
|
7
|
+
import { a as _, i as ee, n as v, o as te, t as y } from "./invoice.service-DrI2ULIR.js";
|
|
8
8
|
import { n as ne } from "./address.transformer-jGddczLV.js";
|
|
9
|
-
import {
|
|
10
|
-
import {
|
|
11
|
-
import {
|
|
12
|
-
import {
|
|
13
|
-
import {
|
|
14
|
-
import { t as
|
|
15
|
-
import { t as
|
|
16
|
-
import { a as
|
|
17
|
-
import { n as
|
|
18
|
-
import { t as
|
|
19
|
-
import { C as
|
|
20
|
-
import { r as
|
|
21
|
-
import { i as
|
|
22
|
-
import { t as
|
|
23
|
-
import
|
|
9
|
+
import { a as re, i as ie, n as b, r as ae } from "./CustomFieldValueText-BRpCwCqJ.js";
|
|
10
|
+
import { n as oe, t as se } from "./download.util-B5Q7KUC9.js";
|
|
11
|
+
import { A as ce, B as le, H as ue, I as de, P as fe, R as pe, V as me, W as he, Z as ge, _ as _e, ft as ve, gt as x, i as ye, it as be, j as xe, l as S, m as Se, q as C, t as Ce, tt as we, ut as Te, w as Ee, x as De, y as Oe } from "./dist-DCbLgB6Y.js";
|
|
12
|
+
import { n as w, t as T } from "./dist-Cdbpkd3Y.js";
|
|
13
|
+
import { t as E } from "./formango.util-D5c2ql--.js";
|
|
14
|
+
import { t as ke } from "./invoiceApprovalStatus.util-CdOAcPzv.js";
|
|
15
|
+
import { t as Ae } from "./invoiceCustomer.service-RRFosiYR.js";
|
|
16
|
+
import { a as je, i as Me, n as Ne, r as Pe, t as Fe } from "./invoiceIndexCache.util-DKtJorc_.js";
|
|
17
|
+
import { n as Ie, t as Le } from "./InvoiceApprovalStatusBadge-CDc_Pwsm.js";
|
|
18
|
+
import { t as Re } from "./issuerSettings.query-CKDhoStt.js";
|
|
19
|
+
import { C as ze, S as Be, _ as Ve, a as He, b as Ue, c as We, d as Ge, f as Ke, g as qe, h as Je, i as Ye, l as Xe, m as Ze, n as Qe, o as $e, p as et, r as tt, s as nt, t as rt, u as it, v as at, x as ot, y as st } from "./BillingDocumentDetailViewDataProvider-CsqBeAiA.js";
|
|
20
|
+
import { r as ct } from "./InvoicingFileUploadProvider-t64Qiyn6.js";
|
|
21
|
+
import { i as lt, n as ut, r as dt, t as ft } from "./InvoiceApproveDialogDataProvider-CK6ij8X1.js";
|
|
22
|
+
import { t as pt } from "./invoiceDetail.query-BmtHdfj0.js";
|
|
23
|
+
import mt, { z as D } from "zod";
|
|
24
24
|
import { useI18n as O } from "vue-i18n";
|
|
25
|
-
import { Fragment as k, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createSlots as
|
|
26
|
-
import { ApiErrorUtil as
|
|
27
|
-
import { RouterLink as
|
|
28
|
-
import { Temporal as
|
|
29
|
-
import { UIAutocomplete as
|
|
25
|
+
import { Fragment as k, computed as A, createBlock as j, createCommentVNode as M, createElementBlock as N, createElementVNode as P, createSlots as ht, createTextVNode as gt, createVNode as F, defineComponent as I, mergeModels as _t, mergeProps as L, normalizeClass as vt, openBlock as R, ref as yt, renderList as bt, resolveDynamicComponent as xt, toDisplayString as z, unref as B, useModel as St, watch as Ct, withCtx as V } from "vue";
|
|
26
|
+
import { ApiErrorUtil as wt, useKeysetInfiniteQuery as Tt, useMutation as H, useOffsetInfiniteQuery as Et, useQuery as Dt } from "@wisemen/vue-core-api-utils";
|
|
27
|
+
import { RouterLink as Ot, useRouter as kt } from "vue-router";
|
|
28
|
+
import { Temporal as At } from "temporal-polyfill";
|
|
29
|
+
import { UIAutocomplete as jt, UIBadge as Mt, UIBadgeLabel as Nt, UIBadgeSeparator as Pt, UIButton as Ft, UICheckbox as It, UIClickableElement as Lt, UIColumnLayout as Rt, UIDateField as zt, UIDetailList as Bt, UIDetailListGroup as Vt, UIDetailListGroupItem as U, UIDetailListGroupItemLabel as W, UIDetailListGroupItemValueText as G, UIDetailListGroupSeparator as Ht, UIDialog as Ut, UIDialogBody as Wt, UIDialogFooter as K, UIDialogFooterCancel as q, UIDialogFooterSubmit as Gt, UIDialogHeader as J, UIForm as Kt, UIFormDialog as Y, UIFormFieldGrid as qt, UIFormFieldGroup as Jt, UIFormSubmitButton as Yt, UIIconButton as Xt, UINumberField as Zt, UIRowLayout as Qt, UISelect as $t, UITable as en, UITableCell as tn, UITableCellInteractiveElement as nn, UIText as X, UITextField as rn, UITooltip as an, UITooltipContent as on, createAutocompleteOptions as sn, createComponent as Z, createSelectOptions as cn, defineTableColumns as ln, useOverlay as un, 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
|
|
32
|
+
var dn = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, fn = { class: "flex flex-col gap-xs pr-4xl" }, pn = {
|
|
33
33
|
key: 0,
|
|
34
34
|
class: "text-xs text-tertiary"
|
|
35
|
-
},
|
|
35
|
+
}, mn = {
|
|
36
36
|
key: 0,
|
|
37
37
|
class: "flex flex-wrap items-center gap-lg"
|
|
38
|
-
},
|
|
38
|
+
}, hn = {
|
|
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
|
-
},
|
|
41
|
+
}, gn = /* @__PURE__ */ I({
|
|
42
42
|
__name: "InvoiceApprovalBanner",
|
|
43
43
|
props: {
|
|
44
44
|
isOutOfSync: { type: Boolean },
|
|
@@ -52,14 +52,14 @@ var un = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, dn = { class: "flex f
|
|
|
52
52
|
"viewProForma"
|
|
53
53
|
],
|
|
54
54
|
setup(e, { emit: t }) {
|
|
55
|
-
let n = e, r = t, a = O(), o =
|
|
55
|
+
let n = e, r = t, a = O(), o = w(), s = A(() => n.approval?.sentAt ?? null), c = A(() => s.value !== null), l = A(() => n.approval?.status === i.REJECTED), u = A(() => s.value === null ? "" : o.toDate(s.value)), d = A(() => l.value ? "error" : n.isOutOfSync ? "warning" : "info"), f = A(() => n.isOutOfSync ? a.t("wise_invoicing.invoice.approval_banner.out_of_sync", { date: u.value }) : a.t("wise_invoicing.invoice.approval_banner.sent", { date: u.value })), p = A(() => {
|
|
56
56
|
if (n.isOutOfSync) return a.t("wise_invoicing.invoice.approval_banner.out_of_sync_supporting");
|
|
57
57
|
if (n.rejection === null || n.approval?.status === i.APPROVED) return null;
|
|
58
|
-
let e = a.t(
|
|
58
|
+
let e = a.t(ke.getRejectionReasonTranslationKey(n.rejection.reason));
|
|
59
59
|
return a.t(l.value ? "wise_invoicing.invoice.approval_banner.rejected_reason" : "wise_invoicing.invoice.approval_banner.previously_rejected_reason", { reason: n.rejection.remark === null ? e : `${e} — ${n.rejection.remark}` });
|
|
60
60
|
}), m = A(() => l.value || n.approval?.status !== i.REQUESTED ? null : n.approval.level), h = A(() => {
|
|
61
61
|
let e = m.value;
|
|
62
|
-
return e === null ? "" : a.t(
|
|
62
|
+
return e === null ? "" : a.t(ke.getReminderLevelTranslationKey(e));
|
|
63
63
|
}), g = A(() => {
|
|
64
64
|
let e = n.approval?.reminderSentAt ?? null;
|
|
65
65
|
return m.value === null || e === null ? null : a.t("wise_invoicing.invoice.approval_banner.last_reminder_sent", { time: o.toRelativeTime(e) });
|
|
@@ -75,66 +75,66 @@ var un = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, dn = { class: "flex f
|
|
|
75
75
|
error: "text-error-primary",
|
|
76
76
|
info: "text-tertiary",
|
|
77
77
|
warning: "text-warning-primary"
|
|
78
|
-
})[d.value]), te = A(() => d.value === "info" ?
|
|
78
|
+
})[d.value]), te = A(() => d.value === "info" ? x : C), y = A(() => ({
|
|
79
79
|
error: "text-error-primary",
|
|
80
80
|
info: "text-brand-secondary",
|
|
81
81
|
warning: "text-tertiary"
|
|
82
82
|
})[d.value]);
|
|
83
83
|
return (e, t) => c.value ? (R(), N("div", {
|
|
84
84
|
key: 0,
|
|
85
|
-
class:
|
|
85
|
+
class: vt([_.value, "relative flex items-start gap-xl rounded-xl border p-xl shadow-xs"])
|
|
86
86
|
}, [
|
|
87
|
-
P("span", { class:
|
|
88
|
-
P("div",
|
|
87
|
+
P("span", { class: vt([ee.value, "flex size-(--spacing-4xl) shrink-0 items-center justify-center"]) }, [(R(), j(xt(te.value), { class: vt([v.value, "size-(--spacing-xl)"]) }, null, 8, ["class"]))], 2),
|
|
88
|
+
P("div", dn, [P("div", fn, [F(B(X), {
|
|
89
89
|
text: f.value,
|
|
90
90
|
class: "text-xs font-semibold text-secondary"
|
|
91
|
-
}, null, 8, ["text"]), p.value === null ? M("", !0) : (R(), N("p",
|
|
91
|
+
}, null, 8, ["text"]), p.value === null ? M("", !0) : (R(), N("p", pn, [gt(z(p.value) + " ", 1), n.proFormaFile !== null && n.isOutOfSync ? (R(), j(B(Lt), { key: 0 }, {
|
|
92
92
|
default: V(() => [P("button", {
|
|
93
|
-
class:
|
|
93
|
+
class: vt([y.value, "underline-offset-2 hover:underline"]),
|
|
94
94
|
type: "button",
|
|
95
95
|
onClick: t[0] ||= (e) => r("viewProForma")
|
|
96
96
|
}, z(B(a).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 3)]),
|
|
97
97
|
_: 1
|
|
98
|
-
})) : M("", !0)]))]), n.isOutOfSync || n.proFormaFile !== null ? (R(), N("div",
|
|
98
|
+
})) : M("", !0)]))]), n.isOutOfSync || n.proFormaFile !== null ? (R(), N("div", mn, [n.isOutOfSync ? (R(), N(k, { key: 0 }, [F(B(Lt), null, {
|
|
99
99
|
default: V(() => [P("button", {
|
|
100
100
|
class: "text-xs font-semibold text-tertiary underline-offset-2 hover:underline",
|
|
101
101
|
type: "button",
|
|
102
102
|
onClick: t[1] ||= (e) => r("revertChanges")
|
|
103
103
|
}, z(B(a).t("wise_invoicing.invoice.approval_banner.revert_changes")), 1)]),
|
|
104
104
|
_: 1
|
|
105
|
-
}), F(B(
|
|
105
|
+
}), F(B(Lt), null, {
|
|
106
106
|
default: V(() => [P("button", {
|
|
107
107
|
class: "text-xs font-semibold text-warning-primary underline-offset-2 hover:underline",
|
|
108
108
|
type: "button",
|
|
109
109
|
onClick: t[2] ||= (e) => r("sendNewRequest")
|
|
110
110
|
}, z(B(a).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(
|
|
112
|
+
})], 64)) : (R(), N(k, { key: 1 }, [n.proFormaFile === null ? M("", !0) : (R(), j(B(Lt), { key: 0 }, {
|
|
113
113
|
default: V(() => [P("button", {
|
|
114
|
-
class:
|
|
114
|
+
class: vt([y.value, "text-xs font-semibold underline-offset-2 hover:underline"]),
|
|
115
115
|
type: "button",
|
|
116
116
|
onClick: t[3] ||= (e) => r("viewProForma")
|
|
117
117
|
}, z(B(a).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 3)]),
|
|
118
118
|
_: 1
|
|
119
119
|
}))], 64))])) : M("", !0)]),
|
|
120
|
-
l.value ? (R(), N("span",
|
|
120
|
+
l.value ? (R(), N("span", hn, [F(B(he), { class: "size-(--spacing-lg) shrink-0 text-white" }), F(B(X), {
|
|
121
121
|
text: B(a).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(
|
|
123
|
+
}, null, 8, ["text"])])) : m.value !== null && g.value !== null ? (R(), j(B(an), {
|
|
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(
|
|
130
|
+
trigger: V(() => [F(Ie, {
|
|
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(
|
|
137
|
+
content: V(() => [F(B(on), null, {
|
|
138
138
|
default: V(() => [F(B(X), {
|
|
139
139
|
text: g.value,
|
|
140
140
|
class: "text-sm text-primary"
|
|
@@ -142,7 +142,7 @@ var un = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, dn = { class: "flex f
|
|
|
142
142
|
_: 1
|
|
143
143
|
})]),
|
|
144
144
|
_: 1
|
|
145
|
-
})) : m.value === null ? M("", !0) : (R(), j(
|
|
145
|
+
})) : m.value === null ? M("", !0) : (R(), j(Ie, {
|
|
146
146
|
key: 2,
|
|
147
147
|
icon: void 0,
|
|
148
148
|
label: h.value,
|
|
@@ -156,7 +156,7 @@ var un = { class: "flex min-w-0 flex-1 flex-col gap-lg" }, dn = { class: "flex f
|
|
|
156
156
|
});
|
|
157
157
|
//#endregion
|
|
158
158
|
//#region src/modules/invoice/api/mutations/invoiceUpdate.mutation.ts
|
|
159
|
-
function
|
|
159
|
+
function _n() {
|
|
160
160
|
return H({
|
|
161
161
|
queryFn: (e) => y.update(e.params.invoiceUuid, e.body),
|
|
162
162
|
queryKeysToInvalidate: {
|
|
@@ -167,15 +167,15 @@ function gn() {
|
|
|
167
167
|
}
|
|
168
168
|
//#endregion
|
|
169
169
|
//#region src/modules/invoice/components/InvoiceDeliveryStatusBadge.vue
|
|
170
|
-
var
|
|
170
|
+
var vn = /* @__PURE__ */ I({
|
|
171
171
|
__name: "InvoiceDeliveryStatusBadge",
|
|
172
172
|
props: {
|
|
173
173
|
deliveryStatus: {},
|
|
174
174
|
size: { default: "sm" }
|
|
175
175
|
},
|
|
176
176
|
setup(e) {
|
|
177
|
-
let t = e, n = O(), r = A(() =>
|
|
178
|
-
return (e, n) => (R(), j(B(
|
|
177
|
+
let t = e, n = O(), r = A(() => Ne.getMetadata(t.deliveryStatus)), i = A(() => n.t(r.value.translationKey));
|
|
178
|
+
return (e, n) => (R(), j(B(Mt), {
|
|
179
179
|
label: i.value,
|
|
180
180
|
color: r.value.tone,
|
|
181
181
|
size: t.size,
|
|
@@ -186,7 +186,7 @@ var _n = /* @__PURE__ */ I({
|
|
|
186
186
|
"size"
|
|
187
187
|
]));
|
|
188
188
|
}
|
|
189
|
-
}),
|
|
189
|
+
}), yn = D.string().nullable(), bn = D.object({ subject: yn }), xn = /* @__PURE__ */ I({
|
|
190
190
|
__name: "InvoiceDetailHeaderSection",
|
|
191
191
|
props: {
|
|
192
192
|
isDisputed: { type: Boolean },
|
|
@@ -197,9 +197,9 @@ var _n = /* @__PURE__ */ I({
|
|
|
197
197
|
},
|
|
198
198
|
emits: ["togglePdfView"],
|
|
199
199
|
setup(e, { emit: t }) {
|
|
200
|
-
let n = e, r = t, i = O(), a = Q(), o =
|
|
200
|
+
let n = e, r = t, i = O(), a = Q(), o = _n(), s = A(() => new Be(n.invoice.status)), c = A(() => s.value.color), l = A(() => i.t(s.value.translationKey)), u = A(() => n.invoice.deliveryStatus !== d.UNSENT), f = A(() => Ne.isSent(n.invoice.deliveryStatus)), p = A(() => !b.isEditable(n.invoice.status)), m = $({
|
|
201
201
|
initialState: { subject: n.invoice.subject },
|
|
202
|
-
schema:
|
|
202
|
+
schema: bn,
|
|
203
203
|
onSubmit: async (e) => {
|
|
204
204
|
let t = await o.execute({
|
|
205
205
|
body: {
|
|
@@ -211,21 +211,21 @@ var _n = /* @__PURE__ */ I({
|
|
|
211
211
|
t.isErr() && a.apiError(t.error);
|
|
212
212
|
}
|
|
213
213
|
}), h = m.register("subject");
|
|
214
|
-
return
|
|
214
|
+
return ze({ form: m }), (e, t) => (R(), j(B(Kt), {
|
|
215
215
|
form: B(m),
|
|
216
216
|
"prompt-on-unsaved-changes": !1
|
|
217
217
|
}, {
|
|
218
|
-
default: V(() => [F(
|
|
218
|
+
default: V(() => [F(at, {
|
|
219
219
|
"fallback-title": B(i).t("wise_invoicing.invoice.detail.fallback_title"),
|
|
220
220
|
"is-disabled": p.value,
|
|
221
221
|
sequence: n.invoice.sequence,
|
|
222
222
|
"status-color": c.value,
|
|
223
223
|
"status-label": l.value,
|
|
224
|
-
icon: B(
|
|
224
|
+
icon: B(C),
|
|
225
225
|
"subject-field": B(h),
|
|
226
226
|
"subject-placeholder": B(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
|
|
227
227
|
}, {
|
|
228
|
-
actions: V(() => [F(
|
|
228
|
+
actions: V(() => [F(Ve, {
|
|
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 _n = /* @__PURE__ */ I({
|
|
|
235
235
|
"menu-groups",
|
|
236
236
|
"primary-buttons"
|
|
237
237
|
])]),
|
|
238
|
-
status: V(() => [F(B(
|
|
238
|
+
status: V(() => [F(B(Qt), {
|
|
239
239
|
gap: "xs",
|
|
240
240
|
class: "flex-wrap items-start"
|
|
241
241
|
}, {
|
|
242
242
|
default: V(() => [
|
|
243
|
-
F(
|
|
244
|
-
F(
|
|
243
|
+
F(Me, { "lifecycle-status": n.invoice.lifecycleStatus }, null, 8, ["lifecycle-status"]),
|
|
244
|
+
F(Pe, {
|
|
245
245
|
"is-sent": f.value,
|
|
246
246
|
"balance-due-amount": n.invoice.balanceDueAmount,
|
|
247
247
|
"gross-amount": n.invoice.grossAmount,
|
|
@@ -256,13 +256,13 @@ var _n = /* @__PURE__ */ I({
|
|
|
256
256
|
"settlement-status",
|
|
257
257
|
"total-credited-amount"
|
|
258
258
|
]),
|
|
259
|
-
n.invoice.isOverdue ? (R(), j(
|
|
260
|
-
n.isDisputed ? (R(), j(
|
|
261
|
-
u.value ? (R(), j(
|
|
259
|
+
n.invoice.isOverdue ? (R(), j(st, { key: 0 })) : M("", !0),
|
|
260
|
+
n.isDisputed ? (R(), j(je, { key: 1 })) : M("", !0),
|
|
261
|
+
u.value ? (R(), j(vn, {
|
|
262
262
|
key: 2,
|
|
263
263
|
"delivery-status": n.invoice.deliveryStatus
|
|
264
264
|
}, null, 8, ["delivery-status"])) : M("", !0),
|
|
265
|
-
F(
|
|
265
|
+
F(Le, {
|
|
266
266
|
approval: n.invoice.approval,
|
|
267
267
|
rejection: n.invoice.rejection,
|
|
268
268
|
"requires-prior-approval": n.invoice.requiresPriorApproval
|
|
@@ -288,12 +288,12 @@ var _n = /* @__PURE__ */ I({
|
|
|
288
288
|
_: 1
|
|
289
289
|
}, 8, ["form"]));
|
|
290
290
|
}
|
|
291
|
-
}),
|
|
291
|
+
}), Sn = { class: "grid w-full grid-cols-1 gap-md lg:grid-cols-3" }, Cn = /* @__PURE__ */ I({
|
|
292
292
|
__name: "InvoiceDetailLinkedCreditNotesSection",
|
|
293
293
|
props: { invoice: {} },
|
|
294
294
|
setup(e) {
|
|
295
295
|
let t = e, n = O(), r = p(), i = A(() => t.invoice.creditNotes.map((e) => {
|
|
296
|
-
let t = new
|
|
296
|
+
let t = new Be(e.status);
|
|
297
297
|
return {
|
|
298
298
|
uuid: e.uuid,
|
|
299
299
|
title: e.sequence === null ? n.t("wise_invoicing.invoice.detail.credit_notes.untitled") : n.t("wise_invoicing.invoice.detail.credit_notes.card_title", { sequence: e.sequence }),
|
|
@@ -308,7 +308,7 @@ var _n = /* @__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(
|
|
311
|
+
return (e, t) => i.value.length > 0 ? (R(), j(B(Rt), {
|
|
312
312
|
key: 0,
|
|
313
313
|
as: "section",
|
|
314
314
|
gap: "md",
|
|
@@ -318,7 +318,7 @@ var _n = /* @__PURE__ */ I({
|
|
|
318
318
|
text: B(n).t("wise_invoicing.invoice.detail.credit_notes.title"),
|
|
319
319
|
as: "h2",
|
|
320
320
|
class: "text-sm font-semibold text-primary"
|
|
321
|
-
}, null, 8, ["text"]), P("div",
|
|
321
|
+
}, null, 8, ["text"]), P("div", Sn, [(R(!0), N(k, null, bt(i.value, (e) => (R(), j(B(Ot), {
|
|
322
322
|
key: e.uuid,
|
|
323
323
|
to: {
|
|
324
324
|
name: "invoicing-credit-note-detail",
|
|
@@ -326,7 +326,7 @@ var _n = /* @__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(
|
|
329
|
+
default: V(() => [F(B(Qt), {
|
|
330
330
|
align: "center",
|
|
331
331
|
gap: "md",
|
|
332
332
|
class: "min-w-0"
|
|
@@ -336,13 +336,13 @@ var _n = /* @__PURE__ */ I({
|
|
|
336
336
|
text: e.title,
|
|
337
337
|
class: "min-w-0 flex-1 truncate text-xs font-semibold text-primary"
|
|
338
338
|
}, null, 8, ["text"]),
|
|
339
|
-
F(B(
|
|
339
|
+
F(B(Mt), {
|
|
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(
|
|
345
|
+
F(B(Mt), {
|
|
346
346
|
label: e.amountLabel,
|
|
347
347
|
variant: "translucent",
|
|
348
348
|
size: "sm"
|
|
@@ -355,10 +355,10 @@ var _n = /* @__PURE__ */ I({
|
|
|
355
355
|
_: 1
|
|
356
356
|
})) : M("", !0);
|
|
357
357
|
}
|
|
358
|
-
}),
|
|
359
|
-
deliveredOn:
|
|
360
|
-
dueOn:
|
|
361
|
-
issuedOn:
|
|
358
|
+
}), wn = D.object({
|
|
359
|
+
deliveredOn: T.nullable(),
|
|
360
|
+
dueOn: T,
|
|
361
|
+
issuedOn: T,
|
|
362
362
|
customFields: D.array(D.custom()),
|
|
363
363
|
externalRemarks: D.string().nullable(),
|
|
364
364
|
poNumber: D.string().nullable(),
|
|
@@ -373,13 +373,13 @@ var _n = /* @__PURE__ */ I({
|
|
|
373
373
|
message: e.global.t("invoicing.invoice.validation.due_date_after_issue_date"),
|
|
374
374
|
path: ["dueOn"]
|
|
375
375
|
});
|
|
376
|
-
}),
|
|
376
|
+
}), Tn = /* @__PURE__ */ I({
|
|
377
377
|
__name: "InvoiceDetailRemarksSection",
|
|
378
378
|
props: { invoice: {} },
|
|
379
379
|
setup(e) {
|
|
380
|
-
let t = e, n = O(), r = Q(), i =
|
|
380
|
+
let t = e, n = O(), r = Q(), i = _n(), a = $({
|
|
381
381
|
initialState: A(() => v.toForm(t.invoice)),
|
|
382
|
-
schema:
|
|
382
|
+
schema: wn,
|
|
383
383
|
onSubmit: async (e) => {
|
|
384
384
|
let n = await i.execute({
|
|
385
385
|
body: e,
|
|
@@ -387,12 +387,12 @@ var _n = /* @__PURE__ */ I({
|
|
|
387
387
|
});
|
|
388
388
|
n.isErr() && r.apiError(n.error);
|
|
389
389
|
}
|
|
390
|
-
}), o = a.register("externalRemarks"), s = A(() => !
|
|
391
|
-
return
|
|
390
|
+
}), o = a.register("externalRemarks"), s = A(() => !b.isEditable(t.invoice.status));
|
|
391
|
+
return ze({ form: a }), (e, t) => (R(), j(B(Kt), {
|
|
392
392
|
form: B(a),
|
|
393
393
|
"prompt-on-unsaved-changes": !1
|
|
394
394
|
}, {
|
|
395
|
-
default: V(() => [F(
|
|
395
|
+
default: V(() => [F(qe, {
|
|
396
396
|
"is-disabled": s.value,
|
|
397
397
|
placeholder: B(n).t("wise_invoicing.invoice.detail.remarks.placeholder"),
|
|
398
398
|
"remarks-field": B(o),
|
|
@@ -409,23 +409,23 @@ var _n = /* @__PURE__ */ I({
|
|
|
409
409
|
});
|
|
410
410
|
//#endregion
|
|
411
411
|
//#region src/modules/invoice/api/queries/invoiceActivityLogIndex.query.ts
|
|
412
|
-
function
|
|
413
|
-
return
|
|
412
|
+
function En(e) {
|
|
413
|
+
return Tt("invoiceActivityLogIndex", {
|
|
414
414
|
params: { invoiceUuid: e },
|
|
415
415
|
queryFn: (t) => y.getActivityLogs(e.value, { pagination: t })
|
|
416
416
|
});
|
|
417
417
|
}
|
|
418
418
|
//#endregion
|
|
419
419
|
//#region src/modules/invoice/use-cases/detail/components/sidebar/InvoiceDetailSidebarActivityTab.vue
|
|
420
|
-
var
|
|
420
|
+
var Dn = /* @__PURE__ */ I({
|
|
421
421
|
__name: "InvoiceDetailSidebarActivityTab",
|
|
422
422
|
props: { invoice: {} },
|
|
423
423
|
setup(e) {
|
|
424
|
-
let t = e, n = O(), { hasNextPage: r, isFetchingNextPage: i, isLoading: a, fetchNextPage: o, result: s } =
|
|
424
|
+
let t = e, n = O(), { hasNextPage: r, isFetchingNextPage: i, isLoading: a, fetchNextPage: o, result: s } = En(A(() => t.invoice.uuid)), c = A(() => s.value.unwrapOr({
|
|
425
425
|
data: [],
|
|
426
426
|
meta: { next: null }
|
|
427
427
|
}).data);
|
|
428
|
-
return (e, s) => (R(), j(
|
|
428
|
+
return (e, s) => (R(), j(Je, {
|
|
429
429
|
"current-billing-document": {
|
|
430
430
|
role: B(u).INVOICE,
|
|
431
431
|
uuid: t.invoice.uuid
|
|
@@ -446,9 +446,9 @@ var En = /* @__PURE__ */ I({
|
|
|
446
446
|
"is-loading"
|
|
447
447
|
]));
|
|
448
448
|
}
|
|
449
|
-
}),
|
|
449
|
+
}), On = /* @__PURE__ */ I({
|
|
450
450
|
__name: "CustomFieldFieldset",
|
|
451
|
-
props: /*@__PURE__*/
|
|
451
|
+
props: /*@__PURE__*/ _t({
|
|
452
452
|
isDisabled: { type: Boolean },
|
|
453
453
|
currency: {},
|
|
454
454
|
definitions: {},
|
|
@@ -460,19 +460,19 @@ var En = /* @__PURE__ */ I({
|
|
|
460
460
|
}),
|
|
461
461
|
emits: ["update:modelValue"],
|
|
462
462
|
setup(e) {
|
|
463
|
-
let t = e, n =
|
|
463
|
+
let t = e, n = St(e, "modelValue");
|
|
464
464
|
function r(e) {
|
|
465
|
-
return
|
|
465
|
+
return oe.findByDefinition(n.value, e);
|
|
466
466
|
}
|
|
467
467
|
function i(e, t) {
|
|
468
|
-
n.value =
|
|
468
|
+
n.value = oe.upsert(n.value, e, t);
|
|
469
469
|
}
|
|
470
|
-
return (e, n) => t.definitions.length > 0 ? (R(), j(B(
|
|
470
|
+
return (e, n) => t.definitions.length > 0 ? (R(), j(B(Rt), {
|
|
471
471
|
key: 0,
|
|
472
472
|
gap: t.size === "sm" ? "xs" : "md",
|
|
473
473
|
align: "stretch"
|
|
474
474
|
}, {
|
|
475
|
-
default: V(() => [(R(!0), N(k, null,
|
|
475
|
+
default: V(() => [(R(!0), N(k, null, bt(t.definitions, (e) => (R(), j(Xe, {
|
|
476
476
|
key: e.uuid,
|
|
477
477
|
currency: t.currency,
|
|
478
478
|
definition: e,
|
|
@@ -496,15 +496,15 @@ var En = /* @__PURE__ */ I({
|
|
|
496
496
|
});
|
|
497
497
|
//#endregion
|
|
498
498
|
//#region src/modules/invoice/api/queries/invoiceCustomerDetail.query.ts
|
|
499
|
-
function
|
|
500
|
-
return
|
|
499
|
+
function kn(e) {
|
|
500
|
+
return Dt("invoiceCustomerDetail", {
|
|
501
501
|
params: { customerUuid: e },
|
|
502
|
-
queryFn: () =>
|
|
502
|
+
queryFn: () => Ae.getByUuid(e.value)
|
|
503
503
|
});
|
|
504
504
|
}
|
|
505
505
|
//#endregion
|
|
506
506
|
//#region src/modules/invoice/models/invoice/update/invoicePreparer.transformer.ts
|
|
507
|
-
var
|
|
507
|
+
var An = class {
|
|
508
508
|
static fromDto(e) {
|
|
509
509
|
let t = `${e.firstName ?? ""} ${e.lastName ?? ""}`.trim();
|
|
510
510
|
return {
|
|
@@ -512,28 +512,28 @@ var kn = class {
|
|
|
512
512
|
name: t === "" ? e.email ?? e.uuid : t
|
|
513
513
|
};
|
|
514
514
|
}
|
|
515
|
-
},
|
|
515
|
+
}, jn = class {
|
|
516
516
|
static toDto(e) {
|
|
517
517
|
return {
|
|
518
518
|
pagination: e.pagination,
|
|
519
519
|
search: te.toDto(e.search)
|
|
520
520
|
};
|
|
521
521
|
}
|
|
522
|
-
},
|
|
522
|
+
}, Mn = class {
|
|
523
523
|
static async getAll(e) {
|
|
524
|
-
return (await
|
|
525
|
-
data: e.data.items.map(
|
|
524
|
+
return (await n.fromPromise(t({ query: jn.toDto(e) }))).map((e) => ({
|
|
525
|
+
data: e.data.items.map(An.fromDto),
|
|
526
526
|
meta: e.data.meta
|
|
527
527
|
}));
|
|
528
528
|
}
|
|
529
529
|
};
|
|
530
530
|
//#endregion
|
|
531
531
|
//#region src/modules/invoice/api/queries/invoiceUserSearch.query.ts
|
|
532
|
-
function
|
|
532
|
+
function Nn(e) {
|
|
533
533
|
let t = A(() => ({ search: e.params.search?.value }));
|
|
534
|
-
return
|
|
534
|
+
return Et("invoiceUserSearch", {
|
|
535
535
|
params: { queryParams: t },
|
|
536
|
-
queryFn: (t) =>
|
|
536
|
+
queryFn: (t) => Mn.getAll({
|
|
537
537
|
pagination: t,
|
|
538
538
|
search: e.params.search?.value ?? ""
|
|
539
539
|
})
|
|
@@ -541,7 +541,7 @@ function Mn(e) {
|
|
|
541
541
|
}
|
|
542
542
|
//#endregion
|
|
543
543
|
//#region src/modules/invoice/components/form/InvoiceFormPreparedByField.vue
|
|
544
|
-
var
|
|
544
|
+
var Pn = /* @__PURE__ */ I({
|
|
545
545
|
__name: "InvoiceFormPreparedByField",
|
|
546
546
|
props: {
|
|
547
547
|
isLoading: { type: Boolean },
|
|
@@ -550,14 +550,14 @@ var Nn = /* @__PURE__ */ I({
|
|
|
550
550
|
},
|
|
551
551
|
emits: ["nextPage", "updateSearch"],
|
|
552
552
|
setup(e, { emit: t }) {
|
|
553
|
-
let n = e, r = t, i = O(), a = A(() =>
|
|
553
|
+
let n = e, r = t, i = O(), a = A(() => sn(n.users));
|
|
554
554
|
function o(e) {
|
|
555
555
|
return e.name;
|
|
556
556
|
}
|
|
557
557
|
function s(e) {
|
|
558
558
|
e !== null && (n.field.setValue(e), r("updateSearch", ""));
|
|
559
559
|
}
|
|
560
|
-
return (e, t) => (R(), j(B(
|
|
560
|
+
return (e, t) => (R(), j(B(jt), L(B(E)(n.field), {
|
|
561
561
|
"display-fn": o,
|
|
562
562
|
"is-loading": n.isLoading,
|
|
563
563
|
"is-required": !0,
|
|
@@ -575,7 +575,7 @@ var Nn = /* @__PURE__ */ I({
|
|
|
575
575
|
"placeholder"
|
|
576
576
|
]));
|
|
577
577
|
}
|
|
578
|
-
}),
|
|
578
|
+
}), Fn = /* @__PURE__ */ I({
|
|
579
579
|
__name: "InvoiceUpdateDialog",
|
|
580
580
|
props: {
|
|
581
581
|
customFieldDefinitions: {},
|
|
@@ -583,18 +583,18 @@ var Nn = /* @__PURE__ */ I({
|
|
|
583
583
|
},
|
|
584
584
|
emits: ["close"],
|
|
585
585
|
setup(e, { emit: t }) {
|
|
586
|
-
let n = e, r = t, i = O(), a = Q(), o =
|
|
586
|
+
let n = e, r = t, i = O(), a = Q(), o = _n(), s = Re(), c = h(), l = g({ debounceMs: 250 }), u = Nn({ params: { search: l.debouncedSearch } }), d = A(() => u.result.value.match({
|
|
587
587
|
err: () => [],
|
|
588
588
|
loading: () => [],
|
|
589
589
|
ok: (e) => e.data
|
|
590
|
-
})), f =
|
|
590
|
+
})), f = kn(A(() => n.invoice.customer.uuid)), p = A(() => {
|
|
591
591
|
let e = f.result.value;
|
|
592
592
|
if (e.isOk()) return e.getValue().defaultPaymentTermDays;
|
|
593
593
|
let t = s.result.value;
|
|
594
594
|
return t.isOk() ? t.getValue().defaultPaymentTermDays ?? 0 : 0;
|
|
595
595
|
}), m = $({
|
|
596
596
|
initialState: A(() => v.toForm(n.invoice)),
|
|
597
|
-
schema:
|
|
597
|
+
schema: wn,
|
|
598
598
|
onSubmit: async (e) => {
|
|
599
599
|
let t = await o.execute({
|
|
600
600
|
body: e,
|
|
@@ -609,16 +609,16 @@ var Nn = /* @__PURE__ */ I({
|
|
|
609
609
|
onSubmitError: () => {
|
|
610
610
|
a.unableToSave();
|
|
611
611
|
}
|
|
612
|
-
}), _ = m.register("issuedOn"), ee = m.register("dueOn"), te = m.register("deliveredOn"), y = m.register("poNumber"), ne = m.register("preparedBy"), re = m.register("subject"), ie = m.register("customFields"),
|
|
612
|
+
}), _ = m.register("issuedOn"), ee = m.register("dueOn"), te = m.register("deliveredOn"), y = m.register("poNumber"), ne = m.register("preparedBy"), re = m.register("subject"), ie = m.register("customFields"), b = A({
|
|
613
613
|
get: () => ie.modelValue.value ?? [],
|
|
614
614
|
set: (e) => {
|
|
615
615
|
ie.setValue(e);
|
|
616
616
|
}
|
|
617
617
|
});
|
|
618
|
-
function
|
|
618
|
+
function ae(e) {
|
|
619
619
|
e !== null && ee.setValue(e.add({ days: p.value }));
|
|
620
620
|
}
|
|
621
|
-
function
|
|
621
|
+
function oe(e) {
|
|
622
622
|
l.updateSearch(e);
|
|
623
623
|
}
|
|
624
624
|
return (e, t) => (R(), j(B(Y), {
|
|
@@ -628,51 +628,51 @@ var Nn = /* @__PURE__ */ I({
|
|
|
628
628
|
}, {
|
|
629
629
|
default: V(() => [
|
|
630
630
|
F(B(J), {
|
|
631
|
-
icon: B(
|
|
631
|
+
icon: B(Te),
|
|
632
632
|
"is-description-hidden": !0,
|
|
633
633
|
title: B(i).t("wise_invoicing.invoice.detail.header.edit_info"),
|
|
634
634
|
description: ""
|
|
635
635
|
}, null, 8, ["icon", "title"]),
|
|
636
|
-
F(B(
|
|
637
|
-
default: V(() => [F(B(
|
|
638
|
-
default: V(() => [F(B(
|
|
636
|
+
F(B(Wt), null, {
|
|
637
|
+
default: V(() => [F(B(Jt), null, {
|
|
638
|
+
default: V(() => [F(B(qt), {
|
|
639
639
|
lg: 2,
|
|
640
640
|
sm: 1
|
|
641
641
|
}, {
|
|
642
642
|
default: V(() => [
|
|
643
|
-
F(B(
|
|
643
|
+
F(B(zt), L(B(E)(B(_)), {
|
|
644
644
|
label: B(i).t("wise_invoicing.invoice.detail.header.invoice_date"),
|
|
645
645
|
"is-required": !0,
|
|
646
|
-
"onUpdate:modelValue":
|
|
646
|
+
"onUpdate:modelValue": ae
|
|
647
647
|
}), null, 16, ["label"]),
|
|
648
|
-
F(B(
|
|
648
|
+
F(B(zt), L(B(E)(B(ee)), {
|
|
649
649
|
label: B(i).t("wise_invoicing.invoice.detail.header.due_date"),
|
|
650
650
|
"is-required": !0,
|
|
651
651
|
"min-date": B(_).modelValue.value
|
|
652
652
|
}), null, 16, ["label", "min-date"]),
|
|
653
|
-
B(c).isDeliveryDateVisible.value ? (R(), j(B(
|
|
654
|
-
F(
|
|
653
|
+
B(c).isDeliveryDateVisible.value ? (R(), j(B(zt), L({ key: 0 }, B(E)(B(te)), { label: B(i).t("wise_invoicing.invoice.detail.header.delivery_date") }), null, 16, ["label"])) : M("", !0),
|
|
654
|
+
F(Pn, {
|
|
655
655
|
field: B(ne),
|
|
656
656
|
"is-loading": B(u).isLoading.value,
|
|
657
657
|
users: d.value,
|
|
658
658
|
onNextPage: B(u).fetchNextPage,
|
|
659
|
-
onUpdateSearch:
|
|
659
|
+
onUpdateSearch: oe
|
|
660
660
|
}, null, 8, [
|
|
661
661
|
"field",
|
|
662
662
|
"is-loading",
|
|
663
663
|
"users",
|
|
664
664
|
"onNextPage"
|
|
665
665
|
]),
|
|
666
|
-
F(B(
|
|
667
|
-
F(B(
|
|
666
|
+
F(B(rn), L(B(E)(B(y)), { label: B(i).t("wise_invoicing.invoice.detail.header.po_number") }), null, 16, ["label"]),
|
|
667
|
+
F(B(rn), L(B(E)(B(re)), {
|
|
668
668
|
label: B(i).t("wise_invoicing.invoice.detail.header.subject"),
|
|
669
669
|
placeholder: B(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
|
|
670
670
|
}), null, 16, ["label", "placeholder"])
|
|
671
671
|
]),
|
|
672
672
|
_: 1
|
|
673
|
-
}), F(
|
|
674
|
-
modelValue:
|
|
675
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
673
|
+
}), F(On, {
|
|
674
|
+
modelValue: b.value,
|
|
675
|
+
"onUpdate:modelValue": t[0] ||= (e) => b.value = e,
|
|
676
676
|
currency: n.invoice.currency,
|
|
677
677
|
definitions: n.customFieldDefinitions,
|
|
678
678
|
"is-disabled": !0,
|
|
@@ -689,23 +689,23 @@ var Nn = /* @__PURE__ */ I({
|
|
|
689
689
|
_: 1
|
|
690
690
|
}),
|
|
691
691
|
F(B(K), null, {
|
|
692
|
-
right: V(() => [F(B(q), { label: "cancel" }), F(B(
|
|
692
|
+
right: V(() => [F(B(q), { label: "cancel" }), F(B(Gt), { label: B(i).t("wise_invoicing.invoice.detail.header.edit_info") }, null, 8, ["label"])]),
|
|
693
693
|
_: 1
|
|
694
694
|
})
|
|
695
695
|
]),
|
|
696
696
|
_: 1
|
|
697
697
|
}, 8, ["form"]));
|
|
698
698
|
}
|
|
699
|
-
}),
|
|
699
|
+
}), In = /* @__PURE__ */ I({
|
|
700
700
|
__name: "InvoiceDetailSidebarInfoTab",
|
|
701
701
|
props: {
|
|
702
702
|
customFieldDefinitions: {},
|
|
703
703
|
invoice: {}
|
|
704
704
|
},
|
|
705
705
|
setup(e) {
|
|
706
|
-
let t = e, n = O(), r =
|
|
706
|
+
let t = e, n = O(), r = w(), i = h(), a = un().create(Fn), o = A(() => b.isEditable(t.invoice.status)), s = A(() => ae.filterByEntityType(t.customFieldDefinitions, l.INVOICE)), c = A(() => {
|
|
707
707
|
if (!t.invoice.isOverdue) return null;
|
|
708
|
-
let e = t.invoice.dueOn.toZonedDateTime(
|
|
708
|
+
let e = t.invoice.dueOn.toZonedDateTime(At.Now.timeZoneId()).toInstant();
|
|
709
709
|
return r.toRelativeTime(e);
|
|
710
710
|
});
|
|
711
711
|
async function u() {
|
|
@@ -717,52 +717,52 @@ var Nn = /* @__PURE__ */ I({
|
|
|
717
717
|
function d(e) {
|
|
718
718
|
return e === null ? "-" : r.formatPlainDate(e);
|
|
719
719
|
}
|
|
720
|
-
return (e, r) => (R(), j(B(
|
|
720
|
+
return (e, r) => (R(), j(B(Bt), { class: "px-2xl py-xl" }, {
|
|
721
721
|
default: V(() => [
|
|
722
|
-
F(B(
|
|
722
|
+
F(B(Vt), { label: B(n).t("wise_invoicing.invoice.detail.sidebar.general") }, ht({
|
|
723
723
|
default: V(() => [
|
|
724
724
|
F(B(U), null, {
|
|
725
725
|
default: V(() => [F(B(W), {
|
|
726
|
-
icon: B(
|
|
726
|
+
icon: B(_e),
|
|
727
727
|
label: B(n).t("wise_invoicing.invoice.detail.header.invoice_id")
|
|
728
728
|
}, null, 8, ["icon", "label"]), F(B(G), { text: t.invoice.sequence ?? "-" }, null, 8, ["text"])]),
|
|
729
729
|
_: 1
|
|
730
730
|
}),
|
|
731
731
|
F(B(U), null, {
|
|
732
732
|
default: V(() => [F(B(W), {
|
|
733
|
-
icon: B(
|
|
733
|
+
icon: B(le),
|
|
734
734
|
label: B(n).t("wise_invoicing.invoice.detail.header.po_number")
|
|
735
735
|
}, null, 8, ["icon", "label"]), F(B(G), { text: t.invoice.poNumber ?? "-" }, null, 8, ["text"])]),
|
|
736
736
|
_: 1
|
|
737
737
|
}),
|
|
738
738
|
F(B(U), null, {
|
|
739
739
|
default: V(() => [F(B(W), {
|
|
740
|
-
icon: B(
|
|
740
|
+
icon: B(S),
|
|
741
741
|
label: B(n).t("wise_invoicing.invoice.detail.header.issuer")
|
|
742
742
|
}, null, 8, ["icon", "label"]), F(B(G), { text: t.invoice.issuer.name ?? "-" }, null, 8, ["text"])]),
|
|
743
743
|
_: 1
|
|
744
744
|
}),
|
|
745
745
|
F(B(U), null, {
|
|
746
746
|
default: V(() => [F(B(W), {
|
|
747
|
-
icon: B(
|
|
747
|
+
icon: B(C),
|
|
748
748
|
label: B(n).t("wise_invoicing.invoice.detail.header.invoice_date")
|
|
749
749
|
}, null, 8, ["icon", "label"]), F(B(G), { text: d(t.invoice.issueOn) }, null, 8, ["text"])]),
|
|
750
750
|
_: 1
|
|
751
751
|
}),
|
|
752
752
|
F(B(U), null, {
|
|
753
753
|
default: V(() => [F(B(W), {
|
|
754
|
-
icon: B(
|
|
754
|
+
icon: B(we),
|
|
755
755
|
label: B(n).t("wise_invoicing.invoice.detail.header.due_date"),
|
|
756
756
|
variant: t.invoice.isOverdue ? "error" : "default"
|
|
757
757
|
}, null, 8, [
|
|
758
758
|
"icon",
|
|
759
759
|
"label",
|
|
760
760
|
"variant"
|
|
761
|
-
]), F(B(
|
|
761
|
+
]), F(B(Qt), { gap: "xs" }, {
|
|
762
762
|
default: V(() => [F(B(G), {
|
|
763
763
|
text: d(t.invoice.dueOn),
|
|
764
764
|
variant: t.invoice.isOverdue ? "error" : "default"
|
|
765
|
-
}, null, 8, ["text", "variant"]), c.value === null ? M("", !0) : (R(), j(B(
|
|
765
|
+
}, null, 8, ["text", "variant"]), c.value === null ? M("", !0) : (R(), j(B(Mt), {
|
|
766
766
|
key: 0,
|
|
767
767
|
label: c.value,
|
|
768
768
|
color: "error",
|
|
@@ -775,12 +775,12 @@ var Nn = /* @__PURE__ */ I({
|
|
|
775
775
|
}),
|
|
776
776
|
B(i).isDeliveryDateVisible.value ? (R(), j(B(U), { key: 0 }, {
|
|
777
777
|
default: V(() => [F(B(W), {
|
|
778
|
-
icon: B(
|
|
778
|
+
icon: B(x),
|
|
779
779
|
label: B(n).t("wise_invoicing.invoice.detail.header.delivery_date")
|
|
780
780
|
}, null, 8, ["icon", "label"]), F(B(G), { text: d(t.invoice.deliveredOn) }, null, 8, ["text"])]),
|
|
781
781
|
_: 1
|
|
782
782
|
})) : M("", !0),
|
|
783
|
-
F(
|
|
783
|
+
F(Ze, {
|
|
784
784
|
definitions: t.customFieldDefinitions,
|
|
785
785
|
values: t.invoice.customFields
|
|
786
786
|
}, null, 8, ["definitions", "values"])
|
|
@@ -788,17 +788,17 @@ var Nn = /* @__PURE__ */ I({
|
|
|
788
788
|
_: 2
|
|
789
789
|
}, [o.value ? {
|
|
790
790
|
name: "actions",
|
|
791
|
-
fn: V(() => [F(B(
|
|
792
|
-
icon: B(
|
|
791
|
+
fn: V(() => [F(B(Xt), {
|
|
792
|
+
icon: B(Ee),
|
|
793
793
|
label: B(n).t("wise_invoicing.invoice.detail.header.edit_info"),
|
|
794
794
|
variant: "tertiary",
|
|
795
795
|
onClick: u
|
|
796
796
|
}, null, 8, ["icon", "label"])]),
|
|
797
797
|
key: "0"
|
|
798
798
|
} : void 0]), 1032, ["label"]),
|
|
799
|
-
F(
|
|
800
|
-
F(B(
|
|
801
|
-
F(B(
|
|
799
|
+
F(et, { "original-invoice": t.invoice.originalInvoice }, null, 8, ["original-invoice"]),
|
|
800
|
+
F(B(Ht)),
|
|
801
|
+
F(B(Vt), {
|
|
802
802
|
label: B(n).t("wise_invoicing.invoice.detail.header.bill_to"),
|
|
803
803
|
"collapse-options": {
|
|
804
804
|
isCollapsible: !0,
|
|
@@ -809,21 +809,21 @@ var Nn = /* @__PURE__ */ I({
|
|
|
809
809
|
default: V(() => [F(B(U), { orientation: "vertical" }, {
|
|
810
810
|
default: V(() => [F(B(X), {
|
|
811
811
|
text: t.invoice.customer.name ?? "-",
|
|
812
|
-
class: "text-xs font-medium"
|
|
812
|
+
class: "text-xs font-medium text-primary"
|
|
813
813
|
}, null, 8, ["text"]), t.invoice.customer.address ? (R(), N(k, { key: 0 }, [F(B(X), {
|
|
814
814
|
text: B(ne).formatLines(t.invoice.customer.address)[0] ?? "",
|
|
815
|
-
class: "text-xs"
|
|
815
|
+
class: "text-xs text-primary"
|
|
816
816
|
}, null, 8, ["text"]), t.invoice.customer.address ? (R(), j(B(X), {
|
|
817
817
|
key: 0,
|
|
818
818
|
text: B(ne).formatLines(t.invoice.customer.address)[1] ?? "",
|
|
819
|
-
class: "text-xs"
|
|
819
|
+
class: "text-xs text-primary"
|
|
820
820
|
}, null, 8, ["text"])) : M("", !0)], 64)) : M("", !0)]),
|
|
821
821
|
_: 1
|
|
822
822
|
})]),
|
|
823
823
|
_: 1
|
|
824
824
|
}, 8, ["label", "collapse-options"]),
|
|
825
|
-
F(B(
|
|
826
|
-
F(B(
|
|
825
|
+
F(B(Ht)),
|
|
826
|
+
F(B(Vt), {
|
|
827
827
|
label: B(n).t("wise_invoicing.invoice.detail.header.bill_from"),
|
|
828
828
|
"collapse-options": {
|
|
829
829
|
isCollapsible: !0,
|
|
@@ -844,20 +844,20 @@ var Nn = /* @__PURE__ */ I({
|
|
|
844
844
|
_: 1
|
|
845
845
|
}));
|
|
846
846
|
}
|
|
847
|
-
}),
|
|
847
|
+
}), Ln = /* @__PURE__ */ I({
|
|
848
848
|
__name: "InvoiceDetailSidebar",
|
|
849
849
|
props: {
|
|
850
850
|
customFieldDefinitions: {},
|
|
851
851
|
invoice: {}
|
|
852
852
|
},
|
|
853
853
|
setup(e) {
|
|
854
|
-
let t = e, n = O(), r =
|
|
855
|
-
return (e, n) => (R(), j(
|
|
854
|
+
let t = e, n = O(), r = w(), i = A(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.invoice.updatedAt) }));
|
|
855
|
+
return (e, n) => (R(), j(Ke, {
|
|
856
856
|
"billing-document": t.invoice,
|
|
857
857
|
"updated-footer": i.value
|
|
858
858
|
}, {
|
|
859
|
-
activity: V(() => [F(
|
|
860
|
-
info: V(() => [F(
|
|
859
|
+
activity: V(() => [F(Dn, { invoice: t.invoice }, null, 8, ["invoice"])]),
|
|
860
|
+
info: V(() => [F(In, {
|
|
861
861
|
"custom-field-definitions": t.customFieldDefinitions,
|
|
862
862
|
invoice: t.invoice
|
|
863
863
|
}, null, 8, ["custom-field-definitions", "invoice"])]),
|
|
@@ -867,15 +867,15 @@ var Nn = /* @__PURE__ */ I({
|
|
|
867
867
|
});
|
|
868
868
|
//#endregion
|
|
869
869
|
//#region src/modules/invoice/api/queries/invoicePaymentIndex.query.ts
|
|
870
|
-
function
|
|
871
|
-
return
|
|
870
|
+
function Rn(e) {
|
|
871
|
+
return Dt("invoicePaymentIndex", {
|
|
872
872
|
params: { invoiceUuid: e },
|
|
873
873
|
queryFn: () => y.getPayments(e.value)
|
|
874
874
|
});
|
|
875
875
|
}
|
|
876
876
|
//#endregion
|
|
877
877
|
//#region src/modules/invoice/use-cases/detail/components/table/InvoiceDetailPaymentActionsCell.vue
|
|
878
|
-
var
|
|
878
|
+
var zn = /* @__PURE__ */ I({
|
|
879
879
|
__name: "InvoiceDetailPaymentActionsCell",
|
|
880
880
|
props: {
|
|
881
881
|
payment: {},
|
|
@@ -883,12 +883,12 @@ var Rn = /* @__PURE__ */ I({
|
|
|
883
883
|
},
|
|
884
884
|
setup(e) {
|
|
885
885
|
let t = e, n = O();
|
|
886
|
-
return (e, i) => (R(), j(B(
|
|
887
|
-
default: V(() => [F(B(
|
|
888
|
-
default: V(() => [t.payment.source === B(r).MANUAL ? (R(), j(B(
|
|
886
|
+
return (e, i) => (R(), j(B(tn), null, {
|
|
887
|
+
default: V(() => [F(B(nn), null, {
|
|
888
|
+
default: V(() => [t.payment.source === B(r).MANUAL ? (R(), j(B(Xt), {
|
|
889
889
|
key: 0,
|
|
890
890
|
label: B(n).t("wise_invoicing.invoice.detail.payments.delete.title"),
|
|
891
|
-
icon: B(
|
|
891
|
+
icon: B(fe),
|
|
892
892
|
size: "sm",
|
|
893
893
|
variant: "tertiary",
|
|
894
894
|
onClick: i[0] ||= (e) => t.onDelete(t.payment)
|
|
@@ -898,25 +898,25 @@ var Rn = /* @__PURE__ */ I({
|
|
|
898
898
|
_: 1
|
|
899
899
|
}));
|
|
900
900
|
}
|
|
901
|
-
}),
|
|
901
|
+
}), Bn = /* @__PURE__ */ I({
|
|
902
902
|
__name: "InvoiceDetailPaymentManualCell",
|
|
903
903
|
props: { payment: {} },
|
|
904
904
|
setup(e) {
|
|
905
905
|
let t = e;
|
|
906
|
-
return (e, n) => (R(), j(B(
|
|
907
|
-
default: V(() => [t.payment.source === B(r).MANUAL ? (R(), j(B(
|
|
906
|
+
return (e, n) => (R(), j(B(tn), null, {
|
|
907
|
+
default: V(() => [t.payment.source === B(r).MANUAL ? (R(), j(B(ye), {
|
|
908
908
|
key: 0,
|
|
909
909
|
class: "size-4 text-brand-600"
|
|
910
910
|
})) : M("", !0)]),
|
|
911
911
|
_: 1
|
|
912
912
|
}));
|
|
913
913
|
}
|
|
914
|
-
}),
|
|
914
|
+
}), Vn = /* @__PURE__ */ I({
|
|
915
915
|
__name: "InvoiceDetailPaymentsTableTextCell",
|
|
916
916
|
props: { text: {} },
|
|
917
917
|
setup(e) {
|
|
918
918
|
let t = e;
|
|
919
|
-
return (e, n) => (R(), j(B(
|
|
919
|
+
return (e, n) => (R(), j(B(tn), null, {
|
|
920
920
|
default: V(() => [F(B(X), {
|
|
921
921
|
text: t.text ?? "-",
|
|
922
922
|
class: "text-sm/5 text-primary"
|
|
@@ -927,9 +927,9 @@ var Rn = /* @__PURE__ */ I({
|
|
|
927
927
|
});
|
|
928
928
|
//#endregion
|
|
929
929
|
//#region src/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.ts
|
|
930
|
-
function
|
|
931
|
-
let t = O(), n =
|
|
932
|
-
return A(() =>
|
|
930
|
+
function Hn(e) {
|
|
931
|
+
let t = O(), n = w(), r = p();
|
|
932
|
+
return A(() => ln()([
|
|
933
933
|
{
|
|
934
934
|
headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.date"),
|
|
935
935
|
key: "date",
|
|
@@ -937,7 +937,7 @@ function Vn(e) {
|
|
|
937
937
|
max: "12rem",
|
|
938
938
|
min: "12rem"
|
|
939
939
|
},
|
|
940
|
-
component: (e) => Z(
|
|
940
|
+
component: (e) => Z(Vn, { text: n.formatPlainDate(e.date) })
|
|
941
941
|
},
|
|
942
942
|
{
|
|
943
943
|
headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.reference"),
|
|
@@ -946,7 +946,7 @@ function Vn(e) {
|
|
|
946
946
|
max: "14rem",
|
|
947
947
|
min: "12rem"
|
|
948
948
|
},
|
|
949
|
-
component: (e) => Z(
|
|
949
|
+
component: (e) => Z(Vn, { text: e.paymentReference ?? "—" })
|
|
950
950
|
},
|
|
951
951
|
{
|
|
952
952
|
headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.remark"),
|
|
@@ -955,7 +955,7 @@ function Vn(e) {
|
|
|
955
955
|
max: "1fr",
|
|
956
956
|
min: "12rem"
|
|
957
957
|
},
|
|
958
|
-
component: (e) => Z(
|
|
958
|
+
component: (e) => Z(Vn, { text: e.remarks ?? "—" })
|
|
959
959
|
},
|
|
960
960
|
{
|
|
961
961
|
headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.manual"),
|
|
@@ -964,7 +964,7 @@ function Vn(e) {
|
|
|
964
964
|
max: "6rem",
|
|
965
965
|
min: "6rem"
|
|
966
966
|
},
|
|
967
|
-
component: (e) => Z(
|
|
967
|
+
component: (e) => Z(Bn, { payment: e })
|
|
968
968
|
},
|
|
969
969
|
{
|
|
970
970
|
headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.amount"),
|
|
@@ -973,7 +973,7 @@ function Vn(e) {
|
|
|
973
973
|
max: "10rem",
|
|
974
974
|
min: "10rem"
|
|
975
975
|
},
|
|
976
|
-
component: (e) => Z(
|
|
976
|
+
component: (e) => Z(Vn, { text: r.formatMonetary(e.amount) })
|
|
977
977
|
},
|
|
978
978
|
{
|
|
979
979
|
headerLabel: "",
|
|
@@ -982,7 +982,7 @@ function Vn(e) {
|
|
|
982
982
|
max: "5rem",
|
|
983
983
|
min: "5rem"
|
|
984
984
|
},
|
|
985
|
-
component: (t) => Z(
|
|
985
|
+
component: (t) => Z(zn, {
|
|
986
986
|
payment: t,
|
|
987
987
|
onDelete: e.onDelete
|
|
988
988
|
})
|
|
@@ -991,7 +991,7 @@ function Vn(e) {
|
|
|
991
991
|
}
|
|
992
992
|
//#endregion
|
|
993
993
|
//#region src/modules/invoice/api/mutations/invoicePaymentCreate.mutation.ts
|
|
994
|
-
function
|
|
994
|
+
function Un() {
|
|
995
995
|
return H({
|
|
996
996
|
queryFn: (e) => y.createPayment(e.params.invoiceUuid, e.body),
|
|
997
997
|
queryKeysToInvalidate: {
|
|
@@ -1004,19 +1004,19 @@ function Hn() {
|
|
|
1004
1004
|
}
|
|
1005
1005
|
//#endregion
|
|
1006
1006
|
//#region src/modules/invoice/models/invoice/payment/invoicePaymentCreateForm.model.ts
|
|
1007
|
-
var
|
|
1007
|
+
var Wn = D.object({
|
|
1008
1008
|
amount: D.number().positive(),
|
|
1009
1009
|
currency: D.enum(s),
|
|
1010
1010
|
date: ee,
|
|
1011
1011
|
paymentReference: D.string().nullable(),
|
|
1012
1012
|
precision: D.number().int().nonnegative(),
|
|
1013
1013
|
remarks: D.string().nullable()
|
|
1014
|
-
}),
|
|
1014
|
+
}), Gn = { class: "pr-md text-xs text-secondary" }, Kn = /* @__PURE__ */ I({
|
|
1015
1015
|
__name: "InvoicePaymentCreateDialog",
|
|
1016
1016
|
props: { invoice: {} },
|
|
1017
1017
|
emits: ["close"],
|
|
1018
1018
|
setup(e, { emit: t }) {
|
|
1019
|
-
let n = e, r = t, i = O(), a = Q(), o = p(), s =
|
|
1019
|
+
let n = e, r = t, i = O(), a = Q(), o = p(), s = Un(), c = A(() => o.getSymbol(n.invoice.grossAmount.currency)), l = A(() => m(1, n.invoice.grossAmount.precision)), u = $({
|
|
1020
1020
|
initialState: {
|
|
1021
1021
|
amount: null,
|
|
1022
1022
|
currency: n.invoice.grossAmount.currency,
|
|
@@ -1025,7 +1025,7 @@ var Un = D.object({
|
|
|
1025
1025
|
precision: n.invoice.grossAmount.precision,
|
|
1026
1026
|
remarks: null
|
|
1027
1027
|
},
|
|
1028
|
-
schema:
|
|
1028
|
+
schema: Wn,
|
|
1029
1029
|
onSubmit: async (e) => {
|
|
1030
1030
|
let t = await s.execute({
|
|
1031
1031
|
body: e,
|
|
@@ -1050,38 +1050,38 @@ var Un = D.object({
|
|
|
1050
1050
|
F(B(J), {
|
|
1051
1051
|
title: B(i).t("wise_invoicing.invoice.detail.payments.create.title"),
|
|
1052
1052
|
description: B(i).t("wise_invoicing.invoice.detail.payments.create.description"),
|
|
1053
|
-
icon: B(
|
|
1053
|
+
icon: B(ce)
|
|
1054
1054
|
}, null, 8, [
|
|
1055
1055
|
"title",
|
|
1056
1056
|
"description",
|
|
1057
1057
|
"icon"
|
|
1058
1058
|
]),
|
|
1059
|
-
F(B(
|
|
1060
|
-
default: V(() => [F(B(
|
|
1061
|
-
default: V(() => [F(B(
|
|
1059
|
+
F(B(Wt), null, {
|
|
1060
|
+
default: V(() => [F(B(Jt), null, {
|
|
1061
|
+
default: V(() => [F(B(qt), {
|
|
1062
1062
|
lg: 2,
|
|
1063
1063
|
sm: 1
|
|
1064
1064
|
}, {
|
|
1065
1065
|
default: V(() => [
|
|
1066
|
-
F(B(
|
|
1066
|
+
F(B(Zt), L(B(E)(B(d)), {
|
|
1067
1067
|
"is-required": !0,
|
|
1068
1068
|
label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.amount"),
|
|
1069
1069
|
min: l.value,
|
|
1070
1070
|
step: l.value
|
|
1071
1071
|
}), {
|
|
1072
|
-
right: V(() => [P("span",
|
|
1072
|
+
right: V(() => [P("span", Gn, z(c.value.symbol), 1)]),
|
|
1073
1073
|
_: 1
|
|
1074
1074
|
}, 16, [
|
|
1075
1075
|
"label",
|
|
1076
1076
|
"min",
|
|
1077
1077
|
"step"
|
|
1078
1078
|
]),
|
|
1079
|
-
F(B(
|
|
1079
|
+
F(B(zt), L(B(E)(B(f)), {
|
|
1080
1080
|
"is-required": !0,
|
|
1081
1081
|
label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.date")
|
|
1082
1082
|
}), null, 16, ["label"]),
|
|
1083
|
-
F(B(
|
|
1084
|
-
F(B(
|
|
1083
|
+
F(B(rn), L(B(E)(B(h)), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.reference") }), null, 16, ["label"]),
|
|
1084
|
+
F(B(rn), L(B(E)(B(g)), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.fields.remarks") }), null, 16, ["label"])
|
|
1085
1085
|
]),
|
|
1086
1086
|
_: 1
|
|
1087
1087
|
})]),
|
|
@@ -1090,7 +1090,7 @@ var Un = D.object({
|
|
|
1090
1090
|
_: 1
|
|
1091
1091
|
}),
|
|
1092
1092
|
F(B(K), null, {
|
|
1093
|
-
right: V(() => [F(B(q)), F(B(
|
|
1093
|
+
right: V(() => [F(B(q)), F(B(Yt), { label: B(i).t("wise_invoicing.invoice.detail.payments.create.submit") }, null, 8, ["label"])]),
|
|
1094
1094
|
_: 1
|
|
1095
1095
|
})
|
|
1096
1096
|
]),
|
|
@@ -1100,7 +1100,7 @@ var Un = D.object({
|
|
|
1100
1100
|
});
|
|
1101
1101
|
//#endregion
|
|
1102
1102
|
//#region src/modules/invoice/api/mutations/invoicePaymentDelete.mutation.ts
|
|
1103
|
-
function
|
|
1103
|
+
function qn() {
|
|
1104
1104
|
return H({
|
|
1105
1105
|
queryFn: (e) => y.deletePayment(e.params.invoiceUuid, e.params.paymentUuid),
|
|
1106
1106
|
queryKeysToInvalidate: {
|
|
@@ -1113,7 +1113,7 @@ function Kn() {
|
|
|
1113
1113
|
}
|
|
1114
1114
|
//#endregion
|
|
1115
1115
|
//#region src/modules/invoice/use-cases/detail/dialogs/InvoicePaymentDeleteDialog.vue
|
|
1116
|
-
var
|
|
1116
|
+
var Jn = /* @__PURE__ */ I({
|
|
1117
1117
|
__name: "InvoicePaymentDeleteDialog",
|
|
1118
1118
|
props: {
|
|
1119
1119
|
invoiceUuid: {},
|
|
@@ -1121,8 +1121,8 @@ var qn = /* @__PURE__ */ I({
|
|
|
1121
1121
|
},
|
|
1122
1122
|
emits: ["close"],
|
|
1123
1123
|
setup(e, { emit: t }) {
|
|
1124
|
-
let n = e, r = t, i = O(), a = Q(), o = p(), s =
|
|
1125
|
-
schema:
|
|
1124
|
+
let n = e, r = t, i = O(), a = Q(), o = p(), s = qn(), c = A(() => o.formatMonetary(n.payment.amount)), l = $({
|
|
1125
|
+
schema: mt.object({}),
|
|
1126
1126
|
onSubmit: async () => {
|
|
1127
1127
|
let e = await s.execute({ params: {
|
|
1128
1128
|
invoiceUuid: n.invoiceUuid,
|
|
@@ -1144,7 +1144,7 @@ var qn = /* @__PURE__ */ I({
|
|
|
1144
1144
|
title: B(i).t("wise_invoicing.invoice.detail.payments.delete.title"),
|
|
1145
1145
|
description: B(i).t("wise_invoicing.invoice.detail.payments.delete.description", { amount: c.value })
|
|
1146
1146
|
}, null, 8, ["title", "description"]), F(B(K), null, {
|
|
1147
|
-
right: V(() => [F(B(q)), F(B(
|
|
1147
|
+
right: V(() => [F(B(q)), F(B(Gt), {
|
|
1148
1148
|
"is-destructive": !0,
|
|
1149
1149
|
label: B(i).t("wise_invoicing.invoice.detail.payments.delete.submit")
|
|
1150
1150
|
}, null, 8, ["label"])]),
|
|
@@ -1153,11 +1153,11 @@ var qn = /* @__PURE__ */ I({
|
|
|
1153
1153
|
_: 1
|
|
1154
1154
|
}, 8, ["form"]));
|
|
1155
1155
|
}
|
|
1156
|
-
}),
|
|
1156
|
+
}), Yn = /* @__PURE__ */ I({
|
|
1157
1157
|
__name: "InvoiceDetailPaymentsSection",
|
|
1158
1158
|
props: { invoice: {} },
|
|
1159
1159
|
setup(e) {
|
|
1160
|
-
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 } =
|
|
1160
|
+
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 } = Rn(i), c = un(), l = c.create(Kn), u = c.create(Jn), d = A(() => s.value.match({
|
|
1161
1161
|
err: () => [],
|
|
1162
1162
|
loading: () => [],
|
|
1163
1163
|
ok: (e) => e
|
|
@@ -1165,7 +1165,7 @@ var qn = /* @__PURE__ */ I({
|
|
|
1165
1165
|
err: (e) => e,
|
|
1166
1166
|
loading: () => null,
|
|
1167
1167
|
ok: () => null
|
|
1168
|
-
})), m = A(() => !
|
|
1168
|
+
})), m = A(() => !b.getMetadata(t.invoice.status).isTerminal);
|
|
1169
1169
|
function h() {
|
|
1170
1170
|
l.open({ invoice: t.invoice });
|
|
1171
1171
|
}
|
|
@@ -1175,40 +1175,40 @@ var qn = /* @__PURE__ */ I({
|
|
|
1175
1175
|
payment: e
|
|
1176
1176
|
});
|
|
1177
1177
|
}
|
|
1178
|
-
let _ =
|
|
1179
|
-
return (e, t) => (R(), j(
|
|
1180
|
-
default: V(() => [F(B(
|
|
1178
|
+
let _ = Hn({ onDelete: g });
|
|
1179
|
+
return (e, t) => (R(), j($e, null, {
|
|
1180
|
+
default: V(() => [F(B(Qt), {
|
|
1181
1181
|
justify: "between",
|
|
1182
1182
|
class: "w-full gap-lg border-b border-secondary px-lg py-md"
|
|
1183
1183
|
}, {
|
|
1184
|
-
default: V(() => [F(B(
|
|
1184
|
+
default: V(() => [F(B(Qt), { gap: "sm" }, {
|
|
1185
1185
|
default: V(() => [F(B(X), {
|
|
1186
1186
|
text: B(n).t("wise_invoicing.invoice.detail.payments.title"),
|
|
1187
1187
|
as: "h2",
|
|
1188
1188
|
class: "text-sm font-semibold text-primary"
|
|
1189
|
-
}, null, 8, ["text"]), a.value === null ? M("", !0) : (R(), j(B(
|
|
1189
|
+
}, null, 8, ["text"]), a.value === null ? M("", !0) : (R(), j(B(Mt), {
|
|
1190
1190
|
key: 0,
|
|
1191
1191
|
color: "gray",
|
|
1192
1192
|
size: "sm",
|
|
1193
1193
|
variant: "outline"
|
|
1194
1194
|
}, {
|
|
1195
1195
|
default: V(() => [
|
|
1196
|
-
F(B(
|
|
1197
|
-
F(B(
|
|
1198
|
-
F(B(
|
|
1196
|
+
F(B(Nt), { label: B(n).t("wise_invoicing.invoice.detail.payments.balance_due") }, null, 8, ["label"]),
|
|
1197
|
+
F(B(Pt)),
|
|
1198
|
+
F(B(Nt), { label: a.value }, null, 8, ["label"])
|
|
1199
1199
|
]),
|
|
1200
1200
|
_: 1
|
|
1201
1201
|
}))]),
|
|
1202
1202
|
_: 1
|
|
1203
|
-
}), m.value ? (R(), j(B(
|
|
1203
|
+
}), m.value ? (R(), j(B(Ft), {
|
|
1204
1204
|
key: 0,
|
|
1205
1205
|
label: B(n).t("wise_invoicing.invoice.detail.payments.add"),
|
|
1206
|
-
"icon-left": B(
|
|
1206
|
+
"icon-left": B(ge),
|
|
1207
1207
|
size: "sm",
|
|
1208
1208
|
onClick: h
|
|
1209
1209
|
}, null, 8, ["label", "icon-left"])) : M("", !0)]),
|
|
1210
1210
|
_: 1
|
|
1211
|
-
}), F(B(
|
|
1211
|
+
}), F(B(en), {
|
|
1212
1212
|
"active-filter-count": 0,
|
|
1213
1213
|
columns: B(_),
|
|
1214
1214
|
data: d.value,
|
|
@@ -1231,7 +1231,7 @@ var qn = /* @__PURE__ */ I({
|
|
|
1231
1231
|
});
|
|
1232
1232
|
//#endregion
|
|
1233
1233
|
//#region src/modules/invoice/api/mutations/invoiceUpdateLines.mutation.ts
|
|
1234
|
-
function
|
|
1234
|
+
function Xn() {
|
|
1235
1235
|
return H({
|
|
1236
1236
|
queryFn: (e) => y.updateLines(e.params.invoiceUuid, e.body),
|
|
1237
1237
|
queryKeysToInvalidate: { invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid } }
|
|
@@ -1239,7 +1239,7 @@ function Yn() {
|
|
|
1239
1239
|
}
|
|
1240
1240
|
//#endregion
|
|
1241
1241
|
//#region src/modules/invoice/api/mutations/invoiceApplyDiscount.mutation.ts
|
|
1242
|
-
function
|
|
1242
|
+
function Zn() {
|
|
1243
1243
|
return H({
|
|
1244
1244
|
queryFn: (e) => y.applyDiscount(e.params.invoiceUuid, e.body),
|
|
1245
1245
|
queryKeysToInvalidate: { invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid } }
|
|
@@ -1247,24 +1247,24 @@ function Xn() {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
//#endregion
|
|
1249
1249
|
//#region src/modules/invoice/models/invoice/update/invoiceApplyDiscountForm.model.ts
|
|
1250
|
-
var
|
|
1250
|
+
var Qn = D.object({
|
|
1251
1251
|
currency: D.enum(s),
|
|
1252
1252
|
precision: D.number().int().nonnegative(),
|
|
1253
1253
|
type: D.enum(c),
|
|
1254
1254
|
value: D.number()
|
|
1255
|
-
}).refine((e) => e.type !== c.PERCENTAGE || e.value <= 100, { path: ["value"] }),
|
|
1255
|
+
}).refine((e) => e.type !== c.PERCENTAGE || e.value <= 100, { path: ["value"] }), $n = { class: "pr-md text-xs text-secondary" }, er = /* @__PURE__ */ I({
|
|
1256
1256
|
__name: "InvoiceApplyDiscountDialog",
|
|
1257
1257
|
props: { invoice: {} },
|
|
1258
1258
|
emits: ["close"],
|
|
1259
1259
|
setup(e, { emit: t }) {
|
|
1260
|
-
let n = e, r = t, i = O(), a = Q(), o = p(), s =
|
|
1260
|
+
let n = e, r = t, i = O(), a = Q(), o = p(), s = Zn(), l = A(() => cn([c.PERCENTAGE, c.AMOUNT])), u = $({
|
|
1261
1261
|
initialState: {
|
|
1262
1262
|
currency: n.invoice.grossAmount.currency,
|
|
1263
1263
|
precision: n.invoice.grossAmount.precision,
|
|
1264
1264
|
type: c.PERCENTAGE,
|
|
1265
1265
|
value: null
|
|
1266
1266
|
},
|
|
1267
|
-
schema:
|
|
1267
|
+
schema: Qn,
|
|
1268
1268
|
onSubmit: async (e) => {
|
|
1269
1269
|
let t = await s.execute({
|
|
1270
1270
|
body: e,
|
|
@@ -1292,26 +1292,26 @@ var Zn = D.object({
|
|
|
1292
1292
|
F(B(J), {
|
|
1293
1293
|
title: B(i).t("wise_invoicing.invoice.detail.line_items.global_discount"),
|
|
1294
1294
|
description: B(i).t("wise_invoicing.invoice.detail.global_discount.description"),
|
|
1295
|
-
icon: B(
|
|
1295
|
+
icon: B(Ce)
|
|
1296
1296
|
}, null, 8, [
|
|
1297
1297
|
"title",
|
|
1298
1298
|
"description",
|
|
1299
1299
|
"icon"
|
|
1300
1300
|
]),
|
|
1301
|
-
F(B(
|
|
1302
|
-
default: V(() => [F(B(
|
|
1303
|
-
default: V(() => [F(B(
|
|
1301
|
+
F(B(Wt), null, {
|
|
1302
|
+
default: V(() => [F(B(Jt), null, {
|
|
1303
|
+
default: V(() => [F(B(qt), {
|
|
1304
1304
|
lg: 2,
|
|
1305
1305
|
sm: 1
|
|
1306
1306
|
}, {
|
|
1307
1307
|
default: V(() => [
|
|
1308
|
-
F(B(
|
|
1308
|
+
F(B($t), L(B(E)(B(f)), {
|
|
1309
1309
|
"display-fn": _,
|
|
1310
1310
|
"is-required": !0,
|
|
1311
1311
|
items: l.value,
|
|
1312
1312
|
label: B(i).t("wise_invoicing.invoice.detail.global_discount.type.label")
|
|
1313
1313
|
}), null, 16, ["items", "label"]),
|
|
1314
|
-
m.value ? (R(), j(B(
|
|
1314
|
+
m.value ? (R(), j(B(Zt), L({ key: 0 }, B(E)(B(d)), {
|
|
1315
1315
|
hint: B(i).t("wise_invoicing.invoice.detail.global_discount.amount.hint"),
|
|
1316
1316
|
"is-required": !0,
|
|
1317
1317
|
label: B(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
|
|
@@ -1322,13 +1322,13 @@ var Zn = D.object({
|
|
|
1322
1322
|
right: V(() => [...t[1] ||= [P("span", { class: "pr-md text-xs text-secondary" }, " % ", -1)]]),
|
|
1323
1323
|
_: 1
|
|
1324
1324
|
}, 16, ["hint", "label"])) : M("", !0),
|
|
1325
|
-
h.value ? (R(), j(B(
|
|
1325
|
+
h.value ? (R(), j(B(Zt), L({ key: 1 }, B(E)(B(d)), {
|
|
1326
1326
|
"is-required": !0,
|
|
1327
1327
|
label: B(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
|
|
1328
1328
|
min: .01,
|
|
1329
1329
|
step: .01
|
|
1330
1330
|
}), {
|
|
1331
|
-
right: V(() => [P("span",
|
|
1331
|
+
right: V(() => [P("span", $n, z(g.value.symbol), 1)]),
|
|
1332
1332
|
_: 1
|
|
1333
1333
|
}, 16, ["label"])) : M("", !0)
|
|
1334
1334
|
]),
|
|
@@ -1339,21 +1339,21 @@ var Zn = D.object({
|
|
|
1339
1339
|
_: 1
|
|
1340
1340
|
}),
|
|
1341
1341
|
F(B(K), null, {
|
|
1342
|
-
right: V(() => [F(B(q)), F(B(
|
|
1342
|
+
right: V(() => [F(B(q)), F(B(Gt), { label: B(i).t("wise_invoicing.invoice.detail.global_discount.confirm") }, null, 8, ["label"])]),
|
|
1343
1343
|
_: 1
|
|
1344
1344
|
})
|
|
1345
1345
|
]),
|
|
1346
1346
|
_: 1
|
|
1347
1347
|
}, 8, ["form"]));
|
|
1348
1348
|
}
|
|
1349
|
-
}),
|
|
1349
|
+
}), tr = /* @__PURE__ */ I({
|
|
1350
1350
|
__name: "InvoiceLineItemsTableSection",
|
|
1351
1351
|
props: {
|
|
1352
1352
|
customFieldDefinitions: {},
|
|
1353
1353
|
invoice: {}
|
|
1354
1354
|
},
|
|
1355
1355
|
setup(e) {
|
|
1356
|
-
let t = e, n = A(() => t.invoice), r = h(), i =
|
|
1356
|
+
let t = e, n = A(() => t.invoice), r = h(), i = Xn(), a = A(() => b.isEditable(t.invoice.status)), o = Ye({
|
|
1357
1357
|
isSaving: A(() => i.isLoading.value),
|
|
1358
1358
|
billingDocument: () => n.value,
|
|
1359
1359
|
canEdit: a,
|
|
@@ -1362,19 +1362,19 @@ var Zn = D.object({
|
|
|
1362
1362
|
body: e,
|
|
1363
1363
|
params: { invoiceUuid: t.invoice.uuid }
|
|
1364
1364
|
})
|
|
1365
|
-
}), s =
|
|
1365
|
+
}), s = un().create(er);
|
|
1366
1366
|
function c() {
|
|
1367
1367
|
s.open({ invoice: t.invoice });
|
|
1368
1368
|
}
|
|
1369
|
-
return
|
|
1369
|
+
return Ge(o), (e, n) => (R(), j($e, null, {
|
|
1370
1370
|
default: V(() => [
|
|
1371
|
-
F(
|
|
1371
|
+
F(nt, {
|
|
1372
1372
|
"show-apply-discount": B(r).isGlobalDiscountEnabled.value,
|
|
1373
1373
|
onApplyDiscount: c
|
|
1374
1374
|
}, null, 8, ["show-apply-discount"]),
|
|
1375
|
-
F(
|
|
1376
|
-
F(
|
|
1377
|
-
F(
|
|
1375
|
+
F(We),
|
|
1376
|
+
F(He, { "billing-document": t.invoice }, null, 8, ["billing-document"]),
|
|
1377
|
+
F(it)
|
|
1378
1378
|
]),
|
|
1379
1379
|
_: 1
|
|
1380
1380
|
}));
|
|
@@ -1382,7 +1382,7 @@ var Zn = D.object({
|
|
|
1382
1382
|
});
|
|
1383
1383
|
//#endregion
|
|
1384
1384
|
//#region src/modules/invoice/api/mutations/invoiceCreateCreditNote.mutation.ts
|
|
1385
|
-
function
|
|
1385
|
+
function nr() {
|
|
1386
1386
|
return H({
|
|
1387
1387
|
queryFn: (e) => y.createCreditNote(e.params.invoiceUuid),
|
|
1388
1388
|
queryKeysToInvalidate: {
|
|
@@ -1393,7 +1393,7 @@ function tr() {
|
|
|
1393
1393
|
}
|
|
1394
1394
|
//#endregion
|
|
1395
1395
|
//#region src/modules/invoice/api/mutations/invoiceDuplicate.mutation.ts
|
|
1396
|
-
function
|
|
1396
|
+
function rr() {
|
|
1397
1397
|
return H({
|
|
1398
1398
|
queryFn: (e) => y.duplicate(e.params.invoiceUuid),
|
|
1399
1399
|
queryKeysToInvalidate: { invoiceIndex: {} }
|
|
@@ -1401,7 +1401,7 @@ function nr() {
|
|
|
1401
1401
|
}
|
|
1402
1402
|
//#endregion
|
|
1403
1403
|
//#region src/modules/invoice/api/mutations/invoiceFinalize.mutation.ts
|
|
1404
|
-
function
|
|
1404
|
+
function ir() {
|
|
1405
1405
|
return H({
|
|
1406
1406
|
queryFn: (e) => y.finalize(e.params.invoiceUuid),
|
|
1407
1407
|
queryKeysToInvalidate: {
|
|
@@ -1412,7 +1412,7 @@ function rr() {
|
|
|
1412
1412
|
}
|
|
1413
1413
|
//#endregion
|
|
1414
1414
|
//#region src/modules/invoice/api/mutations/invoiceMarkAsDraft.mutation.ts
|
|
1415
|
-
function
|
|
1415
|
+
function ar() {
|
|
1416
1416
|
return H({
|
|
1417
1417
|
queryFn: (e) => y.markAsDraft(e.params.invoiceUuid),
|
|
1418
1418
|
queryKeysToInvalidate: {
|
|
@@ -1423,7 +1423,7 @@ function ir() {
|
|
|
1423
1423
|
}
|
|
1424
1424
|
//#endregion
|
|
1425
1425
|
//#region src/modules/invoice/api/mutations/invoiceMarkAsPaid.mutation.ts
|
|
1426
|
-
function
|
|
1426
|
+
function or() {
|
|
1427
1427
|
return H({
|
|
1428
1428
|
queryFn: (e) => y.markAsPaid(e.params.invoiceUuid),
|
|
1429
1429
|
queryKeysToInvalidate: {
|
|
@@ -1434,7 +1434,7 @@ function ar() {
|
|
|
1434
1434
|
}
|
|
1435
1435
|
//#endregion
|
|
1436
1436
|
//#region src/modules/invoice/api/mutations/invoiceMarkAsPriorApprovalRequired.mutation.ts
|
|
1437
|
-
function
|
|
1437
|
+
function sr() {
|
|
1438
1438
|
return H({
|
|
1439
1439
|
queryFn: (e) => y.markAsPriorApprovalRequired(e.params.invoiceUuid),
|
|
1440
1440
|
queryKeysToInvalidate: {
|
|
@@ -1447,7 +1447,7 @@ function or() {
|
|
|
1447
1447
|
}
|
|
1448
1448
|
//#endregion
|
|
1449
1449
|
//#region src/modules/invoice/api/mutations/invoiceMarkAsProtested.mutation.ts
|
|
1450
|
-
function
|
|
1450
|
+
function cr() {
|
|
1451
1451
|
return H({
|
|
1452
1452
|
queryFn: (e) => y.markAsProtested(e.params.invoiceUuid),
|
|
1453
1453
|
queryKeysToInvalidate: {
|
|
@@ -1458,7 +1458,7 @@ function sr() {
|
|
|
1458
1458
|
}
|
|
1459
1459
|
//#endregion
|
|
1460
1460
|
//#region src/modules/invoice/api/mutations/invoiceMarkAsReady.mutation.ts
|
|
1461
|
-
function
|
|
1461
|
+
function lr() {
|
|
1462
1462
|
return H({
|
|
1463
1463
|
queryFn: (e) => y.markAsReady(e.params.invoiceUuid),
|
|
1464
1464
|
queryKeysToInvalidate: {
|
|
@@ -1469,7 +1469,7 @@ function cr() {
|
|
|
1469
1469
|
}
|
|
1470
1470
|
//#endregion
|
|
1471
1471
|
//#region src/modules/invoice/api/mutations/invoiceSend.mutation.ts
|
|
1472
|
-
function
|
|
1472
|
+
function ur() {
|
|
1473
1473
|
return H({
|
|
1474
1474
|
queryFn: (e) => y.send(e.params.invoiceUuid),
|
|
1475
1475
|
queryKeysToInvalidate: {
|
|
@@ -1480,7 +1480,7 @@ function lr() {
|
|
|
1480
1480
|
}
|
|
1481
1481
|
//#endregion
|
|
1482
1482
|
//#region src/modules/invoice/api/mutations/invoiceUnmarkAsPriorApprovalRequired.mutation.ts
|
|
1483
|
-
function
|
|
1483
|
+
function dr() {
|
|
1484
1484
|
return H({
|
|
1485
1485
|
queryFn: (e) => y.unmarkAsPriorApprovalRequired(e.params.invoiceUuid),
|
|
1486
1486
|
queryKeysToInvalidate: {
|
|
@@ -1493,7 +1493,7 @@ function ur() {
|
|
|
1493
1493
|
}
|
|
1494
1494
|
//#endregion
|
|
1495
1495
|
//#region src/modules/invoice/api/mutations/invoiceWithdrawProtest.mutation.ts
|
|
1496
|
-
function
|
|
1496
|
+
function fr() {
|
|
1497
1497
|
return H({
|
|
1498
1498
|
queryFn: (e) => y.withdrawProtest(e.params.invoiceUuid),
|
|
1499
1499
|
queryKeysToInvalidate: {
|
|
@@ -1504,7 +1504,7 @@ function dr() {
|
|
|
1504
1504
|
}
|
|
1505
1505
|
//#endregion
|
|
1506
1506
|
//#region src/modules/invoice/api/mutations/invoiceRestoreFromProForma.mutation.ts
|
|
1507
|
-
function
|
|
1507
|
+
function pr() {
|
|
1508
1508
|
return H({
|
|
1509
1509
|
queryFn: (e) => y.restoreFromProForma(e.params.invoiceUuid),
|
|
1510
1510
|
queryKeysToInvalidate: {
|
|
@@ -1517,7 +1517,7 @@ function fr() {
|
|
|
1517
1517
|
}
|
|
1518
1518
|
//#endregion
|
|
1519
1519
|
//#region src/modules/invoice/use-cases/detail/dialogs/InvoiceApprovalRevertDialog.vue
|
|
1520
|
-
var
|
|
1520
|
+
var mr = /* @__PURE__ */ I({
|
|
1521
1521
|
__name: "InvoiceApprovalRevertDialog",
|
|
1522
1522
|
props: {
|
|
1523
1523
|
invoiceUuid: {},
|
|
@@ -1525,7 +1525,7 @@ var pr = /* @__PURE__ */ I({
|
|
|
1525
1525
|
},
|
|
1526
1526
|
emits: ["close", "reverted"],
|
|
1527
1527
|
setup(e, { emit: t }) {
|
|
1528
|
-
let n = e, r = t, i = O(), a = Q(), o =
|
|
1528
|
+
let n = e, r = t, i = O(), a = Q(), o = w(), s = pr(), c = A(() => n.sentAt === null ? "" : o.toDate(n.sentAt)), l = $({
|
|
1529
1529
|
initialState: {},
|
|
1530
1530
|
schema: D.object({}),
|
|
1531
1531
|
onSubmit: async () => {
|
|
@@ -1548,14 +1548,14 @@ var pr = /* @__PURE__ */ I({
|
|
|
1548
1548
|
default: V(() => [F(B(J), {
|
|
1549
1549
|
title: B(i).t("wise_invoicing.invoice.approval_revert.title"),
|
|
1550
1550
|
description: B(i).t("wise_invoicing.invoice.approval_revert.description", { date: c.value }),
|
|
1551
|
-
icon: B(
|
|
1551
|
+
icon: B(de),
|
|
1552
1552
|
"icon-variant": "warning"
|
|
1553
1553
|
}, null, 8, [
|
|
1554
1554
|
"title",
|
|
1555
1555
|
"description",
|
|
1556
1556
|
"icon"
|
|
1557
1557
|
]), F(B(K), null, {
|
|
1558
|
-
default: V(() => [F(B(q)), F(B(
|
|
1558
|
+
default: V(() => [F(B(q)), F(B(Gt), { label: B(i).t("wise_invoicing.invoice.approval_revert.submit") }, null, 8, ["label"])]),
|
|
1559
1559
|
_: 1
|
|
1560
1560
|
})]),
|
|
1561
1561
|
_: 1
|
|
@@ -1564,7 +1564,7 @@ var pr = /* @__PURE__ */ I({
|
|
|
1564
1564
|
});
|
|
1565
1565
|
//#endregion
|
|
1566
1566
|
//#region src/modules/invoice/api/mutations/invoiceDelete.mutation.ts
|
|
1567
|
-
function
|
|
1567
|
+
function hr() {
|
|
1568
1568
|
return H({
|
|
1569
1569
|
queryFn: (e) => y.delete(e.params.invoiceUuid),
|
|
1570
1570
|
queryKeysToInvalidate: { invoiceIndex: {} }
|
|
@@ -1572,13 +1572,13 @@ function mr() {
|
|
|
1572
1572
|
}
|
|
1573
1573
|
//#endregion
|
|
1574
1574
|
//#region src/modules/invoice/use-cases/detail/dialogs/InvoiceDeleteDialog.vue
|
|
1575
|
-
var
|
|
1575
|
+
var gr = /* @__PURE__ */ I({
|
|
1576
1576
|
__name: "InvoiceDeleteDialog",
|
|
1577
1577
|
props: { invoice: {} },
|
|
1578
1578
|
emits: ["close", "deleted"],
|
|
1579
1579
|
setup(e, { emit: t }) {
|
|
1580
|
-
let n = e, r = t, i = O(), a =
|
|
1581
|
-
schema:
|
|
1580
|
+
let n = e, r = t, i = O(), a = kt(), o = Q(), s = hr(), c = $({
|
|
1581
|
+
schema: mt.object({}),
|
|
1582
1582
|
onSubmit: async () => {
|
|
1583
1583
|
let e = await s.execute({ params: { invoiceUuid: n.invoice.uuid } });
|
|
1584
1584
|
if (e.isErr()) {
|
|
@@ -1597,7 +1597,7 @@ var hr = /* @__PURE__ */ I({
|
|
|
1597
1597
|
title: B(i).t("wise_invoicing.invoice.delete.title"),
|
|
1598
1598
|
description: B(i).t("wise_invoicing.invoice.delete.description")
|
|
1599
1599
|
}, null, 8, ["title", "description"]), F(B(K), null, {
|
|
1600
|
-
right: V(() => [F(B(q), { label: "cancel" }), F(B(
|
|
1600
|
+
right: V(() => [F(B(q), { label: "cancel" }), F(B(Gt), {
|
|
1601
1601
|
"is-destructive": !0,
|
|
1602
1602
|
label: B(i).t("wise_invoicing.invoice.delete.submit_button")
|
|
1603
1603
|
}, null, 8, ["label"])]),
|
|
@@ -1606,7 +1606,7 @@ var hr = /* @__PURE__ */ I({
|
|
|
1606
1606
|
_: 1
|
|
1607
1607
|
}, 8, ["form"]));
|
|
1608
1608
|
}
|
|
1609
|
-
}),
|
|
1609
|
+
}), _r = { class: "flex flex-col gap-lg px-2xl" }, vr = /* @__PURE__ */ I({
|
|
1610
1610
|
__name: "InvoiceFinalizeOutOfSyncDialog",
|
|
1611
1611
|
props: {
|
|
1612
1612
|
sentAt: {},
|
|
@@ -1620,7 +1620,7 @@ var hr = /* @__PURE__ */ I({
|
|
|
1620
1620
|
"viewProForma"
|
|
1621
1621
|
],
|
|
1622
1622
|
setup(e, { emit: t }) {
|
|
1623
|
-
let n = e, r = t, i = O(), a =
|
|
1623
|
+
let n = e, r = t, i = O(), a = w(), o = yt(!1), s = A(() => n.sentAt === null ? "" : a.toDate(n.sentAt));
|
|
1624
1624
|
function c() {
|
|
1625
1625
|
r("finalizeAnyway"), r("close");
|
|
1626
1626
|
}
|
|
@@ -1630,7 +1630,7 @@ var hr = /* @__PURE__ */ I({
|
|
|
1630
1630
|
function u() {
|
|
1631
1631
|
r("sendNewRequest"), r("close");
|
|
1632
1632
|
}
|
|
1633
|
-
return (e, t) => (R(), j(B(
|
|
1633
|
+
return (e, t) => (R(), j(B(Ut), {
|
|
1634
1634
|
size: "sm",
|
|
1635
1635
|
onClose: t[2] ||= (e) => r("close")
|
|
1636
1636
|
}, {
|
|
@@ -1638,14 +1638,14 @@ var hr = /* @__PURE__ */ I({
|
|
|
1638
1638
|
F(B(J), {
|
|
1639
1639
|
title: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.title"),
|
|
1640
1640
|
description: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.description", { date: s.value }),
|
|
1641
|
-
icon: B(
|
|
1641
|
+
icon: B(be),
|
|
1642
1642
|
"icon-variant": "warning"
|
|
1643
1643
|
}, null, 8, [
|
|
1644
1644
|
"title",
|
|
1645
1645
|
"description",
|
|
1646
1646
|
"icon"
|
|
1647
1647
|
]),
|
|
1648
|
-
P("div",
|
|
1648
|
+
P("div", _r, [n.proFormaFile === null ? M("", !0) : (R(), j(B(Lt), {
|
|
1649
1649
|
key: 0,
|
|
1650
1650
|
class: "self-start"
|
|
1651
1651
|
}, {
|
|
@@ -1655,23 +1655,23 @@ var hr = /* @__PURE__ */ I({
|
|
|
1655
1655
|
onClick: t[0] ||= (e) => r("viewProForma")
|
|
1656
1656
|
}, z(B(i).t("wise_invoicing.invoice.approval_banner.view_pro_forma")), 1)]),
|
|
1657
1657
|
_: 1
|
|
1658
|
-
})), F(B(
|
|
1658
|
+
})), F(B(It), {
|
|
1659
1659
|
modelValue: o.value,
|
|
1660
1660
|
"onUpdate:modelValue": t[1] ||= (e) => o.value = e,
|
|
1661
1661
|
label: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.acknowledge")
|
|
1662
1662
|
}, null, 8, ["modelValue", "label"])]),
|
|
1663
1663
|
F(B(K), null, {
|
|
1664
|
-
left: V(() => [F(B(
|
|
1665
|
-
"icon-right": B(
|
|
1664
|
+
left: V(() => [F(B(Ft), {
|
|
1665
|
+
"icon-right": B(x),
|
|
1666
1666
|
label: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.send_new_request"),
|
|
1667
1667
|
variant: "tertiary",
|
|
1668
1668
|
onClick: u
|
|
1669
1669
|
}, null, 8, ["icon-right", "label"])]),
|
|
1670
|
-
right: V(() => [F(B(
|
|
1670
|
+
right: V(() => [F(B(Ft), {
|
|
1671
1671
|
label: B(i).t("wise_invoicing.invoice.finalize_out_of_sync.revert_changes"),
|
|
1672
1672
|
variant: "secondary",
|
|
1673
1673
|
onClick: l
|
|
1674
|
-
}, null, 8, ["label"]), F(B(
|
|
1674
|
+
}, null, 8, ["label"]), F(B(Ft), {
|
|
1675
1675
|
"disabled-reason": o.value ? null : B(i).t("wise_invoicing.invoice.finalize_out_of_sync.acknowledge_required"),
|
|
1676
1676
|
"is-destructive": !0,
|
|
1677
1677
|
"is-disabled": !o.value,
|
|
@@ -1689,29 +1689,29 @@ var hr = /* @__PURE__ */ I({
|
|
|
1689
1689
|
_: 1
|
|
1690
1690
|
}));
|
|
1691
1691
|
}
|
|
1692
|
-
}),
|
|
1692
|
+
}), yr = "customer_has_no_approval_email", br = /* @__PURE__ */ new Set([
|
|
1693
1693
|
a.AWAITING_APPROVAL,
|
|
1694
1694
|
a.EXPIRED,
|
|
1695
1695
|
a.REMINDER_1,
|
|
1696
1696
|
a.REMINDER_2
|
|
1697
1697
|
]);
|
|
1698
|
-
async function
|
|
1698
|
+
async function xr(e) {
|
|
1699
1699
|
if (e === null) return;
|
|
1700
|
-
let t = await
|
|
1700
|
+
let t = await ct.getDownloadUrl(e.uuid);
|
|
1701
1701
|
t !== null && window.open(t, "_blank", "noopener");
|
|
1702
1702
|
}
|
|
1703
|
-
function
|
|
1704
|
-
let t = O(), n = Q(), r =
|
|
1705
|
-
function
|
|
1706
|
-
return
|
|
1703
|
+
function Sr(e) {
|
|
1704
|
+
let t = O(), n = Q(), r = kt(), s = h(), c = un(), l = c.create(gr), u = c.create(ft), p = c.create(dt), m = c.create(mr), g = c.create(lt), _ = c.create(vr), ee = c.create(Ue), v = ur(), te = nr(), ne = rr(), re = ir(), ie = ar(), ae = or(), oe = sr(), ce = cr(), le = lr(), he = ut(), ge = dr(), _e = fr(), { shouldSkipConfirmation: be } = ot(), S = yt(null), C = A(() => b.getMetadata(e.value.status)), Ce = A(() => S.value ?? e.value.isDisputed), Te = A(() => e.value.status !== o.DRAFT && e.value.status !== o.READY), Ee = A(() => e.value.lifecycleStatus === f.FINALIZED);
|
|
1705
|
+
function w(e) {
|
|
1706
|
+
return C.value.actions.includes(e);
|
|
1707
1707
|
}
|
|
1708
|
-
let
|
|
1708
|
+
let T = A(() => ke.getDisplayStatus({
|
|
1709
1709
|
approval: e.value.approval,
|
|
1710
1710
|
requiresPriorApproval: e.value.requiresPriorApproval
|
|
1711
|
-
})),
|
|
1712
|
-
let e =
|
|
1711
|
+
})), E = A(() => {
|
|
1712
|
+
let e = T.value;
|
|
1713
1713
|
return e === null || e === a.APPROVED ? null : e;
|
|
1714
|
-
}), Ae = A(() =>
|
|
1714
|
+
}), Ae = A(() => E.value === null ? null : t.t("wise_invoicing.invoice.finalize.blocked_by_approval", { status: t.t(ke.getMetadata(E.value).translationKey) })), je = A(() => C.value.isEditable && !e.value.requiresPriorApproval), Me = A(() => C.value.isEditable && e.value.requiresPriorApproval && !e.value.hasApprovalHistory), Ne = A(() => C.value.isEditable && e.value.requiresPriorApproval && (T.value !== a.APPROVED || e.value.hasChangesSinceApprovalSent)), Pe = A(() => Ne.value && w("finalize") && !e.value.hasApprovalHistory), Ie = A(() => C.value.isEditable && e.value.approval !== null && ke.canMarkAsApproved(e.value.approval.status)), Le = A(() => C.value.isEditable && e.value.approvalUuid !== null && br.has(T.value)), Re = A(() => T.value === a.APPROVED && e.value.hasChangesSinceApprovalSent), ze = A(() => C.value.isEditable && e.value.approval?.status === i.REQUESTED);
|
|
1715
1715
|
async function Be() {
|
|
1716
1716
|
e.value.approvalUuid !== null && await g.open({
|
|
1717
1717
|
approvalUuid: e.value.approvalUuid,
|
|
@@ -1727,8 +1727,8 @@ function xr(e) {
|
|
|
1727
1727
|
}
|
|
1728
1728
|
});
|
|
1729
1729
|
}
|
|
1730
|
-
async function
|
|
1731
|
-
await
|
|
1730
|
+
async function He() {
|
|
1731
|
+
await xr(e.value.approvalProFormaFile);
|
|
1732
1732
|
}
|
|
1733
1733
|
async function We() {
|
|
1734
1734
|
e.value.approvalUuid !== null && await u.open({
|
|
@@ -1743,13 +1743,13 @@ function xr(e) {
|
|
|
1743
1743
|
});
|
|
1744
1744
|
}
|
|
1745
1745
|
async function Ke() {
|
|
1746
|
-
let r = await
|
|
1746
|
+
let r = await he.execute({ params: {
|
|
1747
1747
|
invoiceUuid: e.value.uuid,
|
|
1748
1748
|
hasActiveApproval: e.value.approval !== null
|
|
1749
1749
|
} });
|
|
1750
1750
|
if (r.isErr()) {
|
|
1751
1751
|
let i = s.getCustomerDetailRoute(e.value.customer.uuid);
|
|
1752
|
-
if (
|
|
1752
|
+
if (wt.isExpectedApiError(r.error) && wt.getApiErrorCode(r.error) === yr) {
|
|
1753
1753
|
n.show({
|
|
1754
1754
|
link: i === null ? void 0 : {
|
|
1755
1755
|
label: t.t("wise_invoicing.invoice.send_approval.view_customer_action"),
|
|
@@ -1769,7 +1769,7 @@ function xr(e) {
|
|
|
1769
1769
|
}) });
|
|
1770
1770
|
}
|
|
1771
1771
|
async function qe() {
|
|
1772
|
-
let r = await
|
|
1772
|
+
let r = await oe.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
1773
1773
|
if (r.isErr()) {
|
|
1774
1774
|
n.apiError(r.error);
|
|
1775
1775
|
return;
|
|
@@ -1777,15 +1777,15 @@ function xr(e) {
|
|
|
1777
1777
|
n.show({ message: t.t("wise_invoicing.invoice.mark_as_needs_approval.success") });
|
|
1778
1778
|
}
|
|
1779
1779
|
async function Je() {
|
|
1780
|
-
let r = await
|
|
1780
|
+
let r = await ge.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
1781
1781
|
if (r.isErr()) {
|
|
1782
1782
|
n.apiError(r.error);
|
|
1783
1783
|
return;
|
|
1784
1784
|
}
|
|
1785
1785
|
n.show({ message: t.t("wise_invoicing.invoice.unmark_as_needs_approval.success") });
|
|
1786
1786
|
}
|
|
1787
|
-
|
|
1788
|
-
|
|
1787
|
+
Ct(() => e.value.isDisputed, (e) => {
|
|
1788
|
+
S.value === e && (S.value = null);
|
|
1789
1789
|
});
|
|
1790
1790
|
async function Ye() {
|
|
1791
1791
|
let r = await re.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
@@ -1808,12 +1808,12 @@ function xr(e) {
|
|
|
1808
1808
|
Ke();
|
|
1809
1809
|
},
|
|
1810
1810
|
onViewProForma: () => {
|
|
1811
|
-
|
|
1811
|
+
He();
|
|
1812
1812
|
}
|
|
1813
1813
|
});
|
|
1814
1814
|
return;
|
|
1815
1815
|
}
|
|
1816
|
-
if (
|
|
1816
|
+
if (be.value) {
|
|
1817
1817
|
await Ye();
|
|
1818
1818
|
return;
|
|
1819
1819
|
}
|
|
@@ -1823,7 +1823,7 @@ function xr(e) {
|
|
|
1823
1823
|
});
|
|
1824
1824
|
}
|
|
1825
1825
|
async function Ze() {
|
|
1826
|
-
let r = await
|
|
1826
|
+
let r = await le.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
1827
1827
|
if (r.isErr()) {
|
|
1828
1828
|
n.apiError(r.error);
|
|
1829
1829
|
return;
|
|
@@ -1831,7 +1831,7 @@ function xr(e) {
|
|
|
1831
1831
|
n.show({ message: t.t("wise_invoicing.invoice.mark_as_ready.success") });
|
|
1832
1832
|
}
|
|
1833
1833
|
async function Qe() {
|
|
1834
|
-
let r = await
|
|
1834
|
+
let r = await ie.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
1835
1835
|
if (r.isErr()) {
|
|
1836
1836
|
n.apiError(r.error);
|
|
1837
1837
|
return;
|
|
@@ -1839,7 +1839,7 @@ function xr(e) {
|
|
|
1839
1839
|
n.show({ message: t.t("wise_invoicing.invoice.mark_as_draft.success") });
|
|
1840
1840
|
}
|
|
1841
1841
|
async function $e() {
|
|
1842
|
-
let r = await
|
|
1842
|
+
let r = await ae.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
1843
1843
|
if (r.isErr()) {
|
|
1844
1844
|
n.apiError(r.error);
|
|
1845
1845
|
return;
|
|
@@ -1847,19 +1847,19 @@ function xr(e) {
|
|
|
1847
1847
|
n.show({ message: t.t("wise_invoicing.invoice.mark_as_paid.success") });
|
|
1848
1848
|
}
|
|
1849
1849
|
async function et() {
|
|
1850
|
-
|
|
1851
|
-
let r = await
|
|
1850
|
+
S.value = !0;
|
|
1851
|
+
let r = await ce.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
1852
1852
|
if (r.isErr()) {
|
|
1853
|
-
|
|
1853
|
+
S.value = null, n.apiError(r.error);
|
|
1854
1854
|
return;
|
|
1855
1855
|
}
|
|
1856
1856
|
n.show({ message: t.t("wise_invoicing.invoice.mark_as_disputed.success") });
|
|
1857
1857
|
}
|
|
1858
1858
|
async function tt() {
|
|
1859
|
-
|
|
1860
|
-
let r = await
|
|
1859
|
+
S.value = !1;
|
|
1860
|
+
let r = await _e.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
1861
1861
|
if (r.isErr()) {
|
|
1862
|
-
|
|
1862
|
+
S.value = null, n.apiError(r.error);
|
|
1863
1863
|
return;
|
|
1864
1864
|
}
|
|
1865
1865
|
n.show({ message: t.t("wise_invoicing.invoice.withdraw_dispute.success") });
|
|
@@ -1870,7 +1870,7 @@ function xr(e) {
|
|
|
1870
1870
|
n.apiError(r.error);
|
|
1871
1871
|
return;
|
|
1872
1872
|
}
|
|
1873
|
-
|
|
1873
|
+
Fe.reflectBulkAction([e.value.uuid], { deliveryStatus: d.SENT }), n.show({ message: t.t("wise_invoicing.invoice.send.success") });
|
|
1874
1874
|
}
|
|
1875
1875
|
async function rt() {
|
|
1876
1876
|
await l.open({ invoice: e.value });
|
|
@@ -1886,10 +1886,10 @@ function xr(e) {
|
|
|
1886
1886
|
n.show({ message: t.t("wise_invoicing.invoice.download_pdf.generation_in_progress") });
|
|
1887
1887
|
return;
|
|
1888
1888
|
}
|
|
1889
|
-
let a = await
|
|
1890
|
-
a !== null &&
|
|
1889
|
+
let a = await ct.getDownloadUrl(i.uuid);
|
|
1890
|
+
a !== null && se.downloadUrl(a, i.name);
|
|
1891
1891
|
}
|
|
1892
|
-
async function
|
|
1892
|
+
async function at() {
|
|
1893
1893
|
let i = await ne.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
1894
1894
|
if (i.isErr()) {
|
|
1895
1895
|
n.apiError(i.error);
|
|
@@ -1908,7 +1908,7 @@ function xr(e) {
|
|
|
1908
1908
|
message: t.t("wise_invoicing.invoice.duplicate.success")
|
|
1909
1909
|
});
|
|
1910
1910
|
}
|
|
1911
|
-
async function
|
|
1911
|
+
async function st() {
|
|
1912
1912
|
let i = await te.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
1913
1913
|
if (i.isErr()) {
|
|
1914
1914
|
n.apiError(i.error);
|
|
@@ -1930,7 +1930,7 @@ function xr(e) {
|
|
|
1930
1930
|
let pt = A(() => [
|
|
1931
1931
|
{
|
|
1932
1932
|
isLoading: v.isLoading.value,
|
|
1933
|
-
iconLeft:
|
|
1933
|
+
iconLeft: x,
|
|
1934
1934
|
key: "send",
|
|
1935
1935
|
label: t.t("wise_invoicing.invoice.detail.actions.send"),
|
|
1936
1936
|
variant: "primary",
|
|
@@ -1938,62 +1938,62 @@ function xr(e) {
|
|
|
1938
1938
|
onClick: nt
|
|
1939
1939
|
},
|
|
1940
1940
|
{
|
|
1941
|
-
isLoading:
|
|
1942
|
-
iconRight:
|
|
1941
|
+
isLoading: le.isLoading.value,
|
|
1942
|
+
iconRight: ye,
|
|
1943
1943
|
key: "markAsReady",
|
|
1944
1944
|
label: t.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
|
|
1945
|
-
visible:
|
|
1945
|
+
visible: w("markAsReady"),
|
|
1946
1946
|
onClick: Ze
|
|
1947
1947
|
},
|
|
1948
1948
|
{
|
|
1949
1949
|
isLoading: !1,
|
|
1950
|
-
iconLeft:
|
|
1950
|
+
iconLeft: ve,
|
|
1951
1951
|
key: "markAsApproved",
|
|
1952
1952
|
label: t.t("wise_invoicing.invoice.detail.actions.mark_as_approved"),
|
|
1953
1953
|
visible: Ie.value,
|
|
1954
1954
|
onClick: We
|
|
1955
1955
|
},
|
|
1956
1956
|
{
|
|
1957
|
-
isLoading:
|
|
1958
|
-
iconLeft:
|
|
1957
|
+
isLoading: he.isLoading.value,
|
|
1958
|
+
iconLeft: x,
|
|
1959
1959
|
key: "sendApprovalRequest",
|
|
1960
1960
|
label: t.t("wise_invoicing.invoice.detail.actions.send_approval_request"),
|
|
1961
1961
|
variant: "primary",
|
|
1962
|
-
visible:
|
|
1962
|
+
visible: Pe.value,
|
|
1963
1963
|
onClick: Ke
|
|
1964
1964
|
},
|
|
1965
1965
|
{
|
|
1966
|
-
isDisabled:
|
|
1966
|
+
isDisabled: E.value !== null,
|
|
1967
1967
|
isLoading: re.isLoading.value,
|
|
1968
1968
|
disabledReason: Ae.value,
|
|
1969
|
-
iconLeft:
|
|
1969
|
+
iconLeft: xe,
|
|
1970
1970
|
key: "finalize",
|
|
1971
1971
|
label: t.t("wise_invoicing.invoice.detail.actions.finalize"),
|
|
1972
|
-
variant:
|
|
1973
|
-
visible:
|
|
1972
|
+
variant: E.value === null ? "primary" : "secondary",
|
|
1973
|
+
visible: w("finalize") && !Pe.value,
|
|
1974
1974
|
onClick: Xe
|
|
1975
1975
|
}
|
|
1976
|
-
].filter((e) => e.visible)),
|
|
1976
|
+
].filter((e) => e.visible)), mt = A(() => {
|
|
1977
1977
|
let n = [
|
|
1978
1978
|
{
|
|
1979
|
-
icon:
|
|
1979
|
+
icon: we,
|
|
1980
1980
|
key: "markAsProtested",
|
|
1981
1981
|
label: t.t("wise_invoicing.invoice.detail.actions.mark_as_disputed"),
|
|
1982
|
-
visible:
|
|
1982
|
+
visible: Ee.value && !Ce.value,
|
|
1983
1983
|
onSelect: et
|
|
1984
1984
|
},
|
|
1985
1985
|
{
|
|
1986
|
-
icon:
|
|
1986
|
+
icon: ve,
|
|
1987
1987
|
key: "markAsPaid",
|
|
1988
1988
|
label: t.t("wise_invoicing.invoice.detail.actions.mark_as_paid"),
|
|
1989
|
-
visible:
|
|
1989
|
+
visible: w("markAsPaid"),
|
|
1990
1990
|
onSelect: $e
|
|
1991
1991
|
},
|
|
1992
1992
|
{
|
|
1993
|
-
icon:
|
|
1993
|
+
icon: ye,
|
|
1994
1994
|
key: "withdrawProtest",
|
|
1995
1995
|
label: t.t("wise_invoicing.invoice.detail.actions.withdraw_dispute"),
|
|
1996
|
-
visible:
|
|
1996
|
+
visible: Ee.value && Ce.value,
|
|
1997
1997
|
onSelect: tt
|
|
1998
1998
|
}
|
|
1999
1999
|
], r = [
|
|
@@ -2004,49 +2004,49 @@ function xr(e) {
|
|
|
2004
2004
|
o.PROTESTED
|
|
2005
2005
|
].includes(e.value.status), i = [
|
|
2006
2006
|
{
|
|
2007
|
-
icon:
|
|
2007
|
+
icon: De,
|
|
2008
2008
|
key: "downloadPdf",
|
|
2009
2009
|
label: t.t("wise_invoicing.common.download_pdf"),
|
|
2010
|
-
visible:
|
|
2010
|
+
visible: Te.value,
|
|
2011
2011
|
onSelect: it
|
|
2012
2012
|
},
|
|
2013
2013
|
{
|
|
2014
|
-
icon:
|
|
2014
|
+
icon: de,
|
|
2015
2015
|
key: "backToDraft",
|
|
2016
2016
|
label: t.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
|
|
2017
|
-
visible:
|
|
2017
|
+
visible: w("markAsDraft"),
|
|
2018
2018
|
onSelect: Qe
|
|
2019
2019
|
},
|
|
2020
2020
|
{
|
|
2021
|
-
icon:
|
|
2021
|
+
icon: Se,
|
|
2022
2022
|
key: "duplicate",
|
|
2023
2023
|
label: t.t("wise_invoicing.invoice.detail.actions.duplicate"),
|
|
2024
2024
|
visible: !0,
|
|
2025
|
-
onSelect:
|
|
2025
|
+
onSelect: at
|
|
2026
2026
|
},
|
|
2027
2027
|
{
|
|
2028
|
-
icon:
|
|
2028
|
+
icon: me,
|
|
2029
2029
|
key: "rejectApproval",
|
|
2030
2030
|
label: t.t("wise_invoicing.invoice.detail.actions.reject_approval"),
|
|
2031
2031
|
visible: ze.value,
|
|
2032
2032
|
onSelect: Ge
|
|
2033
2033
|
},
|
|
2034
2034
|
{
|
|
2035
|
-
icon:
|
|
2035
|
+
icon: x,
|
|
2036
2036
|
key: "sendApprovalRequest",
|
|
2037
2037
|
label: t.t("wise_invoicing.invoice.detail.actions.send_approval_request"),
|
|
2038
|
-
visible: Ne.value && !
|
|
2038
|
+
visible: Ne.value && !Pe.value,
|
|
2039
2039
|
onSelect: Ke
|
|
2040
2040
|
},
|
|
2041
2041
|
{
|
|
2042
|
-
icon:
|
|
2042
|
+
icon: Oe,
|
|
2043
2043
|
key: "markAsNeedsApproval",
|
|
2044
2044
|
label: t.t("wise_invoicing.invoice.detail.actions.mark_as_needs_approval"),
|
|
2045
2045
|
visible: je.value,
|
|
2046
2046
|
onSelect: qe
|
|
2047
2047
|
},
|
|
2048
2048
|
{
|
|
2049
|
-
icon:
|
|
2049
|
+
icon: de,
|
|
2050
2050
|
key: "unmarkAsNeedsApproval",
|
|
2051
2051
|
label: t.t("wise_invoicing.invoice.detail.actions.unmark_as_needs_approval"),
|
|
2052
2052
|
visible: Me.value,
|
|
@@ -2054,24 +2054,24 @@ function xr(e) {
|
|
|
2054
2054
|
}
|
|
2055
2055
|
], a = [
|
|
2056
2056
|
{
|
|
2057
|
-
icon:
|
|
2057
|
+
icon: pe,
|
|
2058
2058
|
key: "archiveApproval",
|
|
2059
2059
|
label: t.t("wise_invoicing.invoice.detail.actions.archive_approval"),
|
|
2060
2060
|
visible: Le.value,
|
|
2061
2061
|
onSelect: Be
|
|
2062
2062
|
},
|
|
2063
2063
|
{
|
|
2064
|
-
icon:
|
|
2064
|
+
icon: ue,
|
|
2065
2065
|
key: "createCreditNote",
|
|
2066
2066
|
label: t.t("wise_invoicing.invoice.detail.header.cancel_with_credit_note"),
|
|
2067
2067
|
visible: r,
|
|
2068
|
-
onSelect:
|
|
2068
|
+
onSelect: st
|
|
2069
2069
|
},
|
|
2070
2070
|
{
|
|
2071
|
-
icon:
|
|
2071
|
+
icon: fe,
|
|
2072
2072
|
key: "delete",
|
|
2073
2073
|
label: t.t("wise_invoicing.invoice.detail.actions.delete"),
|
|
2074
|
-
visible:
|
|
2074
|
+
visible: C.value.isEditable,
|
|
2075
2075
|
onSelect: rt
|
|
2076
2076
|
}
|
|
2077
2077
|
];
|
|
@@ -2091,41 +2091,41 @@ function xr(e) {
|
|
|
2091
2091
|
].filter((e) => e.items.length > 0);
|
|
2092
2092
|
});
|
|
2093
2093
|
return {
|
|
2094
|
-
isActionMenuVisible: A(() =>
|
|
2095
|
-
isDisputed:
|
|
2096
|
-
menuGroups:
|
|
2094
|
+
isActionMenuVisible: A(() => mt.value.length > 0),
|
|
2095
|
+
isDisputed: Ce,
|
|
2096
|
+
menuGroups: mt,
|
|
2097
2097
|
primaryButtons: pt,
|
|
2098
2098
|
onRevertApprovalChanges: Ve,
|
|
2099
2099
|
onSendApprovalRequest: Ke,
|
|
2100
|
-
onViewProForma:
|
|
2100
|
+
onViewProForma: He
|
|
2101
2101
|
};
|
|
2102
2102
|
}
|
|
2103
2103
|
//#endregion
|
|
2104
2104
|
//#region src/modules/invoice/use-cases/detail/views/InvoiceDetailView.vue
|
|
2105
|
-
var
|
|
2105
|
+
var Cr = /* @__PURE__ */ I({
|
|
2106
2106
|
__name: "InvoiceDetailView",
|
|
2107
2107
|
props: {
|
|
2108
2108
|
customFieldDefinitions: {},
|
|
2109
2109
|
invoice: {}
|
|
2110
2110
|
},
|
|
2111
2111
|
setup(e) {
|
|
2112
|
-
let t = e, n = O(), r =
|
|
2112
|
+
let t = e, n = O(), r = yt(!1), i = A(() => ae.filterByView(t.customFieldDefinitions, re.INVOICE_DETAIL)), { isDisputed: a, menuGroups: o, primaryButtons: s, onRevertApprovalChanges: c, onSendApprovalRequest: l, onViewProForma: u } = Sr(A(() => t.invoice)), d = A(() => [{
|
|
2113
2113
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
2114
2114
|
to: { name: "invoicing-invoice-overview" }
|
|
2115
2115
|
}, { label: t.invoice.sequence ?? t.invoice.subject ?? n.t("wise_invoicing.invoice.detail.fallback_title") }]);
|
|
2116
|
-
return (e,
|
|
2116
|
+
return (e, f) => (R(), j(tt, {
|
|
2117
2117
|
"billing-document": t.invoice,
|
|
2118
|
-
breadcrumbs:
|
|
2118
|
+
breadcrumbs: d.value,
|
|
2119
2119
|
title: B(n).t("wise_invoicing.invoice.detail.fallback_title")
|
|
2120
2120
|
}, {
|
|
2121
|
-
header: V(() => [F(
|
|
2121
|
+
header: V(() => [F(xn, {
|
|
2122
2122
|
invoice: t.invoice,
|
|
2123
|
-
"is-disputed": B(
|
|
2124
|
-
"menu-groups": B(
|
|
2125
|
-
"primary-buttons": B(
|
|
2123
|
+
"is-disputed": B(a),
|
|
2124
|
+
"menu-groups": B(o),
|
|
2125
|
+
"primary-buttons": B(s),
|
|
2126
2126
|
"is-pdf-view-active": r.value,
|
|
2127
2127
|
class: "w-full",
|
|
2128
|
-
onTogglePdfView:
|
|
2128
|
+
onTogglePdfView: f[0] ||= (e) => r.value = !r.value
|
|
2129
2129
|
}, null, 8, [
|
|
2130
2130
|
"invoice",
|
|
2131
2131
|
"is-disputed",
|
|
@@ -2133,16 +2133,16 @@ var Sr = /* @__PURE__ */ I({
|
|
|
2133
2133
|
"primary-buttons",
|
|
2134
2134
|
"is-pdf-view-active"
|
|
2135
2135
|
])]),
|
|
2136
|
-
default: V(() => [B(
|
|
2136
|
+
default: V(() => [B(b).isEditable(t.invoice.status) ? (R(), j(gn, {
|
|
2137
2137
|
key: 0,
|
|
2138
2138
|
approval: t.invoice.approval,
|
|
2139
2139
|
"is-out-of-sync": t.invoice.hasChangesSinceApprovalSent,
|
|
2140
2140
|
"pro-forma-file": t.invoice.approvalProFormaFile,
|
|
2141
2141
|
rejection: t.invoice.rejection,
|
|
2142
2142
|
class: "w-full",
|
|
2143
|
-
onRevertChanges: B(
|
|
2144
|
-
onSendNewRequest: B(
|
|
2145
|
-
onViewProForma: B(
|
|
2143
|
+
onRevertChanges: B(c),
|
|
2144
|
+
onSendNewRequest: B(l),
|
|
2145
|
+
onViewProForma: B(u)
|
|
2146
2146
|
}, null, 8, [
|
|
2147
2147
|
"approval",
|
|
2148
2148
|
"is-out-of-sync",
|
|
@@ -2151,31 +2151,31 @@ var Sr = /* @__PURE__ */ I({
|
|
|
2151
2151
|
"onRevertChanges",
|
|
2152
2152
|
"onSendNewRequest",
|
|
2153
2153
|
"onViewProForma"
|
|
2154
|
-
])) : M("", !0), r.value ? (R(), j(
|
|
2154
|
+
])) : M("", !0), r.value ? (R(), j(Qe, {
|
|
2155
2155
|
key: 1,
|
|
2156
2156
|
"billing-document": t.invoice,
|
|
2157
2157
|
class: "w-full"
|
|
2158
2158
|
}, null, 8, ["billing-document"])) : (R(), N(k, { key: 2 }, [
|
|
2159
|
-
F(
|
|
2160
|
-
"custom-field-definitions":
|
|
2159
|
+
F(tr, {
|
|
2160
|
+
"custom-field-definitions": i.value,
|
|
2161
2161
|
invoice: t.invoice
|
|
2162
2162
|
}, null, 8, ["custom-field-definitions", "invoice"]),
|
|
2163
|
-
B(
|
|
2163
|
+
B(b).isEditable(t.invoice.status) ? M("", !0) : (R(), j(Yn, {
|
|
2164
2164
|
key: 0,
|
|
2165
2165
|
invoice: t.invoice,
|
|
2166
2166
|
class: "w-full"
|
|
2167
2167
|
}, null, 8, ["invoice"])),
|
|
2168
|
-
F(
|
|
2168
|
+
F(Cn, {
|
|
2169
2169
|
invoice: t.invoice,
|
|
2170
2170
|
class: "w-full"
|
|
2171
2171
|
}, null, 8, ["invoice"]),
|
|
2172
|
-
F(
|
|
2172
|
+
F(Tn, {
|
|
2173
2173
|
invoice: t.invoice,
|
|
2174
2174
|
class: "w-full"
|
|
2175
2175
|
}, null, 8, ["invoice"])
|
|
2176
2176
|
], 64))]),
|
|
2177
|
-
sidebar: V(() => [F(
|
|
2178
|
-
"custom-field-definitions":
|
|
2177
|
+
sidebar: V(() => [F(Ln, {
|
|
2178
|
+
"custom-field-definitions": i.value,
|
|
2179
2179
|
invoice: t.invoice
|
|
2180
2180
|
}, null, 8, ["custom-field-definitions", "invoice"])]),
|
|
2181
2181
|
_: 1
|
|
@@ -2185,20 +2185,20 @@ var Sr = /* @__PURE__ */ I({
|
|
|
2185
2185
|
"title"
|
|
2186
2186
|
]));
|
|
2187
2187
|
}
|
|
2188
|
-
}),
|
|
2188
|
+
}), wr = /* @__PURE__ */ I({
|
|
2189
2189
|
__name: "InvoiceDetailViewDataProvider",
|
|
2190
2190
|
props: { invoiceUuid: {} },
|
|
2191
2191
|
setup(e) {
|
|
2192
2192
|
let t = e, n = O(), r = A(() => [{
|
|
2193
2193
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
2194
2194
|
to: { name: "invoicing-invoice-overview" }
|
|
2195
|
-
}]), i =
|
|
2196
|
-
return (e, t) => (R(), j(
|
|
2195
|
+
}]), i = pt(A(() => t.invoiceUuid)), a = ie();
|
|
2196
|
+
return (e, t) => (R(), j(rt, {
|
|
2197
2197
|
"custom-field-definitions-query": B(a),
|
|
2198
2198
|
query: B(i),
|
|
2199
2199
|
"loading-breadcrumbs": r.value
|
|
2200
2200
|
}, {
|
|
2201
|
-
default: V(({ billingDocument: e, customFieldDefinitions: t }) => [F(
|
|
2201
|
+
default: V(({ billingDocument: e, customFieldDefinitions: t }) => [F(Cr, {
|
|
2202
2202
|
"custom-field-definitions": t,
|
|
2203
2203
|
invoice: e
|
|
2204
2204
|
}, null, 8, ["custom-field-definitions", "invoice"])]),
|
|
@@ -2211,4 +2211,4 @@ var Sr = /* @__PURE__ */ I({
|
|
|
2211
2211
|
}
|
|
2212
2212
|
});
|
|
2213
2213
|
//#endregion
|
|
2214
|
-
export {
|
|
2214
|
+
export { wr as default };
|