@wisemen/wise-invoicing-web 0.0.5 → 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-DdaNbuI2.js → BillingDocumentDetailViewDataProvider-CmHbMXp0.js} +463 -469
- package/dist/{BillingDocumentPdf-D_NOfBhQ.js → BillingDocumentPdf-Dj_s1l_p.js} +2 -2
- package/dist/{CreditNoteDetailViewDataProvider-5ljhBOoN.js → CreditNoteDetailViewDataProvider-DPePmzgn.js} +68 -68
- package/dist/{CreditNotePdfViewDataProvider-CiWZN7Zy.js → CreditNotePdfViewDataProvider-Dp0zI0fB.js} +2 -2
- package/dist/{CustomFieldValueText-ne5yy02J.js → CustomFieldValueText-BGbQwhON.js} +1 -1
- package/dist/{DunningCaseDetailViewDataProvider-CetbSmjq.js → DunningCaseDetailViewDataProvider-CInwZwMc.js} +8 -8
- package/dist/{DunningCaseOverviewView-Bq0BKVXG.js → DunningCaseOverviewView-DvOmEcJY.js} +4 -4
- package/dist/DunningCaseReminderPdfViewDataProvider-I0I_WQQB.js +490 -0
- package/dist/{DunningCaseSendDialog-C47X_JjC.js → DunningCaseSendDialog-DISQ1Fs3.js} +2 -2
- package/dist/{InvoiceDetailViewDataProvider-DYH2ODDi.js → InvoiceDetailViewDataProvider-YOlvUavt.js} +411 -411
- package/dist/{InvoiceOverviewViewDataProvider-BT9cuQXw.js → InvoiceOverviewViewDataProvider-i8tXATJE.js} +47 -47
- package/dist/{InvoicePdfView-ug0BiMqe.js → InvoicePdfView-Desmlys1.js} +1 -1
- package/dist/{InvoicePdfViewDataProvider-WvjMiEZG.js → InvoicePdfViewDataProvider--CHm0HAM.js} +2 -2
- package/dist/{InvoicePublicPdfViewDataProvider-BI9RQqYp.js → InvoicePublicPdfViewDataProvider-DoNBZsmi.js} +3 -3
- package/dist/{IssuerSettingsViewDataProvider-Bs4rEES2.js → IssuerSettingsViewDataProvider-COqHGUE6.js} +1 -1
- package/dist/{ReminderSettingsViewDataProvider-5n2EfxPG.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-B74GKndD.js → i18n.lib-C6eb-F-e.js} +28 -6
- package/dist/index.d.ts +30 -3
- 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-BYqn1I9n.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 -2
- package/dist/locales/en-US.json.d.ts +14 -3
- package/dist/locales/nl-BE.json.d.ts +14 -3
- package/dist/modules/dunning-case/models/dunningCase.model.d.ts +0 -1
- 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-B9OQY7IT.js → reminderConfig.query-DsJNqqi7.js} +8 -8
- 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
|
@@ -0,0 +1,490 @@
|
|
|
1
|
+
import { t as e } from "./rolldown-runtime-Dy4uBu1J.js";
|
|
2
|
+
import { K as t, t as n } from "./api.util-BCSgCfpS.js";
|
|
3
|
+
import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
4
|
+
import { n as i } from "./src-BFgnUugN.js";
|
|
5
|
+
import { n as a, t as o } from "./plainDate.transformer-BxvJpJOv.js";
|
|
6
|
+
import { n as s, t as c } from "./address.transformer-jGddczLV.js";
|
|
7
|
+
import { t as l } from "./instant.transformer-KmBsH3E9.js";
|
|
8
|
+
import { n as u, r as ee } from "./dist-boJIIxnT.js";
|
|
9
|
+
import { useI18n as d } from "vue-i18n";
|
|
10
|
+
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";
|
|
11
|
+
import { useQuery as D } from "@wisemen/vue-core-api-utils";
|
|
12
|
+
import { UIColumnLayout as O, UIEmptyState as ne, UIRowLayout as k, UIText as A, UIThemeProvider as j } from "@wisemen/vue-core-design-system";
|
|
13
|
+
import { useRouteQuery as M } from "@vueuse/router";
|
|
14
|
+
//#region src/modules/dunning-case/models/dunningCaseReminderPdf.transformer.ts
|
|
15
|
+
var N = class e {
|
|
16
|
+
static fromInvoiceDto(e) {
|
|
17
|
+
return {
|
|
18
|
+
dueOn: o.fromDto(e.dueOn),
|
|
19
|
+
issuedOn: o.fromDto(e.issuedOn),
|
|
20
|
+
isNew: e.isNew,
|
|
21
|
+
daysOverdue: e.daysOverdue,
|
|
22
|
+
fee: a.fromDto(e.fee),
|
|
23
|
+
level: e.level,
|
|
24
|
+
outstandingBalance: a.fromDto(e.outstandingBalance),
|
|
25
|
+
sequence: e.sequence
|
|
26
|
+
};
|
|
27
|
+
}
|
|
28
|
+
static fromOutstandingInvoiceDto(e) {
|
|
29
|
+
return {
|
|
30
|
+
dueOn: o.fromDto(e.dueOn),
|
|
31
|
+
issuedOn: o.fromDto(e.issuedOn),
|
|
32
|
+
isNew: !1,
|
|
33
|
+
daysOverdue: e.daysOverdue,
|
|
34
|
+
fee: null,
|
|
35
|
+
level: null,
|
|
36
|
+
outstandingBalance: a.fromDto(e.outstandingBalance),
|
|
37
|
+
sequence: e.sequence
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
static fromPublicDto(t) {
|
|
41
|
+
return {
|
|
42
|
+
createdAt: l.fromDto(t.createdAt),
|
|
43
|
+
sentAt: l.fromNullableDto(t.sentAt),
|
|
44
|
+
issuer: {
|
|
45
|
+
name: t.issuer.name,
|
|
46
|
+
address: c.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: c.fromNullableDto(t.customer.address),
|
|
57
|
+
locale: t.customer.locale
|
|
58
|
+
},
|
|
59
|
+
invoices: t.invoices.map(e.fromInvoiceDto).toSorted((e, t) => (t.level ?? 0) - (e.level ?? 0) || t.outstandingBalance.amount - e.outstandingBalance.amount),
|
|
60
|
+
level: t.level,
|
|
61
|
+
outstandingInvoices: t.outstandingInvoices.map(e.fromOutstandingInvoiceDto),
|
|
62
|
+
recipient: {
|
|
63
|
+
name: t.recipient.name,
|
|
64
|
+
email: t.recipient.email
|
|
65
|
+
},
|
|
66
|
+
totalFee: a.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(() => s.formatLines(t.issuer.address).join(", ")), a = p(() => t.issuer.bankAccountNumber ?? t.issuer.alternativeBankAccountNumber);
|
|
96
|
+
function o(...e) {
|
|
97
|
+
return e.flatMap(([e, t]) => t === null || t === "" ? [] : `${e}: ${t}`);
|
|
98
|
+
}
|
|
99
|
+
let c = p(() => [o([n.t("module.dunning_case.pdf.footer.email"), t.issuer.email], [n.t("module.dunning_case.pdf.footer.phone"), t.issuer.phoneNumber]), o([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"), a.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")), a = p(() => s.formatLines(t.reminder.customer.address)), o = 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: o.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(a.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 };
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { R as e, t, z as n } from "./api.util-BCSgCfpS.js";
|
|
2
2
|
import { r } from "./useCurrencyFormat.composable-MtZaqKnO.js";
|
|
3
|
-
import { n as i } from "./invoicingConfig.composable-
|
|
4
|
-
import { n as a, r as o, t as s } from "./reminderConfig.query-
|
|
3
|
+
import { n as i } from "./invoicingConfig.composable-D8HuO3Sl.js";
|
|
4
|
+
import { n as a, r as o, t as s } from "./reminderConfig.query-DsJNqqi7.js";
|
|
5
5
|
import { K as c, d as l, tt as u } from "./dist-D9lp7NDv.js";
|
|
6
6
|
import { t as d } from "./customerUuid.model-GUFYq3O2.js";
|
|
7
7
|
import { useRouter as f } from "vue-router";
|