@wisemen/wise-invoicing-web 0.11.2 → 0.12.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-D0kpogSQ.js → ApprovalReminderSettingsViewDataProvider-BnHeEMZD.js} +6 -10
- package/dist/{BillingDocumentDetailViewDataProvider-D_oc3-0D.js → BillingDocumentDetailViewDataProvider-Dm8C5WNN.js} +1311 -1327
- package/dist/{BillingDocumentPdf-wlv-k8KE.js → BillingDocumentPdf-57ksqoPW.js} +16 -22
- package/dist/{CreditNoteDetailViewDataProvider-DoFm2xgo.js → CreditNoteDetailViewDataProvider-CC4gnwSN.js} +154 -172
- package/dist/{CreditNotePdfViewDataProvider-QpzNsVsK.js → CreditNotePdfViewDataProvider-C9vgN3kV.js} +4 -4
- package/dist/{CustomFieldValueText-DZzqLZ0K.js → CustomFieldValueText-CvWq0fl_.js} +3 -3
- package/dist/{DataProvider-C3uEds9v.js → DataProvider-BtnD-BzI.js} +1 -1
- package/dist/{DunningCaseSendDialog-Bol8NF1J.js → DunningCaseSendDialog-CfWSrquA.js} +6 -14
- package/dist/{InvoiceApprovalOutOfSyncIndicator-C4ZLDRiv.js → InvoiceApprovalOutOfSyncIndicator-CKLAraIU.js} +1 -1
- package/dist/{InvoiceApprovalOverviewView-BAmEOum7.js → InvoiceApprovalOverviewView-DpL-vV8_.js} +10 -18
- package/dist/{InvoiceApprovalStatusBadge-C2Wj9b_Z.js → InvoiceApprovalStatusBadge-oVWkCqZY.js} +3 -3
- package/dist/{InvoiceApproveDialogDataProvider-S81Mc5oS.js → InvoiceApproveDialogDataProvider-serNDdl9.js} +16 -32
- package/dist/{InvoiceDetailViewDataProvider-Dqu6qlky.js → InvoiceDetailViewDataProvider-BaT7fgsi.js} +591 -665
- package/dist/{InvoicePdfView-D0G-Pik3.js → InvoicePdfView-MaBnd78V.js} +2 -2
- package/dist/{InvoicePdfViewDataProvider-DXXbPe-Z.js → InvoicePdfViewDataProvider-BIHBY608.js} +4 -4
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-CdGFZD-G.js → InvoicePublicProFormaPdfViewDataProvider-KY8pN59k.js} +4 -4
- package/dist/{InvoicingFileUploadProvider-BsK5eRGE.js → InvoicingFileUploadProvider-CxmF68sz.js} +2 -2
- package/dist/IssuerSettingsViewDataProvider-DJzVZS8Q.js +543 -0
- package/dist/{PeppolSettingsViewDataProvider-ZdJQGqux.js → PeppolSettingsViewDataProvider-C7lwtu7n.js} +6 -20
- package/dist/{api.util-B3JqQVJA.js → api.util-Ct8FnoLB.js} +628 -547
- package/dist/{billingDocumentDetail.transformer-CcnSe7Fz.js → billingDocumentDetail.transformer-B3ypgtIv.js} +4 -2
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.gen.d.ts +177 -7
- package/dist/client/zod.gen.d.ts +406 -6
- package/dist/composables/invoicingConfig.composable.d.ts +15 -0
- package/dist/{creditNoteDetail.query-BVbXoNt-.js → creditNoteDetail.query-C2BYvPKC.js} +5 -3
- package/dist/{dist-DALBiuub.js → dist-BZgvL8_m.js} +19 -30
- package/dist/{documentTitle.composable-RvqrZTBa.js → documentTitle.composable-BqZWKGw1.js} +35 -29
- package/dist/{i18n.lib-BkdaaKCs.js → i18n.lib-8sQYo5_y.js} +101 -7
- package/dist/index.d.ts +96 -2
- package/dist/index.js +4517 -228
- package/dist/{invoice.service-jakQLnDu.js → invoice.service-CtePUw1R.js} +8 -5
- package/dist/{invoiceApproval.service-DR9g1Dek.js → invoiceApproval.service-CQzG8_wX.js} +2 -2
- package/dist/{invoiceApprovalStatus.util-Nd4E3qlZ.js → invoiceApprovalStatus.util-C4su45dU.js} +2 -2
- package/dist/{invoiceCustomer.service-Bp59E0ZJ.js → invoiceCustomer.service-CzbM3ey1.js} +2 -2
- package/dist/{invoiceDetail.query-BBhA0ZAn.js → invoiceDetail.query-NNAoIuWN.js} +1 -1
- package/dist/{invoiceIndexCache.util-Ba2MGULh.js → invoiceIndexCache.util-DI0WM-eW.js} +4 -8
- package/dist/{invoicingConfig.composable-k8p1Y_eJ.js → invoicingConfig.composable-DXJ71Uq_.js} +20 -18
- package/dist/issuerSettings.query-ggEHdk0S.js +204 -0
- package/dist/libs/i18n.lib.d.ts +96 -2
- package/dist/locales/en-US.json.d.ts +50 -3
- package/dist/locales/nl-BE.json.d.ts +51 -4
- package/dist/models/billing-document/billingDocumentCreditable.util.d.ts +19 -0
- package/dist/models/billing-document/billingDocumentCreditable.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +2 -0
- package/dist/models/billing-document/billingDocumentUpdateLines.model.d.ts +2 -0
- package/dist/modules/invoice/models/invoice/detail/invoiceDetail.model.d.ts +4 -1
- package/dist/modules/invoice/models/invoice/index/invoiceIndexQueryParams.model.d.ts +1 -0
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewFilters.composable.d.ts +1 -1
- package/dist/modules/invoice/use-cases/overview/composables/invoiceOverviewFilters.composable.spec.d.ts +1 -0
- package/dist/modules/settings/api/mutations/issuerSettingsUpdate.mutation.d.ts +22 -1
- package/dist/modules/settings/models/issuer-settings/invoiceSequenceFormat.util.d.ts +16 -0
- package/dist/modules/settings/models/issuer-settings/invoiceSequenceFormat.util.spec.d.ts +1 -0
- package/dist/modules/settings/models/issuer-settings/issuerSettings.model.d.ts +7 -2
- package/dist/modules/settings/models/issuer-settings/issuerSettings.transformer.d.ts +2 -0
- package/dist/modules/settings/models/issuer-settings/issuerSettingsForm.model.d.ts +23 -2
- package/dist/modules/settings/use-cases/overview/components/InvoiceSequenceFormatFields.vue.d.ts +11 -0
- package/dist/modules/settings/use-cases/overview/components/InvoiceSequenceNumberPreview.vue.d.ts +12 -0
- package/dist/modules/settings/use-cases/overview/components/InvoiceSequencePreviewCard.vue.d.ts +13 -0
- package/dist/modules/settings/use-cases/overview/components/SharedSequencePreviewCard.vue.d.ts +8 -0
- package/dist/modules/settings/use-cases/overview/composables/sequenceFormatFields.composable.d.ts +16 -0
- package/dist/{reminderConfig.query-BIfCEIYX.js → reminderConfig.query-C2xT3DJH.js} +2 -2
- package/dist/{src-DUSgQTKr.js → src-Vz2dm4sM.js} +1 -3
- package/dist/style.css +1 -1
- package/dist/types/apiError.type.d.ts +2 -2
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +24 -0
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +4 -0
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +4 -0
- package/package.json +2 -2
- package/dist/DunningCaseDetailViewDataProvider-uRJFWZtQ.js +0 -439
- package/dist/DunningCaseOverviewView-DpQoXamE.js +0 -799
- package/dist/DunningCaseReminderPdfViewDataProvider-D-CfDeC8.js +0 -490
- package/dist/InvoiceOverviewViewDataProvider-WKzgF7cl.js +0 -1929
- package/dist/InvoicePublicPdfViewDataProvider-ndVoAAY3.js +0 -45
- package/dist/IssuerSettingsViewDataProvider-Ca7GPCDE.js +0 -193
- package/dist/ReminderSettingsViewDataProvider-DTC0Ud5z.js +0 -709
- package/dist/issuerSettings.query-BOgWdNmP.js +0 -118
- package/dist/rolldown-runtime-Dy4uBu1J.js +0 -11
- /package/dist/{DunningCaseReminderPdfViewDataProvider.css → index.css} +0 -0
|
@@ -1,490 +0,0 @@
|
|
|
1
|
-
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
-
import { lt as t, t as n } from "./api.util-B3JqQVJA.js";
|
|
3
|
-
import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
-
import { n as i } from "./src-DUSgQTKr.js";
|
|
5
|
-
import { n as a, t as o } from "./address.transformer-jGddczLV.js";
|
|
6
|
-
import { n as s, r as c, t as l } from "./plainDate.transformer-Bhiz9jW7.js";
|
|
7
|
-
import { n as u, r as ee } from "./dist-Cdbpkd3Y.js";
|
|
8
|
-
import { useI18n as d } from "vue-i18n";
|
|
9
|
-
import { Fragment as f, computed as p, createBlock as m, createCommentVNode as h, createElementBlock as g, createElementVNode as _, createTextVNode as te, createVNode as v, defineComponent as y, normalizeClass as b, onUnmounted as x, openBlock as S, renderList as C, toDisplayString as w, unref as T, withCtx as E } from "vue";
|
|
10
|
-
import { useQuery as D } from "@wisemen/vue-core-api-utils";
|
|
11
|
-
import { UIColumnLayout as O, UIEmptyState as ne, UIRowLayout as k, UIText as A, UIThemeProvider as j } from "@wisemen/vue-core-design-system";
|
|
12
|
-
import { useRouteQuery as M } from "@vueuse/router";
|
|
13
|
-
//#region src/modules/dunning-case/models/dunningCaseReminderPdf.transformer.ts
|
|
14
|
-
var N = class e {
|
|
15
|
-
static fromInvoiceDto(e) {
|
|
16
|
-
return {
|
|
17
|
-
dueOn: l.fromDto(e.dueOn),
|
|
18
|
-
issuedOn: l.fromDto(e.issuedOn),
|
|
19
|
-
isNew: e.isNew,
|
|
20
|
-
daysOverdue: e.daysOverdue,
|
|
21
|
-
fee: s.fromDto(e.fee),
|
|
22
|
-
level: e.level,
|
|
23
|
-
outstandingBalance: s.fromDto(e.outstandingBalance),
|
|
24
|
-
sequence: e.sequence
|
|
25
|
-
};
|
|
26
|
-
}
|
|
27
|
-
static fromOutstandingInvoiceDto(e) {
|
|
28
|
-
return {
|
|
29
|
-
dueOn: l.fromDto(e.dueOn),
|
|
30
|
-
issuedOn: l.fromDto(e.issuedOn),
|
|
31
|
-
isNew: !1,
|
|
32
|
-
daysOverdue: e.daysOverdue,
|
|
33
|
-
fee: null,
|
|
34
|
-
level: null,
|
|
35
|
-
outstandingBalance: s.fromDto(e.outstandingBalance),
|
|
36
|
-
sequence: e.sequence
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
|
-
static fromPublicDto(t) {
|
|
40
|
-
let n = new Set(t.invoices.map((e) => e.sequence)), r = t.outstandingInvoices.filter((e) => e.daysOverdue > 0 && !n.has(e.sequence));
|
|
41
|
-
return {
|
|
42
|
-
createdAt: c.fromDto(t.createdAt),
|
|
43
|
-
sentAt: c.fromNullableDto(t.sentAt),
|
|
44
|
-
issuer: {
|
|
45
|
-
name: t.issuer.name,
|
|
46
|
-
address: o.fromNullableDto(t.issuer.address),
|
|
47
|
-
alternativeBankAccountNumber: t.issuer.alternativeBankAccountNumber,
|
|
48
|
-
bankAccountNumber: t.issuer.bankAccountNumber,
|
|
49
|
-
email: t.issuer.email,
|
|
50
|
-
phoneNumber: t.issuer.phoneNumber,
|
|
51
|
-
vatNumber: t.issuer.vatNumber,
|
|
52
|
-
website: t.issuer.website
|
|
53
|
-
},
|
|
54
|
-
customer: {
|
|
55
|
-
name: t.customer.name,
|
|
56
|
-
address: o.fromNullableDto(t.customer.address),
|
|
57
|
-
locale: t.customer.locale
|
|
58
|
-
},
|
|
59
|
-
invoices: [...t.invoices.map(e.fromInvoiceDto), ...r.map(e.fromOutstandingInvoiceDto)].toSorted((e, t) => (t.level ?? 0) - (e.level ?? 0) || t.outstandingBalance.amount - e.outstandingBalance.amount),
|
|
60
|
-
level: t.level,
|
|
61
|
-
outstandingInvoices: t.outstandingInvoices.filter((e) => e.daysOverdue <= 0).map(e.fromOutstandingInvoiceDto),
|
|
62
|
-
recipient: {
|
|
63
|
-
name: t.recipient.name,
|
|
64
|
-
email: t.recipient.email
|
|
65
|
-
},
|
|
66
|
-
totalFee: s.fromDto(t.totalFee)
|
|
67
|
-
};
|
|
68
|
-
}
|
|
69
|
-
}, P = class {
|
|
70
|
-
static async get(e) {
|
|
71
|
-
return (await n.fromPromise(t({
|
|
72
|
-
query: { token: e },
|
|
73
|
-
responseValidator: void 0
|
|
74
|
-
}))).map((e) => N.fromPublicDto(e.data));
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/modules/dunning-case/use-cases/pdf/api/dunningCaseReminderPdf.query.ts
|
|
79
|
-
function F(e) {
|
|
80
|
-
return D("dunningCaseReminderPdf", {
|
|
81
|
-
isEnabled: p(() => e.value !== null),
|
|
82
|
-
params: { token: e },
|
|
83
|
-
queryFn: () => {
|
|
84
|
-
if (e.value === null) throw Error("Token is required to fetch a dunning reminder PDF");
|
|
85
|
-
return P.get(e.value);
|
|
86
|
-
}
|
|
87
|
-
});
|
|
88
|
-
}
|
|
89
|
-
//#endregion
|
|
90
|
-
//#region src/modules/dunning-case/use-cases/pdf/components/DunningCaseReminderPdfFooter.vue
|
|
91
|
-
var I = /* @__PURE__ */ y({
|
|
92
|
-
__name: "DunningCaseReminderPdfFooter",
|
|
93
|
-
props: { issuer: {} },
|
|
94
|
-
setup(e) {
|
|
95
|
-
let t = e, n = d(), r = p(() => t.issuer.name ?? n.t("module.dunning_case.pdf.not_available")), i = p(() => a.formatLines(t.issuer.address).join(", ")), o = p(() => t.issuer.bankAccountNumber ?? t.issuer.alternativeBankAccountNumber);
|
|
96
|
-
function s(...e) {
|
|
97
|
-
return e.flatMap(([e, t]) => t === null || t === "" ? [] : `${e}: ${t}`);
|
|
98
|
-
}
|
|
99
|
-
let c = p(() => [s([n.t("module.dunning_case.pdf.footer.email"), t.issuer.email], [n.t("module.dunning_case.pdf.footer.phone"), t.issuer.phoneNumber]), s([n.t("module.dunning_case.pdf.footer.address"), i.value], [n.t("module.dunning_case.pdf.footer.vat_number"), t.issuer.vatNumber], [n.t("module.dunning_case.pdf.footer.iban"), o.value])].filter((e) => e.length > 0));
|
|
100
|
-
return (e, t) => (S(), m(T(O), {
|
|
101
|
-
as: "footer",
|
|
102
|
-
align: "stretch",
|
|
103
|
-
gap: "none",
|
|
104
|
-
class: "mt-auto py-2xl text-[8px]/4.5 text-primary"
|
|
105
|
-
}, {
|
|
106
|
-
default: E(() => [v(T(k), { gap: "lg" }, {
|
|
107
|
-
default: E(() => [
|
|
108
|
-
t[0] ||= _("span", { class: "w-53.5 border-t border-secondary" }, null, -1),
|
|
109
|
-
v(T(A), {
|
|
110
|
-
text: r.value,
|
|
111
|
-
truncate: !1,
|
|
112
|
-
class: "text-[10px] font-semibold"
|
|
113
|
-
}, null, 8, ["text"]),
|
|
114
|
-
t[1] ||= _("span", { class: "flex-1 border-t border-secondary" }, null, -1)
|
|
115
|
-
]),
|
|
116
|
-
_: 1
|
|
117
|
-
}), (S(!0), g(f, null, C(c.value, (e) => (S(), m(T(k), {
|
|
118
|
-
key: e.join(),
|
|
119
|
-
gap: "none",
|
|
120
|
-
justify: "center",
|
|
121
|
-
class: "flex-wrap gap-x-md"
|
|
122
|
-
}, {
|
|
123
|
-
default: E(() => [(S(!0), g(f, null, C(e, (e) => (S(), m(T(A), {
|
|
124
|
-
key: e,
|
|
125
|
-
text: e,
|
|
126
|
-
truncate: !1
|
|
127
|
-
}, null, 8, ["text"]))), 128))]),
|
|
128
|
-
_: 2
|
|
129
|
-
}, 1024))), 128))]),
|
|
130
|
-
_: 1
|
|
131
|
-
}));
|
|
132
|
-
}
|
|
133
|
-
}), L = {
|
|
134
|
-
introKey: "module.dunning_case.pdf.body.intro_repeat",
|
|
135
|
-
paymentKey: "module.dunning_case.pdf.body.payment.level_3",
|
|
136
|
-
subtitleKey: "module.dunning_case.pdf.subtitle.level_3"
|
|
137
|
-
}, R = {
|
|
138
|
-
1: {
|
|
139
|
-
introKey: "module.dunning_case.pdf.body.intro_first",
|
|
140
|
-
paymentKey: "module.dunning_case.pdf.body.payment.level_1",
|
|
141
|
-
subtitleKey: "module.dunning_case.pdf.subtitle.level_1"
|
|
142
|
-
},
|
|
143
|
-
2: {
|
|
144
|
-
introKey: "module.dunning_case.pdf.body.intro_repeat",
|
|
145
|
-
paymentKey: "module.dunning_case.pdf.body.payment.level_2",
|
|
146
|
-
subtitleKey: "module.dunning_case.pdf.subtitle.level_2"
|
|
147
|
-
},
|
|
148
|
-
3: L
|
|
149
|
-
}, z = class {
|
|
150
|
-
static add(e, t) {
|
|
151
|
-
return {
|
|
152
|
-
amount: e.amount + t.amount,
|
|
153
|
-
currency: e.currency,
|
|
154
|
-
precision: e.precision
|
|
155
|
-
};
|
|
156
|
-
}
|
|
157
|
-
static getLetterCopy(e) {
|
|
158
|
-
return R[e] ?? L;
|
|
159
|
-
}
|
|
160
|
-
static getTotal(e) {
|
|
161
|
-
let [t] = e;
|
|
162
|
-
return t === void 0 ? null : {
|
|
163
|
-
amount: e.reduce((e, t) => e + t.outstandingBalance.amount, 0),
|
|
164
|
-
currency: t.outstandingBalance.currency,
|
|
165
|
-
precision: t.outstandingBalance.precision
|
|
166
|
-
};
|
|
167
|
-
}
|
|
168
|
-
}, B = { class: "font-medium whitespace-nowrap" }, V = /* @__PURE__ */ y({
|
|
169
|
-
__name: "DunningCaseReminderPdfHeader",
|
|
170
|
-
props: { reminder: {} },
|
|
171
|
-
setup(e) {
|
|
172
|
-
let t = e, n = d(), r = u(), i = p(() => t.reminder.issuer.name ?? n.t("module.dunning_case.pdf.not_available")), o = p(() => a.formatLines(t.reminder.customer.address)), s = p(() => n.t(z.getLetterCopy(t.reminder.level).subtitleKey)), c = p(() => t.reminder.sentAt === null ? n.t("module.dunning_case.pdf.created_date") : n.t("module.dunning_case.pdf.reminder_date")), l = p(() => r.toDate(t.reminder.sentAt ?? t.reminder.createdAt));
|
|
173
|
-
return (e, r) => (S(), m(T(O), {
|
|
174
|
-
as: "header",
|
|
175
|
-
align: "center",
|
|
176
|
-
class: "pt-5xl pb-2xl"
|
|
177
|
-
}, {
|
|
178
|
-
default: E(() => [v(T(k), {
|
|
179
|
-
as: "p",
|
|
180
|
-
justify: "center",
|
|
181
|
-
class: "min-h-9 max-w-56 text-center text-sm font-semibold wrap-break-word"
|
|
182
|
-
}, {
|
|
183
|
-
default: E(() => [te(w(i.value), 1)]),
|
|
184
|
-
_: 1
|
|
185
|
-
}), v(T(k), {
|
|
186
|
-
align: "start",
|
|
187
|
-
justify: "between",
|
|
188
|
-
class: "w-full"
|
|
189
|
-
}, {
|
|
190
|
-
default: E(() => [v(T(O), null, {
|
|
191
|
-
default: E(() => [
|
|
192
|
-
v(T(A), {
|
|
193
|
-
text: T(n).t("module.dunning_case.pdf.payment_request"),
|
|
194
|
-
truncate: !1,
|
|
195
|
-
as: "h1",
|
|
196
|
-
class: "text-lg/7 font-medium"
|
|
197
|
-
}, null, 8, ["text"]),
|
|
198
|
-
v(T(A), {
|
|
199
|
-
text: s.value,
|
|
200
|
-
truncate: !1,
|
|
201
|
-
as: "p",
|
|
202
|
-
class: "text-secondary"
|
|
203
|
-
}, null, 8, ["text"]),
|
|
204
|
-
v(T(O), {
|
|
205
|
-
as: "address",
|
|
206
|
-
gap: "xs",
|
|
207
|
-
class: "leading-4.5 not-italic"
|
|
208
|
-
}, {
|
|
209
|
-
default: E(() => [v(T(A), {
|
|
210
|
-
text: T(n).t("module.dunning_case.pdf.customer"),
|
|
211
|
-
truncate: !1,
|
|
212
|
-
as: "p",
|
|
213
|
-
class: "leading-3.5 font-semibold"
|
|
214
|
-
}, null, 8, ["text"]), _("div", null, [
|
|
215
|
-
_("p", null, w(t.reminder.customer.name), 1),
|
|
216
|
-
(S(!0), g(f, null, C(o.value, (e) => (S(), g("p", { key: e }, w(e), 1))), 128)),
|
|
217
|
-
_("p", null, w(t.reminder.recipient.email), 1)
|
|
218
|
-
])]),
|
|
219
|
-
_: 1
|
|
220
|
-
})
|
|
221
|
-
]),
|
|
222
|
-
_: 1
|
|
223
|
-
}), v(T(k), {
|
|
224
|
-
as: "dl",
|
|
225
|
-
align: "start",
|
|
226
|
-
gap: "xl",
|
|
227
|
-
justify: "between",
|
|
228
|
-
class: "w-36.25 leading-4.5"
|
|
229
|
-
}, {
|
|
230
|
-
default: E(() => [_("dt", B, w(c.value), 1), _("dd", null, w(l.value), 1)]),
|
|
231
|
-
_: 1
|
|
232
|
-
})]),
|
|
233
|
-
_: 1
|
|
234
|
-
})]),
|
|
235
|
-
_: 1
|
|
236
|
-
}));
|
|
237
|
-
}
|
|
238
|
-
}), H = { class: "overflow-hidden rounded-xs border border-secondary print:overflow-visible" }, U = { class: "w-full table-fixed border-collapse text-left text-[9px] text-primary" }, W = { class: "bg-secondary-subtle" }, G = { class: "truncate px-lg" }, K = { class: "font-medium" }, q = { class: "block text-[7px] text-secondary" }, J = { class: "truncate px-sm font-medium" }, Y = {
|
|
239
|
-
key: 0,
|
|
240
|
-
class: "px-sm"
|
|
241
|
-
}, X = { class: "px-sm" }, re = { class: "truncate px-lg text-right font-semibold" }, ie = {
|
|
242
|
-
key: 1,
|
|
243
|
-
class: "truncate px-sm text-right font-semibold"
|
|
244
|
-
}, ae = {
|
|
245
|
-
key: 2,
|
|
246
|
-
class: "px-sm text-center"
|
|
247
|
-
}, Z = /* @__PURE__ */ y({
|
|
248
|
-
__name: "DunningCaseReminderPdfTable",
|
|
249
|
-
props: {
|
|
250
|
-
isOverdue: {
|
|
251
|
-
type: Boolean,
|
|
252
|
-
default: !1
|
|
253
|
-
},
|
|
254
|
-
rows: {}
|
|
255
|
-
},
|
|
256
|
-
setup(e) {
|
|
257
|
-
let t = e, n = d(), i = r(), a = u(), o = p(() => t.isOverdue ? [
|
|
258
|
-
{
|
|
259
|
-
class: "w-21.5 px-lg",
|
|
260
|
-
label: n.t("module.dunning_case.pdf.table.invoice")
|
|
261
|
-
},
|
|
262
|
-
{
|
|
263
|
-
class: "w-15.5 px-sm",
|
|
264
|
-
label: n.t("module.dunning_case.pdf.table.due_date")
|
|
265
|
-
},
|
|
266
|
-
{
|
|
267
|
-
class: "w-19 px-sm",
|
|
268
|
-
label: n.t("module.dunning_case.pdf.table.reminder")
|
|
269
|
-
},
|
|
270
|
-
{
|
|
271
|
-
class: "w-18 px-sm",
|
|
272
|
-
label: n.t("module.dunning_case.pdf.table.days_overdue")
|
|
273
|
-
},
|
|
274
|
-
{
|
|
275
|
-
class: "w-27 px-lg text-right",
|
|
276
|
-
label: n.t("module.dunning_case.pdf.table.remaining_balance")
|
|
277
|
-
},
|
|
278
|
-
{
|
|
279
|
-
class: "w-18 px-sm text-right",
|
|
280
|
-
label: n.t("module.dunning_case.pdf.table.reminder_fee")
|
|
281
|
-
},
|
|
282
|
-
{
|
|
283
|
-
class: "w-9 px-sm text-center",
|
|
284
|
-
label: n.t("module.dunning_case.pdf.table.new")
|
|
285
|
-
}
|
|
286
|
-
] : [
|
|
287
|
-
{
|
|
288
|
-
class: "px-lg",
|
|
289
|
-
label: n.t("module.dunning_case.pdf.table.invoice")
|
|
290
|
-
},
|
|
291
|
-
{
|
|
292
|
-
class: "px-sm",
|
|
293
|
-
label: n.t("module.dunning_case.pdf.table.due_date")
|
|
294
|
-
},
|
|
295
|
-
{
|
|
296
|
-
class: "px-sm",
|
|
297
|
-
label: n.t("module.dunning_case.pdf.table.days_until_due")
|
|
298
|
-
},
|
|
299
|
-
{
|
|
300
|
-
class: "w-28 px-lg text-right",
|
|
301
|
-
label: n.t("module.dunning_case.pdf.table.remaining_balance")
|
|
302
|
-
}
|
|
303
|
-
]);
|
|
304
|
-
return (e, n) => (S(), g("div", H, [_("table", U, [_("thead", W, [_("tr", null, [(S(!0), g(f, null, C(o.value, (e) => (S(), g("th", {
|
|
305
|
-
key: e.label,
|
|
306
|
-
class: b([e.class, "h-(--spacing-3xl) py-md font-semibold"])
|
|
307
|
-
}, w(e.label), 3))), 128))])]), _("tbody", null, [(S(!0), g(f, null, C(t.rows, (e, n) => (S(), g("tr", {
|
|
308
|
-
key: `${e.sequence}-${n}`,
|
|
309
|
-
class: "h-(--spacing-3xl) break-inside-avoid border-t border-secondary even:bg-secondary-subtle"
|
|
310
|
-
}, [
|
|
311
|
-
_("td", G, [_("span", K, w(e.sequence), 1), _("span", q, w(T(a).formatPlainDate(e.issuedOn)), 1)]),
|
|
312
|
-
_("td", J, w(T(a).formatPlainDate(e.dueOn)), 1),
|
|
313
|
-
t.isOverdue ? (S(), g("td", Y, w(e.level), 1)) : h("", !0),
|
|
314
|
-
_("td", X, w(t.isOverdue ? e.daysOverdue : -e.daysOverdue), 1),
|
|
315
|
-
_("td", re, w(T(i).formatMonetary(e.outstandingBalance)), 1),
|
|
316
|
-
t.isOverdue ? (S(), g("td", ie, w(e.fee === null ? "-" : T(i).formatMonetary(e.fee)), 1)) : h("", !0),
|
|
317
|
-
t.isOverdue ? (S(), g("td", ae, w(e.isNew ? "✓" : ""), 1)) : h("", !0)
|
|
318
|
-
]))), 128))])])]));
|
|
319
|
-
}
|
|
320
|
-
}), oe = /* @__PURE__ */ y({
|
|
321
|
-
__name: "DunningCaseReminderPdfTotals",
|
|
322
|
-
props: { reminder: {} },
|
|
323
|
-
setup(e) {
|
|
324
|
-
let t = e, n = d(), i = r(), a = p(() => z.getTotal(t.reminder.invoices)), o = p(() => a.value === null ? null : z.add(a.value, t.reminder.totalFee));
|
|
325
|
-
function s(e) {
|
|
326
|
-
return e === null ? n.t("module.dunning_case.pdf.not_available") : i.formatMonetary(e);
|
|
327
|
-
}
|
|
328
|
-
let c = p(() => [
|
|
329
|
-
{
|
|
330
|
-
class: "text-secondary",
|
|
331
|
-
label: n.t("module.dunning_case.pdf.total.amount_due"),
|
|
332
|
-
value: s(a.value)
|
|
333
|
-
},
|
|
334
|
-
{
|
|
335
|
-
class: "border-t border-secondary pt-md text-secondary",
|
|
336
|
-
label: n.t("module.dunning_case.pdf.total.reminder_fees"),
|
|
337
|
-
value: i.formatMonetary(t.reminder.totalFee)
|
|
338
|
-
},
|
|
339
|
-
{
|
|
340
|
-
class: "font-semibold",
|
|
341
|
-
label: n.t("module.dunning_case.pdf.total.debt"),
|
|
342
|
-
value: s(o.value)
|
|
343
|
-
}
|
|
344
|
-
]);
|
|
345
|
-
return (e, t) => (S(), m(T(O), {
|
|
346
|
-
as: "dl",
|
|
347
|
-
align: "stretch",
|
|
348
|
-
class: "w-58.25 break-inside-avoid leading-5"
|
|
349
|
-
}, {
|
|
350
|
-
default: E(() => [(S(!0), g(f, null, C(c.value, (e) => (S(), m(T(k), {
|
|
351
|
-
key: e.label,
|
|
352
|
-
class: b(e.class),
|
|
353
|
-
gap: "xl",
|
|
354
|
-
justify: "between"
|
|
355
|
-
}, {
|
|
356
|
-
default: E(() => [_("dt", null, w(e.label), 1), _("dd", null, w(e.value), 1)]),
|
|
357
|
-
_: 2
|
|
358
|
-
}, 1032, ["class"]))), 128))]),
|
|
359
|
-
_: 1
|
|
360
|
-
}));
|
|
361
|
-
}
|
|
362
|
-
}), se = { class: "min-h-screen bg-secondary py-4xl print:bg-primary print:p-none" }, Q = /* @__PURE__ */ y({
|
|
363
|
-
__name: "DunningCaseReminderPdfView",
|
|
364
|
-
props: { reminder: {} },
|
|
365
|
-
setup(e) {
|
|
366
|
-
let t = e, n = d(), r = ee(), a = i(), o = n.locale.value, s = {
|
|
367
|
-
dateFormat: r.dateFormat.value,
|
|
368
|
-
locale: r.locale.value
|
|
369
|
-
};
|
|
370
|
-
n.locale.value = t.reminder.customer.locale, r.update({
|
|
371
|
-
dateFormat: "locale-default",
|
|
372
|
-
locale: t.reminder.customer.locale
|
|
373
|
-
}), x(() => {
|
|
374
|
-
n.locale.value = o, r.update(s);
|
|
375
|
-
}), a.set(() => n.t("module.dunning_case.pdf.document_title", { customer: t.reminder.customer.name }));
|
|
376
|
-
let c = p(() => z.getLetterCopy(t.reminder.level)), l = p(() => t.reminder.issuer.name ?? n.t("module.dunning_case.pdf.not_available")), u = p(() => t.reminder.issuer.bankAccountNumber ?? t.reminder.issuer.alternativeBankAccountNumber ?? n.t("module.dunning_case.pdf.not_available"));
|
|
377
|
-
return (e, r) => (S(), g("main", se, [v(T(O), {
|
|
378
|
-
as: "article",
|
|
379
|
-
align: "stretch",
|
|
380
|
-
class: "mx-auto min-h-210.5 w-148.75 bg-primary px-5xl text-[10px] text-primary shadow-card [-webkit-print-color-adjust:exact] [print-color-adjust:exact] print:min-h-[297mm] print:w-[210mm] print:shadow-none"
|
|
381
|
-
}, {
|
|
382
|
-
default: E(() => [
|
|
383
|
-
v(V, { reminder: t.reminder }, null, 8, ["reminder"]),
|
|
384
|
-
v(T(O), {
|
|
385
|
-
as: "section",
|
|
386
|
-
align: "stretch"
|
|
387
|
-
}, {
|
|
388
|
-
default: E(() => [v(T(A), {
|
|
389
|
-
text: T(n).t("module.dunning_case.pdf.body.greeting"),
|
|
390
|
-
truncate: !1,
|
|
391
|
-
as: "p"
|
|
392
|
-
}, null, 8, ["text"]), v(T(A), {
|
|
393
|
-
text: T(n).t(c.value.introKey),
|
|
394
|
-
truncate: !1,
|
|
395
|
-
as: "p"
|
|
396
|
-
}, null, 8, ["text"])]),
|
|
397
|
-
_: 1
|
|
398
|
-
}),
|
|
399
|
-
_("section", null, [v(Z, {
|
|
400
|
-
rows: t.reminder.invoices,
|
|
401
|
-
"is-overdue": ""
|
|
402
|
-
}, null, 8, ["rows"])]),
|
|
403
|
-
v(T(k), {
|
|
404
|
-
as: "section",
|
|
405
|
-
justify: "end"
|
|
406
|
-
}, {
|
|
407
|
-
default: E(() => [v(oe, { reminder: t.reminder }, null, 8, ["reminder"])]),
|
|
408
|
-
_: 1
|
|
409
|
-
}),
|
|
410
|
-
v(T(O), {
|
|
411
|
-
as: "section",
|
|
412
|
-
align: "stretch"
|
|
413
|
-
}, {
|
|
414
|
-
default: E(() => [
|
|
415
|
-
v(T(A), {
|
|
416
|
-
text: T(n).t(c.value.paymentKey, { iban: u.value }),
|
|
417
|
-
truncate: !1,
|
|
418
|
-
as: "p"
|
|
419
|
-
}, null, 8, ["text"]),
|
|
420
|
-
v(T(A), {
|
|
421
|
-
text: T(n).t("module.dunning_case.pdf.body.disclaimer"),
|
|
422
|
-
truncate: !1,
|
|
423
|
-
as: "p"
|
|
424
|
-
}, null, 8, ["text"]),
|
|
425
|
-
v(T(O), {
|
|
426
|
-
align: "stretch",
|
|
427
|
-
gap: "none"
|
|
428
|
-
}, {
|
|
429
|
-
default: E(() => [v(T(A), {
|
|
430
|
-
text: T(n).t("module.dunning_case.pdf.body.closing"),
|
|
431
|
-
truncate: !1,
|
|
432
|
-
as: "p"
|
|
433
|
-
}, null, 8, ["text"]), v(T(A), {
|
|
434
|
-
text: l.value,
|
|
435
|
-
truncate: !1,
|
|
436
|
-
as: "p",
|
|
437
|
-
class: "font-semibold"
|
|
438
|
-
}, null, 8, ["text"])]),
|
|
439
|
-
_: 1
|
|
440
|
-
})
|
|
441
|
-
]),
|
|
442
|
-
_: 1
|
|
443
|
-
}),
|
|
444
|
-
t.reminder.outstandingInvoices.length > 0 ? (S(), m(T(O), {
|
|
445
|
-
key: 0,
|
|
446
|
-
as: "section",
|
|
447
|
-
align: "stretch"
|
|
448
|
-
}, {
|
|
449
|
-
default: E(() => [v(T(A), {
|
|
450
|
-
text: T(n).t("module.dunning_case.pdf.non_overdue_invoices"),
|
|
451
|
-
truncate: !1,
|
|
452
|
-
as: "p",
|
|
453
|
-
class: "break-after-avoid font-medium"
|
|
454
|
-
}, null, 8, ["text"]), v(Z, { rows: t.reminder.outstandingInvoices }, null, 8, ["rows"])]),
|
|
455
|
-
_: 1
|
|
456
|
-
})) : h("", !0),
|
|
457
|
-
v(I, { issuer: t.reminder.issuer }, null, 8, ["issuer"])
|
|
458
|
-
]),
|
|
459
|
-
_: 1
|
|
460
|
-
})]));
|
|
461
|
-
}
|
|
462
|
-
}), ce = ["data-pdf-error"], le = { key: 1 }, ue = /*@__PURE__*/ y({
|
|
463
|
-
__name: "DunningCaseReminderPdfViewDataProvider",
|
|
464
|
-
setup(e) {
|
|
465
|
-
let t = d(), n = M("token", null), r = F(p(() => n.value)), i = p(() => r.result.value?.isOk() ? r.result.value.getValue() : null), a = p(() => n.value === null ? {
|
|
466
|
-
title: t.t("module.dunning_case.pdf.missing_token_title"),
|
|
467
|
-
description: t.t("module.dunning_case.pdf.missing_token_description")
|
|
468
|
-
} : r.result.value?.isErr() === !0 ? {
|
|
469
|
-
title: t.t("module.dunning_case.pdf.load_error_title"),
|
|
470
|
-
description: t.t("module.dunning_case.pdf.load_error_description")
|
|
471
|
-
} : null);
|
|
472
|
-
return (e, n) => (S(), m(T(j), { appearance: "light" }, {
|
|
473
|
-
default: E(() => [i.value === null ? (S(), g("main", {
|
|
474
|
-
key: 1,
|
|
475
|
-
"data-pdf-error": a.value !== null || void 0,
|
|
476
|
-
class: "flex min-h-screen items-center justify-center bg-secondary p-xl text-primary"
|
|
477
|
-
}, [a.value === null ? (S(), g("p", le, w(T(t).t("module.dunning_case.common.loading")), 1)) : (S(), m(T(ne), {
|
|
478
|
-
key: 0,
|
|
479
|
-
description: a.value.description,
|
|
480
|
-
title: a.value.title
|
|
481
|
-
}, null, 8, ["description", "title"]))], 8, ce)) : (S(), m(Q, {
|
|
482
|
-
key: 0,
|
|
483
|
-
reminder: i.value
|
|
484
|
-
}, null, 8, ["reminder"]))]),
|
|
485
|
-
_: 1
|
|
486
|
-
}));
|
|
487
|
-
}
|
|
488
|
-
}), de = /* @__PURE__ */ e({ default: () => $ }), $ = ue;
|
|
489
|
-
//#endregion
|
|
490
|
-
export { de as n, $ as t };
|