@zeniai/client-epic-state 4.16.46 → 4.16.48
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/lib/entity/tenant/tenantPayload.d.ts +0 -3
- package/lib/entity/tenant/tenantReducer.js +0 -3
- package/lib/entity/tenant/tenantState.d.ts +0 -3
- package/lib/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js +1 -11
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewPayload.d.ts +0 -3
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewPayload.js +33 -53
- package/lib/view/onboardingView/cockpitView/onboardingCockpitViewSelector.js +2 -12
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.d.ts +2 -2
- package/lib/view/onboardingView/cockpitView/types/onboardingCockpitViewTypes.js +0 -3
- package/lib/view/spendManagement/billPay/editBillView/editBillViewReducer.js +1 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewSelector.js +1 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewState.d.ts +1 -0
- package/lib/view/spendManagement/billPay/editBillView/editBillViewState.js +1 -0
- package/lib/view/spendManagement/billPay/editBillView/epics/saveBillDetailEpic.js +26 -26
- package/package.json +1 -1
|
@@ -32,9 +32,6 @@ interface TenantPayload {
|
|
|
32
32
|
is_spend_management_enabled: boolean;
|
|
33
33
|
is_other_products_enabled: boolean;
|
|
34
34
|
is_card_enabled: boolean;
|
|
35
|
-
is_payroll_enabled: boolean;
|
|
36
|
-
is_cfo_enabled: boolean;
|
|
37
|
-
is_tax_enabled: boolean;
|
|
38
35
|
is_admin: boolean;
|
|
39
36
|
is_zeni_support_user: boolean;
|
|
40
37
|
is_bookkeeping_admin: boolean;
|
|
@@ -395,9 +395,6 @@ function mapTenantPayloadToTenant(payload, userTenantPayload) {
|
|
|
395
395
|
isBookkeepingEnabled: payload.is_book_keeping_enabled,
|
|
396
396
|
isOtherProductsEnabled: payload.is_other_products_enabled,
|
|
397
397
|
isCardsEnabled: payload.is_card_enabled,
|
|
398
|
-
isPayrollEnabled: payload.is_payroll_enabled,
|
|
399
|
-
isCfoEnabled: payload.is_cfo_enabled,
|
|
400
|
-
isTaxEnabled: payload.is_tax_enabled,
|
|
401
398
|
},
|
|
402
399
|
userLastCheckInTime: payload.user_last_check_in_time_into_tenant != null
|
|
403
400
|
? (0, zeniDayJS_1.date)(payload.user_last_check_in_time_into_tenant)
|
|
@@ -42,9 +42,6 @@ export interface TenantProductSettings {
|
|
|
42
42
|
isSpendManagementEnabled: boolean;
|
|
43
43
|
isOtherProductsEnabled: boolean;
|
|
44
44
|
isCardsEnabled: boolean;
|
|
45
|
-
isPayrollEnabled: boolean;
|
|
46
|
-
isCfoEnabled: boolean;
|
|
47
|
-
isTaxEnabled: boolean;
|
|
48
45
|
}
|
|
49
46
|
export interface Tenant {
|
|
50
47
|
tenantId: ID;
|
package/lib/view/onboardingView/cockpitView/epic/initializeOnboardingCustomerViewUpdateDataEpic.js
CHANGED
|
@@ -133,17 +133,7 @@ const getSelectedProducts = (tenant) => {
|
|
|
133
133
|
];
|
|
134
134
|
}
|
|
135
135
|
else if (isOtherProductsEnabled) {
|
|
136
|
-
|
|
137
|
-
if (tenant.productSettings.isCfoEnabled) {
|
|
138
|
-
selectedProducts.push('zeni_cfo');
|
|
139
|
-
}
|
|
140
|
-
if (tenant.productSettings.isTaxEnabled) {
|
|
141
|
-
selectedProducts.push('zeni_tax');
|
|
142
|
-
}
|
|
143
|
-
if (tenant.productSettings.isPayrollEnabled) {
|
|
144
|
-
selectedProducts.push('zeni_payroll');
|
|
145
|
-
}
|
|
146
|
-
return selectedProducts;
|
|
136
|
+
return ['other'];
|
|
147
137
|
}
|
|
148
138
|
else {
|
|
149
139
|
return [];
|
|
@@ -67,9 +67,6 @@ export interface OnboardingCustomerPayload extends Partial<OnboardingEmailGroupP
|
|
|
67
67
|
is_spend_management_enabled: boolean;
|
|
68
68
|
is_other_products_enabled: boolean;
|
|
69
69
|
is_card_enabled: boolean;
|
|
70
|
-
is_payroll_enabled: boolean;
|
|
71
|
-
is_cfo_enabled: boolean;
|
|
72
|
-
is_tax_enabled: boolean;
|
|
73
70
|
}
|
|
74
71
|
export declare const toOnboardingCustomerPayload: (onboardingCustomer: Partial<NewOnboardingCustomer>, sendInvite: boolean, company?: CompanyWithSchema, tenant?: Tenant) => Partial<OnboardingCustomerPayload>;
|
|
75
72
|
export {};
|
|
@@ -18,69 +18,49 @@ const toOnboardingCustomerPayload = (onboardingCustomer, sendInvite, company, te
|
|
|
18
18
|
is_card_enabled: false,
|
|
19
19
|
is_spend_management_enabled: false,
|
|
20
20
|
is_other_products_enabled: false,
|
|
21
|
-
is_payroll_enabled: false,
|
|
22
|
-
is_cfo_enabled: false,
|
|
23
|
-
is_tax_enabled: false,
|
|
24
21
|
};
|
|
25
22
|
if (selectedProducts != null) {
|
|
26
23
|
const isChecking = selectedProducts.includes('zeni_checking');
|
|
27
24
|
const isCards = selectedProducts.includes('zeni_cards');
|
|
28
25
|
const isBookkeeping = selectedProducts.includes('bookkeeping');
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
26
|
+
const isOther = selectedProducts.includes('other');
|
|
27
|
+
if (isBookkeeping) {
|
|
28
|
+
onboardingCustomerPayload.is_book_keeping_enabled = true;
|
|
29
|
+
onboardingCustomerPayload.is_banking_enabled = true;
|
|
30
|
+
onboardingCustomerPayload.is_spend_management_enabled = true;
|
|
31
|
+
onboardingCustomerPayload.is_other_products_enabled = false;
|
|
32
|
+
onboardingCustomerPayload.is_card_enabled = true;
|
|
33
|
+
}
|
|
34
|
+
else if (isChecking && isCards && !isBookkeeping) {
|
|
35
|
+
// for card and checking
|
|
36
|
+
onboardingCustomerPayload.is_book_keeping_enabled = false;
|
|
37
|
+
onboardingCustomerPayload.is_banking_enabled = true;
|
|
38
|
+
onboardingCustomerPayload.is_spend_management_enabled = false;
|
|
39
|
+
onboardingCustomerPayload.is_other_products_enabled = false;
|
|
40
|
+
onboardingCustomerPayload.is_card_enabled = true;
|
|
41
|
+
}
|
|
42
|
+
else if (isCards && !isBookkeeping) {
|
|
43
|
+
// for card only
|
|
40
44
|
onboardingCustomerPayload.is_book_keeping_enabled = false;
|
|
41
45
|
onboardingCustomerPayload.is_banking_enabled = false;
|
|
42
46
|
onboardingCustomerPayload.is_spend_management_enabled = false;
|
|
47
|
+
onboardingCustomerPayload.is_other_products_enabled = false;
|
|
48
|
+
onboardingCustomerPayload.is_card_enabled = true;
|
|
49
|
+
}
|
|
50
|
+
else if (isChecking && !isBookkeeping) {
|
|
51
|
+
//for checking only
|
|
52
|
+
onboardingCustomerPayload.is_book_keeping_enabled = false;
|
|
53
|
+
onboardingCustomerPayload.is_banking_enabled = true;
|
|
54
|
+
onboardingCustomerPayload.is_spend_management_enabled = false;
|
|
55
|
+
onboardingCustomerPayload.is_other_products_enabled = false;
|
|
43
56
|
onboardingCustomerPayload.is_card_enabled = false;
|
|
44
57
|
}
|
|
45
|
-
else {
|
|
46
|
-
|
|
47
|
-
onboardingCustomerPayload.
|
|
48
|
-
onboardingCustomerPayload.
|
|
49
|
-
onboardingCustomerPayload.
|
|
50
|
-
|
|
51
|
-
onboardingCustomerPayload.is_book_keeping_enabled = true;
|
|
52
|
-
onboardingCustomerPayload.is_banking_enabled = true;
|
|
53
|
-
onboardingCustomerPayload.is_spend_management_enabled = true;
|
|
54
|
-
onboardingCustomerPayload.is_card_enabled = true;
|
|
55
|
-
}
|
|
56
|
-
else if (isChecking && isCards) {
|
|
57
|
-
// for checking and cards
|
|
58
|
-
onboardingCustomerPayload.is_book_keeping_enabled = false;
|
|
59
|
-
onboardingCustomerPayload.is_banking_enabled = true;
|
|
60
|
-
onboardingCustomerPayload.is_spend_management_enabled = false;
|
|
61
|
-
onboardingCustomerPayload.is_card_enabled = true;
|
|
62
|
-
}
|
|
63
|
-
else if (isCards) {
|
|
64
|
-
// for cards only
|
|
65
|
-
onboardingCustomerPayload.is_book_keeping_enabled = false;
|
|
66
|
-
onboardingCustomerPayload.is_banking_enabled = false;
|
|
67
|
-
onboardingCustomerPayload.is_spend_management_enabled = false;
|
|
68
|
-
onboardingCustomerPayload.is_card_enabled = true;
|
|
69
|
-
}
|
|
70
|
-
else if (isChecking) {
|
|
71
|
-
// for checking only
|
|
72
|
-
onboardingCustomerPayload.is_book_keeping_enabled = false;
|
|
73
|
-
onboardingCustomerPayload.is_banking_enabled = true;
|
|
74
|
-
onboardingCustomerPayload.is_spend_management_enabled = false;
|
|
75
|
-
onboardingCustomerPayload.is_card_enabled = false;
|
|
76
|
-
}
|
|
77
|
-
else {
|
|
78
|
-
// Nothing selected: disable all core flags
|
|
79
|
-
onboardingCustomerPayload.is_book_keeping_enabled = false;
|
|
80
|
-
onboardingCustomerPayload.is_banking_enabled = false;
|
|
81
|
-
onboardingCustomerPayload.is_spend_management_enabled = false;
|
|
82
|
-
onboardingCustomerPayload.is_card_enabled = false;
|
|
83
|
-
}
|
|
58
|
+
else if (isOther) {
|
|
59
|
+
onboardingCustomerPayload.is_book_keeping_enabled = false;
|
|
60
|
+
onboardingCustomerPayload.is_banking_enabled = false;
|
|
61
|
+
onboardingCustomerPayload.is_spend_management_enabled = false;
|
|
62
|
+
onboardingCustomerPayload.is_other_products_enabled = true;
|
|
63
|
+
onboardingCustomerPayload.is_card_enabled = false;
|
|
84
64
|
}
|
|
85
65
|
}
|
|
86
66
|
if (Boolean(companyId) === true) {
|
|
@@ -247,18 +247,8 @@ const allProductsList = [
|
|
|
247
247
|
group: 'spend_management',
|
|
248
248
|
},
|
|
249
249
|
{
|
|
250
|
-
code: '
|
|
251
|
-
name: '
|
|
252
|
-
group: 'other',
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
code: 'zeni_cfo',
|
|
256
|
-
name: 'Zeni CFO',
|
|
257
|
-
group: 'other',
|
|
258
|
-
},
|
|
259
|
-
{
|
|
260
|
-
code: 'zeni_tax',
|
|
261
|
-
name: 'Zeni Tax',
|
|
250
|
+
code: 'other',
|
|
251
|
+
name: 'Other',
|
|
262
252
|
group: 'other',
|
|
263
253
|
},
|
|
264
254
|
];
|
|
@@ -5,8 +5,8 @@ import { Tenant } from '../../../../entity/tenant/tenantState';
|
|
|
5
5
|
import { CompanyDetailsLocalData, PrimaryContactLocalData } from '../../../spendManagement/commonSetup/setupViewState';
|
|
6
6
|
declare const toProductGroupType: (v: string) => "other" | "bookkeeping" | "banking" | "spend_management" | "cards";
|
|
7
7
|
export type ProductGroupType = ReturnType<typeof toProductGroupType>;
|
|
8
|
-
export declare const toProductType: (v: string) => "other" | "bookkeeping" | "zeni_checking" | "zeni_bill_pay" | "zeni_reimbursements" | "zeni_cards"
|
|
9
|
-
export declare const toProductTypeStrict: (v: string) => "other" | "bookkeeping" | "zeni_checking" | "zeni_bill_pay" | "zeni_reimbursements" | "zeni_cards" |
|
|
8
|
+
export declare const toProductType: (v: string) => "other" | "bookkeeping" | "zeni_checking" | "zeni_bill_pay" | "zeni_reimbursements" | "zeni_cards";
|
|
9
|
+
export declare const toProductTypeStrict: (v: string) => "other" | "bookkeeping" | "zeni_checking" | "zeni_bill_pay" | "zeni_reimbursements" | "zeni_cards" | undefined;
|
|
10
10
|
export type ProductType = ReturnType<typeof toProductType>;
|
|
11
11
|
export interface OnboardingCustomer {
|
|
12
12
|
company: CompanyWithSchema;
|
|
@@ -18,9 +18,6 @@ const ALL_PRODUCTS = [
|
|
|
18
18
|
'zeni_reimbursements',
|
|
19
19
|
'zeni_cards',
|
|
20
20
|
'other',
|
|
21
|
-
'zeni_payroll',
|
|
22
|
-
'zeni_cfo',
|
|
23
|
-
'zeni_tax',
|
|
24
21
|
];
|
|
25
22
|
const toProductType = (v) => (0, stringToUnion_1.stringToUnion)(v, ALL_PRODUCTS);
|
|
26
23
|
exports.toProductType = toProductType;
|
|
@@ -126,6 +126,7 @@ const editBillView = (0, toolkit_1.createSlice)({
|
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
else {
|
|
129
|
+
draft.newBillState.isInitialEdit = true;
|
|
129
130
|
const prevRecurringConfig = draft.newBillState.billDetailLocalData.recurringConfig;
|
|
130
131
|
draft.newBillState.billDetailLocalData = Object.assign(Object.assign({}, draft.newBillState.billDetailLocalData), action.payload.billDetailLocalData);
|
|
131
132
|
if (recurringLocalConfig != null) {
|
|
@@ -382,6 +382,7 @@ const getEditBillDetail = (state, isVendorRecommendationFeatureEnabled, isZeniAc
|
|
|
382
382
|
plaidConnectionDetails,
|
|
383
383
|
paymentAccount,
|
|
384
384
|
newAddedBillPaymentAccountId,
|
|
385
|
+
isInitialEdit: sourceBillDetail === null || sourceBillDetail === void 0 ? void 0 : sourceBillDetail.isInitialEdit,
|
|
385
386
|
};
|
|
386
387
|
};
|
|
387
388
|
exports.getEditBillDetail = getEditBillDetail;
|
|
@@ -26,6 +26,7 @@ export interface EditBillDetail {
|
|
|
26
26
|
suggestedVendorIdFromParsedInvoice?: ID;
|
|
27
27
|
recommendationByLineId: Record<ID, Recommendation[]>;
|
|
28
28
|
isBillMarkedForRetry?: boolean;
|
|
29
|
+
isInitialEdit: boolean;
|
|
29
30
|
}
|
|
30
31
|
export declare const initialBillDetail: EditBillDetail;
|
|
31
32
|
export interface EditBillDetailViewState {
|
|
@@ -82,7 +82,7 @@ const getSaveBillApiURL = (saveBillBaseURL, isRecurring, billId, billTransaction
|
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
84
|
function prepareSaveBillPayload(accountState, billTransactionState, paymentAccountState, recurringBillState, billDetail, billStageCode, isForMarkAsPaid, isApproverMarkingAsPaid) {
|
|
85
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27;
|
|
85
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o, _p, _q, _r, _s, _t, _u, _v, _w, _x, _y, _z, _0, _1, _2, _3, _4, _5, _6, _7, _8, _9, _10, _11, _12, _13, _14, _15, _16, _17, _18, _19, _20, _21, _22, _23, _24, _25, _26, _27, _28;
|
|
86
86
|
const billId = billDetail.billId;
|
|
87
87
|
let detail;
|
|
88
88
|
const withdrawFromAccount = (_a = billDetail.billDetailLocalData.paymentDetailsSection) === null || _a === void 0 ? void 0 : _a.withdrawFrom;
|
|
@@ -104,51 +104,51 @@ function prepareSaveBillPayload(accountState, billTransactionState, paymentAccou
|
|
|
104
104
|
account_id: zeniAccountId != null
|
|
105
105
|
? (_k = (0, accountSelector_1.getAccountBase)(accountState, zeniAccountId, 'bill_pay')) === null || _k === void 0 ? void 0 : _k.qboId
|
|
106
106
|
: '',
|
|
107
|
-
file_id: (_l = billDetail.billDetailLocalData.file) === null || _l === void 0 ? void 0 : _l.fileId,
|
|
108
|
-
transaction_date: (
|
|
109
|
-
due_date: (
|
|
110
|
-
total_amount: (
|
|
111
|
-
recipient_total_amount: (
|
|
107
|
+
file_id: (_m = (_l = billDetail.billDetailLocalData.file) === null || _l === void 0 ? void 0 : _l.fileId) !== null && _m !== void 0 ? _m : '',
|
|
108
|
+
transaction_date: (_q = (_p = (_o = billDetail.billDetailLocalData.whatForSection) === null || _o === void 0 ? void 0 : _o.invoiceDate) === null || _p === void 0 ? void 0 : _p.format('YYYY-MM-DD')) !== null && _q !== void 0 ? _q : (0, zeniDayJS_1.dateNow)().format('YYYY-MM-DD'),
|
|
109
|
+
due_date: (_t = (_s = (_r = billDetail.billDetailLocalData.whatForSection) === null || _r === void 0 ? void 0 : _r.billDueDate) === null || _s === void 0 ? void 0 : _s.format('YYYY-MM-DD')) !== null && _t !== void 0 ? _t : null,
|
|
110
|
+
total_amount: (_v = (_u = billDetail.billDetailLocalData.totalAmount) === null || _u === void 0 ? void 0 : _u.amount) !== null && _v !== void 0 ? _v : 0,
|
|
111
|
+
recipient_total_amount: (_x = (_w = billDetail.billDetailLocalData.recipientTotalAmount) === null || _w === void 0 ? void 0 : _w.amount) !== null && _x !== void 0 ? _x : 0,
|
|
112
112
|
bill_pay_info: {
|
|
113
113
|
stage: {
|
|
114
114
|
code: billStageCode,
|
|
115
115
|
},
|
|
116
116
|
payment_date: getPaymentDate(billDetail.billDetailLocalData),
|
|
117
117
|
from_account: {
|
|
118
|
-
account_id: (
|
|
119
|
-
account_type: (
|
|
118
|
+
account_id: (_0 = (_z = (_y = billDetail.billDetailLocalData.paymentDetailsSection) === null || _y === void 0 ? void 0 : _y.withdrawFrom) === null || _z === void 0 ? void 0 : _z.id) !== null && _0 !== void 0 ? _0 : '',
|
|
119
|
+
account_type: (_3 = (0, helpers_1.accountTypeSubConfigCodeToAccType)((_2 = (_1 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _1 === void 0 ? void 0 : _1.withdrawFrom) === null || _2 === void 0 ? void 0 : _2.accType)) !== null && _3 !== void 0 ? _3 : '',
|
|
120
120
|
},
|
|
121
|
-
to_account: Object.assign({}, (((
|
|
121
|
+
to_account: Object.assign({}, (((_5 = (_4 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _4 === void 0 ? void 0 : _4.paymentType) === null || _5 === void 0 ? void 0 : _5.method.includes('international')) === true
|
|
122
122
|
? {
|
|
123
123
|
payment_instrument_id: Boolean(billDetail.billDetailLocalData
|
|
124
124
|
.isCollectToAccountInfoFromVendorContact) === false
|
|
125
|
-
? ((
|
|
125
|
+
? ((_7 = (_6 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _6 === void 0 ? void 0 : _6.paymentTo) !== null && _7 !== void 0 ? _7 : null)
|
|
126
126
|
: null,
|
|
127
127
|
}
|
|
128
128
|
: {
|
|
129
129
|
account_id: Boolean(billDetail.billDetailLocalData
|
|
130
130
|
.isCollectToAccountInfoFromVendorContact) === false
|
|
131
|
-
? ((
|
|
131
|
+
? ((_9 = (_8 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _8 === void 0 ? void 0 : _8.paymentTo) !== null && _9 !== void 0 ? _9 : null)
|
|
132
132
|
: null,
|
|
133
133
|
})),
|
|
134
|
-
to_account_vendor_email: (
|
|
134
|
+
to_account_vendor_email: (_10 = billDetail.billDetailLocalData.toAccountVendorEmail) !== null && _10 !== void 0 ? _10 : null,
|
|
135
135
|
is_collect_to_account_info_from_vendor_contact: billDetail.billDetailLocalData.isCollectToAccountInfoFromVendorContact,
|
|
136
136
|
is_cancelled: false,
|
|
137
|
-
bill_payment_method_type: (0, exports.getBillPaymentMethodTypePayload)((
|
|
138
|
-
international_transfer_fee_bearer_payment_method: ((
|
|
139
|
-
((
|
|
140
|
-
? ((
|
|
141
|
-
.internationalTransferFeeBearerPaymentMethod) !== null &&
|
|
137
|
+
bill_payment_method_type: (0, exports.getBillPaymentMethodTypePayload)((_11 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _11 === void 0 ? void 0 : _11.paymentType),
|
|
138
|
+
international_transfer_fee_bearer_payment_method: ((_13 = (_12 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _12 === void 0 ? void 0 : _12.paymentType) === null || _13 === void 0 ? void 0 : _13.method.includes('international')) === true &&
|
|
139
|
+
((_14 = billDetail.billDetailLocalData.vendor) === null || _14 === void 0 ? void 0 : _14.vendorCurrencyCode) === 'USD'
|
|
140
|
+
? ((_15 = billDetail.billDetailLocalData.paymentDetailsSection
|
|
141
|
+
.internationalTransferFeeBearerPaymentMethod) !== null && _15 !== void 0 ? _15 : 'swift_our') //default value for international method and USD currency
|
|
142
142
|
: null,
|
|
143
|
-
outside_zeni_transaction_payment_mode: (
|
|
143
|
+
outside_zeni_transaction_payment_mode: (_17 = (_16 = billDetail.billDetailLocalData.outsideZeniPaymentLocalData) === null || _16 === void 0 ? void 0 : _16.paymentMode) !== null && _17 !== void 0 ? _17 : null,
|
|
144
144
|
bill_payment_status: {
|
|
145
145
|
code: isForMarkAsPaid ? 'mark_as_paid' : null,
|
|
146
146
|
},
|
|
147
147
|
},
|
|
148
|
-
document_id: (
|
|
149
|
-
transaction_memo: (
|
|
150
|
-
currency_code: (
|
|
151
|
-
recipient_currency_code: (
|
|
148
|
+
document_id: (_18 = billDetail.billDetailLocalData.whatForSection) === null || _18 === void 0 ? void 0 : _18.invoiceNumber,
|
|
149
|
+
transaction_memo: (_19 = billDetail.billDetailLocalData.whatForSection) === null || _19 === void 0 ? void 0 : _19.memo,
|
|
150
|
+
currency_code: (_21 = (_20 = billDetail.billDetailLocalData.whatForSection) === null || _20 === void 0 ? void 0 : _20.currencyCode) !== null && _21 !== void 0 ? _21 : 'USD',
|
|
151
|
+
recipient_currency_code: (_23 = (_22 = billDetail.billDetailLocalData.whatForSection) === null || _22 === void 0 ? void 0 : _22.recipientCurrencyCode) !== null && _23 !== void 0 ? _23 : 'USD',
|
|
152
152
|
lines: Object.keys(billDetail.billDetailLocalData.updatesByLineId).map((lineId) => {
|
|
153
153
|
const line = billDetail.billDetailLocalData.updatesByLineId[lineId];
|
|
154
154
|
const lineAsTransactionLinePayload = (0, editBillViewPayload_1.fromLineLocalDataToTransactionLinePayload)(line);
|
|
@@ -156,12 +156,12 @@ function prepareSaveBillPayload(accountState, billTransactionState, paymentAccou
|
|
|
156
156
|
}),
|
|
157
157
|
};
|
|
158
158
|
if (!isRecurring) {
|
|
159
|
-
payload.vendor_name = (
|
|
159
|
+
payload.vendor_name = (_25 = (_24 = billDetail.billDetailLocalData.vendor) === null || _24 === void 0 ? void 0 : _24.name) !== null && _25 !== void 0 ? _25 : '';
|
|
160
160
|
}
|
|
161
161
|
if (billId != null) {
|
|
162
162
|
detail = (0, get_1.default)(billTransactionState.transactionById, billId, undefined);
|
|
163
|
-
payload.sync_token = (
|
|
164
|
-
payload.update_time = (
|
|
163
|
+
payload.sync_token = (_26 = detail === null || detail === void 0 ? void 0 : detail.syncToken) !== null && _26 !== void 0 ? _26 : null;
|
|
164
|
+
payload.update_time = (_27 = detail === null || detail === void 0 ? void 0 : detail.updateTime.format('YYYY-MM-DD')) !== null && _27 !== void 0 ? _27 : null;
|
|
165
165
|
if (isApproverMarkingAsPaid) {
|
|
166
166
|
payload.is_outside_zeni_bill_marked_as_paid_by_approver = true;
|
|
167
167
|
}
|
|
@@ -175,7 +175,7 @@ function prepareSaveBillPayload(accountState, billTransactionState, paymentAccou
|
|
|
175
175
|
payload.are_approvals_serialized = true;
|
|
176
176
|
}
|
|
177
177
|
if (billStageCode === 'pending_approval' &&
|
|
178
|
-
((
|
|
178
|
+
((_28 = billDetail.billDetailLocalData.paymentDetailsSection) === null || _28 === void 0 ? void 0 : _28.conversionRate) != null) {
|
|
179
179
|
// required by platform
|
|
180
180
|
payload.exchange_rate =
|
|
181
181
|
1 / billDetail.billDetailLocalData.paymentDetailsSection.conversionRate;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.16.
|
|
3
|
+
"version": "4.16.48",
|
|
4
4
|
"description": "Shared module between Web & Mobile containing required abstractions for state management, async network communication. ",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"types": "lib/index.d.ts",
|