@tesouro/embedded-components-react 0.3.14 → 0.3.16
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/libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js +124 -124
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index418.js +116 -116
- package/dist/libs/tesouro-embedded-components-react/monite-sdk/dist/index443.js +94 -94
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/zod.gen.js +1206 -1201
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/packages/shared-ui-shadcn/dist/index.js +2625 -2626
- package/package.json +1 -1
|
@@ -9,31 +9,31 @@ import { Fragment as a, jsx as o, jsxs as s } from "@emotion/react/jsx-runtime";
|
|
|
9
9
|
import { useLingui as c } from "@lingui/react";
|
|
10
10
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index247.js
|
|
11
11
|
var l = (l) => {
|
|
12
|
-
let u = e(), { i18n:
|
|
13
|
-
|
|
12
|
+
let u = "Monite-AccessRestriction", d = e(), { i18n: f } = c(), p = l.title ?? f._("Access Restricted"), m = l.description ?? /* @__PURE__ */ s("span", { children: [
|
|
13
|
+
f._("You don’t have permissions to view this page."),
|
|
14
14
|
/* @__PURE__ */ o("br", {}),
|
|
15
|
-
|
|
15
|
+
f._("Contact your system administrator for details.")
|
|
16
16
|
] });
|
|
17
|
-
return /* @__PURE__ */ s(a, { children: [
|
|
18
|
-
className:
|
|
17
|
+
return /* @__PURE__ */ s(a, { children: [d && /* @__PURE__ */ o("div", {
|
|
18
|
+
className: `ttw:flex ttw:justify-end ttw:p-4 ${u}-InDialog-Header`,
|
|
19
19
|
children: /* @__PURE__ */ o(n, {
|
|
20
|
-
onClick:
|
|
20
|
+
onClick: d.onClose,
|
|
21
21
|
color: "inherit",
|
|
22
22
|
"aria-label": "close",
|
|
23
23
|
children: /* @__PURE__ */ o(i, {})
|
|
24
24
|
})
|
|
25
25
|
}), /* @__PURE__ */ o(t, {
|
|
26
|
-
className: "
|
|
26
|
+
className: u + "-Content",
|
|
27
27
|
children: /* @__PURE__ */ s("div", {
|
|
28
28
|
className: "ttw:flex ttw:flex-col ttw:items-center ttw:space-y-4",
|
|
29
29
|
children: [/* @__PURE__ */ o(r, { className: "ttw:w-8 ttw:h-8 ttw:text-primary" }), /* @__PURE__ */ s("div", {
|
|
30
30
|
className: "ttw:flex ttw:flex-col ttw:items-center ttw:space-y-2",
|
|
31
31
|
children: [/* @__PURE__ */ o("h3", {
|
|
32
32
|
className: "ttw:text-2xl ttw:font-semibold",
|
|
33
|
-
children:
|
|
33
|
+
children: p
|
|
34
34
|
}), /* @__PURE__ */ o("p", {
|
|
35
35
|
className: "ttw:text-center",
|
|
36
|
-
children:
|
|
36
|
+
children: m
|
|
37
37
|
})]
|
|
38
38
|
})]
|
|
39
39
|
})
|
|
@@ -25,57 +25,57 @@ import { PayableLineItemsForm as he } from "./index383.js";
|
|
|
25
25
|
import "./index384.js";
|
|
26
26
|
import { usePayableDetailsForm as ge } from "./index385.js";
|
|
27
27
|
import { getPayableDetailsFormSchema as _e, isFieldRequiredByValidations as s } from "./index386.js";
|
|
28
|
-
import { useProductCurrencyGroups as
|
|
29
|
-
import { getBankAccountName as
|
|
30
|
-
import { safeZodResolver as
|
|
31
|
-
import { useEffect as
|
|
32
|
-
import { Fragment as
|
|
33
|
-
import { Box as
|
|
34
|
-
import { useLingui as
|
|
35
|
-
import { DatePicker as
|
|
36
|
-
import { Controller as
|
|
37
|
-
import
|
|
38
|
-
import
|
|
28
|
+
import { useProductCurrencyGroups as ve } from "./index389.js";
|
|
29
|
+
import { getBankAccountName as ye } from "./index390.js";
|
|
30
|
+
import { safeZodResolver as be } from "./index391.js";
|
|
31
|
+
import { useEffect as c, useMemo as xe, useRef as Se, useState as Ce } from "react";
|
|
32
|
+
import { Fragment as we, jsx as l, jsxs as u } from "@emotion/react/jsx-runtime";
|
|
33
|
+
import { Box as d, Button as f, FormControl as Te, FormHelperText as Ee, Grid as p, IconButton as De, InputLabel as Oe, MenuItem as ke, Paper as m, Select as Ae, Stack as je, Table as Me, TableBody as Ne, TableCell as h, TableRow as g, TextField as _, Typography as v } from "@mui/material";
|
|
34
|
+
import { useLingui as Pe } from "@lingui/react";
|
|
35
|
+
import { DatePicker as y } from "@mui/x-date-pickers";
|
|
36
|
+
import { Controller as b, FormProvider as Fe, useForm as Ie, useFormState as Le } from "react-hook-form";
|
|
37
|
+
import Re from "@mui/icons-material/DeleteForever";
|
|
38
|
+
import x from "@mui/icons-material/Add";
|
|
39
39
|
//#region ../../libs/tesouro-embedded-components-react/monite-sdk/dist/index392.js
|
|
40
|
-
var
|
|
40
|
+
var S = ({ ref: e, ...t }) => /* @__PURE__ */ l(r, { children: /* @__PURE__ */ l(C, {
|
|
41
41
|
ref: e,
|
|
42
42
|
...t
|
|
43
|
-
}) }),
|
|
44
|
-
let { i18n:
|
|
43
|
+
}) }), C = ({ payable: r, savePayable: S, createPayable: C, lineItems: w, payableDetailsFormId: ze, initialCounterpartId: T, enableGLCodes: Be, hideAddDiscountButton: Ve, hideAddBankAccountButton: He, ref: Ue, ...E }) => {
|
|
44
|
+
let { i18n: D } = Pe(), { api: We, componentSettings: Ge } = n(), { root: O } = re(), k = "Monite-PayableDetailsForm", { formatFromMinorUnits: A, formatToMinorUnits: j, formatCurrencyToDisplay: M, getSymbolFromCurrency: Ke } = te(), { isTagsDisabled: qe } = i(E), { data: N } = We.finops.getPayablesValidations.useQuery(), Je = xe(() => o(A, r, w, T), [
|
|
45
45
|
A,
|
|
46
46
|
r,
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
]), P =
|
|
50
|
-
resolver:
|
|
51
|
-
defaultValues:
|
|
47
|
+
w,
|
|
48
|
+
T
|
|
49
|
+
]), P = Ie({
|
|
50
|
+
resolver: be(_e(D, N)),
|
|
51
|
+
defaultValues: Je,
|
|
52
52
|
mode: "onTouched"
|
|
53
|
-
}), { control: F, handleSubmit:
|
|
53
|
+
}), { control: F, handleSubmit: Ye, watch: I, reset: L, trigger: R, setValue: z, getValues: B, getFieldState: V } = P, { dirtyFields: Xe } = Le({ control: F }), H = I("counterpart"), U = I("counterpartBankAccount"), Ze = I("invoiceDate"), Qe = I("dueDate"), W = I("currency"), $e = I("lineItems"), G = I("discount"), K = de($e, G), [et, q] = Ce(!1), { counterpartQuery: tt, counterpartBankAccountQuery: J } = ge({ currentCounterpartId: H }), { ocrRequiredFields: Y, optionalFields: nt } = i(E), { showInvoiceDate: rt, showTags: it } = ne(nt, {
|
|
54
54
|
showInvoiceDate: !0,
|
|
55
55
|
showTags: !0
|
|
56
|
-
}),
|
|
57
|
-
|
|
58
|
-
L(o(A, r,
|
|
56
|
+
}), at = ie().has(e.AccountingConfigReadOrg), X = Se(!1), { counterpart: Z, counterpartRawName: ot, isCounterpartAIMatched: st, isCounterpartMatchingToOCRFound: Q, isCounterpartLoading: ct } = ue({ payable: r }), { data: $ } = ee(T);
|
|
57
|
+
c(() => {
|
|
58
|
+
L(o(A, r, w, T));
|
|
59
59
|
}, [
|
|
60
60
|
r,
|
|
61
61
|
A,
|
|
62
62
|
L,
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
]),
|
|
63
|
+
w,
|
|
64
|
+
T
|
|
65
|
+
]), c(() => {
|
|
66
66
|
!H && U && z("counterpartBankAccount", "", { shouldValidate: !0 });
|
|
67
67
|
}, [
|
|
68
68
|
H,
|
|
69
69
|
U,
|
|
70
70
|
z
|
|
71
|
-
]),
|
|
71
|
+
]), c(() => {
|
|
72
72
|
!Q || !Z || V("counterpart").isTouched || z("counterpart", Z.id);
|
|
73
73
|
}, [
|
|
74
74
|
Z,
|
|
75
75
|
V,
|
|
76
76
|
Q,
|
|
77
77
|
z
|
|
78
|
-
]),
|
|
78
|
+
]), c(() => {
|
|
79
79
|
if (J.isSuccess && J.data?.data) {
|
|
80
80
|
let e = fe(J.data.data, W);
|
|
81
81
|
B("counterpartBankAccount") !== e && z("counterpartBankAccount", e, {
|
|
@@ -90,12 +90,12 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
90
90
|
W,
|
|
91
91
|
B,
|
|
92
92
|
z
|
|
93
|
-
]),
|
|
93
|
+
]), c(() => {
|
|
94
94
|
r?.id && R();
|
|
95
95
|
}, [R, r?.id]);
|
|
96
|
-
let { currencyGroups:
|
|
97
|
-
return /* @__PURE__ */
|
|
98
|
-
className: le(t,
|
|
96
|
+
let { currencyGroups: lt, isLoadingCurrencyGroups: ut } = ve();
|
|
97
|
+
return /* @__PURE__ */ u(we, { children: [/* @__PURE__ */ l(d, {
|
|
98
|
+
className: le(t, k),
|
|
99
99
|
sx: {
|
|
100
100
|
pb: 6,
|
|
101
101
|
display: "flex",
|
|
@@ -104,12 +104,12 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
104
104
|
width: "100%",
|
|
105
105
|
height: 0
|
|
106
106
|
},
|
|
107
|
-
children: /* @__PURE__ */
|
|
107
|
+
children: /* @__PURE__ */ l(Fe, {
|
|
108
108
|
...P,
|
|
109
|
-
children: /* @__PURE__ */
|
|
109
|
+
children: /* @__PURE__ */ l("form", {
|
|
110
110
|
style: { width: "100%" },
|
|
111
|
-
ref:
|
|
112
|
-
id:
|
|
111
|
+
ref: Ue,
|
|
112
|
+
id: ze,
|
|
113
113
|
noValidate: !0,
|
|
114
114
|
onBlur: () => {
|
|
115
115
|
X.current = !1;
|
|
@@ -117,39 +117,39 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
117
117
|
onKeyDown: (e) => {
|
|
118
118
|
X.current = e.key === "Enter";
|
|
119
119
|
},
|
|
120
|
-
onSubmit:
|
|
120
|
+
onSubmit: Ye(async (e) => {
|
|
121
121
|
let t = {
|
|
122
122
|
...e,
|
|
123
123
|
currency: e.currency,
|
|
124
|
-
counterpartAddressId: me(
|
|
124
|
+
counterpartAddressId: me(tt.data?.data, $, e.counterpart)
|
|
125
125
|
}, n = pe(t, j);
|
|
126
|
-
r ?
|
|
126
|
+
r ? S && S(r.id, n, e.lineItems, Xe) : C && C(n, e.lineItems);
|
|
127
127
|
}),
|
|
128
|
-
children: /* @__PURE__ */
|
|
128
|
+
children: /* @__PURE__ */ u(p, {
|
|
129
129
|
container: !0,
|
|
130
130
|
spacing: 3,
|
|
131
131
|
children: [
|
|
132
|
-
/* @__PURE__ */
|
|
132
|
+
/* @__PURE__ */ l(p, {
|
|
133
133
|
item: !0,
|
|
134
134
|
xs: 12,
|
|
135
|
-
children: /* @__PURE__ */
|
|
135
|
+
children: /* @__PURE__ */ u(m, {
|
|
136
136
|
variant: "outlined",
|
|
137
137
|
sx: { p: 3 },
|
|
138
|
-
className: "
|
|
139
|
-
children: [/* @__PURE__ */
|
|
138
|
+
className: k + "-Details",
|
|
139
|
+
children: [/* @__PURE__ */ l(v, {
|
|
140
140
|
variant: "subtitle2",
|
|
141
141
|
mb: 2,
|
|
142
|
-
children:
|
|
143
|
-
}), /* @__PURE__ */
|
|
142
|
+
children: D._("Details")
|
|
143
|
+
}), /* @__PURE__ */ u(je, {
|
|
144
144
|
spacing: 3,
|
|
145
145
|
children: [
|
|
146
|
-
/* @__PURE__ */
|
|
146
|
+
/* @__PURE__ */ l(b, {
|
|
147
147
|
name: "invoiceNumber",
|
|
148
148
|
control: F,
|
|
149
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */
|
|
149
|
+
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(_, {
|
|
150
150
|
...e,
|
|
151
151
|
id: e.name,
|
|
152
|
-
label:
|
|
152
|
+
label: D._("Number"),
|
|
153
153
|
variant: "standard",
|
|
154
154
|
fullWidth: !0,
|
|
155
155
|
error: !!t,
|
|
@@ -157,11 +157,11 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
157
157
|
required: a("invoiceNumber", Y)
|
|
158
158
|
})
|
|
159
159
|
}),
|
|
160
|
-
/* @__PURE__ */
|
|
160
|
+
/* @__PURE__ */ l(oe, {
|
|
161
161
|
control: F,
|
|
162
|
-
disabled:
|
|
162
|
+
disabled: ct,
|
|
163
163
|
name: "counterpart",
|
|
164
|
-
label:
|
|
164
|
+
label: D._("Vendor"),
|
|
165
165
|
customerType: "vendor",
|
|
166
166
|
required: a("counterpart", Y) || s("counterpart_id", N),
|
|
167
167
|
getCounterpartDefaultValues: (e) => ({
|
|
@@ -183,35 +183,35 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
183
183
|
}
|
|
184
184
|
}),
|
|
185
185
|
counterpartMatchingToOCR: Q ? Z : void 0,
|
|
186
|
-
counterpartRawName:
|
|
186
|
+
counterpartRawName: ot,
|
|
187
187
|
showEditCounterpartButton: !0,
|
|
188
188
|
setShowEditCounterpartDialog: q,
|
|
189
|
-
counterpartAISuggested:
|
|
189
|
+
counterpartAISuggested: st ? Z : void 0,
|
|
190
190
|
preselectedCounterpart: $
|
|
191
191
|
}),
|
|
192
|
-
/* @__PURE__ */
|
|
192
|
+
/* @__PURE__ */ l(b, {
|
|
193
193
|
name: "counterpartBankAccount",
|
|
194
194
|
control: F,
|
|
195
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */
|
|
195
|
+
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ u(Te, {
|
|
196
196
|
variant: "standard",
|
|
197
197
|
fullWidth: !0,
|
|
198
198
|
error: !!t,
|
|
199
199
|
required: a("counterpartBankAccount", Y) || s("counterpart_bank_account_id", N),
|
|
200
200
|
children: [
|
|
201
|
-
/* @__PURE__ */
|
|
201
|
+
/* @__PURE__ */ l(Oe, {
|
|
202
202
|
htmlFor: e.name,
|
|
203
|
-
children:
|
|
203
|
+
children: D._("Bank account")
|
|
204
204
|
}),
|
|
205
|
-
/* @__PURE__ */
|
|
205
|
+
/* @__PURE__ */ u(Ae, {
|
|
206
206
|
...e,
|
|
207
207
|
id: e.name,
|
|
208
208
|
labelId: e.name,
|
|
209
|
-
label:
|
|
210
|
-
MenuProps: { container:
|
|
209
|
+
label: D._("Bank Account"),
|
|
210
|
+
MenuProps: { container: O },
|
|
211
211
|
disabled: !J?.data || J?.data?.data.length === 0,
|
|
212
|
-
children: [!
|
|
212
|
+
children: [!He && /* @__PURE__ */ l(f, {
|
|
213
213
|
variant: "text",
|
|
214
|
-
startIcon: /* @__PURE__ */
|
|
214
|
+
startIcon: /* @__PURE__ */ l(x, {}),
|
|
215
215
|
fullWidth: !0,
|
|
216
216
|
sx: {
|
|
217
217
|
justifyContent: "flex-start",
|
|
@@ -219,24 +219,24 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
219
219
|
py: 1
|
|
220
220
|
},
|
|
221
221
|
onClick: () => q(!0),
|
|
222
|
-
children:
|
|
223
|
-
}), J?.data?.data.map((e) => /* @__PURE__ */
|
|
222
|
+
children: D._("Add new bank account")
|
|
223
|
+
}), J?.data?.data.map((e) => /* @__PURE__ */ l(ke, {
|
|
224
224
|
value: e.id,
|
|
225
|
-
children:
|
|
225
|
+
children: ye(D, e)
|
|
226
226
|
}, e.id))]
|
|
227
227
|
}),
|
|
228
|
-
t && /* @__PURE__ */
|
|
228
|
+
t && /* @__PURE__ */ l(Ee, { children: t.message })
|
|
229
229
|
]
|
|
230
230
|
})
|
|
231
231
|
}),
|
|
232
|
-
|
|
232
|
+
rt && /* @__PURE__ */ l(b, {
|
|
233
233
|
name: "invoiceDate",
|
|
234
234
|
control: F,
|
|
235
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */
|
|
236
|
-
maxDate:
|
|
235
|
+
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(y, {
|
|
236
|
+
maxDate: Qe,
|
|
237
237
|
slotProps: {
|
|
238
|
-
popper: { container:
|
|
239
|
-
dialog: { container:
|
|
238
|
+
popper: { container: O },
|
|
239
|
+
dialog: { container: O },
|
|
240
240
|
actionBar: { actions: ["clear", "today"] },
|
|
241
241
|
textField: {
|
|
242
242
|
id: e.name,
|
|
@@ -248,7 +248,7 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
248
248
|
}
|
|
249
249
|
},
|
|
250
250
|
...e,
|
|
251
|
-
label:
|
|
251
|
+
label: D._("Issue date"),
|
|
252
252
|
views: [
|
|
253
253
|
"year",
|
|
254
254
|
"month",
|
|
@@ -256,14 +256,14 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
256
256
|
]
|
|
257
257
|
})
|
|
258
258
|
}),
|
|
259
|
-
/* @__PURE__ */
|
|
259
|
+
/* @__PURE__ */ l(b, {
|
|
260
260
|
name: "dueDate",
|
|
261
261
|
control: F,
|
|
262
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */
|
|
263
|
-
minDate:
|
|
262
|
+
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(y, {
|
|
263
|
+
minDate: Ze,
|
|
264
264
|
slotProps: {
|
|
265
|
-
popper: { container:
|
|
266
|
-
dialog: { container:
|
|
265
|
+
popper: { container: O },
|
|
266
|
+
dialog: { container: O },
|
|
267
267
|
actionBar: { actions: ["clear", "today"] },
|
|
268
268
|
textField: {
|
|
269
269
|
id: e.name,
|
|
@@ -275,7 +275,7 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
275
275
|
}
|
|
276
276
|
},
|
|
277
277
|
...e,
|
|
278
|
-
label:
|
|
278
|
+
label: D._("Due date"),
|
|
279
279
|
views: [
|
|
280
280
|
"year",
|
|
281
281
|
"month",
|
|
@@ -283,59 +283,59 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
283
283
|
]
|
|
284
284
|
})
|
|
285
285
|
}),
|
|
286
|
-
/* @__PURE__ */
|
|
286
|
+
/* @__PURE__ */ l(se, {
|
|
287
287
|
name: "currency",
|
|
288
288
|
control: F,
|
|
289
289
|
required: a("currency", Y) || s("currency", N),
|
|
290
|
-
groups:
|
|
291
|
-
disabled:
|
|
292
|
-
allowedCurrencies:
|
|
290
|
+
groups: lt,
|
|
291
|
+
disabled: ut,
|
|
292
|
+
allowedCurrencies: Ge?.payables?.availableCurrencies
|
|
293
293
|
}),
|
|
294
|
-
|
|
294
|
+
it && /* @__PURE__ */ l(ce, {
|
|
295
295
|
control: F,
|
|
296
296
|
name: "tags",
|
|
297
|
-
label:
|
|
297
|
+
label: D._("Tags"),
|
|
298
298
|
variant: "standard",
|
|
299
|
-
disabled:
|
|
299
|
+
disabled: qe || !at,
|
|
300
300
|
required: a("tags", Y)
|
|
301
301
|
})
|
|
302
302
|
]
|
|
303
303
|
})]
|
|
304
304
|
})
|
|
305
305
|
}),
|
|
306
|
-
/* @__PURE__ */
|
|
306
|
+
/* @__PURE__ */ l(p, {
|
|
307
307
|
item: !0,
|
|
308
308
|
xs: 12,
|
|
309
|
-
children: /* @__PURE__ */
|
|
309
|
+
children: /* @__PURE__ */ u(m, {
|
|
310
310
|
variant: "outlined",
|
|
311
311
|
sx: { p: 3 },
|
|
312
|
-
className: "
|
|
313
|
-
children: [/* @__PURE__ */
|
|
312
|
+
className: k + "-Items",
|
|
313
|
+
children: [/* @__PURE__ */ l(v, {
|
|
314
314
|
variant: "subtitle2",
|
|
315
315
|
mb: 2,
|
|
316
|
-
children:
|
|
317
|
-
}), /* @__PURE__ */
|
|
316
|
+
children: D._("Items")
|
|
317
|
+
}), /* @__PURE__ */ l(he, { enableGLCodes: Be })]
|
|
318
318
|
})
|
|
319
319
|
}),
|
|
320
|
-
/* @__PURE__ */
|
|
320
|
+
/* @__PURE__ */ l(p, {
|
|
321
321
|
item: !0,
|
|
322
322
|
xs: 12,
|
|
323
|
-
className: "
|
|
324
|
-
children: /* @__PURE__ */
|
|
323
|
+
className: k + "-Totals",
|
|
324
|
+
children: /* @__PURE__ */ l(m, {
|
|
325
325
|
variant: "outlined",
|
|
326
|
-
children: /* @__PURE__ */
|
|
327
|
-
/* @__PURE__ */
|
|
328
|
-
className: "
|
|
329
|
-
children: [/* @__PURE__ */
|
|
326
|
+
children: /* @__PURE__ */ l(Me, { children: /* @__PURE__ */ u(Ne, { children: [
|
|
327
|
+
/* @__PURE__ */ u(g, {
|
|
328
|
+
className: k + "-Totals-Subtotal",
|
|
329
|
+
children: [/* @__PURE__ */ l(h, { children: D._("Subtotal") }), /* @__PURE__ */ l(h, {
|
|
330
330
|
align: "right",
|
|
331
|
-
children: /* @__PURE__ */ d
|
|
331
|
+
children: /* @__PURE__ */ u(d, {
|
|
332
332
|
gap: .5,
|
|
333
333
|
alignItems: "center",
|
|
334
334
|
justifyContent: "flex-end",
|
|
335
335
|
display: "flex",
|
|
336
|
-
children: [G === null && !
|
|
336
|
+
children: [G === null && !Ve && /* @__PURE__ */ l(f, {
|
|
337
337
|
variant: "text",
|
|
338
|
-
startIcon: /* @__PURE__ */
|
|
338
|
+
startIcon: /* @__PURE__ */ l(x, {}),
|
|
339
339
|
size: "small",
|
|
340
340
|
sx: {
|
|
341
341
|
pl: 1.25,
|
|
@@ -346,31 +346,31 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
346
346
|
let e = P.setValue;
|
|
347
347
|
e("discount", 0);
|
|
348
348
|
},
|
|
349
|
-
children:
|
|
349
|
+
children: D._("Add Discount")
|
|
350
350
|
}), K.subtotal && W ? M(j(K.subtotal, W) || 0, W) : "—"]
|
|
351
351
|
})
|
|
352
352
|
})]
|
|
353
353
|
}),
|
|
354
|
-
G !== null && /* @__PURE__ */
|
|
355
|
-
className: "
|
|
356
|
-
children: [/* @__PURE__ */
|
|
354
|
+
G !== null && /* @__PURE__ */ u(g, {
|
|
355
|
+
className: k + "-Totals-Discount",
|
|
356
|
+
children: [/* @__PURE__ */ l(h, { children: D._("Discount") }), /* @__PURE__ */ l(h, {
|
|
357
357
|
align: "right",
|
|
358
|
-
children: /* @__PURE__ */ d
|
|
358
|
+
children: /* @__PURE__ */ u(d, {
|
|
359
359
|
gap: .5,
|
|
360
360
|
alignItems: "center",
|
|
361
361
|
justifyContent: "flex-end",
|
|
362
362
|
display: "flex",
|
|
363
|
-
children: [/* @__PURE__ */
|
|
363
|
+
children: [/* @__PURE__ */ l(De, {
|
|
364
364
|
"aria-label": "delete",
|
|
365
365
|
onClick: () => {
|
|
366
366
|
let e = P.setValue;
|
|
367
367
|
e("discount", null);
|
|
368
368
|
},
|
|
369
|
-
children: /* @__PURE__ */
|
|
370
|
-
}), /* @__PURE__ */
|
|
369
|
+
children: /* @__PURE__ */ l(Re, {})
|
|
370
|
+
}), /* @__PURE__ */ l(b, {
|
|
371
371
|
name: "discount",
|
|
372
372
|
control: F,
|
|
373
|
-
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */
|
|
373
|
+
render: ({ field: e, fieldState: { error: t } }) => /* @__PURE__ */ l(_, {
|
|
374
374
|
...e,
|
|
375
375
|
id: e.name,
|
|
376
376
|
variant: "standard",
|
|
@@ -381,27 +381,27 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
381
381
|
},
|
|
382
382
|
error: !!t,
|
|
383
383
|
sx: { width: 150 },
|
|
384
|
-
InputProps: { endAdornment:
|
|
384
|
+
InputProps: { endAdornment: Ke(W) }
|
|
385
385
|
})
|
|
386
386
|
})]
|
|
387
387
|
})
|
|
388
388
|
})]
|
|
389
389
|
}),
|
|
390
|
-
/* @__PURE__ */
|
|
391
|
-
className: "
|
|
392
|
-
children: [/* @__PURE__ */
|
|
390
|
+
/* @__PURE__ */ u(g, {
|
|
391
|
+
className: k + "-Totals-Taxes",
|
|
392
|
+
children: [/* @__PURE__ */ l(h, { children: D._("Tax total") }), /* @__PURE__ */ l(h, {
|
|
393
393
|
align: "right",
|
|
394
394
|
children: K.taxes && W ? M(j(K.taxes, W) || 0, W) : "—"
|
|
395
395
|
})]
|
|
396
396
|
}),
|
|
397
|
-
/* @__PURE__ */
|
|
398
|
-
className: "
|
|
399
|
-
children: [/* @__PURE__ */
|
|
397
|
+
/* @__PURE__ */ u(g, {
|
|
398
|
+
className: k + "-Totals-Total",
|
|
399
|
+
children: [/* @__PURE__ */ l(h, { children: /* @__PURE__ */ l(v, {
|
|
400
400
|
variant: "subtitle1",
|
|
401
|
-
children:
|
|
402
|
-
}) }), /* @__PURE__ */
|
|
401
|
+
children: D._("Total")
|
|
402
|
+
}) }), /* @__PURE__ */ l(h, {
|
|
403
403
|
align: "right",
|
|
404
|
-
children: /* @__PURE__ */
|
|
404
|
+
children: /* @__PURE__ */ l(v, {
|
|
405
405
|
variant: "subtitle1",
|
|
406
406
|
children: K.total && W ? M(j(K.total, W) || 0, W) : "—"
|
|
407
407
|
})
|
|
@@ -414,12 +414,12 @@ var C = ({ ref: e, ...t }) => /* @__PURE__ */ u(r, { children: /* @__PURE__ */ u
|
|
|
414
414
|
})
|
|
415
415
|
})
|
|
416
416
|
})
|
|
417
|
-
}), H && /* @__PURE__ */
|
|
417
|
+
}), H && /* @__PURE__ */ l(ae, {
|
|
418
418
|
counterpartId: H,
|
|
419
|
-
open:
|
|
419
|
+
open: et,
|
|
420
420
|
onClose: () => q(!1),
|
|
421
421
|
customerType: "vendor"
|
|
422
422
|
})] });
|
|
423
423
|
};
|
|
424
424
|
//#endregion
|
|
425
|
-
export {
|
|
425
|
+
export { S as PayableDetailsForm };
|