@tesouro/embedded-components-react 0.3.48 → 0.3.50
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/index.css +8 -2
- package/dist/index.js +1 -1
- package/dist/lib/BillPayWidget.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index.js +11 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index10.js +39 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index11.js +26 -311
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index12.js +325 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index13.js +13 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index14.js +20 -40
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index15.js +75 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index16.js +36 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index5.js +80 -68
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index6.js +86 -73
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index7.js +77 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index8.js +18 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/data-access/dist/index9.js +50 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index.js +22 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index10.js +82 -30
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index11.js +7 -42
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index12.js +15 -159
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index13.js +23 -33
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index14.js +66 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index15.js +2 -50
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index16.js +3 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index17.js +5 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index18.js +3 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index19.js +31 -63
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index2.js +23 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index20.js +37 -24
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index21.js +161 -61
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index22.js +29 -130
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index23.js +1 -25
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index24.js +47 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index25.js +4 -41
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index26.js +12 -55
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index27.js +13 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index28.js +63 -72
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index29.js +26 -49
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index3.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index30.js +62 -93
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index31.js +133 -34
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index32.js +20 -163
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index33.js +4 -77
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index34.js +39 -21
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index35.js +5 -210
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index36.js +70 -211
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index37.js +47 -103
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index38.js +92 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index39.js +34 -47
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index4.js +59 -62
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index40.js +163 -29
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index41.js +67 -181
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index42.js +20 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index43.js +203 -94
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index44.js +214 -15
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js +98 -312
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js +16 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js +49 -31
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js +29 -80
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index49.js +183 -156
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index5.js +9 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index50.js +38 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index51.js +102 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index52.js +18 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index53.js +343 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index54.js +4 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index55.js +30 -8
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index56.js +79 -88
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index57.js +179 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index58.js +3 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index59.js +2 -20
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index6.js +4 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index60.js +38 -51
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index61.js +0 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index62.js +6 -126
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index63.js +9 -9
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index64.js +92 -44
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index65.js +3 -23
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index66.js +123 -26
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index67.js +7 -82
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index68.js +8 -48
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index69.js +45 -250
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index7.js +69 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index70.js +21 -113
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index71.js +27 -208
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index72.js +86 -4
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index73.js +47 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index74.js +244 -106
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index75.js +115 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index76.js +201 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index77.js +4 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index78.js +8 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index79.js +115 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index8.js +44 -5
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index80.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index81.js +25 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index9.js +94 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index.js +19 -19
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index18.js +1 -0
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index50.js +28 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index59.js +1 -3
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index60.js +6 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index73.js +119 -16
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index74.js +24 -111
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index75.js +89 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index76.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index77.js +5 -28
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index78.js +30 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index79.js +2 -7
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index80.js +5 -32
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index81.js +34 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index82.js +2 -12
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index83.js +10 -104
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index84.js +105 -1
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index85.js +2 -17
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index86.js +15 -123
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index87.js +125 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index88.js +2 -18
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index89.js +14 -6
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index90.js +7 -167
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index91.js +170 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index92.js +2 -14
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index93.js +11 -105
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index94.js +108 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index95.js +2 -10
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index96.js +8 -45
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index97.js +47 -2
- package/dist/libs/tesouro-embedded-components-react/bill-pay-widget/ui/dist/index98.js +2 -0
- package/dist/libs/tesouro-embedded-components-react/cards-widget/feature/dist/index8.js +144 -130
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/index.js +23 -23
- package/dist/libs/tesouro-embedded-components-react/shared/data-access/dist/lib/rest/sdk.gen.js +87 -71
- package/dist/libs/tesouro-embedded-components-react/shared/feature/dist/lib/analytics/build-info.js +1 -1
- package/dist/libs/tesouro-embedded-components-react/widget-suite/feature/dist/index8.js +1 -1
- package/package.json +1 -1
|
@@ -2,321 +2,107 @@
|
|
|
2
2
|
"use client";
|
|
3
3
|
"use client";
|
|
4
4
|
"use client";
|
|
5
|
-
import {
|
|
6
|
-
import
|
|
7
|
-
import {
|
|
8
|
-
import { useAllOrganizationUsersQuery as te } from "../../../shared/data-access/dist/lib/user/useAllOrganizationUsersQuery.js";
|
|
9
|
-
import "../../../shared/data-access/dist/index.js";
|
|
10
|
-
import { formatCalendarDate as ne } from "../../../shared/util/dist/lib/formatCalendarDate.js";
|
|
11
|
-
import { useWidgetConfig as re } from "../../../shared/feature/dist/lib/WidgetProvider/hooks.js";
|
|
12
|
-
import "../../../shared/feature/dist/index.js";
|
|
13
|
-
import { resolveAmountDueMinorUnits as ie } from "./index6.js";
|
|
14
|
-
import { resolveVendor as ae } from "./index7.js";
|
|
15
|
-
import { BillCreateScreen as oe } from "../../ui/dist/index44.js";
|
|
16
|
-
import { BillDecisionDialog as n } from "../../ui/dist/index50.js";
|
|
17
|
-
import { BillDuplicateNotice as se } from "../../ui/dist/index60.js";
|
|
18
|
-
import { ExtractionNotice as ce } from "../../ui/dist/index77.js";
|
|
19
|
-
import { MarkAsPaidDialog as le } from "../../ui/dist/index86.js";
|
|
20
|
-
import { UnsavedBillDialog as ue } from "../../ui/dist/index96.js";
|
|
21
|
-
import "../../ui/dist/index.js";
|
|
22
|
-
import { usePayableHistoryQuery as de } from "../../data-access/dist/index7.js";
|
|
23
|
-
import { useAllPayableLineItemsQuery as fe } from "../../data-access/dist/index8.js";
|
|
24
|
-
import { usePayableQuery as pe } from "../../data-access/dist/index14.js";
|
|
5
|
+
import { toast as e } from "../../../../../packages/shared-ui-shadcn/dist/index.js";
|
|
6
|
+
import "../../../shared/ui/dist/index.js";
|
|
7
|
+
import { useUpdatePayableMutation as t } from "../../data-access/dist/index12.js";
|
|
25
8
|
import "../../data-access/dist/index.js";
|
|
26
|
-
import {
|
|
27
|
-
import "
|
|
28
|
-
import
|
|
29
|
-
import "
|
|
30
|
-
import { BILL_CREATE_MESSAGE_LABELS_EN as ge, mergeBillCreateScreenCopy as _e } from "./index32.js";
|
|
31
|
-
import { useBillCreateController as ve } from "./index41.js";
|
|
32
|
-
import { useBillForm as ye } from "./index43.js";
|
|
33
|
-
import { useApprovalPolicyCardView as be } from "./index19.js";
|
|
34
|
-
import { useCurrentApprovalRequestId as xe } from "./index20.js";
|
|
35
|
-
import { usePayableDetailActions as Se } from "./index22.js";
|
|
36
|
-
import { useScheduledPayment as Ce } from "./index23.js";
|
|
37
|
-
import { isEditablePayableStatus as we } from "./index24.js";
|
|
38
|
-
import { useDraftDelete as Te } from "./index25.js";
|
|
39
|
-
import { buildBillDetailView as Ee } from "./index28.js";
|
|
40
|
-
import { buildBillHistory as De } from "./index29.js";
|
|
41
|
-
import { SourceDocumentContainer as Oe } from "./index33.js";
|
|
42
|
-
import { useVendorSectionProps as ke } from "./index36.js";
|
|
43
|
-
import { usePaymentInstructionsForm as Ae } from "./index37.js";
|
|
44
|
-
import { billCreateTestIds as r } from "./index44.js";
|
|
45
|
-
import { useCallback as i, useEffect as je, useMemo as a, useRef as Me, useState as o } from "react";
|
|
46
|
-
import { Fragment as Ne, jsx as s, jsxs as Pe } from "react/jsx-runtime";
|
|
9
|
+
import { counterpartFormBankAccountToCreatePayload as n, counterpartFormBankAccountToUpdatePayload as r, getAchInstructions as i, resolveCounterpartBankAccountWrite as a, validateAchFormValues as o } from "../../../shared/counterpart-management/feature/dist/lib/helpers.js";
|
|
10
|
+
import { useCounterpartBankAccountsQuery as s, useCreateCounterpartBankAccountMutation as c, useUpdateCounterpartBankAccountMutation as l } from "../../../shared/counterpart-management/data-access/dist/index5.js";
|
|
11
|
+
import "../../../shared/counterpart-management/feature/dist/index.js";
|
|
12
|
+
import { useCallback as u, useEffect as d, useRef as f, useState as p } from "react";
|
|
47
13
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index45.js
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
labels: Je,
|
|
76
|
-
counterpartId: m,
|
|
77
|
-
clearCounterpart: Ke,
|
|
78
|
-
prepareVendorForSave: P.savePaymentInstructions,
|
|
79
|
-
onPayableCreated: b,
|
|
80
|
-
onSaved: b,
|
|
81
|
-
onDraftSaved: () => l(!1),
|
|
82
|
-
onFinalized: () => l(!1),
|
|
83
|
-
readSavedStatus: A ? Ye : void 0
|
|
84
|
-
}), L = !!(I.isSavingDraft || I.isFinalizing), R = d ? x : void 0, z = xe({
|
|
85
|
-
payableId: R,
|
|
86
|
-
status: O?.status
|
|
87
|
-
}), B = Me(null), V = Ce({
|
|
88
|
-
payableId: x,
|
|
89
|
-
scheduledPaymentDate: O?.scheduled_payment_date,
|
|
90
|
-
enabled: d || A
|
|
91
|
-
}), Xe = ae(O), H = Ae({
|
|
92
|
-
payableId: R,
|
|
93
|
-
counterpartId: d ? N : void 0,
|
|
94
|
-
saveErrorMessage: p.detail.paymentInstructionsSaveError,
|
|
95
|
-
linkErrorMessage: p.detail.paymentInstructionsLinkError
|
|
96
|
-
}), Ze = e(w?.scopes, [t.CounterpartWriteOrg]) && e(w?.scopes, [t.PayableWriteOrg]), U = he({
|
|
97
|
-
payableId: R,
|
|
98
|
-
amountDueMinorUnits: ie(O) ?? 0,
|
|
99
|
-
amountToPayMinorUnits: O?.amount_to_pay ?? void 0,
|
|
100
|
-
currencyCode: O?.currency ?? void 0,
|
|
101
|
-
dueDate: O?.due_date,
|
|
102
|
-
hasScheduledPayment: V.hasScheduledPayment,
|
|
103
|
-
labels: p.markAsPaid
|
|
104
|
-
}), W = be({
|
|
105
|
-
payableId: R,
|
|
106
|
-
approvalPolicyId: O?.approval_policy_id,
|
|
107
|
-
enabled: d,
|
|
108
|
-
copy: p.approvalPolicyCopy
|
|
109
|
-
}), { actions: G, decisionDialog: Qe, isActionPending: $e } = Se({
|
|
110
|
-
payableId: d || A ? x : void 0,
|
|
111
|
-
status: O?.status,
|
|
112
|
-
currentApprovalRequestId: z.id,
|
|
113
|
-
isPolicyApprover: z.isPolicyApprover,
|
|
114
|
-
hasWaitingRequest: z.hasWaitingRequest,
|
|
115
|
-
arePendingApproversUnknown: W.isLoading,
|
|
116
|
-
hasScheduledPayment: V.hasScheduledPayment,
|
|
117
|
-
scheduledPaymentIntentId: V.scheduledPaymentIntentId,
|
|
118
|
-
isScheduledPaymentUnknown: V.isResolving,
|
|
119
|
-
pendingApprovers: W.pendingApprovers,
|
|
120
|
-
labels: p.actions,
|
|
121
|
-
isMarkAsPaidPending: U.isPending,
|
|
122
|
-
onMarkAsPaidSelect: U.open,
|
|
123
|
-
onPayBillSelect: () => Fe(Xe) || !Ze ? B.current?.open() : H.open(),
|
|
124
|
-
onActionSucceeded: A ? () => l(!1) : void 0
|
|
125
|
-
}), K = Te({
|
|
126
|
-
payableId: x,
|
|
127
|
-
status: O?.status,
|
|
128
|
-
enabled: !d,
|
|
129
|
-
labels: p.deleteDraft,
|
|
130
|
-
onDeleted: () => l(!1)
|
|
131
|
-
}), q = L || $e, et = a(() => [...K.menuItems, ...A ? G.menu.map((e) => ({
|
|
132
|
-
id: e.id,
|
|
133
|
-
label: e.label,
|
|
134
|
-
onSelect: e.onSelect,
|
|
135
|
-
disabled: e.disabled
|
|
136
|
-
})) : []], [
|
|
137
|
-
G.menu,
|
|
138
|
-
K.menuItems,
|
|
139
|
-
A
|
|
140
|
-
]), J = a(() => (D.data?.data ?? []).map((e) => ({
|
|
141
|
-
value: e.id,
|
|
142
|
-
label: [e.nominal_code, e.name].filter(Boolean).join(" — ")
|
|
143
|
-
})), [D.data]), Y;
|
|
144
|
-
T && (E ? D.isError ? Y = p.lineItemsGlCodeUnavailable.loadError : !D.isResolving && J.length === 0 && (Y = p.lineItemsGlCodeUnavailable.empty) : Y = p.lineItemsGlCodeUnavailable.noAccess);
|
|
145
|
-
let tt = !T || !!Y || D.isResolving, nt = E && !D.isResolving && !D.isError, rt = de(R), it = e(w?.scopes, [t.UserReadOrg]), at = te({ enabled: d && it }), ot = a(() => De(rt.data?.data ?? [], at.data?.data ?? [], p.history), [
|
|
146
|
-
rt.data,
|
|
147
|
-
at.data,
|
|
148
|
-
p.history
|
|
149
|
-
]), st = a(() => d && O ? Ee({
|
|
150
|
-
payable: O,
|
|
151
|
-
lineItems: C.lineItems,
|
|
152
|
-
glCodeOptions: J,
|
|
153
|
-
glCodeRosterAvailable: nt,
|
|
154
|
-
history: ot,
|
|
155
|
-
approvalPolicy: W.view,
|
|
156
|
-
labels: p.detail,
|
|
157
|
-
hasScheduledPayment: V.hasScheduledPayment
|
|
158
|
-
}) : void 0, [
|
|
159
|
-
V.hasScheduledPayment,
|
|
160
|
-
W.view,
|
|
161
|
-
p.detail,
|
|
162
|
-
J,
|
|
163
|
-
nt,
|
|
164
|
-
ot,
|
|
165
|
-
C.lineItems,
|
|
166
|
-
O,
|
|
167
|
-
d
|
|
168
|
-
]), ct = O?.source_of_payable_data === "ocr", X = Xe?.name, lt = d ? X ? p.viewTitle(X) : p.readOnlyTitle : X && (ct || A) ? p.extractedTitle(X) : p.newTitle, ut = d && O?.created_at ? p.addedOn(ne(O.created_at.slice(0, 10))) : void 0, Z = i(() => {
|
|
169
|
-
let e = M.isDirty || P.hasUnsavedVendorChanges || !!I.stagedFile || I.isFileDeletionPending;
|
|
170
|
-
if (!j && e) {
|
|
171
|
-
y(!0);
|
|
172
|
-
return;
|
|
173
|
-
}
|
|
174
|
-
l(!1);
|
|
175
|
-
}, [
|
|
176
|
-
I.isFileDeletionPending,
|
|
177
|
-
I.stagedFile,
|
|
178
|
-
M.isDirty,
|
|
179
|
-
j,
|
|
180
|
-
l,
|
|
181
|
-
P.hasUnsavedVendorChanges
|
|
182
|
-
]), dt = i(() => {
|
|
183
|
-
y(!1), l(!1);
|
|
184
|
-
}, [l]), Q = C.isResolving || P.mode === "creating", ft = i(async () => {
|
|
185
|
-
if (Q) return;
|
|
186
|
-
let e = await I.saveDraft();
|
|
187
|
-
y(!1), e && l(!1);
|
|
188
|
-
}, [
|
|
189
|
-
I,
|
|
190
|
-
Q,
|
|
191
|
-
l
|
|
192
|
-
]), pt = i((e) => {
|
|
193
|
-
if (!q) return e ? l(!0) : Z();
|
|
14
|
+
var m = {
|
|
15
|
+
accountHolderName: "",
|
|
16
|
+
routingNumber: "",
|
|
17
|
+
accountNumber: ""
|
|
18
|
+
};
|
|
19
|
+
function h({ payableId: h, counterpartId: g, saveErrorMessage: _, linkErrorMessage: v }) {
|
|
20
|
+
let [y, b] = p(!1), [x, S] = p(m), [C, w] = p(), T = s(g), E = T.data?.data, D = c(), O = l(), k = t(), A = f(void 0), j = f(!1);
|
|
21
|
+
d(() => {
|
|
22
|
+
A.current = void 0;
|
|
23
|
+
}, [g]);
|
|
24
|
+
let M = u(() => {
|
|
25
|
+
let e = T.isFetching ? void 0 : i(E);
|
|
26
|
+
S(e ? {
|
|
27
|
+
accountHolderName: e.account_holder_name ?? "",
|
|
28
|
+
routingNumber: e.routing_number ?? "",
|
|
29
|
+
accountNumber: e.account_number ?? ""
|
|
30
|
+
} : m), A.current = e?.id ?? A.current, j.current = !T.isFetching, w(void 0), b(!0);
|
|
31
|
+
}, [E, T.isFetching]);
|
|
32
|
+
d(() => {
|
|
33
|
+
if (!y || j.current || T.isFetching) return;
|
|
34
|
+
j.current = !0;
|
|
35
|
+
let e = i(E);
|
|
36
|
+
e && (S((t) => t.accountHolderName === "" && t.routingNumber === "" && t.accountNumber === "" ? {
|
|
37
|
+
accountHolderName: e.account_holder_name ?? "",
|
|
38
|
+
routingNumber: e.routing_number ?? "",
|
|
39
|
+
accountNumber: e.account_number ?? ""
|
|
40
|
+
} : t), A.current = e.id);
|
|
194
41
|
}, [
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
])
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
items: M.lineItemRows,
|
|
219
|
-
glCodeOptions: J,
|
|
220
|
-
glCodeDisabled: tt,
|
|
221
|
-
glCodeUnavailableMessage: Y,
|
|
222
|
-
discount: M.discount,
|
|
223
|
-
onDiscountChange: M.onDiscountChange,
|
|
224
|
-
tax: M.tax,
|
|
225
|
-
onTaxChange: M.onTaxChange,
|
|
226
|
-
total: M.total,
|
|
227
|
-
onTotalChange: M.onTotalChange,
|
|
228
|
-
onAddLineItem: M.onAddLineItem,
|
|
229
|
-
errors: M.lineItemErrors,
|
|
230
|
-
testId: r.lineItems
|
|
231
|
-
},
|
|
232
|
-
documentPanel: /* @__PURE__ */ s(Oe, {
|
|
233
|
-
payableId: x,
|
|
234
|
-
readOnly: j,
|
|
235
|
-
isDocumentPending: !!x && !O?.file && (S.isLoading || O?.ocr_status === "processing"),
|
|
236
|
-
file: O?.file ? {
|
|
237
|
-
id: O.file.id,
|
|
238
|
-
name: O.file.name,
|
|
239
|
-
url: O.file.url,
|
|
240
|
-
mimetype: O.file.mimetype
|
|
241
|
-
} : void 0,
|
|
242
|
-
staging: {
|
|
243
|
-
stagedFile: I.stagedFile,
|
|
244
|
-
onFileStaged: I.stageFile,
|
|
245
|
-
onClearStagedFile: I.clearStagedFile,
|
|
246
|
-
isSaving: L
|
|
42
|
+
y,
|
|
43
|
+
T.isFetching,
|
|
44
|
+
E
|
|
45
|
+
]);
|
|
46
|
+
let N = u(() => {
|
|
47
|
+
b(!1);
|
|
48
|
+
}, []), P = u((e) => {
|
|
49
|
+
S((t) => ({
|
|
50
|
+
...t,
|
|
51
|
+
...e
|
|
52
|
+
}));
|
|
53
|
+
}, []), F = u(async () => {
|
|
54
|
+
if (!h || !g) return !1;
|
|
55
|
+
let t = o(x);
|
|
56
|
+
if (Object.keys(t).length > 0) return w(t), !1;
|
|
57
|
+
if (w(void 0), T.isFetching || T.isError) return e.error(_), !1;
|
|
58
|
+
let s = A.current;
|
|
59
|
+
try {
|
|
60
|
+
let e = a(E, s ?? i(E)?.id);
|
|
61
|
+
e.kind === "update" ? (await O.mutateAsync({
|
|
62
|
+
path: {
|
|
63
|
+
counterpart_id: g,
|
|
64
|
+
bank_account_id: e.bankAccountId
|
|
247
65
|
},
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
open: He,
|
|
289
|
-
onSaveDraft: ft,
|
|
290
|
-
onDiscard: dt,
|
|
291
|
-
onCancel: () => y(!1),
|
|
292
|
-
isSaving: I.isSavingDraft,
|
|
293
|
-
isSaveDraftDisabled: Q,
|
|
294
|
-
labels: p.unsavedChanges,
|
|
295
|
-
testId: r.unsavedDialog,
|
|
296
|
-
saveDraftTestId: r.unsavedSaveDraft,
|
|
297
|
-
discardTestId: r.unsavedDiscard
|
|
298
|
-
}),
|
|
299
|
-
/* @__PURE__ */ s(n, {
|
|
300
|
-
...Qe,
|
|
301
|
-
labels: { cancelButton: p.actions.decisionDialog.cancelButton },
|
|
302
|
-
testId: r.decisionDialog,
|
|
303
|
-
confirmTestId: r.decisionConfirm,
|
|
304
|
-
reasonTestId: r.decisionReason
|
|
305
|
-
}),
|
|
306
|
-
/* @__PURE__ */ s(n, {
|
|
307
|
-
...K.dialog,
|
|
308
|
-
labels: { cancelButton: p.actions.decisionDialog.cancelButton },
|
|
309
|
-
testId: r.deleteDraftDialog,
|
|
310
|
-
confirmTestId: r.deleteDraftConfirm
|
|
311
|
-
}),
|
|
312
|
-
/* @__PURE__ */ s(le, { ...U.dialogProps }),
|
|
313
|
-
d && O ? /* @__PURE__ */ s(me, {
|
|
314
|
-
ref: B,
|
|
315
|
-
payable: O,
|
|
316
|
-
poweredByBankName: Le,
|
|
317
|
-
labels: p.payBill
|
|
318
|
-
}) : null
|
|
319
|
-
] });
|
|
66
|
+
body: r(x, { includeAchDefaults: e.includeAchDefaults })
|
|
67
|
+
}), s = e.bankAccountId) : s = (await D.mutateAsync({
|
|
68
|
+
path: { counterpart_id: g },
|
|
69
|
+
body: n(x, { isDefaultForCurrency: e.isDefaultForCurrency })
|
|
70
|
+
}))?.id, A.current = s;
|
|
71
|
+
} catch {
|
|
72
|
+
return e.error(_), !1;
|
|
73
|
+
}
|
|
74
|
+
try {
|
|
75
|
+
await k.mutateAsync({
|
|
76
|
+
path: { payable_id: h },
|
|
77
|
+
body: { counterpart_bank_account_id: s }
|
|
78
|
+
});
|
|
79
|
+
} catch {
|
|
80
|
+
return e.error(v), !1;
|
|
81
|
+
}
|
|
82
|
+
return b(!1), !0;
|
|
83
|
+
}, [
|
|
84
|
+
E,
|
|
85
|
+
T.isError,
|
|
86
|
+
T.isFetching,
|
|
87
|
+
g,
|
|
88
|
+
D,
|
|
89
|
+
v,
|
|
90
|
+
h,
|
|
91
|
+
_,
|
|
92
|
+
O,
|
|
93
|
+
k,
|
|
94
|
+
x
|
|
95
|
+
]);
|
|
96
|
+
return {
|
|
97
|
+
isOpen: y,
|
|
98
|
+
values: x,
|
|
99
|
+
errors: C,
|
|
100
|
+
isSaving: D.isPending || O.isPending || k.isPending,
|
|
101
|
+
open: M,
|
|
102
|
+
close: N,
|
|
103
|
+
onChange: P,
|
|
104
|
+
save: F
|
|
105
|
+
};
|
|
320
106
|
}
|
|
321
107
|
//#endregion
|
|
322
|
-
export {
|
|
108
|
+
export { h as usePaymentInstructionsForm };
|
|
@@ -1,4 +1,16 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index46.js
|
|
2
|
+
function e(e) {
|
|
3
|
+
return new Promise((t, n) => {
|
|
4
|
+
let r = new FileReader();
|
|
5
|
+
r.onerror = () => n(r.error ?? /* @__PURE__ */ Error("Failed to read file")), r.onload = () => {
|
|
6
|
+
let e = r.result;
|
|
7
|
+
if (typeof e != "string") {
|
|
8
|
+
n(/* @__PURE__ */ Error("Failed to read file as a data URL"));
|
|
9
|
+
return;
|
|
10
|
+
}
|
|
11
|
+
t(e.slice(e.indexOf(",") + 1));
|
|
12
|
+
}, r.readAsDataURL(e);
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
//#endregion
|
|
16
|
+
export { e as encodeFileToBase64 };
|
|
@@ -1,33 +1,51 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import "../../
|
|
3
|
-
import { MARK_AS_PAID_FLOW_LABELS_EN as t } from "./index2.js";
|
|
4
|
-
import "./index5.js";
|
|
5
|
-
import { APPROVAL_POLICY_RULE_COPY_EN as n } from "./index15.js";
|
|
6
|
-
import { BILL_DETAIL_ACTIONS_LABELS_EN as r, SCHEDULED_SUMMARY_LABEL_EN as i } from "./index30.js";
|
|
1
|
+
import { parseDecimalAmountToMinorUnits as e } from "../../../shared/util/dist/lib/parseDecimalAmountToMinorUnits.js";
|
|
2
|
+
import "../../data-access/dist/index.js";
|
|
7
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index47.js
|
|
8
|
-
var
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
}
|
|
4
|
+
var t = "USD";
|
|
5
|
+
function n(n) {
|
|
6
|
+
return e(n, t);
|
|
7
|
+
}
|
|
8
|
+
function r(e) {
|
|
9
|
+
let t = e.trim();
|
|
10
|
+
if (!t) return null;
|
|
11
|
+
let n = Number(t);
|
|
12
|
+
return Number.isFinite(n) && n > 0 ? n : null;
|
|
13
|
+
}
|
|
14
|
+
function i(e) {
|
|
15
|
+
return !!(e.description.trim() || e.glCode.trim() || n(e.price) !== null || n(e.amount) !== null);
|
|
16
|
+
}
|
|
17
|
+
function a(e) {
|
|
18
|
+
return n(e) ?? 0;
|
|
19
|
+
}
|
|
20
|
+
function o(e) {
|
|
21
|
+
let t = Number.parseFloat(e);
|
|
22
|
+
return Number.isFinite(t) ? t : 0;
|
|
23
|
+
}
|
|
24
|
+
function s(e) {
|
|
25
|
+
return (e / 100).toFixed(2);
|
|
26
|
+
}
|
|
27
|
+
function c({ values: e, counterpartId: r, clearCounterpart: i, counterpartBankAccountId: a, editedTotals: o, document: s }) {
|
|
28
|
+
let c = { currency: t };
|
|
29
|
+
return r ? c.counterpart_id = r : i && (c.counterpart_id = null), r ? c.counterpart_bank_account_id = a ?? null : i && (c.counterpart_bank_account_id = null), e.invoiceNumber && (c.document_id = e.invoiceNumber), e.invoiceDate && (c.issued_at = e.invoiceDate), e.dueDate && (c.due_date = e.dueDate), s && (c.base64_encoded_file = s.base64EncodedFile, c.file_name = s.fileName), o && (c.discount = n(o.discount) ?? 0, c.tax_amount = n(o.tax) ?? 0, o.total !== void 0 && (c.total_amount = n(o.total) ?? 0)), c;
|
|
30
|
+
}
|
|
31
|
+
function l(e) {
|
|
32
|
+
return e.filter(i).map((e) => {
|
|
33
|
+
let t = n(e.amount), i = r(e.quantity) ?? 1, a = n(e.price) ?? (t === null ? 0 : Math.round(t / i)), o = Math.round(i * a);
|
|
34
|
+
return {
|
|
35
|
+
name: e.description,
|
|
36
|
+
quantity: i,
|
|
37
|
+
unit_price: a,
|
|
38
|
+
tax: 0,
|
|
39
|
+
...t !== null && t !== o ? { subtotal: t } : {},
|
|
40
|
+
...e.glCode ? { ledger_account_id: e.glCode } : {}
|
|
41
|
+
};
|
|
42
|
+
});
|
|
43
|
+
}
|
|
44
|
+
function u(e, t) {
|
|
45
|
+
return s(Math.round(o(e) * a(t)));
|
|
46
|
+
}
|
|
47
|
+
function d(e, t, n) {
|
|
48
|
+
return s(e.reduce((e, t) => e + a(t.amount), 0) + a(t) - a(n));
|
|
49
|
+
}
|
|
32
50
|
//#endregion
|
|
33
|
-
export {
|
|
51
|
+
export { d as calculateTotal, u as displayLineAmount, i as isPersistableLineItem, c as mapBillFormToPayload, l as mapLineItemsToPayload, n as parseMoneyToMinorUnits, r as parseQuantity };
|
|
@@ -1,85 +1,34 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import { derivePayableStatus as r } from "./index26.js";
|
|
4
|
-
import { formatBillMoney as i } from "./index27.js";
|
|
1
|
+
import { BILL_CREATE_MESSAGE_LABELS_EN as e } from "./index40.js";
|
|
2
|
+
import { isPersistableLineItem as t, parseMoneyToMinorUnits as n, parseQuantity as r } from "./index47.js";
|
|
5
3
|
//#region ../../libs/tesouro-embedded-components-react/bill-pay-widget/feature/dist/index48.js
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
let
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
{
|
|
28
|
-
label: c.issueDateRow,
|
|
29
|
-
value: g
|
|
30
|
-
},
|
|
31
|
-
{
|
|
32
|
-
label: c.dueDateRow,
|
|
33
|
-
value: _
|
|
34
|
-
},
|
|
35
|
-
{
|
|
36
|
-
label: c.poNumberRow,
|
|
37
|
-
value: c.notProvided
|
|
38
|
-
}
|
|
39
|
-
], x = new Map(s.map((e) => [e.id, [e.nominal_code, e.name].filter(Boolean).join(" — ")])), S = o.map((e) => {
|
|
40
|
-
let t = f(e.unit_price);
|
|
41
|
-
return {
|
|
42
|
-
id: e.id,
|
|
43
|
-
description: e.name ?? e.description ?? "",
|
|
44
|
-
glCodeLabel: (e.ledger_account_id ? x.get(e.ledger_account_id) : void 0) || c.glCodeMissing,
|
|
45
|
-
quantityLabel: e.quantity != null && t ? c.quantityValue(String(e.quantity), t) : "",
|
|
46
|
-
amountLabel: f(e.subtotal) ?? ""
|
|
47
|
-
};
|
|
48
|
-
}), C = [
|
|
49
|
-
{
|
|
50
|
-
label: c.subtotalRow,
|
|
51
|
-
value: a.subtotal
|
|
52
|
-
},
|
|
53
|
-
{
|
|
54
|
-
label: c.discountsRow,
|
|
55
|
-
value: a.discount
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
label: c.taxRow,
|
|
59
|
-
value: a.tax_amount
|
|
60
|
-
}
|
|
61
|
-
].map(({ label: e, value: t }) => ({
|
|
62
|
-
label: e,
|
|
63
|
-
value: f(t)
|
|
64
|
-
})).filter((e) => !!e.value), w = f(a.total_amount);
|
|
65
|
-
return w && C.push({
|
|
66
|
-
label: c.totalRow,
|
|
67
|
-
value: w,
|
|
68
|
-
emphasis: !0
|
|
4
|
+
var i = /^(?:\d{1,3}(?:,\d{3})+(?:\.\d+)?|\d+(?:\.\d+)?|\.\d+)$/;
|
|
5
|
+
function a(e) {
|
|
6
|
+
let t = e.trim();
|
|
7
|
+
return !t || n(t) !== null ? !0 : i.test(t) ? Number(t.replaceAll(",", "")) === 0 : !1;
|
|
8
|
+
}
|
|
9
|
+
function o(t, i = e) {
|
|
10
|
+
let a = {};
|
|
11
|
+
for (let e of t) {
|
|
12
|
+
let t = n(e.price), o = n(e.amount), s = {};
|
|
13
|
+
e.price.trim() && t === null && (s.price = i.unreadableMoney), e.amount.trim() && o === null && (s.amount = i.unreadableMoney), (t !== null || o !== null) && r(e.quantity) === null && (s.quantity = i.unusableQuantity), Object.keys(s).length && (a[e.id] = s);
|
|
14
|
+
}
|
|
15
|
+
return Object.keys(a).length ? a : void 0;
|
|
16
|
+
}
|
|
17
|
+
function s(i, a, o, s = e) {
|
|
18
|
+
let c = {};
|
|
19
|
+
a || (c.vendor = s.requiredField), i.invoiceNumber.trim() || (c.invoiceNumber = s.requiredField), i.invoiceDate.trim() || (c.invoiceDate = s.requiredField), i.dueDate.trim() || (c.dueDate = s.requiredField);
|
|
20
|
+
let l = {};
|
|
21
|
+
return o.forEach((e, i) => {
|
|
22
|
+
if (i > 0 && !t(e)) return;
|
|
23
|
+
let a = {};
|
|
24
|
+
e.description.trim() || (a.description = s.requiredField), r(e.quantity) === null && (a.quantity = s.requiredField), n(e.price) === null && n(e.amount) === null && (a.price = s.requiredField, a.amount = s.requiredField), Object.keys(a).length && (l[e.id] = a);
|
|
69
25
|
}), {
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
status: p.status,
|
|
73
|
-
statusTone: p.tone,
|
|
74
|
-
amountDueLabel: f(a.amount_due) ?? f(a.total_amount) ?? "",
|
|
75
|
-
invoiceDateLabel: g,
|
|
76
|
-
dueDateLabel: _,
|
|
77
|
-
dueDateTone: p.isOverdue ? "danger" : "default",
|
|
78
|
-
payToItems: v,
|
|
79
|
-
invoiceItems: b,
|
|
80
|
-
lineItems: S,
|
|
81
|
-
totals: C
|
|
26
|
+
formErrors: Object.keys(c).length ? c : void 0,
|
|
27
|
+
lineItemErrors: Object.keys(l).length ? l : void 0
|
|
82
28
|
};
|
|
83
29
|
}
|
|
30
|
+
function c(t, r, i, o = e) {
|
|
31
|
+
return !a(t) || !a(r) || i !== void 0 && n(i) === null ? { form: o.totalsNeedAttention } : void 0;
|
|
32
|
+
}
|
|
84
33
|
//#endregion
|
|
85
|
-
export {
|
|
34
|
+
export { s as validateBillCompleteness, c as validateBillTotals, o as validateLineItems };
|