@wisemen/wise-invoicing-web 0.0.6 → 0.0.7
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/{BillingDocumentDetailViewDataProvider-BGE-p_FL.js → BillingDocumentDetailViewDataProvider-CmHbMXp0.js} +463 -469
- package/dist/{BillingDocumentPdf-Ca81NkZq.js → BillingDocumentPdf-Dj_s1l_p.js} +2 -2
- package/dist/{CreditNoteDetailViewDataProvider-b5dY_4mH.js → CreditNoteDetailViewDataProvider-DPePmzgn.js} +68 -68
- package/dist/{CreditNotePdfViewDataProvider-C2QqCdQ7.js → CreditNotePdfViewDataProvider-Dp0zI0fB.js} +2 -2
- package/dist/{CustomFieldValueText-ne5yy02J.js → CustomFieldValueText-BGbQwhON.js} +1 -1
- package/dist/{DunningCaseDetailViewDataProvider-jsh-LlGx.js → DunningCaseDetailViewDataProvider-CInwZwMc.js} +4 -4
- package/dist/{DunningCaseOverviewView-WbXalMt6.js → DunningCaseOverviewView-DvOmEcJY.js} +4 -4
- package/dist/DunningCaseReminderPdfViewDataProvider-I0I_WQQB.js +490 -0
- package/dist/{DunningCaseSendDialog-D7jAZ8yT.js → DunningCaseSendDialog-DISQ1Fs3.js} +2 -2
- package/dist/{InvoiceDetailViewDataProvider-BAVdcJay.js → InvoiceDetailViewDataProvider-YOlvUavt.js} +411 -411
- package/dist/{InvoiceOverviewViewDataProvider-BT9cuQXw.js → InvoiceOverviewViewDataProvider-i8tXATJE.js} +47 -47
- package/dist/{InvoicePdfView-BpIaYdZX.js → InvoicePdfView-Desmlys1.js} +1 -1
- package/dist/{InvoicePdfViewDataProvider-DGCnmNE-.js → InvoicePdfViewDataProvider--CHm0HAM.js} +2 -2
- package/dist/{InvoicePublicPdfViewDataProvider-KV0_hKUI.js → InvoicePublicPdfViewDataProvider-DoNBZsmi.js} +3 -3
- package/dist/{IssuerSettingsViewDataProvider-Bs4rEES2.js → IssuerSettingsViewDataProvider-COqHGUE6.js} +1 -1
- package/dist/{ReminderSettingsViewDataProvider-D4bRLLXx.js → ReminderSettingsViewDataProvider-Dys4bUU7.js} +2 -2
- package/dist/{address.transformer-B8C0pwT1.js → address.transformer-jGddczLV.js} +2 -73
- package/dist/{billingDocumentDetail.transformer-DIKAl4_L.js → billingDocumentDetail.transformer-BBn9R_cx.js} +32 -42
- package/dist/{creditNoteDetail.query-DHP69UiB.js → creditNoteDetail.query-BcPsB96h.js} +11 -11
- package/dist/customFieldValue.util-BwsX8exl.js +16 -0
- package/dist/{dist-PErDVE6-.js → dist-BBjpqvUl.js} +2 -2
- package/dist/dist-BFx8U4Su.js +72 -0
- package/dist/{dist-YTXTCfo1.js → dist-boJIIxnT.js} +1 -1
- package/dist/{i18n.lib-BGcQ_OBF.js → i18n.lib-C6eb-F-e.js} +28 -4
- package/dist/index.d.ts +30 -1
- package/dist/index.js +186 -185
- package/dist/instant.transformer-KmBsH3E9.js +18 -0
- package/dist/{invoice.service-DG5eacZC.js → invoice.service-Bb8VqQvc.js} +38 -32
- package/dist/{invoiceDeliveryStatus.util-CX-IdqAu.js → invoiceDeliveryStatus.util-BPkGCQM6.js} +2 -2
- package/dist/{invoiceDetail.query-C_IMGjOX.js → invoiceDetail.query-Cek8nyaw.js} +1 -1
- package/dist/{invoicingConfig.composable-Kad_HHx_.js → invoicingConfig.composable-D8HuO3Sl.js} +1 -1
- package/dist/{issuerSettings.query-6wnSPphB.js → issuerSettings.query-Bvz-Oj5D.js} +13 -12
- package/dist/libs/i18n.lib.d.ts +24 -0
- package/dist/locales/en-US.json.d.ts +14 -2
- package/dist/locales/nl-BE.json.d.ts +14 -2
- package/dist/modules/dunning-case/models/dunningCaseReminderPdf.model.d.ts +49 -0
- package/dist/modules/dunning-case/models/dunningCaseReminderPdf.transformer.d.ts +8 -0
- package/dist/modules/dunning-case/models/dunningCaseReminderPdf.transformer.spec.d.ts +1 -0
- package/dist/modules/dunning-case/test/builders/dunningCaseReminderPdfDto.builder.d.ts +27 -0
- package/dist/modules/dunning-case/use-cases/pdf/api/dunningCaseReminderPdf.query.d.ts +1 -1
- package/dist/modules/dunning-case/use-cases/pdf/api/dunningCaseReminderPdf.service.d.ts +2 -2
- package/dist/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfFooter.vue.d.ts +2 -2
- package/dist/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfHeader.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfTable.vue.d.ts +10 -16
- package/dist/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfTotals.vue.d.ts +7 -0
- package/dist/modules/dunning-case/use-cases/pdf/utils/dunningCaseReminderPdf.util.d.ts +15 -6
- package/dist/modules/dunning-case/use-cases/pdf/views/DunningCaseReminderPdfView.vue.d.ts +2 -2
- package/dist/modules/invoice/api/mutations/invoiceUpdate.mutation.d.ts +1 -1
- package/dist/modules/invoice/api/queries/invoicePublicDetail.query.d.ts +1 -1
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +4 -0
- package/dist/percentage.util-Bl78kSSk.js +35 -0
- package/dist/{plainDate.transformer-Dfe5r84P.js → plainDate.transformer-BxvJpJOv.js} +1 -32
- package/dist/{reminderConfig.query-hmDNKreg.js → reminderConfig.query-DsJNqqi7.js} +8 -7
- package/dist/style.css +1 -1
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +432 -432
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +36 -36
- package/package.json +1 -1
- package/dist/DunningCaseReminderPdfViewDataProvider-B3Y2aYFf.js +0 -239
- package/dist/download.util-PjaUQR6r.js +0 -9
package/dist/{InvoiceDetailViewDataProvider-BAVdcJay.js → InvoiceDetailViewDataProvider-YOlvUavt.js}
RENAMED
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { t as e } from "./i18n.lib-
|
|
1
|
+
import { t as e } from "./i18n.lib-C6eb-F-e.js";
|
|
2
2
|
import { Y as t, t as n } from "./api.util-BCSgCfpS.js";
|
|
3
3
|
import { a as r, h as i, l as a, m as o, o as s, p as c, r as l, v as u } from "./documentTitle.composable-4ApFl9TZ.js";
|
|
4
4
|
import { r as d } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
5
5
|
import { t as f } from "./search.composable-BCtYqudV.js";
|
|
6
|
-
import { a as p, i as m, n as h, o as g, t as _ } from "./invoice.service-
|
|
7
|
-
import {
|
|
8
|
-
import { n as
|
|
9
|
-
import {
|
|
10
|
-
import { D as ee, I as
|
|
11
|
-
import { n as
|
|
12
|
-
import { i as
|
|
13
|
-
import { t as
|
|
14
|
-
import { a as
|
|
15
|
-
import { t as
|
|
16
|
-
import { C as
|
|
17
|
-
import { t as
|
|
18
|
-
import { RouterLink as
|
|
19
|
-
import
|
|
20
|
-
import { useI18n as
|
|
21
|
-
import { Fragment as
|
|
22
|
-
import { useKeysetInfiniteQuery as
|
|
23
|
-
import { Temporal as
|
|
24
|
-
import { UIAutocomplete as
|
|
6
|
+
import { a as p, i as m, n as h, o as g, t as _ } from "./invoice.service-Bb8VqQvc.js";
|
|
7
|
+
import { n as v, t as y } from "./customFieldValue.util-BwsX8exl.js";
|
|
8
|
+
import { n as b } from "./invoicingConfig.composable-D8HuO3Sl.js";
|
|
9
|
+
import { n as x } from "./address.transformer-jGddczLV.js";
|
|
10
|
+
import { D as ee, I as S, M as te, O as ne, Q as re, W as ie, X as C, f as ae, g as oe, h as se, i as ce, j as le, l as w, t as ue, tt as de, v as fe, w as pe } from "./dist-D9lp7NDv.js";
|
|
11
|
+
import { n as T, t as E } from "./dist-boJIIxnT.js";
|
|
12
|
+
import { i as D, n as me, r as he } from "./CustomFieldValueText-BGbQwhON.js";
|
|
13
|
+
import { t as O } from "./formango.util-D5c2ql--.js";
|
|
14
|
+
import { a as ge, c as _e, i as ve, n as ye, o as be, r as xe, s as Se, t as Ce, u as we } from "./invoiceDeliveryStatus.util-BPkGCQM6.js";
|
|
15
|
+
import { t as Te } from "./issuerSettings.query-Bvz-Oj5D.js";
|
|
16
|
+
import { C as Ee, S as De, _ as Oe, a as ke, b as Ae, c as je, d as Me, f as Ne, g as Pe, h as Fe, i as Ie, l as Le, m as Re, n as ze, o as Be, p as Ve, r as He, s as Ue, t as We, u as Ge, v as Ke, w as qe, x as Je, y as Ye } from "./BillingDocumentDetailViewDataProvider-CmHbMXp0.js";
|
|
17
|
+
import { t as Xe } from "./invoiceDetail.query-Cek8nyaw.js";
|
|
18
|
+
import { RouterLink as Ze, useRouter as Qe } from "vue-router";
|
|
19
|
+
import $e, { z as k } from "zod";
|
|
20
|
+
import { useI18n as A } from "vue-i18n";
|
|
21
|
+
import { Fragment as j, computed as M, createBlock as N, createCommentVNode as P, createElementBlock as F, createElementVNode as I, createSlots as et, createVNode as L, defineComponent as R, mergeModels as tt, mergeProps as z, openBlock as B, ref as nt, renderList as rt, toDisplayString as it, unref as V, useModel as at, watch as ot, withCtx as H } from "vue";
|
|
22
|
+
import { useKeysetInfiniteQuery as st, useMutation as U, useOffsetInfiniteQuery as ct, useQuery as lt } from "@wisemen/vue-core-api-utils";
|
|
23
|
+
import { Temporal as ut } from "temporal-polyfill";
|
|
24
|
+
import { UIAutocomplete as dt, UIBadge as W, UIBadgeLabel as ft, UIBadgeSeparator as pt, UIButton as mt, UIColumnLayout as ht, UIConfirmDialog as gt, UIDateField as G, UIDetailList as _t, UIDetailListGroup as vt, UIDetailListGroupItem as K, UIDetailListGroupItemLabel as q, UIDetailListGroupItemValueText as J, UIDetailListGroupSeparator as yt, UIDialogBody as bt, UIDialogFooter as xt, UIDialogFooterCancel as St, UIDialogFooterSubmit as Ct, UIDialogHeader as wt, UIForm as Tt, UIFormDialog as Et, UIFormFieldGrid as Dt, UIFormFieldGroup as Ot, UIFormSubmitButton as kt, UIIconButton as At, UINumberField as jt, UIRowLayout as Y, UISelect as Mt, UITable as Nt, UITableCell as Pt, UITableCellInteractiveElement as Ft, UIText as X, UITextField as It, createAutocompleteOptions as Lt, createComponent as Z, createSelectOptions as Rt, defineTableColumns as zt, useOverlay as Bt, useToast as Q } from "@wisemen/vue-core-design-system";
|
|
25
25
|
import { useForm as $ } from "formango";
|
|
26
26
|
//#region src/modules/invoice/api/mutations/invoiceUpdate.mutation.ts
|
|
27
27
|
function Vt() {
|
|
28
|
-
return
|
|
28
|
+
return U({
|
|
29
29
|
queryFn: (e) => _.update(e.params.invoiceUuid, e.body),
|
|
30
30
|
queryKeysToInvalidate: {
|
|
31
31
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -35,15 +35,15 @@ function Vt() {
|
|
|
35
35
|
}
|
|
36
36
|
//#endregion
|
|
37
37
|
//#region src/modules/invoice/components/InvoiceDeliveryStatusBadge.vue
|
|
38
|
-
var Ht = /* @__PURE__ */
|
|
38
|
+
var Ht = /* @__PURE__ */ R({
|
|
39
39
|
__name: "InvoiceDeliveryStatusBadge",
|
|
40
40
|
props: {
|
|
41
41
|
deliveryStatus: {},
|
|
42
42
|
size: { default: "sm" }
|
|
43
43
|
},
|
|
44
44
|
setup(e) {
|
|
45
|
-
let t = e, n =
|
|
46
|
-
return (e, n) => (
|
|
45
|
+
let t = e, n = A(), r = M(() => Ce.getMetadata(t.deliveryStatus)), i = M(() => n.t(r.value.translationKey));
|
|
46
|
+
return (e, n) => (B(), N(V(W), {
|
|
47
47
|
label: i.value,
|
|
48
48
|
color: r.value.tone,
|
|
49
49
|
size: t.size,
|
|
@@ -54,11 +54,11 @@ var Ht = /* @__PURE__ */ F({
|
|
|
54
54
|
"size"
|
|
55
55
|
]));
|
|
56
56
|
}
|
|
57
|
-
}), Ut =
|
|
57
|
+
}), Ut = k.string().nullable(), Wt = k.object({ subject: Ut });
|
|
58
58
|
//#endregion
|
|
59
59
|
//#region src/modules/invoice/api/mutations/invoiceCreateCreditNote.mutation.ts
|
|
60
60
|
function Gt() {
|
|
61
|
-
return
|
|
61
|
+
return U({
|
|
62
62
|
queryFn: (e) => _.createCreditNote(e.params.invoiceUuid),
|
|
63
63
|
queryKeysToInvalidate: {
|
|
64
64
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -69,7 +69,7 @@ function Gt() {
|
|
|
69
69
|
//#endregion
|
|
70
70
|
//#region src/modules/invoice/api/mutations/invoiceDuplicate.mutation.ts
|
|
71
71
|
function Kt() {
|
|
72
|
-
return
|
|
72
|
+
return U({
|
|
73
73
|
queryFn: (e) => _.duplicate(e.params.invoiceUuid),
|
|
74
74
|
queryKeysToInvalidate: { invoiceIndex: {} }
|
|
75
75
|
});
|
|
@@ -77,7 +77,7 @@ function Kt() {
|
|
|
77
77
|
//#endregion
|
|
78
78
|
//#region src/modules/invoice/api/mutations/invoiceFinalize.mutation.ts
|
|
79
79
|
function qt() {
|
|
80
|
-
return
|
|
80
|
+
return U({
|
|
81
81
|
queryFn: (e) => _.finalize(e.params.invoiceUuid),
|
|
82
82
|
queryKeysToInvalidate: {
|
|
83
83
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -88,7 +88,7 @@ function qt() {
|
|
|
88
88
|
//#endregion
|
|
89
89
|
//#region src/modules/invoice/api/mutations/invoiceMarkAsDraft.mutation.ts
|
|
90
90
|
function Jt() {
|
|
91
|
-
return
|
|
91
|
+
return U({
|
|
92
92
|
queryFn: (e) => _.markAsDraft(e.params.invoiceUuid),
|
|
93
93
|
queryKeysToInvalidate: {
|
|
94
94
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -99,7 +99,7 @@ function Jt() {
|
|
|
99
99
|
//#endregion
|
|
100
100
|
//#region src/modules/invoice/api/mutations/invoiceMarkAsPaid.mutation.ts
|
|
101
101
|
function Yt() {
|
|
102
|
-
return
|
|
102
|
+
return U({
|
|
103
103
|
queryFn: (e) => _.markAsPaid(e.params.invoiceUuid),
|
|
104
104
|
queryKeysToInvalidate: {
|
|
105
105
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -110,7 +110,7 @@ function Yt() {
|
|
|
110
110
|
//#endregion
|
|
111
111
|
//#region src/modules/invoice/api/mutations/invoiceMarkAsProtested.mutation.ts
|
|
112
112
|
function Xt() {
|
|
113
|
-
return
|
|
113
|
+
return U({
|
|
114
114
|
queryFn: (e) => _.markAsProtested(e.params.invoiceUuid),
|
|
115
115
|
queryKeysToInvalidate: {
|
|
116
116
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -121,7 +121,7 @@ function Xt() {
|
|
|
121
121
|
//#endregion
|
|
122
122
|
//#region src/modules/invoice/api/mutations/invoiceMarkAsReady.mutation.ts
|
|
123
123
|
function Zt() {
|
|
124
|
-
return
|
|
124
|
+
return U({
|
|
125
125
|
queryFn: (e) => _.markAsReady(e.params.invoiceUuid),
|
|
126
126
|
queryKeysToInvalidate: {
|
|
127
127
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -132,7 +132,7 @@ function Zt() {
|
|
|
132
132
|
//#endregion
|
|
133
133
|
//#region src/modules/invoice/api/mutations/invoiceSend.mutation.ts
|
|
134
134
|
function Qt() {
|
|
135
|
-
return
|
|
135
|
+
return U({
|
|
136
136
|
queryFn: (e) => _.send(e.params.invoiceUuid),
|
|
137
137
|
queryKeysToInvalidate: {
|
|
138
138
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -143,7 +143,7 @@ function Qt() {
|
|
|
143
143
|
//#endregion
|
|
144
144
|
//#region src/modules/invoice/api/mutations/invoiceWithdrawProtest.mutation.ts
|
|
145
145
|
function $t() {
|
|
146
|
-
return
|
|
146
|
+
return U({
|
|
147
147
|
queryFn: (e) => _.withdrawProtest(e.params.invoiceUuid),
|
|
148
148
|
queryKeysToInvalidate: {
|
|
149
149
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -154,20 +154,20 @@ function $t() {
|
|
|
154
154
|
//#endregion
|
|
155
155
|
//#region src/modules/invoice/api/mutations/invoiceDelete.mutation.ts
|
|
156
156
|
function en() {
|
|
157
|
-
return
|
|
157
|
+
return U({
|
|
158
158
|
queryFn: (e) => _.delete(e.params.invoiceUuid),
|
|
159
159
|
queryKeysToInvalidate: { invoiceIndex: {} }
|
|
160
160
|
});
|
|
161
161
|
}
|
|
162
162
|
//#endregion
|
|
163
163
|
//#region src/modules/invoice/use-cases/detail/dialogs/InvoiceDeleteDialog.vue
|
|
164
|
-
var tn = /* @__PURE__ */
|
|
164
|
+
var tn = /* @__PURE__ */ R({
|
|
165
165
|
__name: "InvoiceDeleteDialog",
|
|
166
166
|
props: { invoice: {} },
|
|
167
167
|
emits: ["close", "deleted"],
|
|
168
168
|
setup(e, { emit: t }) {
|
|
169
|
-
let n = e, r = t, i =
|
|
170
|
-
schema:
|
|
169
|
+
let n = e, r = t, i = A(), a = Qe(), o = Q(), s = en(), c = $({
|
|
170
|
+
schema: $e.object({}),
|
|
171
171
|
onSubmit: async () => {
|
|
172
172
|
let e = await s.execute({ params: { invoiceUuid: n.invoice.uuid } });
|
|
173
173
|
if (e.isErr()) {
|
|
@@ -177,19 +177,19 @@ var tn = /* @__PURE__ */ F({
|
|
|
177
177
|
o.show({ message: i.t("wise_invoicing.invoice.delete.success_toast") }), r("deleted"), r("close"), await a.push({ name: "invoicing-invoice-overview" });
|
|
178
178
|
}
|
|
179
179
|
});
|
|
180
|
-
return (e, t) => (
|
|
181
|
-
form:
|
|
180
|
+
return (e, t) => (B(), N(V(Et), {
|
|
181
|
+
form: V(c),
|
|
182
182
|
size: "xs",
|
|
183
183
|
onClose: t[0] ||= (e) => r("close")
|
|
184
184
|
}, {
|
|
185
|
-
default:
|
|
186
|
-
title:
|
|
187
|
-
description:
|
|
185
|
+
default: H(() => [L(V(wt), {
|
|
186
|
+
title: V(i).t("wise_invoicing.invoice.delete.title"),
|
|
187
|
+
description: V(i).t("wise_invoicing.invoice.delete.description"),
|
|
188
188
|
"is-description-visible": !0
|
|
189
|
-
}, null, 8, ["title", "description"]),
|
|
190
|
-
right:
|
|
189
|
+
}, null, 8, ["title", "description"]), L(V(xt), null, {
|
|
190
|
+
right: H(() => [L(V(St), { label: "cancel" }), L(V(Ct), {
|
|
191
191
|
"is-destructive": !0,
|
|
192
|
-
label:
|
|
192
|
+
label: V(i).t("wise_invoicing.invoice.delete.submit_button")
|
|
193
193
|
}, null, 8, ["label"])]),
|
|
194
194
|
_: 1
|
|
195
195
|
})]),
|
|
@@ -200,28 +200,28 @@ var tn = /* @__PURE__ */ F({
|
|
|
200
200
|
//#endregion
|
|
201
201
|
//#region src/modules/invoice/use-cases/detail/composables/invoiceDetailHeaderActions.composable.ts
|
|
202
202
|
function nn(e) {
|
|
203
|
-
let t =
|
|
204
|
-
function
|
|
205
|
-
return
|
|
203
|
+
let t = A(), n = Q(), r = Qe(), a = Bt(), s = a.create(tn), c = a.create(Ae), l = Qt(), u = Gt(), d = Kt(), f = qt(), p = Jt(), m = Yt(), h = Xt(), g = Zt(), y = $t(), { shouldSkipConfirmation: b } = Je(), x = nt(null), S = M(() => D.getMetadata(e.value.status)), C = M(() => x.value ?? e.value.isDisputed), se = M(() => e.value.status !== i.DRAFT && e.value.status !== i.READY), le = M(() => e.value.lifecycleStatus === o.FINALIZED);
|
|
204
|
+
function w(e) {
|
|
205
|
+
return S.value.actions.includes(e);
|
|
206
206
|
}
|
|
207
|
-
|
|
207
|
+
ot(() => e.value.isDisputed, (e) => {
|
|
208
208
|
x.value === e && (x.value = null);
|
|
209
209
|
});
|
|
210
|
-
async function
|
|
210
|
+
async function ue() {
|
|
211
211
|
let r = await f.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
212
212
|
return r.isErr() ? (n.apiError(r.error), !1) : (n.show({ message: t.t("wise_invoicing.invoice.finalize.success") }), !0);
|
|
213
213
|
}
|
|
214
|
-
async function
|
|
214
|
+
async function fe() {
|
|
215
215
|
if (b.value) {
|
|
216
|
-
await
|
|
216
|
+
await ue();
|
|
217
217
|
return;
|
|
218
218
|
}
|
|
219
219
|
await c.open({
|
|
220
220
|
billingDocumentType: "invoice",
|
|
221
|
-
onConfirm:
|
|
221
|
+
onConfirm: ue
|
|
222
222
|
});
|
|
223
223
|
}
|
|
224
|
-
async function
|
|
224
|
+
async function T() {
|
|
225
225
|
let r = await g.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
226
226
|
if (r.isErr()) {
|
|
227
227
|
n.apiError(r.error);
|
|
@@ -229,7 +229,7 @@ function nn(e) {
|
|
|
229
229
|
}
|
|
230
230
|
n.show({ message: t.t("wise_invoicing.invoice.mark_as_ready.success") });
|
|
231
231
|
}
|
|
232
|
-
async function
|
|
232
|
+
async function E() {
|
|
233
233
|
let r = await p.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
234
234
|
if (r.isErr()) {
|
|
235
235
|
n.apiError(r.error);
|
|
@@ -237,7 +237,7 @@ function nn(e) {
|
|
|
237
237
|
}
|
|
238
238
|
n.show({ message: t.t("wise_invoicing.invoice.mark_as_draft.success") });
|
|
239
239
|
}
|
|
240
|
-
async function
|
|
240
|
+
async function me() {
|
|
241
241
|
let r = await m.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
242
242
|
if (r.isErr()) {
|
|
243
243
|
n.apiError(r.error);
|
|
@@ -245,7 +245,7 @@ function nn(e) {
|
|
|
245
245
|
}
|
|
246
246
|
n.show({ message: t.t("wise_invoicing.invoice.mark_as_paid.success") });
|
|
247
247
|
}
|
|
248
|
-
async function
|
|
248
|
+
async function he() {
|
|
249
249
|
x.value = !0;
|
|
250
250
|
let r = await h.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
251
251
|
if (r.isErr()) {
|
|
@@ -254,7 +254,7 @@ function nn(e) {
|
|
|
254
254
|
}
|
|
255
255
|
n.show({ message: t.t("wise_invoicing.invoice.mark_as_disputed.success") });
|
|
256
256
|
}
|
|
257
|
-
async function
|
|
257
|
+
async function O() {
|
|
258
258
|
x.value = !1;
|
|
259
259
|
let r = await y.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
260
260
|
if (r.isErr()) {
|
|
@@ -263,7 +263,7 @@ function nn(e) {
|
|
|
263
263
|
}
|
|
264
264
|
n.show({ message: t.t("wise_invoicing.invoice.withdraw_dispute.success") });
|
|
265
265
|
}
|
|
266
|
-
async function
|
|
266
|
+
async function ge() {
|
|
267
267
|
let r = await l.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
268
268
|
if (r.isErr()) {
|
|
269
269
|
n.apiError(r.error);
|
|
@@ -271,10 +271,10 @@ function nn(e) {
|
|
|
271
271
|
}
|
|
272
272
|
n.show({ message: t.t("wise_invoicing.invoice.send.success") });
|
|
273
273
|
}
|
|
274
|
-
async function
|
|
274
|
+
async function _e() {
|
|
275
275
|
await s.open({ invoice: e.value });
|
|
276
276
|
}
|
|
277
|
-
async function
|
|
277
|
+
async function ve() {
|
|
278
278
|
let r = await _.getByUuid(e.value.uuid);
|
|
279
279
|
if (r.isErr()) {
|
|
280
280
|
n.apiError(r.error);
|
|
@@ -288,7 +288,7 @@ function nn(e) {
|
|
|
288
288
|
let a = await De.getDownloadUrl(i.uuid);
|
|
289
289
|
a !== null && v.downloadUrl(a, i.name);
|
|
290
290
|
}
|
|
291
|
-
async function
|
|
291
|
+
async function ye() {
|
|
292
292
|
let i = await d.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
293
293
|
if (i.isErr()) {
|
|
294
294
|
n.apiError(i.error);
|
|
@@ -307,7 +307,7 @@ function nn(e) {
|
|
|
307
307
|
message: t.t("wise_invoicing.invoice.duplicate.success")
|
|
308
308
|
});
|
|
309
309
|
}
|
|
310
|
-
async function
|
|
310
|
+
async function be() {
|
|
311
311
|
let i = await u.execute({ params: { invoiceUuid: e.value.uuid } });
|
|
312
312
|
if (i.isErr()) {
|
|
313
313
|
n.apiError(i.error);
|
|
@@ -326,7 +326,7 @@ function nn(e) {
|
|
|
326
326
|
message: t.t("wise_invoicing.credit_note.create.success")
|
|
327
327
|
});
|
|
328
328
|
}
|
|
329
|
-
let
|
|
329
|
+
let xe = M(() => [
|
|
330
330
|
{
|
|
331
331
|
isLoading: l.isLoading.value,
|
|
332
332
|
iconLeft: de,
|
|
@@ -334,46 +334,46 @@ function nn(e) {
|
|
|
334
334
|
label: t.t("wise_invoicing.invoice.detail.actions.send"),
|
|
335
335
|
variant: "primary",
|
|
336
336
|
visible: e.value.status === i.FINALIZED,
|
|
337
|
-
onClick:
|
|
337
|
+
onClick: ge
|
|
338
338
|
},
|
|
339
339
|
{
|
|
340
340
|
isLoading: g.isLoading.value,
|
|
341
341
|
iconRight: ce,
|
|
342
342
|
key: "markAsReady",
|
|
343
343
|
label: t.t("wise_invoicing.invoice.detail.actions.mark_as_ready"),
|
|
344
|
-
visible:
|
|
345
|
-
onClick:
|
|
344
|
+
visible: w("markAsReady"),
|
|
345
|
+
onClick: T
|
|
346
346
|
},
|
|
347
347
|
{
|
|
348
348
|
isLoading: f.isLoading.value,
|
|
349
349
|
iconLeft: pe,
|
|
350
350
|
key: "finalize",
|
|
351
351
|
label: t.t("wise_invoicing.invoice.detail.actions.finalize"),
|
|
352
|
-
visible:
|
|
353
|
-
onClick:
|
|
352
|
+
visible: w("finalize"),
|
|
353
|
+
onClick: fe
|
|
354
354
|
}
|
|
355
|
-
].filter((e) => e.visible)),
|
|
355
|
+
].filter((e) => e.visible)), Se = M(() => {
|
|
356
356
|
let n = [
|
|
357
357
|
{
|
|
358
358
|
icon: ie,
|
|
359
359
|
key: "markAsProtested",
|
|
360
360
|
label: t.t("wise_invoicing.invoice.detail.actions.mark_as_disputed"),
|
|
361
|
-
visible:
|
|
362
|
-
onSelect:
|
|
361
|
+
visible: le.value && !C.value,
|
|
362
|
+
onSelect: he
|
|
363
363
|
},
|
|
364
364
|
{
|
|
365
365
|
icon: re,
|
|
366
366
|
key: "markAsPaid",
|
|
367
367
|
label: t.t("wise_invoicing.invoice.detail.actions.mark_as_paid"),
|
|
368
|
-
visible:
|
|
369
|
-
onSelect:
|
|
368
|
+
visible: w("markAsPaid"),
|
|
369
|
+
onSelect: me
|
|
370
370
|
},
|
|
371
371
|
{
|
|
372
372
|
icon: ce,
|
|
373
373
|
key: "withdrawProtest",
|
|
374
374
|
label: t.t("wise_invoicing.invoice.detail.actions.withdraw_dispute"),
|
|
375
|
-
visible:
|
|
376
|
-
onSelect:
|
|
375
|
+
visible: le.value && C.value,
|
|
376
|
+
onSelect: O
|
|
377
377
|
}
|
|
378
378
|
], r = [
|
|
379
379
|
i.FINALIZED,
|
|
@@ -383,38 +383,38 @@ function nn(e) {
|
|
|
383
383
|
i.PROTESTED
|
|
384
384
|
].includes(e.value.status), a = [
|
|
385
385
|
{
|
|
386
|
-
icon:
|
|
386
|
+
icon: oe,
|
|
387
387
|
key: "downloadPdf",
|
|
388
388
|
label: t.t("wise_invoicing.common.download_pdf"),
|
|
389
|
-
visible:
|
|
390
|
-
onSelect:
|
|
389
|
+
visible: se.value,
|
|
390
|
+
onSelect: ve
|
|
391
391
|
},
|
|
392
392
|
{
|
|
393
393
|
icon: ne,
|
|
394
394
|
key: "backToDraft",
|
|
395
395
|
label: t.t("wise_invoicing.invoice.detail.actions.mark_as_draft"),
|
|
396
|
-
visible:
|
|
397
|
-
onSelect:
|
|
396
|
+
visible: w("markAsDraft"),
|
|
397
|
+
onSelect: E
|
|
398
398
|
},
|
|
399
399
|
{
|
|
400
|
-
icon:
|
|
400
|
+
icon: ae,
|
|
401
401
|
key: "duplicate",
|
|
402
402
|
label: t.t("wise_invoicing.invoice.detail.actions.duplicate"),
|
|
403
403
|
visible: !0,
|
|
404
|
-
onSelect:
|
|
404
|
+
onSelect: ye
|
|
405
405
|
}
|
|
406
406
|
], o = [{
|
|
407
407
|
icon: te,
|
|
408
408
|
key: "createCreditNote",
|
|
409
409
|
label: t.t("wise_invoicing.invoice.detail.header.cancel_with_credit_note"),
|
|
410
410
|
visible: r,
|
|
411
|
-
onSelect:
|
|
411
|
+
onSelect: be
|
|
412
412
|
}, {
|
|
413
413
|
icon: ee,
|
|
414
414
|
key: "delete",
|
|
415
415
|
label: t.t("wise_invoicing.invoice.detail.actions.delete"),
|
|
416
|
-
visible:
|
|
417
|
-
onSelect:
|
|
416
|
+
visible: S.value.isEditable,
|
|
417
|
+
onSelect: _e
|
|
418
418
|
}];
|
|
419
419
|
return [
|
|
420
420
|
{
|
|
@@ -432,15 +432,15 @@ function nn(e) {
|
|
|
432
432
|
].filter((e) => e.items.length > 0);
|
|
433
433
|
});
|
|
434
434
|
return {
|
|
435
|
-
isActionMenuVisible:
|
|
436
|
-
isDisputed:
|
|
437
|
-
menuGroups:
|
|
438
|
-
primaryButtons:
|
|
435
|
+
isActionMenuVisible: M(() => Se.value.length > 0),
|
|
436
|
+
isDisputed: C,
|
|
437
|
+
menuGroups: Se,
|
|
438
|
+
primaryButtons: xe
|
|
439
439
|
};
|
|
440
440
|
}
|
|
441
441
|
//#endregion
|
|
442
442
|
//#region src/modules/invoice/use-cases/detail/components/InvoiceDetailHeaderSection.vue
|
|
443
|
-
var rn = /* @__PURE__ */
|
|
443
|
+
var rn = /* @__PURE__ */ R({
|
|
444
444
|
__name: "InvoiceDetailHeaderSection",
|
|
445
445
|
props: {
|
|
446
446
|
isPdfViewActive: { type: Boolean },
|
|
@@ -448,7 +448,7 @@ var rn = /* @__PURE__ */ F({
|
|
|
448
448
|
},
|
|
449
449
|
emits: ["togglePdfView"],
|
|
450
450
|
setup(e, { emit: t }) {
|
|
451
|
-
let n = e, r = t, i =
|
|
451
|
+
let n = e, r = t, i = A(), a = Q(), { isDisputed: o, menuGroups: s, primaryButtons: l } = nn(M(() => n.invoice)), u = Vt(), d = M(() => new Ee(n.invoice.status)), f = M(() => d.value.color), p = M(() => i.t(d.value.translationKey)), m = M(() => n.invoice.deliveryStatus !== c.UNSENT), g = M(() => Ce.isSent(n.invoice.deliveryStatus)), _ = M(() => !D.isEditable(n.invoice.status)), v = $({
|
|
452
452
|
initialState: { subject: n.invoice.subject },
|
|
453
453
|
schema: Wt,
|
|
454
454
|
onSubmit: async (e) => {
|
|
@@ -462,37 +462,37 @@ var rn = /* @__PURE__ */ F({
|
|
|
462
462
|
t.isErr() && a.apiError(t.error);
|
|
463
463
|
}
|
|
464
464
|
}), y = v.register("subject");
|
|
465
|
-
return
|
|
466
|
-
form:
|
|
465
|
+
return qe({ form: v }), (e, t) => (B(), N(V(Tt), {
|
|
466
|
+
form: V(v),
|
|
467
467
|
"prompt-on-unsaved-changes": !1
|
|
468
468
|
}, {
|
|
469
|
-
default:
|
|
470
|
-
"fallback-title":
|
|
469
|
+
default: H(() => [L(Ke, {
|
|
470
|
+
"fallback-title": V(i).t("wise_invoicing.invoice.detail.fallback_title"),
|
|
471
471
|
"is-disabled": _.value,
|
|
472
472
|
sequence: n.invoice.sequence,
|
|
473
473
|
"status-color": f.value,
|
|
474
474
|
"status-label": p.value,
|
|
475
|
-
icon:
|
|
476
|
-
"subject-field":
|
|
477
|
-
"subject-placeholder":
|
|
475
|
+
icon: V(S),
|
|
476
|
+
"subject-field": V(y),
|
|
477
|
+
"subject-placeholder": V(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
|
|
478
478
|
}, {
|
|
479
|
-
actions:
|
|
479
|
+
actions: H(() => [L(Oe, {
|
|
480
480
|
"is-pdf-view-active": n.isPdfViewActive,
|
|
481
|
-
"menu-groups":
|
|
482
|
-
"primary-buttons":
|
|
481
|
+
"menu-groups": V(s),
|
|
482
|
+
"primary-buttons": V(l),
|
|
483
483
|
onTogglePdfView: t[0] ||= (e) => r("togglePdfView")
|
|
484
484
|
}, null, 8, [
|
|
485
485
|
"is-pdf-view-active",
|
|
486
486
|
"menu-groups",
|
|
487
487
|
"primary-buttons"
|
|
488
488
|
])]),
|
|
489
|
-
status:
|
|
489
|
+
status: H(() => [L(V(Y), {
|
|
490
490
|
gap: "xs",
|
|
491
491
|
class: "flex-wrap items-start"
|
|
492
492
|
}, {
|
|
493
|
-
default:
|
|
494
|
-
|
|
495
|
-
|
|
493
|
+
default: H(() => [
|
|
494
|
+
L(Se, { "lifecycle-status": n.invoice.lifecycleStatus }, null, 8, ["lifecycle-status"]),
|
|
495
|
+
L(ye, {
|
|
496
496
|
"is-sent": g.value,
|
|
497
497
|
"balance-due-amount": n.invoice.balanceDueAmount,
|
|
498
498
|
"gross-amount": n.invoice.grossAmount,
|
|
@@ -507,12 +507,12 @@ var rn = /* @__PURE__ */ F({
|
|
|
507
507
|
"settlement-status",
|
|
508
508
|
"total-credited-amount"
|
|
509
509
|
]),
|
|
510
|
-
n.invoice.isOverdue ? (
|
|
511
|
-
|
|
512
|
-
m.value ? (
|
|
510
|
+
n.invoice.isOverdue ? (B(), N(Ye, { key: 0 })) : P("", !0),
|
|
511
|
+
V(o) ? (B(), N(_e, { key: 1 })) : P("", !0),
|
|
512
|
+
m.value ? (B(), N(Ht, {
|
|
513
513
|
key: 2,
|
|
514
514
|
"delivery-status": n.invoice.deliveryStatus
|
|
515
|
-
}, null, 8, ["delivery-status"])) :
|
|
515
|
+
}, null, 8, ["delivery-status"])) : P("", !0)
|
|
516
516
|
]),
|
|
517
517
|
_: 1
|
|
518
518
|
})]),
|
|
@@ -530,12 +530,12 @@ var rn = /* @__PURE__ */ F({
|
|
|
530
530
|
_: 1
|
|
531
531
|
}, 8, ["form"]));
|
|
532
532
|
}
|
|
533
|
-
}), an = { class: "grid w-full grid-cols-1 gap-md lg:grid-cols-3" }, on = /* @__PURE__ */
|
|
533
|
+
}), an = { class: "grid w-full grid-cols-1 gap-md lg:grid-cols-3" }, on = /* @__PURE__ */ R({
|
|
534
534
|
__name: "InvoiceDetailLinkedCreditNotesSection",
|
|
535
535
|
props: { invoice: {} },
|
|
536
536
|
setup(e) {
|
|
537
|
-
let t = e, n =
|
|
538
|
-
let t = new
|
|
537
|
+
let t = e, n = A(), r = d(), i = M(() => t.invoice.creditNotes.map((e) => {
|
|
538
|
+
let t = new Ee(e.status);
|
|
539
539
|
return {
|
|
540
540
|
uuid: e.uuid,
|
|
541
541
|
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 }),
|
|
@@ -550,17 +550,17 @@ var rn = /* @__PURE__ */ F({
|
|
|
550
550
|
amount: e.grossAmount.amount > 0 ? -e.grossAmount.amount : e.grossAmount.amount
|
|
551
551
|
};
|
|
552
552
|
}
|
|
553
|
-
return (e, t) => i.value.length > 0 ? (
|
|
553
|
+
return (e, t) => i.value.length > 0 ? (B(), N(V(ht), {
|
|
554
554
|
key: 0,
|
|
555
555
|
as: "section",
|
|
556
556
|
gap: "md",
|
|
557
557
|
class: "w-full"
|
|
558
558
|
}, {
|
|
559
|
-
default:
|
|
560
|
-
text:
|
|
559
|
+
default: H(() => [L(V(X), {
|
|
560
|
+
text: V(n).t("wise_invoicing.invoice.detail.credit_notes.title"),
|
|
561
561
|
as: "h2",
|
|
562
562
|
class: "text-sm font-semibold text-primary"
|
|
563
|
-
}, null, 8, ["text"]),
|
|
563
|
+
}, null, 8, ["text"]), I("div", an, [(B(!0), F(j, null, rt(i.value, (e) => (B(), N(V(Ze), {
|
|
564
564
|
key: e.uuid,
|
|
565
565
|
to: {
|
|
566
566
|
name: "invoicing-credit-note-detail",
|
|
@@ -568,23 +568,23 @@ var rn = /* @__PURE__ */ F({
|
|
|
568
568
|
},
|
|
569
569
|
class: "min-w-0 rounded-lg border border-secondary bg-primary p-lg transition-colors hover:bg-secondary"
|
|
570
570
|
}, {
|
|
571
|
-
default:
|
|
571
|
+
default: H(() => [L(V(Y), {
|
|
572
572
|
align: "center",
|
|
573
573
|
gap: "md",
|
|
574
574
|
class: "min-w-0"
|
|
575
575
|
}, {
|
|
576
|
-
default:
|
|
577
|
-
|
|
576
|
+
default: H(() => [
|
|
577
|
+
L(V(X), {
|
|
578
578
|
text: e.title,
|
|
579
579
|
class: "min-w-0 flex-1 truncate text-xs font-semibold text-primary"
|
|
580
580
|
}, null, 8, ["text"]),
|
|
581
|
-
|
|
581
|
+
L(V(W), {
|
|
582
582
|
label: e.statusLabel,
|
|
583
583
|
color: e.statusColor,
|
|
584
584
|
size: "sm",
|
|
585
585
|
variant: "translucent"
|
|
586
586
|
}, null, 8, ["label", "color"]),
|
|
587
|
-
|
|
587
|
+
L(V(W), {
|
|
588
588
|
label: e.amountLabel,
|
|
589
589
|
variant: "translucent",
|
|
590
590
|
size: "sm"
|
|
@@ -595,32 +595,32 @@ var rn = /* @__PURE__ */ F({
|
|
|
595
595
|
_: 2
|
|
596
596
|
}, 1032, ["to"]))), 128))])]),
|
|
597
597
|
_: 1
|
|
598
|
-
})) :
|
|
598
|
+
})) : P("", !0);
|
|
599
599
|
}
|
|
600
|
-
}), sn =
|
|
601
|
-
deliveredOn:
|
|
602
|
-
dueOn:
|
|
603
|
-
issuedOn:
|
|
604
|
-
customFields:
|
|
605
|
-
externalRemarks:
|
|
606
|
-
poNumber:
|
|
607
|
-
preparedBy:
|
|
608
|
-
uuid:
|
|
609
|
-
name:
|
|
600
|
+
}), sn = k.object({
|
|
601
|
+
deliveredOn: E.nullable(),
|
|
602
|
+
dueOn: E,
|
|
603
|
+
issuedOn: E,
|
|
604
|
+
customFields: k.array(k.custom()),
|
|
605
|
+
externalRemarks: k.string().nullable(),
|
|
606
|
+
poNumber: k.string().nullable(),
|
|
607
|
+
preparedBy: k.object({
|
|
608
|
+
uuid: k.uuid(),
|
|
609
|
+
name: k.string()
|
|
610
610
|
}),
|
|
611
|
-
subject:
|
|
611
|
+
subject: k.string().nullable()
|
|
612
612
|
}).superRefine((t, n) => {
|
|
613
613
|
Temporal.PlainDate.compare(t.dueOn, t.issuedOn) < 0 && n.addIssue({
|
|
614
614
|
code: "custom",
|
|
615
615
|
message: e.global.t("invoicing.invoice.validation.due_date_after_issue_date"),
|
|
616
616
|
path: ["dueOn"]
|
|
617
617
|
});
|
|
618
|
-
}), cn = /* @__PURE__ */
|
|
618
|
+
}), cn = /* @__PURE__ */ R({
|
|
619
619
|
__name: "InvoiceDetailRemarksSection",
|
|
620
620
|
props: { invoice: {} },
|
|
621
621
|
setup(e) {
|
|
622
|
-
let t = e, n =
|
|
623
|
-
initialState:
|
|
622
|
+
let t = e, n = A(), r = Q(), i = Vt(), a = $({
|
|
623
|
+
initialState: M(() => h.toForm(t.invoice)),
|
|
624
624
|
schema: sn,
|
|
625
625
|
onSubmit: async (e) => {
|
|
626
626
|
let n = await i.execute({
|
|
@@ -629,16 +629,16 @@ var rn = /* @__PURE__ */ F({
|
|
|
629
629
|
});
|
|
630
630
|
n.isErr() && r.apiError(n.error);
|
|
631
631
|
}
|
|
632
|
-
}), o = a.register("externalRemarks"), s =
|
|
633
|
-
return
|
|
634
|
-
form:
|
|
632
|
+
}), o = a.register("externalRemarks"), s = M(() => !D.isEditable(t.invoice.status));
|
|
633
|
+
return qe({ form: a }), (e, t) => (B(), N(V(Tt), {
|
|
634
|
+
form: V(a),
|
|
635
635
|
"prompt-on-unsaved-changes": !1
|
|
636
636
|
}, {
|
|
637
|
-
default:
|
|
637
|
+
default: H(() => [L(Pe, {
|
|
638
638
|
"is-disabled": s.value,
|
|
639
|
-
placeholder:
|
|
640
|
-
"remarks-field":
|
|
641
|
-
title:
|
|
639
|
+
placeholder: V(n).t("wise_invoicing.invoice.detail.remarks.placeholder"),
|
|
640
|
+
"remarks-field": V(o),
|
|
641
|
+
title: V(n).t("wise_invoicing.invoice.detail.remarks.title")
|
|
642
642
|
}, null, 8, [
|
|
643
643
|
"is-disabled",
|
|
644
644
|
"placeholder",
|
|
@@ -652,32 +652,32 @@ var rn = /* @__PURE__ */ F({
|
|
|
652
652
|
//#endregion
|
|
653
653
|
//#region src/modules/invoice/api/queries/invoiceActivityLogIndex.query.ts
|
|
654
654
|
function ln(e) {
|
|
655
|
-
return
|
|
655
|
+
return st("invoiceActivityLogIndex", {
|
|
656
656
|
params: { invoiceUuid: e },
|
|
657
657
|
queryFn: (t) => _.getActivityLogs(e.value, { pagination: t })
|
|
658
658
|
});
|
|
659
659
|
}
|
|
660
660
|
//#endregion
|
|
661
661
|
//#region src/modules/invoice/use-cases/detail/components/sidebar/InvoiceDetailSidebarActivityTab.vue
|
|
662
|
-
var un = /* @__PURE__ */
|
|
662
|
+
var un = /* @__PURE__ */ R({
|
|
663
663
|
__name: "InvoiceDetailSidebarActivityTab",
|
|
664
664
|
props: { invoice: {} },
|
|
665
665
|
setup(e) {
|
|
666
|
-
let t = e, n =
|
|
666
|
+
let t = e, n = A(), { hasNextPage: r, isFetchingNextPage: i, isLoading: a, fetchNextPage: o, result: s } = ln(M(() => t.invoice.uuid)), c = M(() => s.value.unwrapOr({
|
|
667
667
|
data: [],
|
|
668
668
|
meta: { next: null }
|
|
669
669
|
}).data);
|
|
670
|
-
return (e, s) => (
|
|
670
|
+
return (e, s) => (B(), N(Fe, {
|
|
671
671
|
"current-billing-document": {
|
|
672
|
-
role:
|
|
672
|
+
role: V(l).INVOICE,
|
|
673
673
|
uuid: t.invoice.uuid
|
|
674
674
|
},
|
|
675
|
-
"empty-message":
|
|
675
|
+
"empty-message": V(n).t("wise_invoicing.invoice.detail.sidebar.activity_empty"),
|
|
676
676
|
entries: c.value,
|
|
677
|
-
"fetch-next-page":
|
|
678
|
-
"has-next-page":
|
|
679
|
-
"is-fetching-next-page":
|
|
680
|
-
"is-loading":
|
|
677
|
+
"fetch-next-page": V(o),
|
|
678
|
+
"has-next-page": V(r),
|
|
679
|
+
"is-fetching-next-page": V(i),
|
|
680
|
+
"is-loading": V(a)
|
|
681
681
|
}, null, 8, [
|
|
682
682
|
"current-billing-document",
|
|
683
683
|
"empty-message",
|
|
@@ -688,9 +688,9 @@ var un = /* @__PURE__ */ F({
|
|
|
688
688
|
"is-loading"
|
|
689
689
|
]));
|
|
690
690
|
}
|
|
691
|
-
}), dn = /* @__PURE__ */
|
|
691
|
+
}), dn = /* @__PURE__ */ R({
|
|
692
692
|
__name: "CustomFieldFieldset",
|
|
693
|
-
props: /*@__PURE__*/
|
|
693
|
+
props: /*@__PURE__*/ tt({
|
|
694
694
|
isDisabled: { type: Boolean },
|
|
695
695
|
currency: {},
|
|
696
696
|
definitions: {},
|
|
@@ -702,19 +702,19 @@ var un = /* @__PURE__ */ F({
|
|
|
702
702
|
}),
|
|
703
703
|
emits: ["update:modelValue"],
|
|
704
704
|
setup(e) {
|
|
705
|
-
let t = e, n =
|
|
705
|
+
let t = e, n = at(e, "modelValue");
|
|
706
706
|
function r(e) {
|
|
707
|
-
return
|
|
707
|
+
return y.findByDefinition(n.value, e);
|
|
708
708
|
}
|
|
709
709
|
function i(e, t) {
|
|
710
|
-
n.value =
|
|
710
|
+
n.value = y.upsert(n.value, e, t);
|
|
711
711
|
}
|
|
712
|
-
return (e, n) => t.definitions.length > 0 ? (
|
|
712
|
+
return (e, n) => t.definitions.length > 0 ? (B(), N(V(ht), {
|
|
713
713
|
key: 0,
|
|
714
714
|
gap: t.size === "sm" ? "xs" : "md",
|
|
715
715
|
align: "stretch"
|
|
716
716
|
}, {
|
|
717
|
-
default:
|
|
717
|
+
default: H(() => [(B(!0), F(j, null, rt(t.definitions, (e) => (B(), N(Le, {
|
|
718
718
|
key: e.uuid,
|
|
719
719
|
currency: t.currency,
|
|
720
720
|
definition: e,
|
|
@@ -733,15 +733,15 @@ var un = /* @__PURE__ */ F({
|
|
|
733
733
|
"onUpdate:modelValue"
|
|
734
734
|
]))), 128))]),
|
|
735
735
|
_: 1
|
|
736
|
-
}, 8, ["gap"])) :
|
|
736
|
+
}, 8, ["gap"])) : P("", !0);
|
|
737
737
|
}
|
|
738
738
|
});
|
|
739
739
|
//#endregion
|
|
740
740
|
//#region src/modules/invoice/api/queries/invoiceCustomerDetail.query.ts
|
|
741
741
|
function fn(e) {
|
|
742
|
-
return
|
|
742
|
+
return lt("invoiceCustomerDetail", {
|
|
743
743
|
params: { customerUuid: e },
|
|
744
|
-
queryFn: () =>
|
|
744
|
+
queryFn: () => we.getByUuid(e.value)
|
|
745
745
|
});
|
|
746
746
|
}
|
|
747
747
|
//#endregion
|
|
@@ -772,8 +772,8 @@ var pn = class {
|
|
|
772
772
|
//#endregion
|
|
773
773
|
//#region src/modules/invoice/api/queries/invoiceUserSearch.query.ts
|
|
774
774
|
function gn(e) {
|
|
775
|
-
let t =
|
|
776
|
-
return
|
|
775
|
+
let t = M(() => ({ search: e.params.search?.value }));
|
|
776
|
+
return ct("invoiceUserSearch", {
|
|
777
777
|
params: { queryParams: t },
|
|
778
778
|
queryFn: (t) => hn.getAll({
|
|
779
779
|
pagination: t,
|
|
@@ -783,7 +783,7 @@ function gn(e) {
|
|
|
783
783
|
}
|
|
784
784
|
//#endregion
|
|
785
785
|
//#region src/modules/invoice/components/form/InvoiceFormPreparedByField.vue
|
|
786
|
-
var _n = /* @__PURE__ */
|
|
786
|
+
var _n = /* @__PURE__ */ R({
|
|
787
787
|
__name: "InvoiceFormPreparedByField",
|
|
788
788
|
props: {
|
|
789
789
|
isLoading: { type: Boolean },
|
|
@@ -792,20 +792,20 @@ var _n = /* @__PURE__ */ F({
|
|
|
792
792
|
},
|
|
793
793
|
emits: ["nextPage", "updateSearch"],
|
|
794
794
|
setup(e, { emit: t }) {
|
|
795
|
-
let n = e, r = t, i =
|
|
795
|
+
let n = e, r = t, i = A(), a = M(() => Lt(n.users));
|
|
796
796
|
function o(e) {
|
|
797
797
|
return e.name;
|
|
798
798
|
}
|
|
799
799
|
function s(e) {
|
|
800
800
|
e !== null && (n.field.setValue(e), r("updateSearch", ""));
|
|
801
801
|
}
|
|
802
|
-
return (e, t) => (
|
|
802
|
+
return (e, t) => (B(), N(V(dt), z(V(O)(n.field), {
|
|
803
803
|
"display-fn": o,
|
|
804
804
|
"is-loading": n.isLoading,
|
|
805
805
|
"is-required": !0,
|
|
806
806
|
items: a.value,
|
|
807
|
-
label:
|
|
808
|
-
placeholder:
|
|
807
|
+
label: V(i).t("wise_invoicing.invoice.detail.header.created_by"),
|
|
808
|
+
placeholder: V(i).t("component.autocomplete.search_placeholder"),
|
|
809
809
|
"search-mode": "remote",
|
|
810
810
|
onNextPage: t[0] ||= (e) => r("nextPage"),
|
|
811
811
|
"onUpdate:modelValue": s,
|
|
@@ -817,7 +817,7 @@ var _n = /* @__PURE__ */ F({
|
|
|
817
817
|
"placeholder"
|
|
818
818
|
]));
|
|
819
819
|
}
|
|
820
|
-
}), vn = /* @__PURE__ */
|
|
820
|
+
}), vn = /* @__PURE__ */ R({
|
|
821
821
|
__name: "InvoiceUpdateDialog",
|
|
822
822
|
props: {
|
|
823
823
|
customFieldDefinitions: {},
|
|
@@ -825,17 +825,17 @@ var _n = /* @__PURE__ */ F({
|
|
|
825
825
|
},
|
|
826
826
|
emits: ["close"],
|
|
827
827
|
setup(e, { emit: t }) {
|
|
828
|
-
let n = e, r = t, i =
|
|
828
|
+
let n = e, r = t, i = A(), a = Q(), o = Vt(), s = Te(), c = b(), l = f({ debounceMs: 250 }), u = gn({ params: { search: l.debouncedSearch } }), d = M(() => u.result.value.match({
|
|
829
829
|
err: () => [],
|
|
830
830
|
loading: () => [],
|
|
831
831
|
ok: (e) => e.data
|
|
832
|
-
})), p = fn(
|
|
832
|
+
})), p = fn(M(() => n.invoice.customer.uuid)), m = M(() => {
|
|
833
833
|
let e = p.result.value;
|
|
834
834
|
if (e.isOk()) return e.getValue().defaultPaymentTermDays;
|
|
835
835
|
let t = s.result.value;
|
|
836
836
|
return t.isOk() ? t.getValue().defaultPaymentTermDays ?? 0 : 0;
|
|
837
837
|
}), g = $({
|
|
838
|
-
initialState:
|
|
838
|
+
initialState: M(() => h.toForm(n.invoice)),
|
|
839
839
|
schema: sn,
|
|
840
840
|
onSubmit: async (e) => {
|
|
841
841
|
let t = await o.execute({
|
|
@@ -851,70 +851,70 @@ var _n = /* @__PURE__ */ F({
|
|
|
851
851
|
onSubmitError: () => {
|
|
852
852
|
a.unableToSave();
|
|
853
853
|
}
|
|
854
|
-
}), _ = g.register("issuedOn"), v = g.register("dueOn"),
|
|
855
|
-
get: () =>
|
|
854
|
+
}), _ = g.register("issuedOn"), v = g.register("dueOn"), y = g.register("deliveredOn"), x = g.register("poNumber"), ee = g.register("preparedBy"), S = g.register("subject"), te = g.register("customFields"), ne = M({
|
|
855
|
+
get: () => te.modelValue.value ?? [],
|
|
856
856
|
set: (e) => {
|
|
857
|
-
|
|
857
|
+
te.setValue(e);
|
|
858
858
|
}
|
|
859
859
|
});
|
|
860
|
-
function
|
|
860
|
+
function re(e) {
|
|
861
861
|
e !== null && v.setValue(e.add({ days: m.value }));
|
|
862
862
|
}
|
|
863
|
-
function
|
|
863
|
+
function ie(e) {
|
|
864
864
|
l.updateSearch(e);
|
|
865
865
|
}
|
|
866
|
-
return (e, t) => (
|
|
867
|
-
form:
|
|
866
|
+
return (e, t) => (B(), N(V(Et), {
|
|
867
|
+
form: V(g),
|
|
868
868
|
size: "sm",
|
|
869
869
|
onClose: t[1] ||= (e) => r("close")
|
|
870
870
|
}, {
|
|
871
|
-
default:
|
|
872
|
-
|
|
873
|
-
icon:
|
|
871
|
+
default: H(() => [
|
|
872
|
+
L(V(wt), {
|
|
873
|
+
icon: V(C),
|
|
874
874
|
"is-description-visible": !1,
|
|
875
|
-
title:
|
|
875
|
+
title: V(i).t("wise_invoicing.invoice.detail.header.edit_info"),
|
|
876
876
|
description: ""
|
|
877
877
|
}, null, 8, ["icon", "title"]),
|
|
878
|
-
|
|
879
|
-
default:
|
|
880
|
-
default:
|
|
878
|
+
L(V(bt), null, {
|
|
879
|
+
default: H(() => [L(V(Ot), null, {
|
|
880
|
+
default: H(() => [L(V(Dt), {
|
|
881
881
|
lg: 2,
|
|
882
882
|
sm: 1
|
|
883
883
|
}, {
|
|
884
|
-
default:
|
|
885
|
-
|
|
886
|
-
label:
|
|
884
|
+
default: H(() => [
|
|
885
|
+
L(V(G), z(V(O)(V(_)), {
|
|
886
|
+
label: V(i).t("wise_invoicing.invoice.detail.header.invoice_date"),
|
|
887
887
|
"is-required": !0,
|
|
888
|
-
"onUpdate:modelValue":
|
|
888
|
+
"onUpdate:modelValue": re
|
|
889
889
|
}), null, 16, ["label"]),
|
|
890
|
-
|
|
891
|
-
label:
|
|
890
|
+
L(V(G), z(V(O)(V(v)), {
|
|
891
|
+
label: V(i).t("wise_invoicing.invoice.detail.header.due_date"),
|
|
892
892
|
"is-required": !0,
|
|
893
|
-
"min-date":
|
|
893
|
+
"min-date": V(_).modelValue.value
|
|
894
894
|
}), null, 16, ["label", "min-date"]),
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
field:
|
|
898
|
-
"is-loading":
|
|
895
|
+
V(c).isDeliveryDateVisible.value ? (B(), N(V(G), z({ key: 0 }, V(O)(V(y)), { label: V(i).t("wise_invoicing.invoice.detail.header.delivery_date") }), null, 16, ["label"])) : P("", !0),
|
|
896
|
+
L(_n, {
|
|
897
|
+
field: V(ee),
|
|
898
|
+
"is-loading": V(u).isLoading.value,
|
|
899
899
|
users: d.value,
|
|
900
|
-
onNextPage:
|
|
901
|
-
onUpdateSearch:
|
|
900
|
+
onNextPage: V(u).fetchNextPage,
|
|
901
|
+
onUpdateSearch: ie
|
|
902
902
|
}, null, 8, [
|
|
903
903
|
"field",
|
|
904
904
|
"is-loading",
|
|
905
905
|
"users",
|
|
906
906
|
"onNextPage"
|
|
907
907
|
]),
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
label:
|
|
911
|
-
placeholder:
|
|
908
|
+
L(V(It), z(V(O)(V(x)), { label: V(i).t("wise_invoicing.invoice.detail.header.po_number") }), null, 16, ["label"]),
|
|
909
|
+
L(V(It), z(V(O)(V(S)), {
|
|
910
|
+
label: V(i).t("wise_invoicing.invoice.detail.header.subject"),
|
|
911
|
+
placeholder: V(i).t("wise_invoicing.invoice.detail.header.subject_placeholder")
|
|
912
912
|
}), null, 16, ["label", "placeholder"])
|
|
913
913
|
]),
|
|
914
914
|
_: 1
|
|
915
|
-
}),
|
|
916
|
-
modelValue:
|
|
917
|
-
"onUpdate:modelValue": t[0] ||= (e) =>
|
|
915
|
+
}), L(dn, {
|
|
916
|
+
modelValue: ne.value,
|
|
917
|
+
"onUpdate:modelValue": t[0] ||= (e) => ne.value = e,
|
|
918
918
|
currency: n.invoice.currency,
|
|
919
919
|
definitions: n.customFieldDefinitions,
|
|
920
920
|
"is-disabled": !0,
|
|
@@ -930,24 +930,24 @@ var _n = /* @__PURE__ */ F({
|
|
|
930
930
|
})]),
|
|
931
931
|
_: 1
|
|
932
932
|
}),
|
|
933
|
-
|
|
934
|
-
right:
|
|
933
|
+
L(V(xt), null, {
|
|
934
|
+
right: H(() => [L(V(St), { label: "cancel" }), L(V(Ct), { label: V(i).t("wise_invoicing.invoice.detail.header.edit_info") }, null, 8, ["label"])]),
|
|
935
935
|
_: 1
|
|
936
936
|
})
|
|
937
937
|
]),
|
|
938
938
|
_: 1
|
|
939
939
|
}, 8, ["form"]));
|
|
940
940
|
}
|
|
941
|
-
}), yn = /* @__PURE__ */
|
|
941
|
+
}), yn = /* @__PURE__ */ R({
|
|
942
942
|
__name: "InvoiceDetailSidebarInfoTab",
|
|
943
943
|
props: {
|
|
944
944
|
customFieldDefinitions: {},
|
|
945
945
|
invoice: {}
|
|
946
946
|
},
|
|
947
947
|
setup(e) {
|
|
948
|
-
let t = e, n =
|
|
948
|
+
let t = e, n = A(), r = T(), i = b(), a = Bt().create(vn), o = M(() => D.isEditable(t.invoice.status)), c = M(() => me.filterByEntityType(t.customFieldDefinitions, s.INVOICE)), l = M(() => {
|
|
949
949
|
if (!t.invoice.isOverdue) return null;
|
|
950
|
-
let e = t.invoice.dueOn.toZonedDateTime(
|
|
950
|
+
let e = t.invoice.dueOn.toZonedDateTime(ut.Now.timeZoneId()).toInstant();
|
|
951
951
|
return r.toRelativeTime(e);
|
|
952
952
|
});
|
|
953
953
|
async function u() {
|
|
@@ -959,52 +959,52 @@ var _n = /* @__PURE__ */ F({
|
|
|
959
959
|
function d(e) {
|
|
960
960
|
return e === null ? "-" : r.formatPlainDate(e);
|
|
961
961
|
}
|
|
962
|
-
return (e, r) => (
|
|
963
|
-
default:
|
|
964
|
-
|
|
965
|
-
default:
|
|
966
|
-
|
|
967
|
-
default:
|
|
968
|
-
icon:
|
|
969
|
-
label:
|
|
970
|
-
}, null, 8, ["icon", "label"]),
|
|
962
|
+
return (e, r) => (B(), N(V(_t), { class: "px-2xl py-xl" }, {
|
|
963
|
+
default: H(() => [
|
|
964
|
+
L(V(vt), { label: V(n).t("wise_invoicing.invoice.detail.sidebar.general") }, et({
|
|
965
|
+
default: H(() => [
|
|
966
|
+
L(V(K), null, {
|
|
967
|
+
default: H(() => [L(V(q), {
|
|
968
|
+
icon: V(se),
|
|
969
|
+
label: V(n).t("wise_invoicing.invoice.detail.header.invoice_id")
|
|
970
|
+
}, null, 8, ["icon", "label"]), L(V(J), { text: t.invoice.sequence ?? "-" }, null, 8, ["text"])]),
|
|
971
971
|
_: 1
|
|
972
972
|
}),
|
|
973
|
-
|
|
974
|
-
default:
|
|
975
|
-
icon:
|
|
976
|
-
label:
|
|
977
|
-
}, null, 8, ["icon", "label"]),
|
|
973
|
+
L(V(K), null, {
|
|
974
|
+
default: H(() => [L(V(q), {
|
|
975
|
+
icon: V(le),
|
|
976
|
+
label: V(n).t("wise_invoicing.invoice.detail.header.po_number")
|
|
977
|
+
}, null, 8, ["icon", "label"]), L(V(J), { text: t.invoice.poNumber ?? "-" }, null, 8, ["text"])]),
|
|
978
978
|
_: 1
|
|
979
979
|
}),
|
|
980
|
-
|
|
981
|
-
default:
|
|
982
|
-
icon:
|
|
983
|
-
label:
|
|
984
|
-
}, null, 8, ["icon", "label"]),
|
|
980
|
+
L(V(K), null, {
|
|
981
|
+
default: H(() => [L(V(q), {
|
|
982
|
+
icon: V(w),
|
|
983
|
+
label: V(n).t("wise_invoicing.invoice.detail.header.issuer")
|
|
984
|
+
}, null, 8, ["icon", "label"]), L(V(J), { text: t.invoice.issuer.name ?? "-" }, null, 8, ["text"])]),
|
|
985
985
|
_: 1
|
|
986
986
|
}),
|
|
987
|
-
|
|
988
|
-
default:
|
|
989
|
-
icon:
|
|
990
|
-
label:
|
|
991
|
-
}, null, 8, ["icon", "label"]),
|
|
987
|
+
L(V(K), null, {
|
|
988
|
+
default: H(() => [L(V(q), {
|
|
989
|
+
icon: V(S),
|
|
990
|
+
label: V(n).t("wise_invoicing.invoice.detail.header.invoice_date")
|
|
991
|
+
}, null, 8, ["icon", "label"]), L(V(J), { text: d(t.invoice.issueOn) }, null, 8, ["text"])]),
|
|
992
992
|
_: 1
|
|
993
993
|
}),
|
|
994
|
-
|
|
995
|
-
default:
|
|
996
|
-
icon:
|
|
997
|
-
label:
|
|
994
|
+
L(V(K), null, {
|
|
995
|
+
default: H(() => [L(V(q), {
|
|
996
|
+
icon: V(ie),
|
|
997
|
+
label: V(n).t("wise_invoicing.invoice.detail.header.due_date"),
|
|
998
998
|
variant: t.invoice.isOverdue ? "error" : "default"
|
|
999
999
|
}, null, 8, [
|
|
1000
1000
|
"icon",
|
|
1001
1001
|
"label",
|
|
1002
1002
|
"variant"
|
|
1003
|
-
]),
|
|
1004
|
-
default:
|
|
1003
|
+
]), L(V(Y), { gap: "xs" }, {
|
|
1004
|
+
default: H(() => [L(V(J), {
|
|
1005
1005
|
text: d(t.invoice.dueOn),
|
|
1006
1006
|
variant: t.invoice.isOverdue ? "error" : "default"
|
|
1007
|
-
}, null, 8, ["text", "variant"]), l.value === null ?
|
|
1007
|
+
}, null, 8, ["text", "variant"]), l.value === null ? P("", !0) : (B(), N(V(W), {
|
|
1008
1008
|
key: 0,
|
|
1009
1009
|
label: l.value,
|
|
1010
1010
|
color: "error",
|
|
@@ -1015,14 +1015,14 @@ var _n = /* @__PURE__ */ F({
|
|
|
1015
1015
|
})]),
|
|
1016
1016
|
_: 1
|
|
1017
1017
|
}),
|
|
1018
|
-
|
|
1019
|
-
default:
|
|
1020
|
-
icon:
|
|
1021
|
-
label:
|
|
1022
|
-
}, null, 8, ["icon", "label"]),
|
|
1018
|
+
V(i).isDeliveryDateVisible.value ? (B(), N(V(K), { key: 0 }, {
|
|
1019
|
+
default: H(() => [L(V(q), {
|
|
1020
|
+
icon: V(de),
|
|
1021
|
+
label: V(n).t("wise_invoicing.invoice.detail.header.delivery_date")
|
|
1022
|
+
}, null, 8, ["icon", "label"]), L(V(J), { text: d(t.invoice.deliveredOn) }, null, 8, ["text"])]),
|
|
1023
1023
|
_: 1
|
|
1024
|
-
})) :
|
|
1025
|
-
|
|
1024
|
+
})) : P("", !0),
|
|
1025
|
+
L(Re, {
|
|
1026
1026
|
definitions: t.customFieldDefinitions,
|
|
1027
1027
|
values: t.invoice.customFields
|
|
1028
1028
|
}, null, 8, ["definitions", "values"])
|
|
@@ -1030,54 +1030,54 @@ var _n = /* @__PURE__ */ F({
|
|
|
1030
1030
|
_: 2
|
|
1031
1031
|
}, [o.value ? {
|
|
1032
1032
|
name: "actions",
|
|
1033
|
-
fn:
|
|
1034
|
-
icon:
|
|
1035
|
-
label:
|
|
1033
|
+
fn: H(() => [L(V(At), {
|
|
1034
|
+
icon: V(fe),
|
|
1035
|
+
label: V(n).t("wise_invoicing.invoice.detail.header.edit_info"),
|
|
1036
1036
|
variant: "tertiary",
|
|
1037
1037
|
onClick: u
|
|
1038
1038
|
}, null, 8, ["icon", "label"])]),
|
|
1039
1039
|
key: "0"
|
|
1040
1040
|
} : void 0]), 1032, ["label"]),
|
|
1041
|
-
|
|
1042
|
-
|
|
1043
|
-
|
|
1044
|
-
label:
|
|
1041
|
+
L(Ve, { "original-invoice": t.invoice.originalInvoice }, null, 8, ["original-invoice"]),
|
|
1042
|
+
L(V(yt)),
|
|
1043
|
+
L(V(vt), {
|
|
1044
|
+
label: V(n).t("wise_invoicing.invoice.detail.header.bill_to"),
|
|
1045
1045
|
"collapse-options": {
|
|
1046
1046
|
isCollapsible: !0,
|
|
1047
1047
|
isOpenByDefault: !0,
|
|
1048
1048
|
badge: { label: t.invoice.customer.name ?? "-" }
|
|
1049
1049
|
}
|
|
1050
1050
|
}, {
|
|
1051
|
-
default:
|
|
1052
|
-
default:
|
|
1051
|
+
default: H(() => [L(V(K), { orientation: "vertical" }, {
|
|
1052
|
+
default: H(() => [L(V(X), {
|
|
1053
1053
|
text: t.invoice.customer.name ?? "-",
|
|
1054
1054
|
class: "text-xs font-medium"
|
|
1055
|
-
}, null, 8, ["text"]), t.invoice.customer.address ? (
|
|
1056
|
-
text:
|
|
1055
|
+
}, null, 8, ["text"]), t.invoice.customer.address ? (B(), F(j, { key: 0 }, [L(V(X), {
|
|
1056
|
+
text: V(x).formatLines(t.invoice.customer.address)[0] ?? "",
|
|
1057
1057
|
class: "text-xs"
|
|
1058
|
-
}, null, 8, ["text"]), t.invoice.customer.address ? (
|
|
1058
|
+
}, null, 8, ["text"]), t.invoice.customer.address ? (B(), N(V(X), {
|
|
1059
1059
|
key: 0,
|
|
1060
|
-
text:
|
|
1060
|
+
text: V(x).formatLines(t.invoice.customer.address)[1] ?? "",
|
|
1061
1061
|
class: "text-xs"
|
|
1062
|
-
}, null, 8, ["text"])) :
|
|
1062
|
+
}, null, 8, ["text"])) : P("", !0)], 64)) : P("", !0)]),
|
|
1063
1063
|
_: 1
|
|
1064
1064
|
})]),
|
|
1065
1065
|
_: 1
|
|
1066
1066
|
}, 8, ["label", "collapse-options"]),
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
label:
|
|
1067
|
+
L(V(yt)),
|
|
1068
|
+
L(V(vt), {
|
|
1069
|
+
label: V(n).t("wise_invoicing.invoice.detail.header.bill_from"),
|
|
1070
1070
|
"collapse-options": {
|
|
1071
1071
|
isCollapsible: !0,
|
|
1072
1072
|
isOpenByDefault: !1,
|
|
1073
1073
|
badge: { label: t.invoice.issuer.email ?? "-" }
|
|
1074
1074
|
}
|
|
1075
1075
|
}, {
|
|
1076
|
-
default:
|
|
1077
|
-
default:
|
|
1076
|
+
default: H(() => [L(V(K), { orientation: "vertical" }, {
|
|
1077
|
+
default: H(() => [L(V(q), { label: t.invoice.issuer.email ?? "-" }, null, 8, ["label"]), t.invoice.issuer.address ? (B(), N(V(J), {
|
|
1078
1078
|
key: 0,
|
|
1079
|
-
text:
|
|
1080
|
-
}, null, 8, ["text"])) :
|
|
1079
|
+
text: V(x).format(t.invoice.issuer.address)
|
|
1080
|
+
}, null, 8, ["text"])) : P("", !0)]),
|
|
1081
1081
|
_: 1
|
|
1082
1082
|
})]),
|
|
1083
1083
|
_: 1
|
|
@@ -1086,20 +1086,20 @@ var _n = /* @__PURE__ */ F({
|
|
|
1086
1086
|
_: 1
|
|
1087
1087
|
}));
|
|
1088
1088
|
}
|
|
1089
|
-
}), bn = /* @__PURE__ */
|
|
1089
|
+
}), bn = /* @__PURE__ */ R({
|
|
1090
1090
|
__name: "InvoiceDetailSidebar",
|
|
1091
1091
|
props: {
|
|
1092
1092
|
customFieldDefinitions: {},
|
|
1093
1093
|
invoice: {}
|
|
1094
1094
|
},
|
|
1095
1095
|
setup(e) {
|
|
1096
|
-
let t = e, n =
|
|
1097
|
-
return (e, n) => (
|
|
1096
|
+
let t = e, n = A(), r = T(), i = M(() => n.t("wise_invoicing.invoice.detail.sidebar.updated_on", { date: r.toDateTime(t.invoice.updatedAt) }));
|
|
1097
|
+
return (e, n) => (B(), N(Ne, {
|
|
1098
1098
|
"billing-document": t.invoice,
|
|
1099
1099
|
"updated-footer": i.value
|
|
1100
1100
|
}, {
|
|
1101
|
-
activity:
|
|
1102
|
-
info:
|
|
1101
|
+
activity: H(() => [L(un, { invoice: t.invoice }, null, 8, ["invoice"])]),
|
|
1102
|
+
info: H(() => [L(yn, {
|
|
1103
1103
|
"custom-field-definitions": t.customFieldDefinitions,
|
|
1104
1104
|
invoice: t.invoice
|
|
1105
1105
|
}, null, 8, ["custom-field-definitions", "invoice"])]),
|
|
@@ -1110,7 +1110,7 @@ var _n = /* @__PURE__ */ F({
|
|
|
1110
1110
|
//#endregion
|
|
1111
1111
|
//#region src/modules/invoice/api/mutations/invoicePaymentDelete.mutation.ts
|
|
1112
1112
|
function xn() {
|
|
1113
|
-
return
|
|
1113
|
+
return U({
|
|
1114
1114
|
queryFn: (e) => _.deletePayment(e.params.invoiceUuid, e.params.paymentUuid),
|
|
1115
1115
|
queryKeysToInvalidate: {
|
|
1116
1116
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -1121,56 +1121,56 @@ function xn() {
|
|
|
1121
1121
|
//#endregion
|
|
1122
1122
|
//#region src/modules/invoice/api/queries/invoicePaymentIndex.query.ts
|
|
1123
1123
|
function Sn(e) {
|
|
1124
|
-
return
|
|
1124
|
+
return lt("invoicePaymentIndex", {
|
|
1125
1125
|
params: { invoiceUuid: e },
|
|
1126
1126
|
queryFn: () => _.getPayments(e.value)
|
|
1127
1127
|
});
|
|
1128
1128
|
}
|
|
1129
1129
|
//#endregion
|
|
1130
1130
|
//#region src/modules/invoice/use-cases/detail/components/table/InvoiceDetailPaymentActionsCell.vue
|
|
1131
|
-
var Cn = /* @__PURE__ */
|
|
1131
|
+
var Cn = /* @__PURE__ */ R({
|
|
1132
1132
|
__name: "InvoiceDetailPaymentActionsCell",
|
|
1133
1133
|
props: {
|
|
1134
1134
|
payment: {},
|
|
1135
1135
|
onDelete: { type: Function }
|
|
1136
1136
|
},
|
|
1137
1137
|
setup(e) {
|
|
1138
|
-
let t = e, n =
|
|
1139
|
-
return (e, r) => (
|
|
1140
|
-
default:
|
|
1141
|
-
default:
|
|
1138
|
+
let t = e, n = A();
|
|
1139
|
+
return (e, r) => (B(), N(V(Pt), null, {
|
|
1140
|
+
default: H(() => [L(V(Ft), null, {
|
|
1141
|
+
default: H(() => [t.payment.source === V(u).MANUAL ? (B(), N(V(At), {
|
|
1142
1142
|
key: 0,
|
|
1143
|
-
label:
|
|
1144
|
-
icon:
|
|
1143
|
+
label: V(n).t("wise_invoicing.invoice.detail.payments.delete.title"),
|
|
1144
|
+
icon: V(xe),
|
|
1145
1145
|
size: "sm",
|
|
1146
1146
|
variant: "tertiary",
|
|
1147
1147
|
onClick: r[0] ||= (e) => t.onDelete(t.payment)
|
|
1148
|
-
}, null, 8, ["label", "icon"])) :
|
|
1148
|
+
}, null, 8, ["label", "icon"])) : P("", !0)]),
|
|
1149
1149
|
_: 1
|
|
1150
1150
|
})]),
|
|
1151
1151
|
_: 1
|
|
1152
1152
|
}));
|
|
1153
1153
|
}
|
|
1154
|
-
}), wn = /* @__PURE__ */
|
|
1154
|
+
}), wn = /* @__PURE__ */ R({
|
|
1155
1155
|
__name: "InvoiceDetailPaymentManualCell",
|
|
1156
1156
|
props: { payment: {} },
|
|
1157
1157
|
setup(e) {
|
|
1158
1158
|
let t = e;
|
|
1159
|
-
return (e, n) => (
|
|
1160
|
-
default:
|
|
1159
|
+
return (e, n) => (B(), N(V(Pt), null, {
|
|
1160
|
+
default: H(() => [t.payment.source === V(u).MANUAL ? (B(), N(V(be), {
|
|
1161
1161
|
key: 0,
|
|
1162
1162
|
class: "size-4 text-brand-600"
|
|
1163
|
-
})) :
|
|
1163
|
+
})) : P("", !0)]),
|
|
1164
1164
|
_: 1
|
|
1165
1165
|
}));
|
|
1166
1166
|
}
|
|
1167
|
-
}), Tn = /* @__PURE__ */
|
|
1167
|
+
}), Tn = /* @__PURE__ */ R({
|
|
1168
1168
|
__name: "InvoiceDetailPaymentsTableTextCell",
|
|
1169
1169
|
props: { text: {} },
|
|
1170
1170
|
setup(e) {
|
|
1171
1171
|
let t = e;
|
|
1172
|
-
return (e, n) => (
|
|
1173
|
-
default:
|
|
1172
|
+
return (e, n) => (B(), N(V(Pt), null, {
|
|
1173
|
+
default: H(() => [L(V(X), {
|
|
1174
1174
|
text: t.text ?? "-",
|
|
1175
1175
|
class: "text-sm/5 text-primary"
|
|
1176
1176
|
}, null, 8, ["text"])]),
|
|
@@ -1181,8 +1181,8 @@ var Cn = /* @__PURE__ */ F({
|
|
|
1181
1181
|
//#endregion
|
|
1182
1182
|
//#region src/modules/invoice/use-cases/detail/composables/invoiceDetailPaymentsTableColumns.composable.ts
|
|
1183
1183
|
function En(e) {
|
|
1184
|
-
let t =
|
|
1185
|
-
return
|
|
1184
|
+
let t = A(), n = T(), r = d();
|
|
1185
|
+
return M(() => zt()([
|
|
1186
1186
|
{
|
|
1187
1187
|
headerLabel: t.t("wise_invoicing.invoice.detail.payments.columns.date"),
|
|
1188
1188
|
key: "date",
|
|
@@ -1245,7 +1245,7 @@ function En(e) {
|
|
|
1245
1245
|
//#endregion
|
|
1246
1246
|
//#region src/modules/invoice/api/mutations/invoicePaymentCreate.mutation.ts
|
|
1247
1247
|
function Dn() {
|
|
1248
|
-
return
|
|
1248
|
+
return U({
|
|
1249
1249
|
queryFn: (e) => _.createPayment(e.params.invoiceUuid, e.body),
|
|
1250
1250
|
queryKeysToInvalidate: {
|
|
1251
1251
|
invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid },
|
|
@@ -1255,19 +1255,19 @@ function Dn() {
|
|
|
1255
1255
|
}
|
|
1256
1256
|
//#endregion
|
|
1257
1257
|
//#region src/modules/invoice/models/invoice/payment/invoicePaymentCreateForm.model.ts
|
|
1258
|
-
var On =
|
|
1259
|
-
amount:
|
|
1260
|
-
currency:
|
|
1258
|
+
var On = k.object({
|
|
1259
|
+
amount: k.number().positive(),
|
|
1260
|
+
currency: k.enum(r),
|
|
1261
1261
|
date: m,
|
|
1262
|
-
paymentReference:
|
|
1263
|
-
precision:
|
|
1264
|
-
remarks:
|
|
1265
|
-
}), kn = { class: "pr-md text-xs text-secondary" }, An = /* @__PURE__ */
|
|
1262
|
+
paymentReference: k.string().nullable(),
|
|
1263
|
+
precision: k.number().int().nonnegative(),
|
|
1264
|
+
remarks: k.string().nullable()
|
|
1265
|
+
}), kn = { class: "pr-md text-xs text-secondary" }, An = /* @__PURE__ */ R({
|
|
1266
1266
|
__name: "InvoicePaymentCreateDialog",
|
|
1267
1267
|
props: { invoice: {} },
|
|
1268
1268
|
emits: ["close"],
|
|
1269
1269
|
setup(e, { emit: t }) {
|
|
1270
|
-
let n = e, r = t, i =
|
|
1270
|
+
let n = e, r = t, i = A(), a = Q(), o = d(), s = Dn(), c = M(() => o.getSymbol(n.invoice.grossAmount.currency)), l = $({
|
|
1271
1271
|
initialState: {
|
|
1272
1272
|
amount: null,
|
|
1273
1273
|
currency: n.invoice.grossAmount.currency,
|
|
@@ -1292,44 +1292,44 @@ var On = D.object({
|
|
|
1292
1292
|
a.unableToSave();
|
|
1293
1293
|
}
|
|
1294
1294
|
}), u = l.register("amount"), f = l.register("date"), m = l.register("paymentReference"), h = l.register("remarks");
|
|
1295
|
-
return (e, t) => (
|
|
1296
|
-
form:
|
|
1295
|
+
return (e, t) => (B(), N(V(Et), {
|
|
1296
|
+
form: V(l),
|
|
1297
1297
|
size: "sm",
|
|
1298
1298
|
onClose: t[0] ||= (e) => r("close")
|
|
1299
1299
|
}, {
|
|
1300
|
-
default:
|
|
1301
|
-
|
|
1302
|
-
title:
|
|
1303
|
-
description:
|
|
1304
|
-
icon:
|
|
1300
|
+
default: H(() => [
|
|
1301
|
+
L(V(wt), {
|
|
1302
|
+
title: V(i).t("wise_invoicing.invoice.detail.payments.create.title"),
|
|
1303
|
+
description: V(i).t("wise_invoicing.invoice.detail.payments.create.description"),
|
|
1304
|
+
icon: V(ge),
|
|
1305
1305
|
"is-description-visible": !0
|
|
1306
1306
|
}, null, 8, [
|
|
1307
1307
|
"title",
|
|
1308
1308
|
"description",
|
|
1309
1309
|
"icon"
|
|
1310
1310
|
]),
|
|
1311
|
-
|
|
1312
|
-
default:
|
|
1313
|
-
default:
|
|
1311
|
+
L(V(bt), null, {
|
|
1312
|
+
default: H(() => [L(V(Ot), null, {
|
|
1313
|
+
default: H(() => [L(V(Dt), {
|
|
1314
1314
|
lg: 2,
|
|
1315
1315
|
sm: 1
|
|
1316
1316
|
}, {
|
|
1317
|
-
default:
|
|
1318
|
-
|
|
1317
|
+
default: H(() => [
|
|
1318
|
+
L(V(jt), z(V(O)(V(u)), {
|
|
1319
1319
|
"is-required": !0,
|
|
1320
|
-
label:
|
|
1320
|
+
label: V(i).t("wise_invoicing.invoice.detail.payments.create.fields.amount"),
|
|
1321
1321
|
min: .01,
|
|
1322
1322
|
step: .01
|
|
1323
1323
|
}), {
|
|
1324
|
-
right:
|
|
1324
|
+
right: H(() => [I("span", kn, it(c.value.symbol), 1)]),
|
|
1325
1325
|
_: 1
|
|
1326
1326
|
}, 16, ["label"]),
|
|
1327
|
-
|
|
1327
|
+
L(V(G), z(V(O)(V(f)), {
|
|
1328
1328
|
"is-required": !0,
|
|
1329
|
-
label:
|
|
1329
|
+
label: V(i).t("wise_invoicing.invoice.detail.payments.create.fields.date")
|
|
1330
1330
|
}), null, 16, ["label"]),
|
|
1331
|
-
|
|
1332
|
-
|
|
1331
|
+
L(V(It), z(V(O)(V(m)), { label: V(i).t("wise_invoicing.invoice.detail.payments.create.fields.reference") }), null, 16, ["label"]),
|
|
1332
|
+
L(V(It), z(V(O)(V(h)), { label: V(i).t("wise_invoicing.invoice.detail.payments.create.fields.remarks") }), null, 16, ["label"])
|
|
1333
1333
|
]),
|
|
1334
1334
|
_: 1
|
|
1335
1335
|
})]),
|
|
@@ -1337,27 +1337,27 @@ var On = D.object({
|
|
|
1337
1337
|
})]),
|
|
1338
1338
|
_: 1
|
|
1339
1339
|
}),
|
|
1340
|
-
|
|
1341
|
-
right:
|
|
1340
|
+
L(V(xt), null, {
|
|
1341
|
+
right: H(() => [L(V(St), { label: "cancel" }), L(V(kt), { label: V(i).t("wise_invoicing.invoice.detail.payments.create.submit") }, null, 8, ["label"])]),
|
|
1342
1342
|
_: 1
|
|
1343
1343
|
})
|
|
1344
1344
|
]),
|
|
1345
1345
|
_: 1
|
|
1346
1346
|
}, 8, ["form"]));
|
|
1347
1347
|
}
|
|
1348
|
-
}), jn = /* @__PURE__ */
|
|
1348
|
+
}), jn = /* @__PURE__ */ R({
|
|
1349
1349
|
__name: "InvoiceDetailPaymentsSection",
|
|
1350
1350
|
props: { invoice: {} },
|
|
1351
1351
|
setup(e) {
|
|
1352
|
-
let t = e, n =
|
|
1352
|
+
let t = e, n = A(), r = d(), i = M(() => t.invoice.uuid), a = M(() => t.invoice.balanceDueAmount === null ? null : r.formatMonetary(t.invoice.balanceDueAmount)), { isLoading: o, result: s } = Sn(i), c = Bt(), l = Q(), u = c.create(An), f = c.create(gt), p = xn(), m = M(() => s.value.match({
|
|
1353
1353
|
err: () => [],
|
|
1354
1354
|
loading: () => [],
|
|
1355
1355
|
ok: (e) => e
|
|
1356
|
-
})), h =
|
|
1356
|
+
})), h = M(() => s.value.match({
|
|
1357
1357
|
err: (e) => e,
|
|
1358
1358
|
loading: () => null,
|
|
1359
1359
|
ok: () => null
|
|
1360
|
-
})), g =
|
|
1360
|
+
})), g = M(() => !D.getMetadata(t.invoice.status).isTerminal);
|
|
1361
1361
|
function _() {
|
|
1362
1362
|
u.open({ invoice: t.invoice });
|
|
1363
1363
|
}
|
|
@@ -1381,48 +1381,48 @@ var On = D.object({
|
|
|
1381
1381
|
});
|
|
1382
1382
|
}
|
|
1383
1383
|
let y = En({ onDelete: v });
|
|
1384
|
-
return (e, t) => (
|
|
1385
|
-
default:
|
|
1384
|
+
return (e, t) => (B(), N(Be, null, {
|
|
1385
|
+
default: H(() => [L(V(Y), {
|
|
1386
1386
|
justify: "between",
|
|
1387
1387
|
class: "w-full gap-lg border-b border-secondary px-lg py-md"
|
|
1388
1388
|
}, {
|
|
1389
|
-
default:
|
|
1390
|
-
default:
|
|
1391
|
-
text:
|
|
1389
|
+
default: H(() => [L(V(Y), { gap: "sm" }, {
|
|
1390
|
+
default: H(() => [L(V(X), {
|
|
1391
|
+
text: V(n).t("wise_invoicing.invoice.detail.payments.title"),
|
|
1392
1392
|
as: "h2",
|
|
1393
1393
|
class: "text-sm font-semibold text-primary"
|
|
1394
|
-
}, null, 8, ["text"]), a.value === null ?
|
|
1394
|
+
}, null, 8, ["text"]), a.value === null ? P("", !0) : (B(), N(V(W), {
|
|
1395
1395
|
key: 0,
|
|
1396
1396
|
color: "gray",
|
|
1397
1397
|
size: "sm",
|
|
1398
1398
|
variant: "outline"
|
|
1399
1399
|
}, {
|
|
1400
|
-
default:
|
|
1401
|
-
|
|
1402
|
-
|
|
1403
|
-
|
|
1400
|
+
default: H(() => [
|
|
1401
|
+
L(V(ft), { label: V(n).t("wise_invoicing.invoice.detail.payments.balance_due") }, null, 8, ["label"]),
|
|
1402
|
+
L(V(pt)),
|
|
1403
|
+
L(V(ft), { label: a.value }, null, 8, ["label"])
|
|
1404
1404
|
]),
|
|
1405
1405
|
_: 1
|
|
1406
1406
|
}))]),
|
|
1407
1407
|
_: 1
|
|
1408
|
-
}), g.value ? (
|
|
1408
|
+
}), g.value ? (B(), N(V(mt), {
|
|
1409
1409
|
key: 0,
|
|
1410
|
-
label:
|
|
1411
|
-
"icon-left":
|
|
1410
|
+
label: V(n).t("wise_invoicing.invoice.detail.payments.add"),
|
|
1411
|
+
"icon-left": V(ve),
|
|
1412
1412
|
size: "sm",
|
|
1413
1413
|
onClick: _
|
|
1414
|
-
}, null, 8, ["label", "icon-left"])) :
|
|
1414
|
+
}, null, 8, ["label", "icon-left"])) : P("", !0)]),
|
|
1415
1415
|
_: 1
|
|
1416
|
-
}),
|
|
1416
|
+
}), L(V(Nt), {
|
|
1417
1417
|
"active-filter-count": 0,
|
|
1418
|
-
columns:
|
|
1418
|
+
columns: V(y),
|
|
1419
1419
|
data: m.value,
|
|
1420
1420
|
error: h.value,
|
|
1421
1421
|
"get-key": (e) => e.uuid,
|
|
1422
1422
|
"has-active-search": !1,
|
|
1423
1423
|
"header-actions": [],
|
|
1424
1424
|
"is-fetching-next-page": !1,
|
|
1425
|
-
"is-loading":
|
|
1425
|
+
"is-loading": V(o)
|
|
1426
1426
|
}, null, 8, [
|
|
1427
1427
|
"columns",
|
|
1428
1428
|
"data",
|
|
@@ -1437,7 +1437,7 @@ var On = D.object({
|
|
|
1437
1437
|
//#endregion
|
|
1438
1438
|
//#region src/modules/invoice/api/mutations/invoiceUpdateLines.mutation.ts
|
|
1439
1439
|
function Mn() {
|
|
1440
|
-
return
|
|
1440
|
+
return U({
|
|
1441
1441
|
queryFn: (e) => _.updateLines(e.params.invoiceUuid, e.body),
|
|
1442
1442
|
queryKeysToInvalidate: { invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid } }
|
|
1443
1443
|
});
|
|
@@ -1445,24 +1445,24 @@ function Mn() {
|
|
|
1445
1445
|
//#endregion
|
|
1446
1446
|
//#region src/modules/invoice/api/mutations/invoiceApplyDiscount.mutation.ts
|
|
1447
1447
|
function Nn() {
|
|
1448
|
-
return
|
|
1448
|
+
return U({
|
|
1449
1449
|
queryFn: (e) => _.applyDiscount(e.params.invoiceUuid, e.body),
|
|
1450
1450
|
queryKeysToInvalidate: { invoiceDetail: { invoiceUuid: (e) => e.invoiceUuid } }
|
|
1451
1451
|
});
|
|
1452
1452
|
}
|
|
1453
1453
|
//#endregion
|
|
1454
1454
|
//#region src/modules/invoice/models/invoice/update/invoiceApplyDiscountForm.model.ts
|
|
1455
|
-
var Pn =
|
|
1456
|
-
currency:
|
|
1457
|
-
precision:
|
|
1458
|
-
type:
|
|
1459
|
-
value:
|
|
1460
|
-
}).refine((e) => e.type !== a.PERCENTAGE || e.value <= 100, { path: ["value"] }), Fn = { class: "pr-md text-xs text-secondary" }, In = /* @__PURE__ */
|
|
1455
|
+
var Pn = k.object({
|
|
1456
|
+
currency: k.enum(r),
|
|
1457
|
+
precision: k.number().int().nonnegative(),
|
|
1458
|
+
type: k.enum(a),
|
|
1459
|
+
value: k.number()
|
|
1460
|
+
}).refine((e) => e.type !== a.PERCENTAGE || e.value <= 100, { path: ["value"] }), Fn = { class: "pr-md text-xs text-secondary" }, In = /* @__PURE__ */ R({
|
|
1461
1461
|
__name: "InvoiceApplyDiscountDialog",
|
|
1462
1462
|
props: { invoice: {} },
|
|
1463
1463
|
emits: ["close"],
|
|
1464
1464
|
setup(e, { emit: t }) {
|
|
1465
|
-
let n = e, r = t, i =
|
|
1465
|
+
let n = e, r = t, i = A(), o = Q(), s = d(), c = Nn(), l = M(() => Rt([a.PERCENTAGE, a.AMOUNT])), u = $({
|
|
1466
1466
|
initialState: {
|
|
1467
1467
|
currency: n.invoice.grossAmount.currency,
|
|
1468
1468
|
precision: n.invoice.grossAmount.precision,
|
|
@@ -1484,59 +1484,59 @@ var Pn = D.object({
|
|
|
1484
1484
|
onSubmitError: () => {
|
|
1485
1485
|
o.unableToSave();
|
|
1486
1486
|
}
|
|
1487
|
-
}), f = u.register("value"), p = u.register("type"), m =
|
|
1487
|
+
}), f = u.register("value"), p = u.register("type"), m = M(() => p.modelValue.value === a.PERCENTAGE), h = M(() => p.modelValue.value === a.AMOUNT), g = M(() => s.getSymbol(n.invoice.grossAmount.currency));
|
|
1488
1488
|
function _(e) {
|
|
1489
1489
|
return i.t(`wise_invoicing.invoice.detail.global_discount.type.${e}`);
|
|
1490
1490
|
}
|
|
1491
|
-
return (e, t) => (
|
|
1492
|
-
form:
|
|
1491
|
+
return (e, t) => (B(), N(V(Et), {
|
|
1492
|
+
form: V(u),
|
|
1493
1493
|
size: "sm",
|
|
1494
1494
|
onClose: t[0] ||= (e) => r("close")
|
|
1495
1495
|
}, {
|
|
1496
|
-
default:
|
|
1497
|
-
|
|
1498
|
-
title:
|
|
1499
|
-
description:
|
|
1500
|
-
icon:
|
|
1496
|
+
default: H(() => [
|
|
1497
|
+
L(V(wt), {
|
|
1498
|
+
title: V(i).t("wise_invoicing.invoice.detail.line_items.global_discount"),
|
|
1499
|
+
description: V(i).t("wise_invoicing.invoice.detail.global_discount.description"),
|
|
1500
|
+
icon: V(ue),
|
|
1501
1501
|
"is-description-visible": !0
|
|
1502
1502
|
}, null, 8, [
|
|
1503
1503
|
"title",
|
|
1504
1504
|
"description",
|
|
1505
1505
|
"icon"
|
|
1506
1506
|
]),
|
|
1507
|
-
|
|
1508
|
-
default:
|
|
1509
|
-
default:
|
|
1507
|
+
L(V(bt), null, {
|
|
1508
|
+
default: H(() => [L(V(Ot), null, {
|
|
1509
|
+
default: H(() => [L(V(Dt), {
|
|
1510
1510
|
lg: 2,
|
|
1511
1511
|
sm: 1
|
|
1512
1512
|
}, {
|
|
1513
|
-
default:
|
|
1514
|
-
|
|
1513
|
+
default: H(() => [
|
|
1514
|
+
L(V(Mt), z(V(O)(V(p)), {
|
|
1515
1515
|
"display-fn": _,
|
|
1516
1516
|
"is-required": !0,
|
|
1517
1517
|
items: l.value,
|
|
1518
|
-
label:
|
|
1518
|
+
label: V(i).t("wise_invoicing.invoice.detail.global_discount.type.label")
|
|
1519
1519
|
}), null, 16, ["items", "label"]),
|
|
1520
|
-
m.value ? (
|
|
1521
|
-
hint:
|
|
1520
|
+
m.value ? (B(), N(V(jt), z({ key: 0 }, V(O)(V(f)), {
|
|
1521
|
+
hint: V(i).t("wise_invoicing.invoice.detail.global_discount.amount.hint"),
|
|
1522
1522
|
"is-required": !0,
|
|
1523
|
-
label:
|
|
1523
|
+
label: V(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
|
|
1524
1524
|
max: 100,
|
|
1525
1525
|
min: 0,
|
|
1526
1526
|
step: .01
|
|
1527
1527
|
}), {
|
|
1528
|
-
right:
|
|
1528
|
+
right: H(() => [...t[1] ||= [I("span", { class: "pr-md text-xs text-secondary" }, " % ", -1)]]),
|
|
1529
1529
|
_: 1
|
|
1530
|
-
}, 16, ["hint", "label"])) :
|
|
1531
|
-
h.value ? (
|
|
1530
|
+
}, 16, ["hint", "label"])) : P("", !0),
|
|
1531
|
+
h.value ? (B(), N(V(jt), z({ key: 1 }, V(O)(V(f)), {
|
|
1532
1532
|
"is-required": !0,
|
|
1533
|
-
label:
|
|
1533
|
+
label: V(i).t("wise_invoicing.invoice.detail.global_discount.amount.label"),
|
|
1534
1534
|
min: .01,
|
|
1535
1535
|
step: .01
|
|
1536
1536
|
}), {
|
|
1537
|
-
right:
|
|
1537
|
+
right: H(() => [I("span", Fn, it(g.value.symbol), 1)]),
|
|
1538
1538
|
_: 1
|
|
1539
|
-
}, 16, ["label"])) :
|
|
1539
|
+
}, 16, ["label"])) : P("", !0)
|
|
1540
1540
|
]),
|
|
1541
1541
|
_: 1
|
|
1542
1542
|
})]),
|
|
@@ -1544,23 +1544,23 @@ var Pn = D.object({
|
|
|
1544
1544
|
})]),
|
|
1545
1545
|
_: 1
|
|
1546
1546
|
}),
|
|
1547
|
-
|
|
1548
|
-
right:
|
|
1547
|
+
L(V(xt), null, {
|
|
1548
|
+
right: H(() => [L(V(St), { label: "cancel" }), L(V(Ct), { label: V(i).t("wise_invoicing.invoice.detail.global_discount.confirm") }, null, 8, ["label"])]),
|
|
1549
1549
|
_: 1
|
|
1550
1550
|
})
|
|
1551
1551
|
]),
|
|
1552
1552
|
_: 1
|
|
1553
1553
|
}, 8, ["form"]));
|
|
1554
1554
|
}
|
|
1555
|
-
}), Ln = /* @__PURE__ */
|
|
1555
|
+
}), Ln = /* @__PURE__ */ R({
|
|
1556
1556
|
__name: "InvoiceLineItemsTableSection",
|
|
1557
1557
|
props: {
|
|
1558
1558
|
customFieldDefinitions: {},
|
|
1559
1559
|
invoice: {}
|
|
1560
1560
|
},
|
|
1561
1561
|
setup(e) {
|
|
1562
|
-
let t = e, n =
|
|
1563
|
-
isSaving:
|
|
1562
|
+
let t = e, n = M(() => t.invoice), r = b(), i = Mn(), a = M(() => D.isEditable(t.invoice.status)), o = Ie({
|
|
1563
|
+
isSaving: M(() => i.isLoading.value),
|
|
1564
1564
|
billingDocument: () => n.value,
|
|
1565
1565
|
canEdit: a,
|
|
1566
1566
|
customFieldDefinitions: () => t.customFieldDefinitions,
|
|
@@ -1572,65 +1572,65 @@ var Pn = D.object({
|
|
|
1572
1572
|
function c() {
|
|
1573
1573
|
s.open({ invoice: t.invoice });
|
|
1574
1574
|
}
|
|
1575
|
-
return
|
|
1576
|
-
default:
|
|
1577
|
-
|
|
1578
|
-
"show-apply-discount":
|
|
1575
|
+
return Me(o), (e, n) => (B(), N(Be, null, {
|
|
1576
|
+
default: H(() => [
|
|
1577
|
+
L(Ue, {
|
|
1578
|
+
"show-apply-discount": V(r).isGlobalDiscountEnabled.value,
|
|
1579
1579
|
onApplyDiscount: c
|
|
1580
1580
|
}, null, 8, ["show-apply-discount"]),
|
|
1581
|
-
|
|
1582
|
-
|
|
1583
|
-
|
|
1581
|
+
L(je),
|
|
1582
|
+
L(ke, { "billing-document": t.invoice }, null, 8, ["billing-document"]),
|
|
1583
|
+
L(Ge)
|
|
1584
1584
|
]),
|
|
1585
1585
|
_: 1
|
|
1586
1586
|
}));
|
|
1587
1587
|
}
|
|
1588
|
-
}), Rn = /* @__PURE__ */
|
|
1588
|
+
}), Rn = /* @__PURE__ */ R({
|
|
1589
1589
|
__name: "InvoiceDetailView",
|
|
1590
1590
|
props: {
|
|
1591
1591
|
customFieldDefinitions: {},
|
|
1592
1592
|
invoice: {}
|
|
1593
1593
|
},
|
|
1594
1594
|
setup(e) {
|
|
1595
|
-
let t = e, n =
|
|
1595
|
+
let t = e, n = A(), r = nt(!1), i = M(() => [{
|
|
1596
1596
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
1597
1597
|
to: { name: "invoicing-invoice-overview" }
|
|
1598
1598
|
}, { label: t.invoice.sequence ?? t.invoice.subject ?? n.t("wise_invoicing.invoice.detail.fallback_title") }]);
|
|
1599
|
-
return (e, a) => (
|
|
1599
|
+
return (e, a) => (B(), N(He, {
|
|
1600
1600
|
"billing-document": t.invoice,
|
|
1601
1601
|
breadcrumbs: i.value,
|
|
1602
|
-
title:
|
|
1602
|
+
title: V(n).t("wise_invoicing.invoice.detail.fallback_title")
|
|
1603
1603
|
}, {
|
|
1604
|
-
header:
|
|
1604
|
+
header: H(() => [L(rn, {
|
|
1605
1605
|
invoice: t.invoice,
|
|
1606
1606
|
"is-pdf-view-active": r.value,
|
|
1607
1607
|
class: "w-full",
|
|
1608
1608
|
onTogglePdfView: a[0] ||= (e) => r.value = !r.value
|
|
1609
1609
|
}, null, 8, ["invoice", "is-pdf-view-active"])]),
|
|
1610
|
-
default:
|
|
1610
|
+
default: H(() => [r.value ? (B(), N(ze, {
|
|
1611
1611
|
key: 0,
|
|
1612
1612
|
"billing-document": t.invoice,
|
|
1613
1613
|
class: "w-full"
|
|
1614
|
-
}, null, 8, ["billing-document"])) : (
|
|
1615
|
-
|
|
1614
|
+
}, null, 8, ["billing-document"])) : (B(), F(j, { key: 1 }, [
|
|
1615
|
+
L(Ln, {
|
|
1616
1616
|
"custom-field-definitions": t.customFieldDefinitions,
|
|
1617
1617
|
invoice: t.invoice
|
|
1618
1618
|
}, null, 8, ["custom-field-definitions", "invoice"]),
|
|
1619
|
-
|
|
1619
|
+
V(D).isEditable(t.invoice.status) ? P("", !0) : (B(), N(jn, {
|
|
1620
1620
|
key: 0,
|
|
1621
1621
|
invoice: t.invoice,
|
|
1622
1622
|
class: "w-full"
|
|
1623
1623
|
}, null, 8, ["invoice"])),
|
|
1624
|
-
|
|
1624
|
+
L(on, {
|
|
1625
1625
|
invoice: t.invoice,
|
|
1626
1626
|
class: "w-full"
|
|
1627
1627
|
}, null, 8, ["invoice"]),
|
|
1628
|
-
|
|
1628
|
+
L(cn, {
|
|
1629
1629
|
invoice: t.invoice,
|
|
1630
1630
|
class: "w-full"
|
|
1631
1631
|
}, null, 8, ["invoice"])
|
|
1632
1632
|
], 64))]),
|
|
1633
|
-
sidebar:
|
|
1633
|
+
sidebar: H(() => [L(bn, {
|
|
1634
1634
|
"custom-field-definitions": t.customFieldDefinitions,
|
|
1635
1635
|
invoice: t.invoice
|
|
1636
1636
|
}, null, 8, ["custom-field-definitions", "invoice"])]),
|
|
@@ -1641,20 +1641,20 @@ var Pn = D.object({
|
|
|
1641
1641
|
"title"
|
|
1642
1642
|
]));
|
|
1643
1643
|
}
|
|
1644
|
-
}), zn = /* @__PURE__ */
|
|
1644
|
+
}), zn = /* @__PURE__ */ R({
|
|
1645
1645
|
__name: "InvoiceDetailViewDataProvider",
|
|
1646
1646
|
props: { invoiceUuid: {} },
|
|
1647
1647
|
setup(e) {
|
|
1648
|
-
let t = e, n =
|
|
1648
|
+
let t = e, n = A(), r = M(() => [{
|
|
1649
1649
|
label: n.t("wise_invoicing.invoice.overview.title"),
|
|
1650
1650
|
to: { name: "invoicing-invoice-overview" }
|
|
1651
|
-
}]), i =
|
|
1652
|
-
return (e, t) => (
|
|
1653
|
-
"custom-field-definitions-query":
|
|
1654
|
-
query:
|
|
1651
|
+
}]), i = Xe(M(() => t.invoiceUuid)), a = he();
|
|
1652
|
+
return (e, t) => (B(), N(We, {
|
|
1653
|
+
"custom-field-definitions-query": V(a),
|
|
1654
|
+
query: V(i),
|
|
1655
1655
|
"loading-breadcrumbs": r.value
|
|
1656
1656
|
}, {
|
|
1657
|
-
default:
|
|
1657
|
+
default: H(({ billingDocument: e, customFieldDefinitions: t }) => [L(Rn, {
|
|
1658
1658
|
"custom-field-definitions": t,
|
|
1659
1659
|
invoice: e
|
|
1660
1660
|
}, null, 8, ["custom-field-definitions", "invoice"])]),
|