@loczer/storefront-sdk 0.229.0 → 0.230.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/components/ContractSaleDocument/InvoiceDetails.d.ts.map +1 -1
- package/dist/components/ContractSaleDocument/InvoiceDetails.js +126 -138
- package/dist/i18n/en.d.ts +1 -0
- package/dist/i18n/en.d.ts.map +1 -1
- package/dist/i18n/en.js +2 -1
- package/dist/i18n/fr.d.ts +1 -0
- package/dist/i18n/fr.d.ts.map +1 -1
- package/dist/i18n/fr.js +2 -1
- package/dist/index.d.ts +2 -0
- package/dist/storefront.css +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"InvoiceDetails.d.ts","sourceRoot":"","sources":["../../../src/components/ContractSaleDocument/InvoiceDetails.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAA;AAKvC,KAAK,mBAAmB,GAAG;IACzB,YAAY,EAAE,oBAAoB,CAAA;IAClC,KAAK,EAAE,4BAA4B,EAAE,CAAA;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,KAAK,MAAM,CAAA;IACpD,gBAAgB,EAAE,4BAA4B,CAAA;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;
|
|
1
|
+
{"version":3,"file":"InvoiceDetails.d.ts","sourceRoot":"","sources":["../../../src/components/ContractSaleDocument/InvoiceDetails.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,oBAAoB,EACpB,4BAA4B,EAC5B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAA;AAKvC,KAAK,mBAAmB,GAAG;IACzB,YAAY,EAAE,oBAAoB,CAAA;IAClC,KAAK,EAAE,4BAA4B,EAAE,CAAA;IACrC,QAAQ,EAAE,MAAM,CAAA;IAChB,GAAG,EAAE,MAAM,CAAA;IACX,KAAK,EAAE,MAAM,CAAA;IACb,UAAU,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,MAAM,GAAG,MAAM,KAAK,MAAM,CAAA;IACpD,gBAAgB,EAAE,4BAA4B,CAAA;IAC9C,eAAe,CAAC,EAAE,OAAO,CAAA;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAC3B,gBAAgB,CAAC,EAAE,OAAO,CAAA;IAC1B,qBAAqB,CAAC,EAAE,OAAO,CAAA;IAC/B,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB,CAAA;AAwDD,wBAAgB,cAAc,CAAC,EAC7B,YAAY,EACZ,KAAK,EACL,QAAQ,EACR,GAAG,EACH,KAAK,EACL,UAAU,EACV,gBAAgB,EAChB,eAAsB,EACtB,iBAAwB,EACxB,gBAAuB,EACvB,qBAA4B,EAC5B,iBAAiB,EACjB,OAAe,GAChB,EAAE,mBAAmB,2CAuVrB"}
|
|
@@ -8,7 +8,13 @@ function s(e) {
|
|
|
8
8
|
let t = e?.trim() ?? "";
|
|
9
9
|
return !t || t === "-" ? "" : t;
|
|
10
10
|
}
|
|
11
|
-
function c(e, t
|
|
11
|
+
function c(e, t) {
|
|
12
|
+
let n = e?.trim() ?? "";
|
|
13
|
+
if (!n) return "";
|
|
14
|
+
let r = t?.trim() ?? "", i = n.replace(/[^a-z\d]/gi, "").toLowerCase(), a = r.replace(/[^a-z\d]/gi, "").toLowerCase();
|
|
15
|
+
return !a || i.includes(a) ? n : `${n} ${r}`;
|
|
16
|
+
}
|
|
17
|
+
function l(e, t, n) {
|
|
12
18
|
let r = t.trim().toUpperCase();
|
|
13
19
|
try {
|
|
14
20
|
return new Intl.NumberFormat(n, {
|
|
@@ -19,7 +25,7 @@ function c(e, t, n) {
|
|
|
19
25
|
return `${e.toFixed(2)} ${r}`;
|
|
20
26
|
}
|
|
21
27
|
}
|
|
22
|
-
function
|
|
28
|
+
function u(e, t, n) {
|
|
23
29
|
let r = e instanceof Date ? e : new Date(e);
|
|
24
30
|
if (Number.isNaN(r.getTime())) return "-";
|
|
25
31
|
try {
|
|
@@ -35,9 +41,9 @@ function l(e, t, n) {
|
|
|
35
41
|
}).format(r);
|
|
36
42
|
}
|
|
37
43
|
}
|
|
38
|
-
function
|
|
39
|
-
let { t:
|
|
40
|
-
let n =
|
|
44
|
+
function d({ saleDocument: d, items: f, subtotal: p, tax: m, total: h, formatDate: g, documentLanguage: _, showInvoiceMeta: v = !0, showTotalsSection: y = !0, showNotesSection: b = !0, showAcceptanceSection: x = !0, documentQrCodeUrl: S, compact: C = !1 }) {
|
|
45
|
+
let { t: w } = a(), T = (t, n = {}) => e(w, _, t, n), E = (e, n = {}) => t(w, _, e, n), D = (e, t = {}) => {
|
|
46
|
+
let n = T(e, t), a = n.indexOf(" / ");
|
|
41
47
|
return a === -1 ? /* @__PURE__ */ r("span", { children: n }) : /* @__PURE__ */ i("span", {
|
|
42
48
|
className: "inline-flex flex-col text-left leading-snug",
|
|
43
49
|
children: [/* @__PURE__ */ r("span", { children: n.slice(0, a) }), /* @__PURE__ */ r("span", {
|
|
@@ -45,196 +51,178 @@ function u({ saleDocument: u, items: d, subtotal: f, tax: p, total: m, formatDat
|
|
|
45
51
|
children: n.slice(a + 3)
|
|
46
52
|
})]
|
|
47
53
|
});
|
|
48
|
-
},
|
|
49
|
-
O.description ? {
|
|
50
|
-
key: "description",
|
|
51
|
-
label: T("docs_contract_sale_legal_description_label"),
|
|
52
|
-
value: O.description
|
|
53
|
-
} : null,
|
|
54
|
-
O.companyRegistrationNumber ? {
|
|
55
|
-
key: "company-registration",
|
|
56
|
-
label: T("docs_contract_sale_legal_company_registration_label"),
|
|
57
|
-
value: O.companyRegistrationNumber
|
|
58
|
-
} : null,
|
|
59
|
-
O.establishmentRegistrationNumber ? {
|
|
60
|
-
key: "establishment-registration",
|
|
61
|
-
label: T("docs_contract_sale_legal_establishment_registration_label"),
|
|
62
|
-
value: O.establishmentRegistrationNumber
|
|
63
|
-
} : null,
|
|
64
|
-
O.vatNumber ? {
|
|
65
|
-
key: "vat-number",
|
|
66
|
-
label: T("docs_contract_sale_legal_vat_number_label"),
|
|
67
|
-
value: O.vatNumber
|
|
68
|
-
} : null,
|
|
69
|
-
O.tradeRegister ? {
|
|
70
|
-
key: "trade-register",
|
|
71
|
-
label: T("docs_contract_sale_legal_trade_register_label"),
|
|
72
|
-
value: O.tradeRegister
|
|
73
|
-
} : null
|
|
74
|
-
].filter((e) => e !== null) : [], N = s(u.recipient.address), P = u.recipient.email?.trim() ?? "", F = u.kind === "credit_note", I = w(F ? "docs_contract_sale_credit_note_title" : u.kind === "quote" ? "docs_contract_sale_quote_title" : "docs_contract_sale_invoice_title"), L = w(F ? "docs_contract_sale_credit_note_date_label" : u.kind === "quote" ? "docs_contract_sale_quote_date_label" : "docs_contract_sale_invoice_date_label"), R = w(F ? "docs_contract_sale_credit_note_recipient_label" : "docs_contract_sale_invoice_recipient_label"), z = F ? -1 : 1;
|
|
54
|
+
}, O = !y && !b && !x, k = d.issuer.legalIdentity, A = k?.legalName?.trim() || d.issuer.name, j = s(k?.registeredAddress || d.issuer.address), M = c(k?.tradeRegister, k?.companyRegistrationNumber), N = [k?.description?.trim(), M].filter((e) => !!e).join(", "), P = k?.vatNumber?.trim() ?? "", F = d.recipient.legalIdentity, I = F?.legalName?.trim() || d.recipient.name, L = s(F?.registeredAddress || d.recipient.address), R = c(F?.tradeRegister, F?.companyRegistrationNumber), z = [F?.description?.trim(), R].filter((e) => !!e).join(", "), B = F?.companyRegistrationNumber?.trim() ?? "", V = F?.establishmentRegistrationNumber?.trim() ?? "", H = F?.vatNumber?.trim() ?? "", U = d.recipient.email?.trim() ?? "", W = d.kind === "credit_note", G = T(W ? "docs_contract_sale_credit_note_title" : d.kind === "quote" ? "docs_contract_sale_quote_title" : "docs_contract_sale_invoice_title"), K = g(d.date), q = g(d.dueDate), J = d.kind === "invoice" && K === q, Y = T(W ? "docs_contract_sale_credit_note_date_label" : d.kind === "quote" ? "docs_contract_sale_quote_date_label" : J ? "docs_contract_sale_invoice_and_due_date_label" : "docs_contract_sale_invoice_date_label"), X = T(W ? "docs_contract_sale_credit_note_recipient_label" : "docs_contract_sale_invoice_recipient_label"), Z = W ? -1 : 1;
|
|
75
55
|
return /* @__PURE__ */ i("main", {
|
|
76
56
|
className: "flex flex-grow flex-col px-4 md:px-8",
|
|
77
57
|
children: [
|
|
78
|
-
|
|
79
|
-
className: o("grid",
|
|
58
|
+
v && /* @__PURE__ */ i("header", {
|
|
59
|
+
className: o("grid", C ? "mb-4 gap-3" : "mb-8 gap-6"),
|
|
80
60
|
children: [/* @__PURE__ */ i("div", {
|
|
81
|
-
className: o("grid md:grid-cols-2",
|
|
61
|
+
className: o("grid md:grid-cols-2", C ? "gap-3 md:gap-4" : "gap-6 md:gap-8"),
|
|
82
62
|
children: [/* @__PURE__ */ i("div", { children: [/* @__PURE__ */ i("h1", {
|
|
83
|
-
className: o("flex flex-wrap items-baseline gap-x-2 gap-y-1 font-semibold text-foreground",
|
|
84
|
-
children: [/* @__PURE__ */ r("span", { children:
|
|
63
|
+
className: o("flex flex-wrap items-baseline gap-x-2 gap-y-1 font-semibold text-foreground", C ? "text-lg" : "text-xl"),
|
|
64
|
+
children: [/* @__PURE__ */ r("span", { children: G }), /* @__PURE__ */ i("span", {
|
|
85
65
|
className: "font-normal text-muted-foreground",
|
|
86
|
-
children: ["#",
|
|
66
|
+
children: ["#", d.saleDocumentNumber]
|
|
87
67
|
})]
|
|
88
|
-
}),
|
|
89
|
-
className: o(
|
|
68
|
+
}), S === void 0 ? null : /* @__PURE__ */ r("div", {
|
|
69
|
+
className: o(C ? "mt-2 h-16 w-16" : "mt-4 h-24 w-24"),
|
|
90
70
|
"data-testid": "contract-sale-document-public-url-qr-container",
|
|
91
|
-
children:
|
|
92
|
-
src:
|
|
93
|
-
alt:
|
|
71
|
+
children: S ? /* @__PURE__ */ r("img", {
|
|
72
|
+
src: S,
|
|
73
|
+
alt: w("docs_contract_sale_qr_alt"),
|
|
94
74
|
className: "block h-full w-full",
|
|
95
75
|
"data-testid": "contract-sale-document-public-url-qr"
|
|
96
76
|
}) : null
|
|
97
77
|
})] }), /* @__PURE__ */ i("div", {
|
|
98
|
-
className: o("md:text-right",
|
|
78
|
+
className: o("md:text-right", C ? "text-[13px] leading-[18px]" : "text-sm"),
|
|
99
79
|
children: [/* @__PURE__ */ i("div", {
|
|
100
|
-
className: "mb-2",
|
|
80
|
+
className: o(!J && "mb-2"),
|
|
101
81
|
children: [/* @__PURE__ */ r("p", {
|
|
102
82
|
className: "font-semibold text-foreground",
|
|
103
|
-
children:
|
|
83
|
+
children: Y
|
|
104
84
|
}), /* @__PURE__ */ r("p", {
|
|
105
85
|
className: "text-muted-foreground",
|
|
106
|
-
children:
|
|
86
|
+
children: K
|
|
107
87
|
})]
|
|
108
|
-
}), /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("p", {
|
|
88
|
+
}), J ? null : /* @__PURE__ */ i("div", { children: [/* @__PURE__ */ r("p", {
|
|
109
89
|
className: "font-semibold text-foreground",
|
|
110
|
-
children:
|
|
90
|
+
children: T("docs_contract_sale_due_date_label")
|
|
111
91
|
}), /* @__PURE__ */ r("p", {
|
|
112
92
|
className: "text-muted-foreground",
|
|
113
|
-
children:
|
|
93
|
+
children: q
|
|
114
94
|
})] })]
|
|
115
95
|
})]
|
|
116
96
|
}), /* @__PURE__ */ i("div", {
|
|
117
|
-
className: o("grid md:grid-cols-2",
|
|
118
|
-
children: [
|
|
119
|
-
|
|
97
|
+
className: o("grid md:grid-cols-2", C ? "gap-3 md:gap-4" : "gap-6 md:gap-8"),
|
|
98
|
+
children: [/* @__PURE__ */ i("div", {
|
|
99
|
+
className: o(C ? "text-[13px] leading-[18px]" : "text-sm"),
|
|
100
|
+
"data-testid": k ? "contract-sale-document-issuer-legal-identity" : void 0,
|
|
101
|
+
children: [
|
|
120
102
|
/* @__PURE__ */ r("h2", {
|
|
121
|
-
className:
|
|
122
|
-
children: k
|
|
123
|
-
}),
|
|
124
|
-
A ? /* @__PURE__ */ r("p", {
|
|
125
|
-
className: "text-xs text-muted-foreground",
|
|
103
|
+
className: "font-semibold text-primary",
|
|
126
104
|
children: A
|
|
105
|
+
}),
|
|
106
|
+
N ? /* @__PURE__ */ r("p", {
|
|
107
|
+
className: "whitespace-nowrap text-muted-foreground",
|
|
108
|
+
children: N
|
|
109
|
+
}) : null,
|
|
110
|
+
P ? /* @__PURE__ */ i("p", {
|
|
111
|
+
className: "flex items-baseline gap-1 text-muted-foreground",
|
|
112
|
+
children: [/* @__PURE__ */ i("span", { children: [E("docs_contract_sale_legal_vat_number_label"), ":"] }), /* @__PURE__ */ r("span", { children: P })]
|
|
127
113
|
}) : null,
|
|
128
114
|
j ? /* @__PURE__ */ r("p", {
|
|
129
115
|
className: "text-muted-foreground whitespace-pre-line",
|
|
130
116
|
children: j
|
|
131
117
|
}) : null
|
|
132
|
-
]
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
}) :
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
className: "
|
|
159
|
-
children: [/* @__PURE__ */
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
118
|
+
]
|
|
119
|
+
}), /* @__PURE__ */ i("div", {
|
|
120
|
+
className: o("md:text-right", C ? "text-[13px] leading-[18px]" : "text-sm"),
|
|
121
|
+
"data-testid": F ? "contract-sale-document-recipient-legal-identity" : void 0,
|
|
122
|
+
children: [
|
|
123
|
+
/* @__PURE__ */ r("h3", {
|
|
124
|
+
className: "mb-2 font-semibold text-foreground",
|
|
125
|
+
children: X
|
|
126
|
+
}),
|
|
127
|
+
/* @__PURE__ */ r("p", {
|
|
128
|
+
className: "font-medium text-foreground",
|
|
129
|
+
children: I
|
|
130
|
+
}),
|
|
131
|
+
z ? /* @__PURE__ */ r("p", {
|
|
132
|
+
className: "text-muted-foreground",
|
|
133
|
+
children: z
|
|
134
|
+
}) : null,
|
|
135
|
+
!R && B ? /* @__PURE__ */ i("p", {
|
|
136
|
+
className: "text-muted-foreground",
|
|
137
|
+
children: [/* @__PURE__ */ i("span", { children: [E("docs_contract_sale_legal_company_registration_label"), ":"] }), /* @__PURE__ */ i("span", { children: [" ", B] })]
|
|
138
|
+
}) : null,
|
|
139
|
+
V ? /* @__PURE__ */ i("p", {
|
|
140
|
+
className: "text-muted-foreground",
|
|
141
|
+
children: [/* @__PURE__ */ i("span", { children: [E("docs_contract_sale_legal_establishment_registration_label"), ":"] }), /* @__PURE__ */ i("span", { children: [" ", V] })]
|
|
142
|
+
}) : null,
|
|
143
|
+
H ? /* @__PURE__ */ i("p", {
|
|
144
|
+
className: "text-muted-foreground",
|
|
145
|
+
children: [/* @__PURE__ */ i("span", { children: [E("docs_contract_sale_legal_vat_number_label"), ":"] }), /* @__PURE__ */ i("span", { children: [" ", H] })]
|
|
146
|
+
}) : null,
|
|
147
|
+
L ? /* @__PURE__ */ r("p", {
|
|
148
|
+
className: "text-muted-foreground whitespace-pre-line",
|
|
149
|
+
children: L
|
|
150
|
+
}) : null,
|
|
151
|
+
U ? /* @__PURE__ */ r("p", {
|
|
152
|
+
className: "text-muted-foreground",
|
|
153
|
+
children: U
|
|
154
|
+
}) : null
|
|
155
|
+
]
|
|
156
|
+
})]
|
|
169
157
|
})]
|
|
170
158
|
}),
|
|
171
|
-
|
|
172
|
-
className: o("border-
|
|
159
|
+
v && d.rental ? /* @__PURE__ */ r("section", {
|
|
160
|
+
className: o("border-t border-border", C ? "py-2" : "py-3"),
|
|
173
161
|
"data-testid": "contract-sale-document-rental-details",
|
|
174
162
|
children: /* @__PURE__ */ i("dl", {
|
|
175
|
-
className: o("grid",
|
|
163
|
+
className: o("grid", C ? "gap-0.5 text-[13px] leading-[18px]" : "gap-1 text-sm"),
|
|
176
164
|
children: [
|
|
177
165
|
/* @__PURE__ */ i("div", {
|
|
178
166
|
className: "flex items-baseline gap-1 whitespace-nowrap",
|
|
179
167
|
children: [/* @__PURE__ */ r("dt", {
|
|
180
168
|
className: "font-medium text-foreground",
|
|
181
|
-
children: /* @__PURE__ */ i("span", { children: [
|
|
169
|
+
children: /* @__PURE__ */ i("span", { children: [T("docs_contract_sale_booking_number_label"), ":"] })
|
|
182
170
|
}), /* @__PURE__ */ r("dd", {
|
|
183
171
|
className: "text-muted-foreground",
|
|
184
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
172
|
+
children: /* @__PURE__ */ r("span", { children: d.rental.bookingNumber })
|
|
185
173
|
})]
|
|
186
174
|
}),
|
|
187
175
|
/* @__PURE__ */ i("div", {
|
|
188
176
|
className: "flex items-baseline gap-1 whitespace-nowrap",
|
|
189
177
|
children: [/* @__PURE__ */ r("dt", {
|
|
190
178
|
className: "font-medium text-foreground",
|
|
191
|
-
children: /* @__PURE__ */ i("span", { children: [
|
|
179
|
+
children: /* @__PURE__ */ i("span", { children: [T("docs_contract_sale_rental_start_label"), ":"] })
|
|
192
180
|
}), /* @__PURE__ */ r("dd", {
|
|
193
181
|
className: "text-muted-foreground",
|
|
194
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
182
|
+
children: /* @__PURE__ */ r("span", { children: u(d.rental.start, _.legal, d.rental.timeZone) })
|
|
195
183
|
})]
|
|
196
184
|
}),
|
|
197
185
|
/* @__PURE__ */ i("div", {
|
|
198
186
|
className: "flex items-baseline gap-1 whitespace-nowrap",
|
|
199
187
|
children: [/* @__PURE__ */ r("dt", {
|
|
200
188
|
className: "font-medium text-foreground",
|
|
201
|
-
children: /* @__PURE__ */ i("span", { children: [
|
|
189
|
+
children: /* @__PURE__ */ i("span", { children: [T("docs_contract_sale_rental_end_label"), ":"] })
|
|
202
190
|
}), /* @__PURE__ */ r("dd", {
|
|
203
191
|
className: "text-muted-foreground",
|
|
204
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
192
|
+
children: /* @__PURE__ */ r("span", { children: u(d.rental.end, _.legal, d.rental.timeZone) })
|
|
205
193
|
})]
|
|
206
194
|
})
|
|
207
195
|
]
|
|
208
196
|
})
|
|
209
197
|
}) : null,
|
|
210
198
|
/* @__PURE__ */ i("section", {
|
|
211
|
-
className: o(
|
|
199
|
+
className: o(O ? "mb-0 flex flex-grow flex-col" : C ? "mb-4" : "mb-8"),
|
|
212
200
|
children: [/* @__PURE__ */ i("div", {
|
|
213
|
-
className: o("flex bg-muted font-semibold text-muted-foreground",
|
|
201
|
+
className: o("flex bg-muted font-semibold text-muted-foreground", C ? "p-2 text-sm leading-5" : "p-2 text-xs md:p-3 md:text-base"),
|
|
214
202
|
children: [
|
|
215
203
|
/* @__PURE__ */ r("div", {
|
|
216
204
|
className: "w-5/12 pr-2 md:w-1/2",
|
|
217
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
205
|
+
children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_description_label") })
|
|
218
206
|
}),
|
|
219
207
|
/* @__PURE__ */ r("div", {
|
|
220
208
|
className: "w-1/6 text-center",
|
|
221
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
209
|
+
children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_quantity_label") })
|
|
222
210
|
}),
|
|
223
211
|
/* @__PURE__ */ r("div", {
|
|
224
212
|
className: "w-3/12 text-right md:w-1/6",
|
|
225
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
213
|
+
children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_unit_price_label") })
|
|
226
214
|
}),
|
|
227
215
|
/* @__PURE__ */ r("div", {
|
|
228
216
|
className: "w-1/6 text-right",
|
|
229
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
217
|
+
children: /* @__PURE__ */ r("span", { children: E("docs_contract_sale_line_total_label") })
|
|
230
218
|
})
|
|
231
219
|
]
|
|
232
220
|
}), /* @__PURE__ */ r("div", {
|
|
233
|
-
className:
|
|
234
|
-
children:
|
|
235
|
-
let t = 1 + (e.taxRate ??
|
|
221
|
+
className: O ? "flex flex-1 flex-col" : "flex flex-col",
|
|
222
|
+
children: f.map((e) => {
|
|
223
|
+
let t = 1 + (e.taxRate ?? d.taxRate ?? 0);
|
|
236
224
|
return /* @__PURE__ */ i("div", {
|
|
237
|
-
className: o("flex items-center border-b border-border",
|
|
225
|
+
className: o("flex items-center border-b border-border", C ? "p-2 text-sm leading-5" : "p-2 text-sm md:p-3 md:text-base"),
|
|
238
226
|
children: [
|
|
239
227
|
/* @__PURE__ */ r("div", {
|
|
240
228
|
className: "w-5/12 pr-2 md:w-1/2",
|
|
@@ -252,19 +240,19 @@ function u({ saleDocument: u, items: d, subtotal: f, tax: p, total: m, formatDat
|
|
|
252
240
|
}),
|
|
253
241
|
/* @__PURE__ */ r("div", {
|
|
254
242
|
className: "w-3/12 text-right md:w-1/6",
|
|
255
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
243
|
+
children: /* @__PURE__ */ r("span", { children: l(e.unitPrice / t * Z, d.currency, _.customer) })
|
|
256
244
|
}),
|
|
257
245
|
/* @__PURE__ */ r("div", {
|
|
258
246
|
className: "w-1/6 text-right",
|
|
259
|
-
children: /* @__PURE__ */ r("span", { children:
|
|
247
|
+
children: /* @__PURE__ */ r("span", { children: l(e.quantity * e.unitPrice / t * Z, d.currency, _.customer) })
|
|
260
248
|
})
|
|
261
249
|
]
|
|
262
250
|
}, e.id);
|
|
263
251
|
})
|
|
264
252
|
})]
|
|
265
253
|
}),
|
|
266
|
-
|
|
267
|
-
className: o("flex justify-end",
|
|
254
|
+
y && /* @__PURE__ */ r("section", {
|
|
255
|
+
className: o("flex justify-end", C ? "mb-6 text-sm leading-5" : "mb-16"),
|
|
268
256
|
children: /* @__PURE__ */ i("div", {
|
|
269
257
|
className: "w-full md:w-1/3",
|
|
270
258
|
children: [
|
|
@@ -272,56 +260,56 @@ function u({ saleDocument: u, items: d, subtotal: f, tax: p, total: m, formatDat
|
|
|
272
260
|
className: "mb-2 flex items-start justify-between gap-4",
|
|
273
261
|
children: [/* @__PURE__ */ r("span", {
|
|
274
262
|
className: "text-muted-foreground",
|
|
275
|
-
children:
|
|
263
|
+
children: D("docs_contract_sale_subtotal_label")
|
|
276
264
|
}), /* @__PURE__ */ r("span", {
|
|
277
265
|
className: "shrink-0 text-right font-semibold",
|
|
278
|
-
children:
|
|
266
|
+
children: l(p, d.currency, _.customer)
|
|
279
267
|
})]
|
|
280
268
|
}),
|
|
281
|
-
|
|
269
|
+
m !== 0 && /* @__PURE__ */ i("div", {
|
|
282
270
|
className: "mb-2 flex items-start justify-between gap-4",
|
|
283
271
|
children: [/* @__PURE__ */ r("span", {
|
|
284
272
|
className: "text-muted-foreground",
|
|
285
|
-
children:
|
|
273
|
+
children: D("docs_contract_sale_tax_label", { rate: ((d.taxRate ?? 0) * 100).toFixed(0) })
|
|
286
274
|
}), /* @__PURE__ */ r("span", {
|
|
287
275
|
className: "shrink-0 text-right font-semibold",
|
|
288
|
-
children:
|
|
276
|
+
children: l(m, d.currency, _.customer)
|
|
289
277
|
})]
|
|
290
278
|
}),
|
|
291
279
|
/* @__PURE__ */ i("div", {
|
|
292
280
|
className: "mt-2 flex items-start justify-between gap-4 border-t border-border pt-2",
|
|
293
281
|
children: [/* @__PURE__ */ r("span", {
|
|
294
|
-
className: o("font-bold",
|
|
295
|
-
children:
|
|
282
|
+
className: o("font-bold", C ? "text-lg" : "text-xl"),
|
|
283
|
+
children: D("docs_contract_sale_total_label")
|
|
296
284
|
}), /* @__PURE__ */ r("span", {
|
|
297
|
-
className: o("shrink-0 text-right font-bold",
|
|
298
|
-
children:
|
|
285
|
+
className: o("shrink-0 text-right font-bold", C ? "text-lg" : "text-xl"),
|
|
286
|
+
children: l(h, d.currency, _.customer)
|
|
299
287
|
})]
|
|
300
288
|
})
|
|
301
289
|
]
|
|
302
290
|
})
|
|
303
291
|
}),
|
|
304
|
-
|
|
305
|
-
className: o(
|
|
292
|
+
b && d.notes && /* @__PURE__ */ i("section", {
|
|
293
|
+
className: o(C ? "mb-6" : "mb-16"),
|
|
306
294
|
children: [/* @__PURE__ */ r("h3", {
|
|
307
|
-
className: o("border-b border-border font-semibold text-foreground",
|
|
308
|
-
children:
|
|
295
|
+
className: o("border-b border-border font-semibold text-foreground", C ? "mb-2 pb-1" : "mb-4 pb-2"),
|
|
296
|
+
children: T("docs_contract_sale_notes_title")
|
|
309
297
|
}), /* @__PURE__ */ r("div", {
|
|
310
298
|
className: "text-sm text-muted-foreground",
|
|
311
299
|
children: /* @__PURE__ */ r("p", {
|
|
312
300
|
className: "whitespace-pre-wrap break-words",
|
|
313
|
-
children:
|
|
301
|
+
children: d.notes
|
|
314
302
|
})
|
|
315
303
|
})]
|
|
316
304
|
}),
|
|
317
|
-
|
|
318
|
-
saleDocument:
|
|
319
|
-
documentLanguage:
|
|
320
|
-
formatDate:
|
|
321
|
-
compact:
|
|
305
|
+
x ? /* @__PURE__ */ r(n, {
|
|
306
|
+
saleDocument: d,
|
|
307
|
+
documentLanguage: _,
|
|
308
|
+
formatDate: g,
|
|
309
|
+
compact: C
|
|
322
310
|
}) : null
|
|
323
311
|
]
|
|
324
312
|
});
|
|
325
313
|
}
|
|
326
314
|
//#endregion
|
|
327
|
-
export {
|
|
315
|
+
export { d as InvoiceDetails };
|
package/dist/i18n/en.d.ts
CHANGED
|
@@ -298,6 +298,7 @@ export declare const storefront: {
|
|
|
298
298
|
docs_contract_sale_credit_note_title: string;
|
|
299
299
|
docs_contract_sale_page_counter: string;
|
|
300
300
|
docs_contract_sale_invoice_date_label: string;
|
|
301
|
+
docs_contract_sale_invoice_and_due_date_label: string;
|
|
301
302
|
docs_contract_sale_quote_date_label: string;
|
|
302
303
|
docs_contract_sale_credit_note_date_label: string;
|
|
303
304
|
docs_contract_sale_due_date_label: string;
|
package/dist/i18n/en.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"en.d.ts","sourceRoot":"","sources":["../../src/i18n/en.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+gBtB,CAAA"}
|
package/dist/i18n/en.js
CHANGED
|
@@ -299,6 +299,7 @@ var e = {
|
|
|
299
299
|
docs_contract_sale_credit_note_title: "Credit note",
|
|
300
300
|
docs_contract_sale_page_counter: "Page {{current_page}} of {{total_pages}}",
|
|
301
301
|
docs_contract_sale_invoice_date_label: "Invoice Date:",
|
|
302
|
+
docs_contract_sale_invoice_and_due_date_label: "Invoice and Due Date:",
|
|
302
303
|
docs_contract_sale_quote_date_label: "Quote Date:",
|
|
303
304
|
docs_contract_sale_credit_note_date_label: "Credit Note Date:",
|
|
304
305
|
docs_contract_sale_due_date_label: "Due Date:",
|
|
@@ -307,7 +308,7 @@ var e = {
|
|
|
307
308
|
docs_contract_sale_legal_description_label: "Description",
|
|
308
309
|
docs_contract_sale_legal_company_registration_label: "Company registration no.",
|
|
309
310
|
docs_contract_sale_legal_establishment_registration_label: "Establishment registration no.",
|
|
310
|
-
docs_contract_sale_legal_vat_number_label: "VAT
|
|
311
|
+
docs_contract_sale_legal_vat_number_label: "VAT",
|
|
311
312
|
docs_contract_sale_legal_trade_register_label: "Trade register",
|
|
312
313
|
docs_contract_sale_rental_details_title: "Rental details",
|
|
313
314
|
docs_contract_sale_booking_number_label: "Booking",
|
package/dist/i18n/fr.d.ts
CHANGED
|
@@ -299,6 +299,7 @@ export declare const storefront: {
|
|
|
299
299
|
docs_contract_sale_credit_note_title: string;
|
|
300
300
|
docs_contract_sale_page_counter: string;
|
|
301
301
|
docs_contract_sale_invoice_date_label: string;
|
|
302
|
+
docs_contract_sale_invoice_and_due_date_label: string;
|
|
302
303
|
docs_contract_sale_quote_date_label: string;
|
|
303
304
|
docs_contract_sale_credit_note_date_label: string;
|
|
304
305
|
docs_contract_sale_due_date_label: string;
|
package/dist/i18n/fr.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU
|
|
1
|
+
{"version":3,"file":"fr.d.ts","sourceRoot":"","sources":["../../src/i18n/fr.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAghBtB,CAAA"}
|
package/dist/i18n/fr.js
CHANGED
|
@@ -300,6 +300,7 @@ var e = {
|
|
|
300
300
|
docs_contract_sale_credit_note_title: "Avoir",
|
|
301
301
|
docs_contract_sale_page_counter: "Page {{current_page}} sur {{total_pages}}",
|
|
302
302
|
docs_contract_sale_invoice_date_label: "Date de facture :",
|
|
303
|
+
docs_contract_sale_invoice_and_due_date_label: "Date et échéance :",
|
|
303
304
|
docs_contract_sale_quote_date_label: "Date du devis :",
|
|
304
305
|
docs_contract_sale_credit_note_date_label: "Date de l'avoir :",
|
|
305
306
|
docs_contract_sale_due_date_label: "Date d'échéance :",
|
|
@@ -308,7 +309,7 @@ var e = {
|
|
|
308
309
|
docs_contract_sale_legal_description_label: "Description",
|
|
309
310
|
docs_contract_sale_legal_company_registration_label: "N° d’immatriculation",
|
|
310
311
|
docs_contract_sale_legal_establishment_registration_label: "N° d’établissement",
|
|
311
|
-
docs_contract_sale_legal_vat_number_label: "
|
|
312
|
+
docs_contract_sale_legal_vat_number_label: "TVA",
|
|
312
313
|
docs_contract_sale_legal_trade_register_label: "Registre du commerce",
|
|
313
314
|
docs_contract_sale_rental_details_title: "Détails de la location",
|
|
314
315
|
docs_contract_sale_booking_number_label: "Réservation",
|
package/dist/index.d.ts
CHANGED
|
@@ -4487,6 +4487,7 @@ export declare const storefrontEn: {
|
|
|
4487
4487
|
docs_contract_sale_credit_note_title: string;
|
|
4488
4488
|
docs_contract_sale_page_counter: string;
|
|
4489
4489
|
docs_contract_sale_invoice_date_label: string;
|
|
4490
|
+
docs_contract_sale_invoice_and_due_date_label: string;
|
|
4490
4491
|
docs_contract_sale_quote_date_label: string;
|
|
4491
4492
|
docs_contract_sale_credit_note_date_label: string;
|
|
4492
4493
|
docs_contract_sale_due_date_label: string;
|
|
@@ -5047,6 +5048,7 @@ export declare const storefrontFr: {
|
|
|
5047
5048
|
docs_contract_sale_credit_note_title: string;
|
|
5048
5049
|
docs_contract_sale_page_counter: string;
|
|
5049
5050
|
docs_contract_sale_invoice_date_label: string;
|
|
5051
|
+
docs_contract_sale_invoice_and_due_date_label: string;
|
|
5050
5052
|
docs_contract_sale_quote_date_label: string;
|
|
5051
5053
|
docs_contract_sale_credit_note_date_label: string;
|
|
5052
5054
|
docs_contract_sale_due_date_label: string;
|