@wisemen/wise-invoicing-web 0.3.1 → 0.4.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-DwtfyQpx.js → ApprovalReminderSettingsViewDataProvider-IuReavOR.js} +3 -3
- package/dist/{BillingDocumentDetailViewDataProvider-Dub07ybW.js → BillingDocumentDetailViewDataProvider-B3I6UIKY.js} +2201 -1728
- package/dist/BillingDocumentDetailViewDataProvider.css +1 -1
- package/dist/{BillingDocumentPdf-DgtUB45R.js → BillingDocumentPdf-rFqmLUPy.js} +226 -219
- package/dist/{CreditNoteDetailViewDataProvider-BxNfC6yO.js → CreditNoteDetailViewDataProvider-CQRnG2Fz.js} +41 -41
- package/dist/{CreditNotePdfViewDataProvider-D0j8qqK-.js → CreditNotePdfViewDataProvider-RytwPWH5.js} +2 -2
- package/dist/{CustomFieldValueText-Cuhs9sRn.js → CustomFieldValueText-DA0aPKwC.js} +1 -1
- package/dist/{DunningCaseDetailViewDataProvider-ou1FfNWQ.js → DunningCaseDetailViewDataProvider-BRYbYgTw.js} +64 -64
- package/dist/{DunningCaseOverviewView--zaPD0-c.js → DunningCaseOverviewView-D0vScVF1.js} +125 -125
- package/dist/{DunningCaseReminderPdfViewDataProvider-BpUDbbSH.js → DunningCaseReminderPdfViewDataProvider-I_ZQiAuK.js} +1 -1
- package/dist/{DunningCaseSendDialog-Co4oLFtZ.js → DunningCaseSendDialog-CV66_tMv.js} +8 -8
- package/dist/{InvoiceApprovalOutOfSyncIndicator-H6H7kjAE.js → InvoiceApprovalOutOfSyncIndicator-AJOQe8j8.js} +2 -2
- package/dist/{InvoiceApprovalOverviewView-Bw-6rkon.js → InvoiceApprovalOverviewView-CcMqr2jH.js} +213 -213
- package/dist/{InvoiceApprovalStatusBadge-IyzJ--TJ.js → InvoiceApprovalStatusBadge-BJ3Q18bf.js} +3 -3
- package/dist/{InvoiceApproveDialogDataProvider-8G-11W1e.js → InvoiceApproveDialogDataProvider-DaCEHgs0.js} +7 -7
- package/dist/{InvoiceDetailViewDataProvider-B9gul2ei.js → InvoiceDetailViewDataProvider-B5uZY8Qy.js} +46 -46
- package/dist/{InvoiceOverviewViewDataProvider-5KgIdhfL.js → InvoiceOverviewViewDataProvider-BrgmweRE.js} +57 -57
- package/dist/{InvoicePdfView-5sJ-u_gT.js → InvoicePdfView-CPEX7E9W.js} +1 -1
- package/dist/{InvoicePdfViewDataProvider-BLVXDPv6.js → InvoicePdfViewDataProvider-T4-8A2OD.js} +3 -3
- package/dist/{InvoicePublicPdfViewDataProvider-CnhYazmB.js → InvoicePublicPdfViewDataProvider-BkHZoPSZ.js} +3 -3
- package/dist/{InvoicePublicProFormaPdfViewDataProvider-CcvGISK6.js → InvoicePublicProFormaPdfViewDataProvider-CfkArXbC.js} +3 -3
- package/dist/{InvoicingFileUploadProvider-Kcq7kSSt.js → InvoicingFileUploadProvider-BLBjPKqx.js} +1 -1
- package/dist/{IssuerSettingsViewDataProvider-BuSIVnIl.js → IssuerSettingsViewDataProvider-BStn0jFI.js} +2 -2
- package/dist/{ReminderSettingsViewDataProvider-CH7gSXnj.js → ReminderSettingsViewDataProvider-CjX7afDs.js} +3 -3
- package/dist/{api.util-CkIRZS3h.js → api.util-D6m6OY3_.js} +15 -6
- package/dist/{billingDocumentDetail.transformer-Bfd8geNo.js → billingDocumentDetail.transformer-Da-Nt4bI.js} +37 -29
- package/dist/client/index.d.ts +1 -1
- package/dist/client/types.gen.d.ts +16 -2
- package/dist/client/zod.gen.d.ts +28 -0
- package/dist/{creditNoteDetail.query-tLnfqsEB.js → creditNoteDetail.query-Yb8TdZNm.js} +22 -18
- package/dist/{dist-CGZBUnWK.js → dist-BpDuRYDT.js} +130 -130
- package/dist/{dist-BQbaoN5W.js → dist-DCbLgB6Y.js} +181 -101
- package/dist/{i18n.lib--mzprLMR.js → i18n.lib-CKs3ExEl.js} +28 -0
- package/dist/index.d.ts +28 -0
- package/dist/index.js +32 -31
- package/dist/{invoice.service-B1w16_Md.js → invoice.service-DWDl9XRh.js} +214 -209
- package/dist/{invoiceApproval.service-BHAJmFkU.js → invoiceApproval.service-Fwlxgd9o.js} +2 -2
- package/dist/{invoiceApprovalStatus.util-DohOKR4q.js → invoiceApprovalStatus.util-q-zHLdFV.js} +1 -1
- package/dist/{invoiceCustomer.service-DpVfpQUD.js → invoiceCustomer.service-DOexR54S.js} +2 -2
- package/dist/{invoiceDetail.query-CfyNSXLS.js → invoiceDetail.query-B5w0Vlsy.js} +1 -1
- package/dist/{invoiceIndexCache.util-BDLs7W9m.js → invoiceIndexCache.util-CUlp4R7R.js} +2 -2
- package/dist/{invoicingConfig.composable-COn1rKRf.js → invoicingConfig.composable-DjFexycc.js} +2 -2
- package/dist/{issuerSettings.query-CDFk2GiP.js → issuerSettings.query-BHuLjV9P.js} +1 -1
- package/dist/libs/i18n.lib.d.ts +28 -0
- package/dist/locales/en-US.json.d.ts +14 -0
- package/dist/locales/nl-BE.json.d.ts +14 -0
- package/dist/models/billing-document/billingDocumentDetail.model.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentLineGroup.util.d.ts +15 -0
- package/dist/models/billing-document/billingDocumentLineGroup.util.spec.d.ts +1 -0
- package/dist/models/billing-document/billingDocumentUpdateLines.model.d.ts +1 -0
- package/dist/modules/invoice/models/invoice/pdf/invoicePdfDetail.model.d.ts +1 -0
- package/dist/modules/invoice/use-cases/pdf/components/invoicePdf.types.d.ts +4 -1
- package/dist/modules/invoice/use-cases/pdf/utils/invoicePdf.util.d.ts +5 -0
- package/dist/{reminderConfig.query-DSO0ekC_.js → reminderConfig.query-C4J6m4ER.js} +1 -1
- package/dist/style.css +1 -1
- package/dist/types/apiError.type.d.ts +2 -2
- package/dist/ui/billing-document/table/BillingDocumentLineItemDeleteDialog.vue.d.ts +1 -0
- package/dist/ui/billing-document/table/BillingDocumentLineItemsInsertIndicator.vue.d.ts +3 -0
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTableGroupRow.vue.d.ts +5 -2
- package/dist/ui/billing-document/table/BillingDocumentLineItemsTreeIndent.vue.d.ts +17 -0
- package/dist/ui/billing-document/table/billingDocumentLineItemsTable.context.d.ts +78 -18
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsEditor.composable.d.ts +14 -4
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsKeyboardNav.composable.d.ts +6 -0
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsRowMutations.composable.d.ts +8 -4
- package/dist/ui/billing-document/table/composables/useBillingDocumentLineItemsTableDrag.composable.d.ts +16 -3
- package/dist/ui/billing-document/table/utils/billingDocumentLineItemsEditor.util.d.ts +163 -26
- package/package.json +1 -1
|
@@ -1,13 +1,43 @@
|
|
|
1
|
-
import "./api.util-
|
|
1
|
+
import "./api.util-D6m6OY3_.js";
|
|
2
2
|
import { b as e, x as t } from "./documentTitle.composable-CRJjS6p-.js";
|
|
3
|
-
import { n } from "./invoicingConfig.composable-
|
|
3
|
+
import { n } from "./invoicingConfig.composable-DjFexycc.js";
|
|
4
4
|
import { n as r } from "./address.transformer-jGddczLV.js";
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
5
|
+
import { dt as i } from "./dist-DCbLgB6Y.js";
|
|
6
|
+
import { i as a } from "./billingDocumentDetail.transformer-Da-Nt4bI.js";
|
|
7
|
+
import { useI18n as o } from "vue-i18n";
|
|
8
|
+
import { Fragment as s, computed as c, createBlock as l, createCommentVNode as u, createElementBlock as d, createElementVNode as f, createTextVNode as p, createVNode as m, defineComponent as h, normalizeClass as g, normalizeStyle as _, openBlock as v, renderList as y, renderSlot as b, toDisplayString as x, unref as S, withCtx as C } from "vue";
|
|
9
|
+
import { UIColumnLayout as w, UIRowLayout as T, UIText as E } from "@wisemen/vue-core-design-system";
|
|
9
10
|
//#region src/modules/invoice/use-cases/pdf/utils/invoicePdf.util.ts
|
|
10
|
-
var
|
|
11
|
+
var D = "-", O = 32, k = 512, A = 640, j = 576, M = 704, N = 52, P = 34, F = 16, I = 14, L = /\r?\n/u, R = class {
|
|
12
|
+
static appendRows(e, t, n, r, i) {
|
|
13
|
+
let o = [...t.map((e) => ({
|
|
14
|
+
kind: "line",
|
|
15
|
+
line: e,
|
|
16
|
+
position: e.position
|
|
17
|
+
})), ...n.map((e) => ({
|
|
18
|
+
group: e,
|
|
19
|
+
kind: "group",
|
|
20
|
+
position: e.position
|
|
21
|
+
}))].toSorted((e, t) => e.position - t.position);
|
|
22
|
+
for (let t of o) {
|
|
23
|
+
if (t.kind === "line") {
|
|
24
|
+
e.push({
|
|
25
|
+
depth: r,
|
|
26
|
+
line: t.line,
|
|
27
|
+
type: "line"
|
|
28
|
+
});
|
|
29
|
+
continue;
|
|
30
|
+
}
|
|
31
|
+
e.push({
|
|
32
|
+
uuid: t.group.uuid,
|
|
33
|
+
name: t.group.name,
|
|
34
|
+
depth: r,
|
|
35
|
+
description: t.group.description,
|
|
36
|
+
total: this.getGroupTotal(a.flattenLines([t.group]), i),
|
|
37
|
+
type: "group"
|
|
38
|
+
}), this.appendRows(e, t.group.lines, t.group.groups, r + 1, i);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
11
41
|
static avoidGroupRowOrphans(e) {
|
|
12
42
|
let t = e.map((e) => [...e]);
|
|
13
43
|
for (let e = 0; e < t.length - 1; e += 1) {
|
|
@@ -25,46 +55,16 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
25
55
|
return n.length > 0 ? n : [[]];
|
|
26
56
|
}
|
|
27
57
|
static buildRows(e, t) {
|
|
28
|
-
let n = [
|
|
29
|
-
|
|
30
|
-
line: e,
|
|
31
|
-
position: e.position
|
|
32
|
-
})), ...e.groups.map((e) => ({
|
|
33
|
-
group: e,
|
|
34
|
-
kind: "group",
|
|
35
|
-
position: e.position
|
|
36
|
-
}))].toSorted((e, t) => e.position - t.position), r = [];
|
|
37
|
-
for (let e of n) {
|
|
38
|
-
if (e.kind === "line") {
|
|
39
|
-
r.push({
|
|
40
|
-
isGrouped: !1,
|
|
41
|
-
line: e.line,
|
|
42
|
-
type: "line"
|
|
43
|
-
});
|
|
44
|
-
continue;
|
|
45
|
-
}
|
|
46
|
-
r.push({
|
|
47
|
-
uuid: e.group.uuid,
|
|
48
|
-
name: e.group.name,
|
|
49
|
-
description: e.group.description,
|
|
50
|
-
total: this.getGroupTotal(e.group.lines, t),
|
|
51
|
-
type: "group"
|
|
52
|
-
});
|
|
53
|
-
for (let t of e.group.lines.toSorted((e, t) => e.position - t.position)) r.push({
|
|
54
|
-
isGrouped: !0,
|
|
55
|
-
line: t,
|
|
56
|
-
type: "line"
|
|
57
|
-
});
|
|
58
|
-
}
|
|
59
|
-
return r;
|
|
58
|
+
let n = [];
|
|
59
|
+
return this.appendRows(n, e.ungroupedLines, e.groups, 0, t), n;
|
|
60
60
|
}
|
|
61
61
|
static estimateGroupRowHeight(e) {
|
|
62
62
|
let t = [e.name, e.description].filter((e) => e !== null && e.trim() !== "").reduce((e, t) => e + this.getWrappedTextLineCount(t), 0);
|
|
63
|
-
return Math.max(
|
|
63
|
+
return Math.max(O, F + t * I);
|
|
64
64
|
}
|
|
65
65
|
static estimateLineHeight(e) {
|
|
66
66
|
let t = this.getWrappedItemLineCount(e);
|
|
67
|
-
return Math.max(
|
|
67
|
+
return Math.max(O, F + t * I);
|
|
68
68
|
}
|
|
69
69
|
static estimateRowHeight(e) {
|
|
70
70
|
return e.type === "group" ? this.estimateGroupRowHeight(e) : this.estimateLineHeight(e.line);
|
|
@@ -85,7 +85,7 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
85
85
|
return `${this.formatNumber(e, t)}%`;
|
|
86
86
|
}
|
|
87
87
|
static formatPlainDate(e, t) {
|
|
88
|
-
return e === null ?
|
|
88
|
+
return e === null ? D : new Intl.DateTimeFormat(t, {
|
|
89
89
|
day: "2-digit",
|
|
90
90
|
month: "2-digit",
|
|
91
91
|
timeZone: "UTC",
|
|
@@ -114,8 +114,8 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
114
114
|
};
|
|
115
115
|
}
|
|
116
116
|
static getLastPageRowBudget(e) {
|
|
117
|
-
let t = e.headerType === "first" ?
|
|
118
|
-
return e.hasRemarks ? t -
|
|
117
|
+
let t = e.headerType === "first" ? k : j;
|
|
118
|
+
return e.hasRemarks ? t - N : t;
|
|
119
119
|
}
|
|
120
120
|
static getTotalRowsHeight(e) {
|
|
121
121
|
return e.reduce((e, t) => e + this.estimateRowHeight(t), 0);
|
|
@@ -125,13 +125,13 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
125
125
|
}
|
|
126
126
|
static getWrappedTextLineCount(e) {
|
|
127
127
|
let t = e.trim();
|
|
128
|
-
return t === "" ? 1 : t.split(
|
|
128
|
+
return t === "" ? 1 : t.split(L).reduce((e, t) => e + Math.max(1, Math.ceil(t.length / P)), 0);
|
|
129
129
|
}
|
|
130
130
|
static paginatePrefixRows(e) {
|
|
131
131
|
if (e.length === 0) return [];
|
|
132
|
-
let t = [], n = e, r = this.takeRowsForBudget(n,
|
|
132
|
+
let t = [], n = e, r = this.takeRowsForBudget(n, A);
|
|
133
133
|
for (t.push(r), n = n.slice(r.length); n.length > 0;) {
|
|
134
|
-
let e = this.takeRowsForBudget(n,
|
|
134
|
+
let e = this.takeRowsForBudget(n, M);
|
|
135
135
|
t.push(e), n = n.slice(e.length);
|
|
136
136
|
}
|
|
137
137
|
return t;
|
|
@@ -178,20 +178,20 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
178
178
|
}
|
|
179
179
|
return n;
|
|
180
180
|
}
|
|
181
|
-
},
|
|
181
|
+
}, z = /* @__PURE__ */ h({
|
|
182
182
|
__name: "InvoicePdfFooterSection",
|
|
183
183
|
props: { invoice: {} },
|
|
184
184
|
setup(e) {
|
|
185
|
-
let t = e, n =
|
|
185
|
+
let t = e, n = o(), r = c(() => [{
|
|
186
186
|
label: n.t("wise_invoicing.invoice.pdf.footer.email"),
|
|
187
187
|
value: t.invoice.issuer.email ?? ""
|
|
188
188
|
}, {
|
|
189
189
|
label: n.t("wise_invoicing.invoice.pdf.footer.phone"),
|
|
190
190
|
value: t.invoice.issuer.phoneNumber ?? ""
|
|
191
|
-
}].filter((e) => e.value !== "")), i =
|
|
191
|
+
}].filter((e) => e.value !== "")), i = c(() => [
|
|
192
192
|
{
|
|
193
193
|
label: n.t("wise_invoicing.invoice.pdf.footer.address"),
|
|
194
|
-
value:
|
|
194
|
+
value: R.getAddressLines(t.invoice.issuer.address).join(", ")
|
|
195
195
|
},
|
|
196
196
|
{
|
|
197
197
|
label: n.t("wise_invoicing.invoice.pdf.footer.vat_number"),
|
|
@@ -202,38 +202,38 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
202
202
|
value: t.invoice.issuer.bankAccountNumber ?? t.invoice.issuer.alternativeBankAccountNumber ?? ""
|
|
203
203
|
}
|
|
204
204
|
].filter((e) => e.value !== ""));
|
|
205
|
-
return (e, a) => (
|
|
205
|
+
return (e, a) => (v(), l(S(w), {
|
|
206
206
|
as: "footer",
|
|
207
207
|
align: "center",
|
|
208
208
|
justify: "center",
|
|
209
209
|
gap: "none",
|
|
210
210
|
class: "mt-auto w-full break-inside-avoid [page-break-inside:avoid]"
|
|
211
211
|
}, {
|
|
212
|
-
default:
|
|
213
|
-
|
|
212
|
+
default: C(() => [
|
|
213
|
+
m(S(T), {
|
|
214
214
|
align: "center",
|
|
215
215
|
gap: "md"
|
|
216
216
|
}, {
|
|
217
|
-
default:
|
|
218
|
-
a[0] ||=
|
|
219
|
-
|
|
220
|
-
text: t.invoice.issuer.name ??
|
|
217
|
+
default: C(() => [
|
|
218
|
+
a[0] ||= f("span", { class: "flex-1 border-t border-secondary" }, null, -1),
|
|
219
|
+
m(S(E), {
|
|
220
|
+
text: t.invoice.issuer.name ?? S(n).t("wise_invoicing.common.not_available"),
|
|
221
221
|
truncate: !1,
|
|
222
222
|
as: "p",
|
|
223
223
|
class: "text-xs font-semibold text-primary"
|
|
224
224
|
}, null, 8, ["text"]),
|
|
225
|
-
a[1] ||=
|
|
225
|
+
a[1] ||= f("span", { class: "flex-1 border-t border-secondary" }, null, -1)
|
|
226
226
|
]),
|
|
227
227
|
_: 1
|
|
228
228
|
}),
|
|
229
|
-
r.value.length > 0 ? (
|
|
229
|
+
r.value.length > 0 ? (v(), l(S(T), {
|
|
230
230
|
key: 0,
|
|
231
231
|
justify: "center",
|
|
232
232
|
gap: "xs",
|
|
233
233
|
class: "mt-xxs",
|
|
234
234
|
wrap: ""
|
|
235
235
|
}, {
|
|
236
|
-
default:
|
|
236
|
+
default: C(() => [(v(!0), d(s, null, y(r.value, (e) => (v(), l(S(E), {
|
|
237
237
|
key: e.label,
|
|
238
238
|
text: `${e.label}: ${e.value}`,
|
|
239
239
|
truncate: !1,
|
|
@@ -241,15 +241,15 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
241
241
|
class: "text-xxs text-primary"
|
|
242
242
|
}, null, 8, ["text"]))), 128))]),
|
|
243
243
|
_: 1
|
|
244
|
-
})) :
|
|
245
|
-
i.value.length > 0 ? (
|
|
244
|
+
})) : u("", !0),
|
|
245
|
+
i.value.length > 0 ? (v(), l(S(T), {
|
|
246
246
|
key: 1,
|
|
247
247
|
justify: "center",
|
|
248
248
|
gap: "xs",
|
|
249
249
|
class: "mt-xxs",
|
|
250
250
|
wrap: ""
|
|
251
251
|
}, {
|
|
252
|
-
default:
|
|
252
|
+
default: C(() => [(v(!0), d(s, null, y(i.value, (e) => (v(), l(S(E), {
|
|
253
253
|
key: e.label,
|
|
254
254
|
text: `${e.label}: ${e.value}`,
|
|
255
255
|
truncate: !1,
|
|
@@ -257,123 +257,123 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
257
257
|
class: "text-xxs text-primary"
|
|
258
258
|
}, null, 8, ["text"]))), 128))]),
|
|
259
259
|
_: 1
|
|
260
|
-
})) :
|
|
260
|
+
})) : u("", !0)
|
|
261
261
|
]),
|
|
262
262
|
_: 1
|
|
263
263
|
}));
|
|
264
264
|
}
|
|
265
|
-
}),
|
|
265
|
+
}), B = /* @__PURE__ */ h({
|
|
266
266
|
__name: "InvoicePdfHeaderSection",
|
|
267
267
|
props: {
|
|
268
268
|
invoice: {},
|
|
269
269
|
pageType: {}
|
|
270
270
|
},
|
|
271
271
|
setup(e) {
|
|
272
|
-
let r = e,
|
|
272
|
+
let r = e, a = o(), f = n(), p = c(() => a.locale.value || "en-US"), h = c(() => r.invoice.type === t.CREDIT_NOTE), g = c(() => h.value ? r.invoice.sequence === null ? a.t("wise_invoicing.credit_note.detail.fallback_title") : `${a.t("wise_invoicing.invoice.type.credit_note")} ${r.invoice.sequence}` : r.invoice.sequence ?? a.t("wise_invoicing.invoice.detail.fallback_title")), _ = c(() => {
|
|
273
273
|
let e = r.invoice.originalInvoice?.sequence;
|
|
274
|
-
return !h.value || r.pageType !== "first" || e === null ? null : `${
|
|
275
|
-
}),
|
|
274
|
+
return !h.value || r.pageType !== "first" || e === null ? null : `${a.t("wise_invoicing.invoice.type.standard")} ${e}`;
|
|
275
|
+
}), b = c(() => (r.invoice.issuer.name ?? a.t("wise_invoicing.common.not_available")).split(" ").filter((e) => e !== "").slice(0, 2).map((e) => e.toUpperCase())), x = c(() => R.getAddressLines(r.invoice.customer.address)), D = c(() => {
|
|
276
276
|
let e = r.invoice.customer.vatNumber;
|
|
277
|
-
return e ? `${
|
|
278
|
-
}), O =
|
|
277
|
+
return e ? `${a.t("wise_invoicing.invoice.pdf.footer.vat_number")}: ${e}` : null;
|
|
278
|
+
}), O = c(() => r.invoice.customer.name !== null || x.value.length > 0 || r.invoice.customer.email !== null || D.value !== null), k = c(() => {
|
|
279
279
|
let e = [{
|
|
280
|
-
label:
|
|
280
|
+
label: a.t("wise_invoicing.invoice.detail.header.invoice_date"),
|
|
281
281
|
value: A(r.invoice.issueOn)
|
|
282
282
|
}, {
|
|
283
|
-
label:
|
|
283
|
+
label: a.t("wise_invoicing.invoice.detail.header.due_date"),
|
|
284
284
|
value: A(r.invoice.dueOn)
|
|
285
285
|
}];
|
|
286
286
|
return r.pageType === "first" && f.isDeliveryDateVisible.value && e.push({
|
|
287
|
-
label:
|
|
287
|
+
label: a.t("wise_invoicing.invoice.detail.header.delivery_date"),
|
|
288
288
|
value: A(r.invoice.deliveredOn)
|
|
289
289
|
}), e;
|
|
290
290
|
});
|
|
291
291
|
function A(e) {
|
|
292
|
-
return
|
|
292
|
+
return R.formatPlainDate(e, p.value);
|
|
293
293
|
}
|
|
294
|
-
return (e, t) => (
|
|
294
|
+
return (e, t) => (v(), l(S(w), {
|
|
295
295
|
as: "header",
|
|
296
296
|
gap: "none",
|
|
297
297
|
class: "w-full break-inside-avoid [page-break-inside:avoid]"
|
|
298
298
|
}, {
|
|
299
|
-
default:
|
|
300
|
-
"aria-label": r.invoice.issuer.name ??
|
|
299
|
+
default: C(() => [m(S(w), {
|
|
300
|
+
"aria-label": r.invoice.issuer.name ?? S(a).t("wise_invoicing.common.not_available"),
|
|
301
301
|
align: "center",
|
|
302
302
|
gap: "none",
|
|
303
303
|
class: "w-full leading-none font-bold text-primary"
|
|
304
304
|
}, {
|
|
305
|
-
default:
|
|
305
|
+
default: C(() => [(v(!0), d(s, null, y(b.value, (e) => (v(), l(S(E), {
|
|
306
306
|
key: e,
|
|
307
307
|
text: e,
|
|
308
308
|
truncate: !1,
|
|
309
309
|
as: "span"
|
|
310
310
|
}, null, 8, ["text"]))), 128))]),
|
|
311
311
|
_: 1
|
|
312
|
-
}, 8, ["aria-label"]),
|
|
312
|
+
}, 8, ["aria-label"]), m(S(w), {
|
|
313
313
|
gap: r.pageType === "first" ? "2xl" : "xl",
|
|
314
314
|
class: "w-full"
|
|
315
315
|
}, {
|
|
316
|
-
default:
|
|
316
|
+
default: C(() => [m(S(T), {
|
|
317
317
|
justify: "between",
|
|
318
318
|
align: "start",
|
|
319
319
|
gap: "2xl",
|
|
320
320
|
class: "w-full"
|
|
321
321
|
}, {
|
|
322
|
-
default:
|
|
322
|
+
default: C(() => [m(S(w), {
|
|
323
323
|
gap: "none",
|
|
324
324
|
class: "min-w-px"
|
|
325
325
|
}, {
|
|
326
|
-
default:
|
|
327
|
-
|
|
326
|
+
default: C(() => [
|
|
327
|
+
_.value === null ? u("", !0) : (v(), l(S(T), {
|
|
328
328
|
key: 0,
|
|
329
329
|
align: "center",
|
|
330
330
|
gap: "xxs",
|
|
331
331
|
class: "text-xs text-secondary"
|
|
332
332
|
}, {
|
|
333
|
-
default:
|
|
333
|
+
default: C(() => [m(S(i), {
|
|
334
334
|
"aria-hidden": "true",
|
|
335
335
|
class: "size-3 shrink-0 text-secondary"
|
|
336
|
-
}),
|
|
337
|
-
text:
|
|
336
|
+
}), m(S(E), {
|
|
337
|
+
text: _.value,
|
|
338
338
|
truncate: !1,
|
|
339
339
|
as: "p",
|
|
340
340
|
class: "text-xs text-secondary"
|
|
341
341
|
}, null, 8, ["text"])]),
|
|
342
342
|
_: 1
|
|
343
343
|
})),
|
|
344
|
-
|
|
345
|
-
text:
|
|
344
|
+
m(S(E), {
|
|
345
|
+
text: g.value,
|
|
346
346
|
truncate: !1,
|
|
347
347
|
as: "h1",
|
|
348
348
|
class: "text-lg font-semibold text-primary"
|
|
349
349
|
}, null, 8, ["text"]),
|
|
350
|
-
r.invoice.subject ? (
|
|
350
|
+
r.invoice.subject ? (v(), l(S(E), {
|
|
351
351
|
key: 1,
|
|
352
352
|
text: r.invoice.subject,
|
|
353
353
|
truncate: !1,
|
|
354
354
|
as: "p",
|
|
355
355
|
class: "max-w-100! text-xs wrap-break-word text-secondary"
|
|
356
|
-
}, null, 8, ["text"])) :
|
|
356
|
+
}, null, 8, ["text"])) : u("", !0)
|
|
357
357
|
]),
|
|
358
358
|
_: 1
|
|
359
|
-
}),
|
|
359
|
+
}), m(S(w), {
|
|
360
360
|
as: "dl",
|
|
361
361
|
gap: "none",
|
|
362
362
|
class: "w-48 text-xs text-primary"
|
|
363
363
|
}, {
|
|
364
|
-
default:
|
|
364
|
+
default: C(() => [(v(!0), d(s, null, y(k.value, (e) => (v(), l(S(T), {
|
|
365
365
|
key: e.label,
|
|
366
366
|
justify: "between",
|
|
367
367
|
align: "start",
|
|
368
368
|
gap: "xl",
|
|
369
369
|
class: "w-full"
|
|
370
370
|
}, {
|
|
371
|
-
default:
|
|
371
|
+
default: C(() => [m(S(E), {
|
|
372
372
|
text: e.label,
|
|
373
373
|
truncate: !1,
|
|
374
374
|
as: "dt",
|
|
375
375
|
class: "font-medium text-primary"
|
|
376
|
-
}, null, 8, ["text"]),
|
|
376
|
+
}, null, 8, ["text"]), m(S(E), {
|
|
377
377
|
text: e.value,
|
|
378
378
|
truncate: !1,
|
|
379
379
|
as: "dd",
|
|
@@ -384,39 +384,39 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
384
384
|
_: 1
|
|
385
385
|
})]),
|
|
386
386
|
_: 1
|
|
387
|
-
}), r.pageType === "first" && O.value ? (
|
|
387
|
+
}), r.pageType === "first" && O.value ? (v(), l(S(w), {
|
|
388
388
|
key: 0,
|
|
389
389
|
as: "section",
|
|
390
390
|
gap: "xxs",
|
|
391
391
|
class: "break-inside-avoid [page-break-inside:avoid]"
|
|
392
392
|
}, {
|
|
393
|
-
default:
|
|
394
|
-
|
|
395
|
-
text:
|
|
393
|
+
default: C(() => [
|
|
394
|
+
m(S(E), {
|
|
395
|
+
text: S(a).t("wise_invoicing.invoice.pdf.client"),
|
|
396
396
|
truncate: !1,
|
|
397
397
|
as: "h2",
|
|
398
398
|
class: "text-xs font-semibold text-primary"
|
|
399
399
|
}, null, 8, ["text"]),
|
|
400
|
-
|
|
400
|
+
m(S(E), {
|
|
401
401
|
text: r.invoice.customer.name ?? "-",
|
|
402
402
|
truncate: !1,
|
|
403
403
|
as: "p",
|
|
404
404
|
class: "text-xs text-secondary"
|
|
405
405
|
}, null, 8, ["text"]),
|
|
406
|
-
(
|
|
406
|
+
(v(!0), d(s, null, y(x.value, (e) => (v(), l(S(E), {
|
|
407
407
|
key: e,
|
|
408
408
|
text: e,
|
|
409
409
|
truncate: !1,
|
|
410
410
|
as: "p",
|
|
411
411
|
class: "text-xs text-secondary"
|
|
412
412
|
}, null, 8, ["text"]))), 128)),
|
|
413
|
-
|
|
413
|
+
m(S(E), {
|
|
414
414
|
text: r.invoice.customer.email ?? "-",
|
|
415
415
|
truncate: !1,
|
|
416
416
|
as: "p",
|
|
417
417
|
class: "text-xs text-secondary"
|
|
418
418
|
}, null, 8, ["text"]),
|
|
419
|
-
D.value === null ?
|
|
419
|
+
D.value === null ? u("", !0) : (v(), l(S(E), {
|
|
420
420
|
key: 0,
|
|
421
421
|
text: D.value,
|
|
422
422
|
truncate: !1,
|
|
@@ -425,126 +425,133 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
425
425
|
}, null, 8, ["text"]))
|
|
426
426
|
]),
|
|
427
427
|
_: 1
|
|
428
|
-
})) :
|
|
428
|
+
})) : u("", !0)]),
|
|
429
429
|
_: 1
|
|
430
430
|
}, 8, ["gap"])]),
|
|
431
431
|
_: 1
|
|
432
432
|
}));
|
|
433
433
|
}
|
|
434
|
-
}),
|
|
434
|
+
}), V = /* @__PURE__ */ h({
|
|
435
435
|
__name: "InvoicePdfTableCell",
|
|
436
436
|
props: { bold: { type: Boolean } },
|
|
437
437
|
setup(e) {
|
|
438
438
|
let t = e;
|
|
439
|
-
return (e, n) => (
|
|
439
|
+
return (e, n) => (v(), d("td", { class: g([t.bold && "font-semibold", "px-lg py-sm text-right align-middle text-xxs whitespace-nowrap text-primary"]) }, [b(e.$slots, "default")], 2));
|
|
440
440
|
}
|
|
441
|
-
}),
|
|
441
|
+
}), H = { class: "border-b border-secondary bg-secondary px-lg py-xs text-right text-xxs font-semibold text-primary" }, U = /* @__PURE__ */ h({
|
|
442
442
|
__name: "InvoicePdfTableHeaderCell",
|
|
443
443
|
props: { label: {} },
|
|
444
444
|
setup(e) {
|
|
445
445
|
let t = e;
|
|
446
|
-
return (e, n) => (
|
|
446
|
+
return (e, n) => (v(), d("th", H, x(t.label), 1));
|
|
447
447
|
}
|
|
448
|
-
}),
|
|
448
|
+
}), W = { class: "mt-2xl w-full" }, G = { class: "w-full table-fixed border-separate border-spacing-0 overflow-hidden rounded-xs border border-secondary" }, K = { class: "table-header-group" }, q = {
|
|
449
449
|
key: 0,
|
|
450
450
|
class: "break-inside-avoid bg-secondary [page-break-inside:avoid]"
|
|
451
|
-
},
|
|
452
|
-
colspan: "6",
|
|
453
|
-
class: "border-y border-secondary px-lg py-sm align-middle text-xxs wrap-break-word text-primary"
|
|
454
|
-
}, q = { class: "font-semibold" }, J = {
|
|
451
|
+
}, J = { class: "font-semibold" }, Y = {
|
|
455
452
|
key: 0,
|
|
456
453
|
class: "ml-xs text-tertiary"
|
|
457
|
-
},
|
|
454
|
+
}, X = {
|
|
458
455
|
key: 0,
|
|
459
456
|
class: "mt-xxs whitespace-pre-line text-tertiary"
|
|
460
457
|
}, Z = { key: 0 }, Q = {
|
|
461
458
|
colspan: "7",
|
|
462
459
|
class: "px-lg py-sm text-center text-xxs text-secondary"
|
|
463
|
-
}, ee = /* @__PURE__ */
|
|
460
|
+
}, ee = /* @__PURE__ */ h({
|
|
464
461
|
__name: "InvoicePdfLinesTable",
|
|
465
462
|
props: {
|
|
466
463
|
isCreditNote: { type: Boolean },
|
|
467
464
|
rows: {}
|
|
468
465
|
},
|
|
469
466
|
setup(e) {
|
|
470
|
-
let t = e, n =
|
|
467
|
+
let t = e, n = o(), r = n.locale;
|
|
471
468
|
function i(e) {
|
|
472
|
-
return
|
|
469
|
+
return R.formatMonetary(e, r.value);
|
|
473
470
|
}
|
|
474
|
-
function
|
|
475
|
-
return e === null ? "" :
|
|
471
|
+
function a(e) {
|
|
472
|
+
return e === null ? "" : R.formatMonetary(e, r.value);
|
|
476
473
|
}
|
|
477
474
|
function c(e) {
|
|
478
475
|
let n = t.isCreditNote ? {
|
|
479
476
|
...e,
|
|
480
477
|
amount: -e.amount
|
|
481
478
|
} : e;
|
|
482
|
-
return
|
|
479
|
+
return R.formatMonetary(n, r.value);
|
|
483
480
|
}
|
|
484
|
-
function
|
|
485
|
-
return
|
|
481
|
+
function l(e) {
|
|
482
|
+
return R.formatMonetary(R.getDisplayLineGrossAmount(e.grossAmount, {
|
|
486
483
|
isCreditNote: t.isCreditNote,
|
|
487
484
|
isDiscount: e.isDiscount
|
|
488
485
|
}), r.value);
|
|
489
486
|
}
|
|
490
|
-
function
|
|
491
|
-
return
|
|
487
|
+
function h(e) {
|
|
488
|
+
return R.formatNumber(t.isCreditNote ? -e : e, r.value);
|
|
492
489
|
}
|
|
493
|
-
function
|
|
490
|
+
function b(e) {
|
|
494
491
|
return e.toString(r.value);
|
|
495
492
|
}
|
|
496
|
-
|
|
497
|
-
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
493
|
+
function w(e) {
|
|
494
|
+
return { paddingLeft: `calc(var(--spacing-lg) + ${e} * var(--spacing-md))` };
|
|
495
|
+
}
|
|
496
|
+
return (e, r) => (v(), d("div", W, [f("table", G, [
|
|
497
|
+
r[0] ||= f("colgroup", null, [
|
|
498
|
+
f("col", { class: "w-auto" }),
|
|
499
|
+
f("col", { class: "w-[8%]" }),
|
|
500
|
+
f("col", { class: "w-[8%]" }),
|
|
501
|
+
f("col", { class: "w-[14%]" }),
|
|
502
|
+
f("col", { class: "w-[16%]" }),
|
|
503
|
+
f("col", { class: "w-[4%]" }),
|
|
504
|
+
f("col", { class: "w-[12%]" })
|
|
505
505
|
], -1),
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
label:
|
|
506
|
+
f("thead", K, [f("tr", null, [
|
|
507
|
+
m(U, {
|
|
508
|
+
label: S(n).t("wise_invoicing.invoice.detail.line_items.item"),
|
|
509
509
|
class: "text-left!"
|
|
510
510
|
}, null, 8, ["label"]),
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
511
|
+
m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.unit") }, null, 8, ["label"]),
|
|
512
|
+
m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.qty") }, null, 8, ["label"]),
|
|
513
|
+
m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.unit_price") }, null, 8, ["label"]),
|
|
514
|
+
m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.price_excl_vat") }, null, 8, ["label"]),
|
|
515
|
+
m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.vat") }, null, 8, ["label"]),
|
|
516
|
+
m(U, { label: S(n).t("wise_invoicing.invoice.detail.line_items.total") }, null, 8, ["label"])
|
|
517
517
|
])]),
|
|
518
|
-
|
|
518
|
+
f("tbody", null, [(v(!0), d(s, null, y(t.rows, (e, t) => (v(), d(s, { key: e.type === "group" ? e.uuid : e.line.uuid }, [e.type === "group" ? (v(), d("tr", q, [f("td", {
|
|
519
|
+
style: _(w(e.depth)),
|
|
520
|
+
colspan: "6",
|
|
521
|
+
class: "border-y border-secondary py-sm pr-lg align-middle text-xxs wrap-break-word text-primary"
|
|
522
|
+
}, [f("span", J, x(e.name), 1), e.description !== null && e.description !== "" ? (v(), d("span", Y, x(e.description), 1)) : u("", !0)], 4), f("td", { class: g([e.depth === 0 ? "font-semibold text-primary" : "\n font-medium text-secondary\n ", "border-y border-secondary px-lg py-sm text-right align-middle text-xxs whitespace-nowrap"]) }, x(a(e.total)), 3)])) : (v(), d("tr", {
|
|
519
523
|
key: 1,
|
|
520
|
-
class:
|
|
524
|
+
class: g([t % 2 == 1 ? "bg-secondary" : "bg-primary", "break-inside-avoid [page-break-inside:avoid]"])
|
|
521
525
|
}, [
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
526
|
+
f("td", {
|
|
527
|
+
style: _(w(e.depth)),
|
|
528
|
+
class: "py-sm pr-lg align-middle text-xxs font-medium wrap-break-word text-primary"
|
|
529
|
+
}, [f("div", null, x(e.line.name), 1), e.line.description !== null && e.line.description !== "" ? (v(), d("div", X, x(e.line.description), 1)) : u("", !0)], 4),
|
|
530
|
+
m(V, null, {
|
|
531
|
+
default: C(() => [p(x(e.line.unit), 1)]),
|
|
525
532
|
_: 2
|
|
526
533
|
}, 1024),
|
|
527
|
-
|
|
528
|
-
default:
|
|
534
|
+
m(V, null, {
|
|
535
|
+
default: C(() => [p(x(h(e.line.quantity)), 1)]),
|
|
529
536
|
_: 2
|
|
530
537
|
}, 1024),
|
|
531
|
-
|
|
532
|
-
default:
|
|
538
|
+
m(V, null, {
|
|
539
|
+
default: C(() => [p(x(i(e.line.unitPrice)), 1)]),
|
|
533
540
|
_: 2
|
|
534
541
|
}, 1024),
|
|
535
|
-
|
|
536
|
-
default:
|
|
542
|
+
m(V, null, {
|
|
543
|
+
default: C(() => [p(x(c(e.line.netAmount)), 1)]),
|
|
537
544
|
_: 2
|
|
538
545
|
}, 1024),
|
|
539
|
-
|
|
540
|
-
default:
|
|
546
|
+
m(V, null, {
|
|
547
|
+
default: C(() => [p(x(b(e.line.vatRatePercentage)), 1)]),
|
|
541
548
|
_: 2
|
|
542
549
|
}, 1024),
|
|
543
|
-
|
|
544
|
-
default:
|
|
550
|
+
m(V, { bold: !0 }, {
|
|
551
|
+
default: C(() => [p(x(l(e.line)), 1)]),
|
|
545
552
|
_: 2
|
|
546
553
|
}, 1024)
|
|
547
|
-
], 2))], 64))), 128)), t.rows.length === 0 ? (
|
|
554
|
+
], 2))], 64))), 128)), t.rows.length === 0 ? (v(), d("tr", Z, [f("td", Q, x(S(n).t("wise_invoicing.invoice.detail.line_items.empty")), 1)])) : u("", !0)])
|
|
548
555
|
])]));
|
|
549
556
|
}
|
|
550
557
|
}), $ = class {
|
|
@@ -554,70 +561,70 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
554
561
|
}, te = { class: "grid grid-cols-[auto_1px_auto] items-end gap-x-2xl align-bottom" }, ne = { class: "grid h-min grid-cols-[auto_auto_auto] gap-x-lg gap-y-sm text-xs" }, re = {
|
|
555
562
|
key: 0,
|
|
556
563
|
class: "mt-4xl text-xs text-primary"
|
|
557
|
-
}, ie = /* @__PURE__ */
|
|
564
|
+
}, ie = /* @__PURE__ */ h({
|
|
558
565
|
__name: "InvoicePdfSummarySection",
|
|
559
566
|
props: {
|
|
560
567
|
hasLines: { type: Boolean },
|
|
561
568
|
invoice: {}
|
|
562
569
|
},
|
|
563
570
|
setup(e) {
|
|
564
|
-
let n = e, r =
|
|
565
|
-
function
|
|
571
|
+
let n = e, r = o(), i = c(() => r.locale.value || "en-US"), a = c(() => n.invoice.type === t.CREDIT_NOTE);
|
|
572
|
+
function l(e) {
|
|
566
573
|
return {
|
|
567
574
|
...e,
|
|
568
575
|
amount: -e.amount
|
|
569
576
|
};
|
|
570
577
|
}
|
|
571
|
-
function
|
|
572
|
-
return
|
|
578
|
+
function p(e) {
|
|
579
|
+
return R.formatMonetary(a.value ? l(e) : e, i.value);
|
|
573
580
|
}
|
|
574
|
-
let
|
|
581
|
+
let h = c(() => {
|
|
575
582
|
let e = $.sortByVatRate(n.invoice.vatSummaries).map((e) => ({
|
|
576
583
|
key: `${e.vatRate}`,
|
|
577
|
-
label:
|
|
578
|
-
netValue:
|
|
579
|
-
vatValue:
|
|
584
|
+
label: b(e.vatRate),
|
|
585
|
+
netValue: p(e.netAmount),
|
|
586
|
+
vatValue: p(e.vatAmount)
|
|
580
587
|
}));
|
|
581
588
|
return e.push({
|
|
582
589
|
key: "subtotal",
|
|
583
590
|
label: r.t("wise_invoicing.invoice.pdf.summary.subtotal"),
|
|
584
|
-
netValue:
|
|
585
|
-
vatValue:
|
|
591
|
+
netValue: p(n.invoice.effectiveNet),
|
|
592
|
+
vatValue: p(n.invoice.vatAmount)
|
|
586
593
|
}), e;
|
|
587
|
-
}),
|
|
588
|
-
function
|
|
594
|
+
}), _ = c(() => n.invoice.totalDiscountAmount === null ? "-" : `-${R.formatMonetary(n.invoice.totalDiscountAmount, i.value)}`);
|
|
595
|
+
function b(e) {
|
|
589
596
|
let t = n.invoice.lines.find((t) => t.vatRate === e);
|
|
590
597
|
return t === void 0 ? r.t("wise_invoicing.invoice.detail.totals.vat") : t.vatRatePercentage.toString(i.value);
|
|
591
598
|
}
|
|
592
|
-
return (e, t) => (
|
|
593
|
-
|
|
594
|
-
t[0] ||=
|
|
595
|
-
|
|
596
|
-
text:
|
|
599
|
+
return (e, t) => (v(), d("div", { class: g([n.hasLines ? "mt-xl" : "mt-4xl", "break-inside-avoid [page-break-inside:avoid]"]) }, [f("div", te, [
|
|
600
|
+
f("div", ne, [
|
|
601
|
+
t[0] ||= f("span", { class: "min-w-12" }, null, -1),
|
|
602
|
+
m(S(E), {
|
|
603
|
+
text: S(r).t("wise_invoicing.invoice.detail.totals.excl_vat"),
|
|
597
604
|
truncate: !1,
|
|
598
605
|
as: "span",
|
|
599
606
|
class: "text-right font-medium text-secondary"
|
|
600
607
|
}, null, 8, ["text"]),
|
|
601
|
-
|
|
602
|
-
text:
|
|
608
|
+
m(S(E), {
|
|
609
|
+
text: S(r).t("wise_invoicing.invoice.detail.totals.vat"),
|
|
603
610
|
truncate: !1,
|
|
604
611
|
as: "span",
|
|
605
612
|
class: "text-right font-medium text-secondary"
|
|
606
613
|
}, null, 8, ["text"]),
|
|
607
|
-
(
|
|
608
|
-
|
|
614
|
+
(v(!0), d(s, null, y(h.value, (e) => (v(), d(s, { key: e.key }, [
|
|
615
|
+
m(S(E), {
|
|
609
616
|
text: e.label,
|
|
610
617
|
truncate: !1,
|
|
611
618
|
as: "span",
|
|
612
619
|
class: "font-medium text-secondary"
|
|
613
620
|
}, null, 8, ["text"]),
|
|
614
|
-
|
|
621
|
+
m(S(E), {
|
|
615
622
|
text: e.netValue,
|
|
616
623
|
truncate: !1,
|
|
617
624
|
as: "span",
|
|
618
625
|
class: "text-right font-medium whitespace-nowrap text-primary"
|
|
619
626
|
}, null, 8, ["text"]),
|
|
620
|
-
|
|
627
|
+
m(S(E), {
|
|
621
628
|
text: e.vatValue,
|
|
622
629
|
truncate: !1,
|
|
623
630
|
as: "span",
|
|
@@ -625,38 +632,38 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
625
632
|
}, null, 8, ["text"])
|
|
626
633
|
], 64))), 128))
|
|
627
634
|
]),
|
|
628
|
-
t[2] ||=
|
|
629
|
-
|
|
630
|
-
default:
|
|
631
|
-
|
|
635
|
+
t[2] ||= f("span", { class: "h-24 w-px bg-tertiary" }, null, -1),
|
|
636
|
+
m(S(w), { class: "w-full" }, {
|
|
637
|
+
default: C(() => [
|
|
638
|
+
m(S(T), {
|
|
632
639
|
justify: "between",
|
|
633
640
|
class: "w-full text-xs"
|
|
634
641
|
}, {
|
|
635
|
-
default:
|
|
636
|
-
text:
|
|
642
|
+
default: C(() => [m(S(E), {
|
|
643
|
+
text: S(r).t("wise_invoicing.invoice.pdf.summary.total_discount"),
|
|
637
644
|
truncate: !1,
|
|
638
645
|
as: "span",
|
|
639
646
|
class: "font-medium text-secondary"
|
|
640
|
-
}, null, 8, ["text"]),
|
|
641
|
-
text:
|
|
647
|
+
}, null, 8, ["text"]), m(S(E), {
|
|
648
|
+
text: _.value,
|
|
642
649
|
truncate: !1,
|
|
643
650
|
as: "span",
|
|
644
651
|
class: "text-right font-medium whitespace-nowrap text-primary"
|
|
645
652
|
}, null, 8, ["text"])]),
|
|
646
653
|
_: 1
|
|
647
654
|
}),
|
|
648
|
-
t[1] ||=
|
|
649
|
-
|
|
655
|
+
t[1] ||= f("span", { class: "w-full border-t border-tertiary" }, null, -1),
|
|
656
|
+
m(S(T), {
|
|
650
657
|
class: "w-full",
|
|
651
658
|
justify: "between"
|
|
652
659
|
}, {
|
|
653
|
-
default:
|
|
654
|
-
text:
|
|
660
|
+
default: C(() => [m(S(E), {
|
|
661
|
+
text: S(r).t("wise_invoicing.invoice.detail.totals.total_incl_vat"),
|
|
655
662
|
truncate: !1,
|
|
656
663
|
as: "span",
|
|
657
664
|
class: "text-xs font-medium text-secondary"
|
|
658
|
-
}, null, 8, ["text"]),
|
|
659
|
-
text:
|
|
665
|
+
}, null, 8, ["text"]), m(S(E), {
|
|
666
|
+
text: p(n.invoice.grossAmount),
|
|
660
667
|
truncate: !1,
|
|
661
668
|
as: "span",
|
|
662
669
|
class: "text-sm font-semibold whitespace-nowrap text-primary"
|
|
@@ -666,68 +673,68 @@ var T = "-", E = 32, D = 512, O = 640, k = 576, A = 704, j = 52, M = 34, N = 16,
|
|
|
666
673
|
]),
|
|
667
674
|
_: 1
|
|
668
675
|
})
|
|
669
|
-
]), n.invoice.externalRemarks ? (
|
|
670
|
-
text:
|
|
676
|
+
]), n.invoice.externalRemarks ? (v(), d("section", re, [m(S(E), {
|
|
677
|
+
text: S(r).t("wise_invoicing.invoice.pdf.summary.remarks"),
|
|
671
678
|
truncate: !1,
|
|
672
679
|
as: "h2",
|
|
673
680
|
class: "font-medium"
|
|
674
|
-
}, null, 8, ["text"]),
|
|
681
|
+
}, null, 8, ["text"]), m(S(E), {
|
|
675
682
|
text: n.invoice.externalRemarks,
|
|
676
683
|
truncate: !1,
|
|
677
684
|
as: "p"
|
|
678
|
-
}, null, 8, ["text"])])) :
|
|
685
|
+
}, null, 8, ["text"])])) : u("", !0)], 2));
|
|
679
686
|
}
|
|
680
687
|
}), ae = {
|
|
681
688
|
"aria-hidden": "true",
|
|
682
689
|
class: "pointer-events-none absolute inset-0 flex transform-[rotate(-34deg)] items-center justify-center text-[42mm] leading-none font-bold whitespace-nowrap text-primary uppercase opacity-[0.05] select-none"
|
|
683
|
-
}, oe = /* @__PURE__ */
|
|
690
|
+
}, oe = /* @__PURE__ */ h({
|
|
684
691
|
__name: "InvoicePdfWatermark",
|
|
685
692
|
props: { label: {} },
|
|
686
693
|
setup(e) {
|
|
687
|
-
let t = e, n =
|
|
688
|
-
return (e, r) => (
|
|
694
|
+
let t = e, n = o();
|
|
695
|
+
return (e, r) => (v(), d("div", ae, x(t.label ?? S(n).t("wise_invoicing.invoice.status.draft")), 1));
|
|
689
696
|
}
|
|
690
|
-
}), se = { class: "absolute right-9 bottom-9 text-xs leading-none font-medium text-tertiary" }, ce = /* @__PURE__ */
|
|
697
|
+
}), se = { class: "absolute right-9 bottom-9 text-xs leading-none font-medium text-tertiary" }, ce = /* @__PURE__ */ h({
|
|
691
698
|
__name: "BillingDocumentPdf",
|
|
692
699
|
props: {
|
|
693
700
|
billingDocument: {},
|
|
694
701
|
watermark: {}
|
|
695
702
|
},
|
|
696
703
|
setup(n) {
|
|
697
|
-
let r = n, i =
|
|
698
|
-
let e =
|
|
704
|
+
let r = n, i = c(() => r.billingDocument.status === e.DRAFT || r.billingDocument.status === e.READY), a = c(() => r.billingDocument.type === t.CREDIT_NOTE), o = c(() => R.buildRows(r.billingDocument, { isCreditNote: a.value })), p = c(() => {
|
|
705
|
+
let e = R.paginateRows(o.value, { hasRemarks: r.billingDocument.externalRemarks !== null && r.billingDocument.externalRemarks.trim() !== "" });
|
|
699
706
|
return e.map((t, n) => ({
|
|
700
707
|
isLastPage: n === e.length - 1,
|
|
701
708
|
headerType: n === 0 ? "first" : "continuation",
|
|
702
709
|
rows: t
|
|
703
710
|
}));
|
|
704
711
|
});
|
|
705
|
-
return (e, t) => (
|
|
712
|
+
return (e, t) => (v(!0), d(s, null, y(p.value, (e, t) => (v(), d("article", {
|
|
706
713
|
key: `invoice-pdf-page-${t}`,
|
|
707
|
-
class:
|
|
714
|
+
class: g([t > 0 ? "\n mt-4xl\n print:mt-0\n " : "", "relative mx-auto box-border flex h-[297mm] w-[210mm] break-after-page flex-col overflow-hidden bg-primary px-5xl pt-5xl pb-2xl text-primary shadow-card [-webkit-print-color-adjust:exact] [page-break-after:always] [print-color-adjust:exact] last:break-after-auto last:[page-break-after:auto] print:mx-none print:min-h-auto print:w-auto print:shadow-none"])
|
|
708
715
|
}, [
|
|
709
|
-
i.value ? (
|
|
716
|
+
i.value ? (v(), l(oe, {
|
|
710
717
|
key: 0,
|
|
711
718
|
label: r.watermark
|
|
712
|
-
}, null, 8, ["label"])) :
|
|
713
|
-
|
|
719
|
+
}, null, 8, ["label"])) : u("", !0),
|
|
720
|
+
m(B, {
|
|
714
721
|
invoice: r.billingDocument,
|
|
715
722
|
"page-type": e.headerType
|
|
716
723
|
}, null, 8, ["invoice", "page-type"]),
|
|
717
|
-
e.rows.length > 0 || r.billingDocument.lines.length === 0 ? (
|
|
724
|
+
e.rows.length > 0 || r.billingDocument.lines.length === 0 ? (v(), l(ee, {
|
|
718
725
|
key: 1,
|
|
719
726
|
"is-credit-note": a.value,
|
|
720
727
|
rows: e.rows
|
|
721
|
-
}, null, 8, ["is-credit-note", "rows"])) :
|
|
722
|
-
e.isLastPage ? (
|
|
728
|
+
}, null, 8, ["is-credit-note", "rows"])) : u("", !0),
|
|
729
|
+
e.isLastPage ? (v(), l(ie, {
|
|
723
730
|
key: 2,
|
|
724
731
|
"has-lines": e.rows.length > 0 || r.billingDocument.lines.length === 0,
|
|
725
732
|
invoice: r.billingDocument
|
|
726
|
-
}, null, 8, ["has-lines", "invoice"])) :
|
|
727
|
-
|
|
728
|
-
|
|
733
|
+
}, null, 8, ["has-lines", "invoice"])) : u("", !0),
|
|
734
|
+
m(z, { invoice: r.billingDocument }, null, 8, ["invoice"]),
|
|
735
|
+
f("span", se, x(t + 1) + "/" + x(p.value.length), 1)
|
|
729
736
|
], 2))), 128));
|
|
730
737
|
}
|
|
731
738
|
});
|
|
732
739
|
//#endregion
|
|
733
|
-
export { $ as n,
|
|
740
|
+
export { $ as n, R as r, ce as t };
|