@zeniai/client-epic-state 4.19.49 → 4.19.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/lib/esm/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +5 -3
- package/lib/esm/view/expenseAutomationView/helpers/reconciliationHelpers.js +7 -4
- package/lib/tsconfig.typecheck.tsbuildinfo +1 -1
- package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +5 -3
- package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.d.ts +3 -2
- package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.js +7 -4
- package/package.json +1 -1
|
@@ -58,7 +58,7 @@ const saveReconciliationReviewEpic = (actions$, state$, zeniAPI) => actions$.pip
|
|
|
58
58
|
payload = getPayloadForBankTransfer(updatedTransaction, localData);
|
|
59
59
|
break;
|
|
60
60
|
case 'record_cc_payment':
|
|
61
|
-
payload = getPayloadForCCPayment(updatedTransaction, localData);
|
|
61
|
+
payload = getPayloadForCCPayment(updatedTransaction, localData, reconciliationData?.account.accountType);
|
|
62
62
|
break;
|
|
63
63
|
case 'record_deposit':
|
|
64
64
|
payload = getPayloadForDeposit(updatedTransaction, localData);
|
|
@@ -189,9 +189,11 @@ function getPayloadForBankTransfer(updatedTransaction, localData) {
|
|
|
189
189
|
currency_code: updatedTransaction.amount.currencyCode,
|
|
190
190
|
};
|
|
191
191
|
}
|
|
192
|
-
function getPayloadForCCPayment(updatedTransaction, localData) {
|
|
192
|
+
function getPayloadForCCPayment(updatedTransaction, localData, accountType) {
|
|
193
193
|
return {
|
|
194
|
-
account_id:
|
|
194
|
+
account_id: accountType === 'credit_card'
|
|
195
|
+
? localData.bankAccountId
|
|
196
|
+
: localData.creditCardId,
|
|
195
197
|
amount: updatedTransaction.amount.amount,
|
|
196
198
|
transaction_memo: updatedTransaction.memo,
|
|
197
199
|
line_description: localData.memo,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { CurrencyPayload } from '../../../commonPayloadTypes/v2/viewAndReportPayloadv2';
|
|
2
|
+
import { AccountType } from '../../../entity/account/accountState';
|
|
2
3
|
import { ReconciliationDataPayload } from '../../../entity/accountRecon/accountReconPayload';
|
|
3
4
|
import { TransactionsToReview } from '../../../entity/accountRecon/accountReconState';
|
|
4
5
|
import { MatchedTransactionPayload } from '../../../entity/transaction/payloadTypes/reconciliationTransactionPayloads';
|
|
@@ -9,6 +10,6 @@ export declare const getAllReviewTransactionsFromReconcilePayload: (reconcilePay
|
|
|
9
10
|
export declare const isReviewTransactionBillPaymentType: (transaction: TransactionsToReview) => boolean;
|
|
10
11
|
export declare const isReviewTransactionExpenseType: (transaction: TransactionsToReview) => boolean;
|
|
11
12
|
export declare const isReviewTransactionDepositType: (transaction: TransactionsToReview) => boolean;
|
|
12
|
-
export declare const isReviewTransactionBankTransferType: (transaction: TransactionsToReview) => boolean;
|
|
13
|
-
export declare const isReviewTransactionCreditCardPaymentType: (transaction: TransactionsToReview) => boolean;
|
|
13
|
+
export declare const isReviewTransactionBankTransferType: (transaction: TransactionsToReview, accountType: AccountType) => boolean;
|
|
14
|
+
export declare const isReviewTransactionCreditCardPaymentType: (transaction: TransactionsToReview, accountType: AccountType) => boolean;
|
|
14
15
|
export declare const isReviewTransactionCreditCardCreditType: (transaction: TransactionsToReview) => boolean;
|
|
@@ -28,12 +28,15 @@ const isReviewTransactionDepositType = (transaction) => {
|
|
|
28
28
|
return transaction.recommendedAction.action === 'record_deposit';
|
|
29
29
|
};
|
|
30
30
|
exports.isReviewTransactionDepositType = isReviewTransactionDepositType;
|
|
31
|
-
const isReviewTransactionBankTransferType = (transaction) => {
|
|
32
|
-
return transaction.recommendedAction.action === 'record_transfer'
|
|
31
|
+
const isReviewTransactionBankTransferType = (transaction, accountType) => {
|
|
32
|
+
return (transaction.recommendedAction.action === 'record_transfer' ||
|
|
33
|
+
(transaction.recommendedAction.action === 'record_cc_payment' &&
|
|
34
|
+
accountType === 'credit_card'));
|
|
33
35
|
};
|
|
34
36
|
exports.isReviewTransactionBankTransferType = isReviewTransactionBankTransferType;
|
|
35
|
-
const isReviewTransactionCreditCardPaymentType = (transaction) => {
|
|
36
|
-
return transaction.recommendedAction.action === 'record_cc_payment'
|
|
37
|
+
const isReviewTransactionCreditCardPaymentType = (transaction, accountType) => {
|
|
38
|
+
return (transaction.recommendedAction.action === 'record_cc_payment' &&
|
|
39
|
+
accountType !== 'credit_card');
|
|
37
40
|
};
|
|
38
41
|
exports.isReviewTransactionCreditCardPaymentType = isReviewTransactionCreditCardPaymentType;
|
|
39
42
|
const isReviewTransactionCreditCardCreditType = (transaction) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zeniai/client-epic-state",
|
|
3
|
-
"version": "4.19.
|
|
3
|
+
"version": "4.19.50",
|
|
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
|
"module": "lib/esm/index.js",
|