@zeniai/client-epic-state 4.15.41 → 4.15.43

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.
Files changed (235) hide show
  1. package/README.md +1 -19
  2. package/lib/commonPayloadTypes/recommendationPayload.d.ts +0 -1
  3. package/lib/commonStateTypes/common.d.ts +1 -1
  4. package/lib/commonStateTypes/fiscalYearHelpers/getFYMonths.d.ts +2 -2
  5. package/lib/commonStateTypes/fiscalYearHelpers/getFYQuarterAndYear.d.ts +2 -2
  6. package/lib/commonStateTypes/timePeriod.d.ts +7 -7
  7. package/lib/commonStateTypes/timePeriod.js +2 -2
  8. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.d.ts +1 -1
  9. package/lib/commonStateTypes/viewAndReport/agingReportStateTypes.js +1 -1
  10. package/lib/commonStateTypes/viewAndReport/viewAndReport.d.ts +2 -2
  11. package/lib/commonStateTypes/viewAndReport/viewAndReport.js +0 -1
  12. package/lib/configureStore.js +1 -2
  13. package/lib/entity/account/accountSelector.d.ts +3 -3
  14. package/lib/entity/account/accountState.d.ts +1 -1
  15. package/lib/entity/account/pickAndMergeForecastAccountReport.d.ts +1 -1
  16. package/lib/entity/accountGroup/accountGroupSelector.d.ts +22 -22
  17. package/lib/entity/accountGroup/accountGroupState.d.ts +1 -1
  18. package/lib/entity/approvalRule/approvalRuleState.d.ts +2 -2
  19. package/lib/entity/billPay/billTransaction/billTransactionState.d.ts +4 -4
  20. package/lib/entity/chargeCard/chargeCard.d.ts +1 -1
  21. package/lib/entity/chargeCardTransaction/chargeCardTransaction.d.ts +1 -1
  22. package/lib/entity/class/classReducer.d.ts +4 -4
  23. package/lib/entity/class/classState.d.ts +1 -1
  24. package/lib/entity/company/companyReducer.js +1 -0
  25. package/lib/entity/customer/customerPayload.d.ts +1 -1
  26. package/lib/entity/customer/customerPayload.js +6 -16
  27. package/lib/entity/depositAccountTransaction/depositAccountTransaction.d.ts +1 -1
  28. package/lib/entity/entityApprovalStatus/entityApprovalStatusState.d.ts +2 -2
  29. package/lib/entity/file/fileState.d.ts +3 -3
  30. package/lib/entity/forecast/forecastState.d.ts +1 -1
  31. package/lib/entity/jeSchedules/jeSchedulesReducer.d.ts +2 -2
  32. package/lib/entity/jeSchedules/jeSchedulesTypes.d.ts +2 -2
  33. package/lib/entity/notification/types/notificationTypes.d.ts +2 -2
  34. package/lib/entity/sectionAccountsView/sectionAccountsView.d.ts +1 -1
  35. package/lib/entity/sectionClassesViewV2/sectionClassesView.d.ts +1 -1
  36. package/lib/entity/sectionClassesViewV2/sectionClassesViewReducer.d.ts +2 -2
  37. package/lib/entity/snackbar/snackbarTypes.d.ts +2 -2
  38. package/lib/entity/snackbar/snackbarTypes.js +0 -4
  39. package/lib/entity/task/taskState.d.ts +3 -3
  40. package/lib/entity/tenant/clearAllEpic.d.ts +2 -4
  41. package/lib/entity/tenant/clearAllEpic.js +0 -4
  42. package/lib/entity/tenant/tenantReducer.d.ts +2 -2
  43. package/lib/entity/tenant/tenantReducer.js +1 -0
  44. package/lib/entity/transaction/payloadTypes/customerTransactionPayload.d.ts +1 -1
  45. package/lib/entity/transaction/payloadTypes/customerTransactionPayload.js +2 -1
  46. package/lib/entity/transaction/payloadTypes/transactionPayload.d.ts +0 -2
  47. package/lib/entity/transaction/payloadTypes/transactionPayload.js +6 -9
  48. package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.d.ts +1 -9
  49. package/lib/entity/transaction/payloadTypes/vendorTransactionPayload.js +2 -24
  50. package/lib/entity/transaction/stateTypes/attachment.d.ts +2 -2
  51. package/lib/entity/transaction/stateTypes/transaction.d.ts +1 -3
  52. package/lib/entity/transaction/stateTypes/transactionType.d.ts +1 -1
  53. package/lib/entity/transaction/stateTypes/transactionType.js +1 -1
  54. package/lib/entity/transaction/stateTypes/vendorTransaction.d.ts +0 -5
  55. package/lib/entity/transaction/stateTypes/vendorTransaction.js +1 -5
  56. package/lib/entity/transaction/toSupportedTransaction.js +1 -6
  57. package/lib/entity/transaction/transactionReducer.d.ts +0 -17
  58. package/lib/entity/transaction/transactionReducer.js +2 -47
  59. package/lib/entity/transaction/transactionSelector.d.ts +0 -2
  60. package/lib/entity/transaction/transactionSelector.js +0 -5
  61. package/lib/entity/transaction/transactionState.d.ts +4 -6
  62. package/lib/entity/vendorExpense/vendorExpenseReducer.js +1 -0
  63. package/lib/entity/vendorExpense/vendorExpenseSelector.d.ts +2 -2
  64. package/lib/epic.d.ts +1 -6
  65. package/lib/epic.js +1 -6
  66. package/lib/index.d.ts +12 -20
  67. package/lib/index.js +27 -56
  68. package/lib/init.d.ts +1 -2
  69. package/lib/init.js +2 -9
  70. package/lib/reducer.d.ts +1 -7
  71. package/lib/reducer.js +0 -6
  72. package/lib/view/accountList/accountListReducer.js +3 -1
  73. package/lib/view/accountMappingView/accountMappingReducer.js +1 -0
  74. package/lib/view/apAgingView/apAgingDetail/apAgingDetailReducer.js +2 -1
  75. package/lib/view/auditReportView/auditReportViewReducer.d.ts +2 -2
  76. package/lib/view/auditReportView/auditReportViewState.d.ts +2 -2
  77. package/lib/view/balanceSheet/balanceSheetReducer.js +6 -1
  78. package/lib/view/bankAccountView/bankAccountViewReducer.js +1 -0
  79. package/lib/view/billPayCard/billPayCardSelector.d.ts +2 -2
  80. package/lib/view/cardBalance/cardBalanceSelector.d.ts +3 -3
  81. package/lib/view/cashBalance/cashBalanceSelector.d.ts +3 -3
  82. package/lib/view/cashFlow/cashFlowReducer.js +4 -1
  83. package/lib/view/cashInCashOut/cashInCashOutSelector.d.ts +2 -2
  84. package/lib/view/cashPosition/cashPositionReducer.js +1 -0
  85. package/lib/view/cashPosition/cashPositionSelector.d.ts +2 -2
  86. package/lib/view/common/reportsHelpers.d.ts +1 -1
  87. package/lib/view/commonVendorView/transactionVendorView/epics/saveTransactionVendorEpic.js +0 -7
  88. package/lib/view/commonVendorView/vendorView/epics/fetchAndUpdateVendorRecommendationsEpic.js +3 -1
  89. package/lib/view/commonVendorView/vendorsTabVendorView/vendorsTabVendorViewReducer.d.ts +2 -2
  90. package/lib/view/companyTaskManagerView/companyTaskManagerViewReducer.d.ts +2 -2
  91. package/lib/view/companyView/companyViewReducer.d.ts +1 -1
  92. package/lib/view/companyView/companyViewReducer.js +10 -1
  93. package/lib/view/companyView/types/cockpitTypes.d.ts +3 -3
  94. package/lib/view/companyView/types/companyPassport/companyUsersLocalData.d.ts +1 -1
  95. package/lib/view/dashboard/dashboardEpic.js +2 -0
  96. package/lib/view/dashboard/dashboardReducer.d.ts +2 -2
  97. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.d.ts +1 -2
  98. package/lib/view/expenseAutomationView/epics/common/fetchAllExpenseAutomationTabsEpic.js +10 -24
  99. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.d.ts +1 -2
  100. package/lib/view/expenseAutomationView/epics/common/refreshExpenseAutomationCurrentTabEpic.js +0 -14
  101. package/lib/view/expenseAutomationView/epics/transactionCategorization/updateTransactionCategorizationEpic.js +7 -30
  102. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.d.ts +2 -2
  103. package/lib/view/expenseAutomationView/expenseAutomationViewReducer.js +5 -1
  104. package/lib/view/expenseAutomationView/expenseAutomationViewSelector.js +2 -17
  105. package/lib/view/expenseAutomationView/expenseAutomationViewState.d.ts +2 -2
  106. package/lib/view/expenseAutomationView/expenseAutomationViewState.js +1 -1
  107. package/lib/view/expenseAutomationView/helpers/saveTransactionHelper.js +42 -98
  108. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.d.ts +1 -1
  109. package/lib/view/expenseAutomationView/helpers/transactionCategorizationLocalDataHelper.js +10 -86
  110. package/lib/view/expenseAutomationView/reducers/jeSchedulesViewReducer.d.ts +11 -11
  111. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.d.ts +1 -12
  112. package/lib/view/expenseAutomationView/reducers/transactionsViewReducer.js +7 -66
  113. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.d.ts +0 -2
  114. package/lib/view/expenseAutomationView/selectorTypes/expenseAutomationViewSelectorTypes.js +1 -1
  115. package/lib/view/expenseAutomationView/selectors/jeSchedulesViewSelector.js +2 -5
  116. package/lib/view/expenseAutomationView/types/fluxAnalysisViewState.d.ts +1 -1
  117. package/lib/view/expenseAutomationView/types/missingReceiptsViewState.d.ts +1 -1
  118. package/lib/view/expenseAutomationView/types/transactionsViewState.d.ts +2 -12
  119. package/lib/view/financeStatement/financeStatementReducer.d.ts +1 -1
  120. package/lib/view/financeStatement/financeStatementReducer.js +4 -1
  121. package/lib/view/globalMerchantView/globalMerchantViewReducer.d.ts +4 -4
  122. package/lib/view/netBurnOrIncome/netBurnOrIncomeReducer.js +10 -3
  123. package/lib/view/netBurnOrIncomeClassesView/netBurnOrIncomeClassesViewReducer.js +6 -1
  124. package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardReducer.js +1 -0
  125. package/lib/view/netBurnOrIncomeStoryCard/netBurnOrIncomeStoryCardState.d.ts +1 -1
  126. package/lib/view/notificationView/notificationViewReducer.d.ts +8 -8
  127. package/lib/view/notificationView/notificationViewState.d.ts +2 -2
  128. package/lib/view/onboardingView/cockpitView/onboardingCockpitViewReducer.js +3 -0
  129. package/lib/view/onboardingView/customerView/onboardingCustomerViewReducer.d.ts +2 -2
  130. package/lib/view/opEx/opExForTimeFrameEpic.js +1 -1
  131. package/lib/view/opEx/opExReducer.js +14 -4
  132. package/lib/view/opExByVendor/opExByVendorReducer.js +3 -1
  133. package/lib/view/opExByVendor/opExByVendorState.d.ts +1 -1
  134. package/lib/view/opExClassesView/opExClassesViewReducer.js +6 -1
  135. package/lib/view/people/fetchPeopleEpic.js +3 -1
  136. package/lib/view/people/invitePeopleEpic.js +3 -1
  137. package/lib/view/people/inviteZeniPeopleEpic.js +3 -1
  138. package/lib/view/people/peopleReducer.js +1 -0
  139. package/lib/view/people/peopleSaveUpdatesEpic.js +1 -1
  140. package/lib/view/profitAndLoss/profitAndLossReducer.js +6 -1
  141. package/lib/view/profitAndLossClassesView/profitAndLossClassesViewReducer.js +6 -1
  142. package/lib/view/recommendation/recommendationReducer.js +4 -1
  143. package/lib/view/referralView/referralState.d.ts +1 -1
  144. package/lib/view/reimbursementCard/reimbursementCardSelector.d.ts +2 -2
  145. package/lib/view/reportUIOptions/reportUIOptionsReducer.d.ts +8 -8
  146. package/lib/view/reportUIOptions/updateReportUIOptionThisPeriodEpic.js +3 -1
  147. package/lib/view/revenue/revenueReducer.js +10 -3
  148. package/lib/view/revenueClassesView/revenueClassesViewReducer.js +6 -1
  149. package/lib/view/scheduleView/scheduleAccruedDetailView/LinkBillExpenseView/linkBillExpense.d.ts +1 -1
  150. package/lib/view/scheduleView/scheduleDetailView/scheduleDetailReducer.d.ts +4 -4
  151. package/lib/view/scheduleView/scheduleListView/scheduleListTypes.d.ts +2 -2
  152. package/lib/view/settingsView/settingsViewReducer.js +1 -0
  153. package/lib/view/settingsView/settingsViewState.d.ts +1 -1
  154. package/lib/view/spendManagement/billPay/billList/billListReducer.d.ts +1 -1
  155. package/lib/view/spendManagement/billPay/billList/billListReducer.js +1 -0
  156. package/lib/view/spendManagement/billPay/billList/billListState.d.ts +2 -2
  157. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.d.ts +1 -1
  158. package/lib/view/spendManagement/billPay/billPayConfig/billPayConfigState.js +6 -0
  159. package/lib/view/spendManagement/billPay/billsBulkActionView/billsBulkActionViewReducer.d.ts +2 -2
  160. package/lib/view/spendManagement/billPay/billsBulkActionView/epics/validateBillsBulkActionEpic.ts.js +3 -4
  161. package/lib/view/spendManagement/billPay/editBillView/epics/fetchBillAndInitializeLocalStoreEpic.js +3 -1
  162. package/lib/view/spendManagement/chargeCards/chargeCardDetail/chargeCardDetail.d.ts +2 -2
  163. package/lib/view/spendManagement/commonHistoryView/commonHistory.d.ts +1 -1
  164. package/lib/view/spendManagement/commonSetup/setupViewReducer.d.ts +7 -7
  165. package/lib/view/spendManagement/commonSetup/setupViewState.d.ts +1 -1
  166. package/lib/view/spendManagement/plaidAccount/epic/plaidConnection/establishPlaidConnectionEpic.js +3 -11
  167. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.d.ts +10 -11
  168. package/lib/view/spendManagement/plaidAccount/plaidAccountViewReducer.js +1 -3
  169. package/lib/view/spendManagement/plaidAccount/plaidAccountViewState.d.ts +1 -1
  170. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRecommendationsAndUpdateMerchantRecommendationsEpic.js +6 -2
  171. package/lib/view/spendManagement/reimbursement/editRemiView/epics/fetchRemiAndInitializeLocalStoreEpic.js +3 -1
  172. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.d.ts +1 -1
  173. package/lib/view/spendManagement/reimbursement/remiListView/remiListReducer.js +1 -0
  174. package/lib/view/spendManagement/reimbursement/remiListView/remiListState.d.ts +4 -4
  175. package/lib/view/spendManagement/reimbursement/remisBulkActionView/remisBulkActionViewReducer.d.ts +2 -2
  176. package/lib/view/subscriptionView/subscriptionViewReducer.js +1 -0
  177. package/lib/view/subscriptionView/types/subscriptionTypes.js +1 -0
  178. package/lib/view/taskManager/taskListView/epics/dragNDropTasksEpic.js +3 -1
  179. package/lib/view/taskManager/taskListView/taskList.d.ts +3 -3
  180. package/lib/view/taskManager/taskListView/taskListSelector.d.ts +1 -1
  181. package/lib/view/tasksCard/fetchTasksCardEpic.js +2 -1
  182. package/lib/view/tasksCard/tasksCardSelector.d.ts +2 -2
  183. package/lib/view/tasksCard/tasksCardSelector.js +1 -1
  184. package/lib/view/topEx/topExSelector.d.ts +3 -3
  185. package/lib/view/transactionDetail/epics/saveTransactionHelper.js +52 -45
  186. package/lib/view/transactionDetail/epics/updateTransactionDetailEpic.js +4 -22
  187. package/lib/view/transactionDetail/transactionDetailLocalDataHelper.js +13 -66
  188. package/lib/view/transactionDetail/transactionDetailReducer.d.ts +4 -13
  189. package/lib/view/transactionDetail/transactionDetailReducer.js +21 -51
  190. package/lib/view/transactionDetail/transactionDetailState.d.ts +2 -3
  191. package/lib/view/transactionDetail/transactionDetailTypes.d.ts +0 -8
  192. package/lib/view/transactionList/transactionListByEntitySelector.js +2 -0
  193. package/lib/view/transactionList/transactionListReducer.js +6 -4
  194. package/lib/view/trendWithTransactions/trendWithTransactionsReducer.js +1 -0
  195. package/lib/view/userFinancialAccount/userFinancialAccountReducer.js +3 -1
  196. package/lib/view/vendorFiling1099/vendorFiling1099List/vendorFiling1099ListState.d.ts +1 -1
  197. package/lib/view/vendorReviewView/vendorFirstReviewView/vendorFirstReviewViewState.d.ts +1 -1
  198. package/lib/view/vendorReviewView/vendorGlobalReviewView/vendorGlobalReviewViewState.d.ts +1 -1
  199. package/lib/zeniAPI.d.ts +0 -1
  200. package/lib/zeniUrl.d.ts +1 -1
  201. package/package.json +12 -13
  202. package/lib/entity/accountRecon/accountReconPayload.d.ts +0 -70
  203. package/lib/entity/accountRecon/accountReconPayload.js +0 -125
  204. package/lib/entity/accountRecon/accountReconReducer.d.ts +0 -16
  205. package/lib/entity/accountRecon/accountReconReducer.js +0 -71
  206. package/lib/entity/accountRecon/accountReconSelector.d.ts +0 -28
  207. package/lib/entity/accountRecon/accountReconSelector.js +0 -44
  208. package/lib/entity/accountRecon/accountReconState.d.ts +0 -70
  209. package/lib/entity/accountRecon/accountReconState.js +0 -28
  210. package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.d.ts +0 -35
  211. package/lib/entity/transaction/payloadTypes/reconciliationTransactionPayloads.js +0 -53
  212. package/lib/entity/transaction/stateTypes/reconciliationTransaction.d.ts +0 -32
  213. package/lib/entity/transaction/stateTypes/reconciliationTransaction.js +0 -10
  214. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.d.ts +0 -15
  215. package/lib/view/expenseAutomationView/epics/accountRecon/fetchReconciliationViewEpic.js +0 -118
  216. package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.d.ts +0 -10
  217. package/lib/view/expenseAutomationView/epics/accountRecon/initialiseLocalDataForSelectedAccountIdEpic.js +0 -49
  218. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.d.ts +0 -14
  219. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationDetailEpic.js +0 -169
  220. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.d.ts +0 -9
  221. package/lib/view/expenseAutomationView/epics/accountRecon/saveReconciliationReviewEpic.js +0 -154
  222. package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.d.ts +0 -6
  223. package/lib/view/expenseAutomationView/epics/accountRecon/updateReconcileTabLocalDataEpic.js +0 -110
  224. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.d.ts +0 -7
  225. package/lib/view/expenseAutomationView/helpers/reconciliationHelpers.js +0 -18
  226. package/lib/view/expenseAutomationView/payload/reconciliationPayload.d.ts +0 -28
  227. package/lib/view/expenseAutomationView/payload/reconciliationPayload.js +0 -51
  228. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.d.ts +0 -66
  229. package/lib/view/expenseAutomationView/reducers/reconciliationViewReducer.js +0 -384
  230. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.d.ts +0 -51
  231. package/lib/view/expenseAutomationView/selectorTypes/reconciliationViewSelectorTypes.js +0 -7
  232. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.d.ts +0 -5
  233. package/lib/view/expenseAutomationView/selectors/reconciliationViewSelector.js +0 -254
  234. package/lib/view/expenseAutomationView/types/reconciliationViewState.d.ts +0 -103
  235. package/lib/view/expenseAutomationView/types/reconciliationViewState.js +0 -37
@@ -1,11 +1,11 @@
1
1
  import { RootState } from '../../reducer';
2
2
  export declare const getTasksCardReport: (state: RootState) => {
3
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
3
+ reportId: "billing" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "flux_analysis_operating_expense";
4
4
  reportTitle: string;
5
5
  version: string | number | undefined;
6
6
  status: import("../..").Status | undefined;
7
7
  fetchState: import("../..").FetchState;
8
- firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
8
+ firstMonthOfFY: 2 | 1 | 3 | 4 | 8 | 5 | 6 | 10 | 7 | 12 | 11 | 9;
9
9
  tasks: {
10
10
  isUncategorizedIncomeTransactionsExist: boolean;
11
11
  numOfBillsPendingApproval: number;
@@ -4,7 +4,7 @@ exports.getTasksCardReport = void 0;
4
4
  const toolkit_1 = require("@reduxjs/toolkit");
5
5
  const getTasksCardReportSelector = (0, toolkit_1.createSelector)((state) => state.tasksCardState, (tasksCardState) => {
6
6
  const { tasks, fetchState } = tasksCardState;
7
- let showCard = fetchState !== 'Completed';
7
+ let showCard = false || fetchState !== 'Completed';
8
8
  let isMulti = false;
9
9
  if (fetchState === 'Completed') {
10
10
  for (const key in tasks) {
@@ -4,7 +4,7 @@ import { RootState } from '../../reducer';
4
4
  import { TopExReport, TopExTimePeriodWithMetaData } from './topExSelectorTypes';
5
5
  import { TopExState } from './topExState';
6
6
  export declare const getTopExpenses: (accountState: AccountState, topExState: TopExState, numberOfExpenses?: number) => {
7
- reportId: "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "billing" | "flux_analysis_operating_expense" | "account_reconciliation";
7
+ reportId: "billing" | "cash_balance" | "card_balance" | "expense_automation_card" | "operating_expenses" | "operating_expenses_by_classes" | "revenue" | "revenue_by_classes" | "net_burn_or_income" | "net_burn_or_income_story_card" | "net_burn_or_income_by_classes" | "cash_position" | "top_expenses" | "profit_and_loss" | "profit_and_loss_by_classes" | "balance_sheet" | "cash_flow" | "dashboard" | "finance_statement" | "transaction_list_of_account" | "transaction_list_missing_receipt" | "transaction_list_of_account_by_class" | "transaction_detail" | "cash_in_cash_out" | "insights_dashboard" | "company_details" | "class_list" | "account_list" | "account_list_by_type" | "vendor" | "task_card" | "bill_pay" | "reimbursement" | "bill_pay_card" | "reimbursement_card" | "bill_pay_promo_card" | "zeni_accounts" | "zeni_accounts_promo_card" | "charge_cards" | "reimbursement_promo_card" | "onboarding" | "operating_expenses_by_vendor" | "operating_expenses_by_vendor_summary" | "vendors_tab" | "accounts_payable_aging" | "accounts_receivable_aging" | "vendor_global_review" | "prepaid_expenses" | "fixed_assets" | "notification" | "rewards_card" | "flux_analysis_operating_expense";
8
8
  reportTitle: string;
9
9
  version: string | number | undefined;
10
10
  status: import("../..").Status | undefined;
@@ -24,13 +24,13 @@ export declare const getTopExpenses: (accountState: AccountState, topExState: To
24
24
  accountType: "cash_position" | "fixed_assets" | "bank" | "credit_card" | "expenses" | "cogs" | "income" | "cash_in" | "cash_out" | "other_income" | "other_expense" | "accounts_receivable" | "other_current_assets" | "other_assets" | "accounts_payable" | "other_current_liabilities" | "long_term_liabilities" | "equity" | "current_liabilities" | "current_assets" | undefined;
25
25
  accountSubType: string | undefined;
26
26
  accountDescription: string;
27
- logo: import("url-parse")<Record<string, string | undefined>> | import("url-parse")<string> | undefined;
27
+ logo: import("url-parse")<string> | import("url-parse")<Record<string, string | undefined>> | undefined;
28
28
  balance: import("../..").Balance;
29
29
  }[];
30
30
  };
31
31
  allTimePeriods: TopExTimePeriodWithMetaData[];
32
32
  dataAvailable: import("../..").TimeframeTick | undefined;
33
- firstMonthOfFY: 1 | 3 | 12 | 2 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11;
33
+ firstMonthOfFY: 2 | 1 | 3 | 4 | 8 | 5 | 6 | 10 | 7 | 12 | 11 | 9;
34
34
  downloadState: import("../..").FetchState;
35
35
  };
36
36
  export declare const getTop6Expenses: (state: RootState) => TopExReport;
@@ -2,6 +2,8 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isAccountUncategorized = exports.isTransactionUncategorized = exports.isTransactionMiscategorized = exports.toRecommendedClassBase = exports.toRecommendedAccountBase = exports.toTransactionUpdatesFromTransactionDetailLocalData = void 0;
4
4
  const recommendationBase_1 = require("../../../commonStateTypes/recommendationBase");
5
+ const entity_1 = require("../../../entity/genericEntity/entity");
6
+ const customerTransaction_1 = require("../../../entity/transaction/stateTypes/customerTransaction");
5
7
  const transactionType_1 = require("../../../entity/transaction/stateTypes/transactionType");
6
8
  const vendorTransaction_1 = require("../../../entity/transaction/stateTypes/vendorTransaction");
7
9
  const recommendationState_1 = require("../../recommendation/recommendationState");
@@ -23,7 +25,7 @@ const recommendationState_1 = require("../../recommendation/recommendationState"
23
25
  * additionally fire “Mark as not miscat” for every point above.
24
26
  */
25
27
  const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLocalData, transaction, isExpenseAutomationEnabled) => {
26
- var _a, _b;
28
+ var _a, _b, _c;
27
29
  const updates = {
28
30
  updatesByLineId: {},
29
31
  };
@@ -31,28 +33,21 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
31
33
  const entityUpdates = {};
32
34
  const isTransactionMisCategorized = (0, exports.isTransactionMiscategorized)(transaction, isExpenseAutomationEnabled);
33
35
  updates.memo = transactionDetailLocalData.memo;
34
- const selectedEntity = transactionDetailLocalData.selectedEntity;
35
36
  const updatedEntityId = transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor ===
36
37
  true
37
38
  ? (_a = transactionDetailLocalData.vendorUpdates) === null || _a === void 0 ? void 0 : _a.qboId
38
39
  : undefined;
39
- if ((0, vendorTransaction_1.isVendorTransaction)(transaction) &&
40
- selectedEntity != null &&
41
- selectedEntity.type === 'vendor') {
42
- updates.vendorId = selectedEntity.id;
43
- }
44
- if ((0, vendorTransaction_1.isVendorTransaction)(transaction) &&
45
- selectedEntity != null &&
46
- selectedEntity.type === 'customer') {
47
- updates.customerId = selectedEntity.id;
40
+ if ((0, vendorTransaction_1.isVendorTransaction)(transaction)) {
41
+ updates.vendorId = (_b = transactionDetailLocalData.vendorUpdates) === null || _b === void 0 ? void 0 : _b.id;
48
42
  }
49
43
  let isBulkUpdate = false;
44
+ const entity = getEntityFromTransaction(transaction);
50
45
  let lastUpdatedCategory;
51
46
  let lastUpdatedClass;
52
47
  // single recommendation to just pick the last recommendation in the list of lines
53
- (_b = transaction.lines) === null || _b === void 0 ? void 0 : _b.forEach((line) => {
48
+ (_c = transaction.lines) === null || _c === void 0 ? void 0 : _c.forEach((line) => {
54
49
  var _a, _b, _c, _d, _e, _f;
55
- const entityDetails = getEntityDetails(selectedEntity, transactionDetailLocalData.lineItemById[line.id], transactionDetailLocalData.vendorUpdates, transactionDetailLocalData.customerUpdates);
50
+ const entityDetails = getEntityDetails(entity, transactionDetailLocalData.lineItemById[line.id], transactionDetailLocalData.vendorUpdates);
56
51
  if (line.type === 'transaction_with_account_and_class_line' ||
57
52
  line.type === 'transaction_with_product_or_service_line' ||
58
53
  line.type === 'journal_entry_transaction_line') {
@@ -65,14 +60,7 @@ const toTransactionUpdatesFromTransactionDetailLocalData = (transactionDetailLoc
65
60
  };
66
61
  if (line.type === 'journal_entry_transaction_line' ||
67
62
  line.platformLineDetailType === 'deposit_line_detail') {
68
- const currentSelectedEntityLine = lineItem.lineEntity;
69
- updatesByLineId[line.id] = Object.assign(Object.assign({}, updatesByLineId[line.id]), { customer: currentSelectedEntityLine != null &&
70
- currentSelectedEntityLine.type === 'customer'
71
- ? lineItem.customer
72
- : undefined, vendor: currentSelectedEntityLine != null &&
73
- currentSelectedEntityLine.type === 'vendor'
74
- ? lineItem.vendor
75
- : undefined });
63
+ updatesByLineId[line.id] = Object.assign(Object.assign({}, updatesByLineId[line.id]), getVendorOrCustomerDetails(lineItem));
76
64
  }
77
65
  let hasCategoryChanged = false;
78
66
  let hasClassChanged = false;
@@ -199,22 +187,49 @@ const toRecommendedClassBase = (amountValue, classBase, recommendationBase) => {
199
187
  }
200
188
  };
201
189
  exports.toRecommendedClassBase = toRecommendedClassBase;
202
- // const getVendorOrCustomerDetails = (
203
- // lineItem: TransactionDetailLineItemData
204
- // ) => {
205
- // if (lineItem.lineEntity != null) {
206
- // const lineEntity = lineItem.lineEntity;
207
- // const type = lineItem.vendor != null ? 'vendor' : 'customer';
208
- // return {
209
- // [type]: {
210
- // name: lineEntity?.name,
211
- // id: lineEntity?.qboId ?? lineEntity?.id, // For vendor we don't have qbo_id in VendorBase so using id instead
212
- // },
213
- // };
214
- // }
215
- // return {};
216
- // };
217
- const getEntityDetails = (entity, lineItemLocalData, vendorUpdates, customerUpdates) => {
190
+ const getVendorOrCustomerDetails = (lineItem) => {
191
+ var _a;
192
+ if (lineItem.lineEntity != null) {
193
+ const lineEntity = lineItem.lineEntity;
194
+ const type = lineItem.vendor != null ? 'vendor' : 'customer';
195
+ return {
196
+ [type]: {
197
+ name: lineEntity === null || lineEntity === void 0 ? void 0 : lineEntity.name,
198
+ id: (_a = lineEntity === null || lineEntity === void 0 ? void 0 : lineEntity.qboId) !== null && _a !== void 0 ? _a : lineEntity === null || lineEntity === void 0 ? void 0 : lineEntity.id, // For vendor we don't have qbo_id in VendorBase so using id instead
199
+ },
200
+ };
201
+ }
202
+ return {};
203
+ };
204
+ const getEntityFromTransaction = (transaction) => {
205
+ let entity = undefined;
206
+ if ((0, vendorTransaction_1.isVendorTransaction)(transaction)) {
207
+ const vendorEntity = transaction.vendor;
208
+ if (vendorEntity != null) {
209
+ entity = {
210
+ id: vendorEntity.id,
211
+ name: vendorEntity.name,
212
+ type: (0, entity_1.toEntityType)('vendor'),
213
+ qboId: vendorEntity.id,
214
+ zeniId: vendorEntity.id,
215
+ };
216
+ }
217
+ }
218
+ if ((0, customerTransaction_1.isCustomerTransaction)(transaction)) {
219
+ const customerEntity = transaction.customer;
220
+ if (customerEntity != null) {
221
+ entity = {
222
+ id: customerEntity.id,
223
+ name: customerEntity.name,
224
+ type: (0, entity_1.toEntityType)('customer'),
225
+ qboId: customerEntity.id,
226
+ zeniId: customerEntity.id,
227
+ };
228
+ }
229
+ }
230
+ return entity;
231
+ };
232
+ const getEntityDetails = (entity, lineItemLocalData, vendorUpdates) => {
218
233
  var _a, _b, _c, _d;
219
234
  if (entity != null) {
220
235
  return {
@@ -228,14 +243,6 @@ const getEntityDetails = (entity, lineItemLocalData, vendorUpdates, customerUpda
228
243
  entityType: lineItemLocalData.vendor != null ? 'vendor' : 'customer',
229
244
  };
230
245
  }
231
- if (customerUpdates != null &&
232
- Boolean(customerUpdates.id) === true &&
233
- customerUpdates.id != null) {
234
- return {
235
- entityId: customerUpdates.id,
236
- entityType: 'customer',
237
- };
238
- }
239
246
  if (vendorUpdates != null && vendorUpdates.id != null) {
240
247
  return {
241
248
  entityId: vendorUpdates.id,
@@ -126,12 +126,8 @@ function preparePayload(transactionState, vendorState, transactionDetailState, t
126
126
  const detail = (0, transactionSelector_1.getSupportedTransactionById)(transactionState, transactionDetailKey);
127
127
  const tranDetail = (0, get_1.default)(transactionDetailState.transactionDetailById, transactionDetailKey, undefined);
128
128
  const tranVendorUpdates = tranDetail === null || tranDetail === void 0 ? void 0 : tranDetail.transactionDetailLocalData.vendorUpdates;
129
- const tranCustomerUpdates = tranDetail === null || tranDetail === void 0 ? void 0 : tranDetail.transactionDetailLocalData.customerUpdates;
130
- const currentSelectedEntity = tranDetail === null || tranDetail === void 0 ? void 0 : tranDetail.transactionDetailLocalData.selectedEntity;
131
129
  let vendorUpdates = undefined;
132
- if ((tranVendorUpdates === null || tranVendorUpdates === void 0 ? void 0 : tranVendorUpdates.qboId) != null &&
133
- currentSelectedEntity != null &&
134
- currentSelectedEntity.type === 'vendor') {
130
+ if ((tranVendorUpdates === null || tranVendorUpdates === void 0 ? void 0 : tranVendorUpdates.qboId) != null) {
135
131
  const vendor = (0, vendorSelector_1.getVendorByVendorId)(vendorState, tranVendorUpdates.qboId);
136
132
  if (vendor != null) {
137
133
  vendorUpdates = {
@@ -146,17 +142,8 @@ function preparePayload(transactionState, vendorState, transactionDetailState, t
146
142
  };
147
143
  }
148
144
  }
149
- let customerUpdates = undefined;
150
- if ((tranCustomerUpdates === null || tranCustomerUpdates === void 0 ? void 0 : tranCustomerUpdates.qboId) != null &&
151
- currentSelectedEntity != null &&
152
- currentSelectedEntity.type === 'customer') {
153
- customerUpdates = {
154
- id: tranCustomerUpdates.qboId,
155
- name: tranCustomerUpdates.name,
156
- };
157
- }
158
145
  if (detail != null) {
159
- const transUpdates = toTransactionUpdatePayload(saveUpdates.updates, detail, vendorUpdates, customerUpdates, currentSelectedEntity);
146
+ const transUpdates = toTransactionUpdatePayload(saveUpdates.updates, detail, vendorUpdates);
160
147
  const entityUpdates = toEntityUpdatePayload(saveUpdates.entityRelatedUpdates);
161
148
  return {
162
149
  entity_related_updates: entityUpdates,
@@ -166,7 +153,7 @@ function preparePayload(transactionState, vendorState, transactionDetailState, t
166
153
  }
167
154
  return undefined;
168
155
  }
169
- const toTransactionUpdatePayload = (updates, detail, vendorUpdates, customerUpdates, tranSelectedEntity) => {
156
+ const toTransactionUpdatePayload = (updates, detail, vendorUpdates) => {
170
157
  var _a, _b;
171
158
  const transaction = Object.assign({}, detail);
172
159
  transaction.memo = (_a = updates.memo) !== null && _a !== void 0 ? _a : '';
@@ -210,12 +197,7 @@ const toTransactionUpdatePayload = (updates, detail, vendorUpdates, customerUpda
210
197
  return (0, customerTransactionPayload_1.toCustomerTransactionPayload)(transaction);
211
198
  }
212
199
  else if ((0, vendorTransaction_1.isVendorTransaction)(transaction)) {
213
- if (tranSelectedEntity != null && tranSelectedEntity.type === 'customer') {
214
- return (0, vendorTransactionPayload_1.toVendorTransactionWithCustomerPayload)(transaction, customerUpdates);
215
- }
216
- else {
217
- return (0, vendorTransactionPayload_1.toVendorTransactionPayload)(transaction, vendorUpdates);
218
- }
200
+ return (0, vendorTransactionPayload_1.toVendorTransactionPayload)(transaction, vendorUpdates);
219
201
  }
220
202
  else if ((0, otherTransaction_1.isTransferTransaction)(transaction)) {
221
203
  return (0, otherTransactionPayload_1.toTransferTransactionPayload)(transaction);
@@ -6,75 +6,23 @@ const customerTransaction_1 = require("../../entity/transaction/stateTypes/custo
6
6
  const vendorTransaction_1 = require("../../entity/transaction/stateTypes/vendorTransaction");
7
7
  const transactionDetailState_1 = require("./transactionDetailState");
8
8
  const toTransactionDetailLocalData = (transaction, vendorId, uncategorizedIncomeExpense) => {
9
- var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
9
+ var _a, _b, _c, _d, _e, _f, _g;
10
10
  const transactionLocal = Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData);
11
- const customerId = (_a = transaction.customer) === null || _a === void 0 ? void 0 : _a.id;
12
11
  transactionLocal.memo = transaction.memo;
13
12
  transactionLocal.vendorUpdates =
14
13
  (0, vendorTransaction_1.isVendorTransaction)(transaction) && vendorId != null
15
14
  ? {
16
15
  id: vendorId,
17
- name: (_c = (_b = transaction.vendor) === null || _b === void 0 ? void 0 : _b.name) !== null && _c !== void 0 ? _c : '',
18
- qboId: (_d = transaction.vendor) === null || _d === void 0 ? void 0 : _d.id,
16
+ name: (_b = (_a = transaction.vendor) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : '',
17
+ qboId: (_c = transaction.vendor) === null || _c === void 0 ? void 0 : _c.id,
19
18
  }
20
19
  : undefined;
21
- transactionLocal.customerUpdates =
22
- (0, vendorTransaction_1.isVendorTransactionWithCustomer)(transaction) && customerId != null
23
- ? {
24
- id: customerId,
25
- name: (_f = (_e = transaction.customer) === null || _e === void 0 ? void 0 : _e.name) !== null && _f !== void 0 ? _f : '',
26
- qboId: (_h = (_g = transaction.customer) === null || _g === void 0 ? void 0 : _g.id) !== null && _h !== void 0 ? _h : '',
27
- }
28
- : undefined;
29
- const vendorName = (_k = (_j = transaction.vendor) === null || _j === void 0 ? void 0 : _j.name) !== null && _k !== void 0 ? _k : '';
30
- const customerName = (_m = (_l = transaction.customer) === null || _l === void 0 ? void 0 : _l.name) !== null && _m !== void 0 ? _m : '';
31
- if ((0, vendorTransaction_1.isVendorTransactionWithCustomer)(transaction) === true &&
32
- customerId != null &&
33
- customerName != null &&
34
- Boolean(customerName) === true) {
35
- transactionLocal.selectedEntity = {
36
- id: customerId,
37
- name: customerName,
38
- type: (0, entity_1.toEntityType)('customer'),
39
- qboId: customerId,
40
- zeniId: customerId,
41
- };
42
- }
43
- else if ((0, vendorTransaction_1.isVendorTransaction)(transaction) === true &&
44
- vendorId != null &&
45
- vendorName &&
46
- Boolean(vendorName) === true) {
47
- transactionLocal.selectedEntity = {
48
- id: vendorId,
49
- name: vendorName,
50
- type: (0, entity_1.toEntityType)('vendor'),
51
- qboId: vendorId,
52
- zeniId: vendorId,
53
- };
54
- }
55
- else {
56
- transactionLocal.selectedEntity = undefined;
57
- }
58
20
  transactionLocal.vendorDetails =
59
- (0, vendorTransaction_1.isVendorTransaction)(transaction) &&
60
- vendorId != null &&
61
- vendorName != null &&
62
- Boolean(vendorName) === true
21
+ (0, vendorTransaction_1.isVendorTransaction)(transaction) && vendorId != null
63
22
  ? {
64
23
  id: vendorId,
65
- qboId: vendorId,
66
- name: vendorName,
67
- }
68
- : undefined;
69
- transactionLocal.customerDetails =
70
- (0, vendorTransaction_1.isVendorTransactionWithCustomer)(transaction) &&
71
- customerId != null &&
72
- customerName != null &&
73
- Boolean(customerName) === true
74
- ? {
75
- id: customerId,
76
- qboId: customerId,
77
- name: customerName,
24
+ qboId: (_e = (_d = transaction.vendor) === null || _d === void 0 ? void 0 : _d.id) !== null && _e !== void 0 ? _e : '',
25
+ name: (_g = (_f = transaction.vendor) === null || _f === void 0 ? void 0 : _f.name) !== null && _g !== void 0 ? _g : '',
78
26
  }
79
27
  : undefined;
80
28
  transactionLocal.lineItemById =
@@ -102,7 +50,6 @@ const buildLineItemById = (transaction, uncategorizedIncomeExpense, recommendati
102
50
  ? line.vendor != null ||
103
51
  line.customer != null
104
52
  : transaction.vendor != null ||
105
- transaction.customer != null ||
106
53
  transaction.customer != null;
107
54
  record.account = accountLine.account;
108
55
  record.class = accountLine.class;
@@ -377,7 +324,7 @@ const toUpdateLineItemsOriginalCategoryClass = (transaction, transactionDetailLo
377
324
  }
378
325
  });
379
326
  }
380
- const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, customerDetails: transactionDetailLocalData.customerDetails, customerUpdates: transactionDetailLocalData.customerUpdates, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity, selectedEntity: transactionDetailLocalData.selectedEntity });
327
+ const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity });
381
328
  return newLocalData;
382
329
  };
383
330
  exports.toUpdateLineItemsOriginalCategoryClass = toUpdateLineItemsOriginalCategoryClass;
@@ -465,7 +412,7 @@ const toSetAllLineItemsToCategoryClass = (transaction, transactionDetailLocalDat
465
412
  }
466
413
  });
467
414
  }
468
- const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, customerUpdates: transactionDetailLocalData.customerUpdates, customerDetails: transactionDetailLocalData.customerDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity, selectedEntity: transactionDetailLocalData.selectedEntity });
415
+ const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity });
469
416
  return newLocalData;
470
417
  };
471
418
  exports.toSetAllLineItemsToCategoryClass = toSetAllLineItemsToCategoryClass;
@@ -491,7 +438,7 @@ const toSetAllLineItemsLocalDataIsUpdateAllChecked = (transaction, transactionDe
491
438
  }
492
439
  });
493
440
  }
494
- const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, customerUpdates: transactionDetailLocalData.customerUpdates, customerDetails: transactionDetailLocalData.customerDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity, selectedEntity: transactionDetailLocalData.selectedEntity });
441
+ const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity });
495
442
  return newLocalData;
496
443
  };
497
444
  exports.toSetAllLineItemsLocalDataIsUpdateAllChecked = toSetAllLineItemsLocalDataIsUpdateAllChecked;
@@ -613,7 +560,7 @@ const setEntityRecommendationForLineIdInLocalData = (transaction, transactionDet
613
560
  newLineItems[matchingEntityLineId] = Object.assign(Object.assign({}, newLineItem), { isUpdateAllChecked: true, isCategoryUpdateSelected: matchingRecord.isCategoryUpdateSelected, isClassUpdateSelected: matchingRecord.isClassUpdateSelected, isRecommendedCategorySelected: matchingRecord.isRecommendedCategorySelected, isRecommendedClassSelected: matchingRecord.isRecommendedClassSelected, isRetainedCategorySelected: matchingRecord.isRetainedCategorySelected, isRetainedClassSelected: matchingRecord.isRetainedCategorySelected, class: matchingRecord.class, account: matchingRecord.account, lineEntity: matchingRecord.lineEntity });
614
561
  }
615
562
  }
616
- const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, customerUpdates: transactionDetailLocalData.customerUpdates, customerDetails: transactionDetailLocalData.customerDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity, vendorBulkUpdateCategoryClassRecommendationsFetchStatus: transactionDetailLocalData.vendorBulkUpdateCategoryClassRecommendationsFetchStatus, selectedEntity: transactionDetailLocalData.selectedEntity });
563
+ const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorUpdates: transactionDetailLocalData.vendorUpdates, vendorDetails: transactionDetailLocalData.vendorDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity, vendorBulkUpdateCategoryClassRecommendationsFetchStatus: transactionDetailLocalData.vendorBulkUpdateCategoryClassRecommendationsFetchStatus });
617
564
  return newLocalData;
618
565
  };
619
566
  exports.setEntityRecommendationForLineIdInLocalData = setEntityRecommendationForLineIdInLocalData;
@@ -650,7 +597,7 @@ const removeEntityRecommendationForLineIdInLocalData = (transaction, transaction
650
597
  }
651
598
  });
652
599
  }
653
- const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, customerUpdates: transactionDetailLocalData.customerUpdates, customerDetails: transactionDetailLocalData.customerDetails, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity, selectedEntity: transactionDetailLocalData.selectedEntity });
600
+ const newLocalData = Object.assign(Object.assign({}, transactionDetailState_1.initialSupportedTransactionDetail.transactionDetailLocalData), { memo: transactionDetailLocalData.memo, lineItemById: newLineItems, vendorDetails: transactionDetailLocalData.vendorDetails, vendorUpdates: transactionDetailLocalData.vendorUpdates, updatePreviousTransactionsWithUpdatedVendor: transactionDetailLocalData.updatePreviousTransactionsWithUpdatedVendor, isVendorUpdateAllChecked: transactionDetailLocalData.isVendorUpdateAllChecked, latestSelectedEntityOnLineItem: transactionDetailLocalData.latestSelectedEntityOnLineItem, latestUpdatedLineWithEntity: transactionDetailLocalData.latestUpdatedLineWithEntity });
654
601
  return newLocalData;
655
602
  };
656
603
  exports.removeEntityRecommendationForLineIdInLocalData = removeEntityRecommendationForLineIdInLocalData;
@@ -714,12 +661,12 @@ const toSetAllLineItemsToVendor = (transaction, transactionDetailLocalData, enti
714
661
  ? toVendorBaseFromLineEntity(entity)
715
662
  : undefined;
716
663
  if (line.type === 'transaction_with_product_or_service_line') {
717
- const lineRecord = Object.assign(Object.assign({}, transactionDetailLocalData.lineItemById[lineId]), { vendor: record.vendor, customer: record.customer });
664
+ const lineRecord = Object.assign(Object.assign({}, transactionDetailLocalData.lineItemById[lineId]), { vendor: record.vendor });
718
665
  record.item = lineRecord.item;
719
666
  record.lineDetailType = lineRecord.lineDetailType;
720
667
  }
721
668
  if (line.type === 'journal_entry_transaction_line') {
722
- const lineRecord = Object.assign(Object.assign({}, transactionDetailLocalData.lineItemById[lineId]), { vendor: record.vendor, customer: record.customer });
669
+ const lineRecord = Object.assign(Object.assign({}, transactionDetailLocalData.lineItemById[lineId]), { vendor: record.vendor });
723
670
  record.lineTransactionType = lineRecord.lineTransactionType;
724
671
  record.postingType = lineRecord.postingType;
725
672
  record.postingTypeName = lineRecord.postingTypeName;
@@ -63,18 +63,17 @@ export declare const downloadAccountingProviderAttachment: import("@reduxjs/tool
63
63
  }, "transactionDetail/saveTransactionDetail">, initializeTransactionDetailLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
64
64
  transactionId: TransactionID;
65
65
  vendorId?: ID;
66
- customerId?: ID;
67
66
  }, "transactionDetail/initializeTransactionDetailLocalData">, saveTransactionDetailLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
68
67
  transactionId: TransactionID;
69
68
  transactionLocalData: TransactionDetailLocalData;
70
69
  }, "transactionDetail/saveTransactionDetailLocalData">, clearTransactionDetailLocalData: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
71
70
  transactionId: TransactionID;
72
- }, "transactionDetail/clearTransactionDetailLocalData">, resetLineItemsCategoryClassInLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, transaction: SupportedTransaction, lineIdsForReplace: string[], lineIdsForUpdateAll: string[], replace: "account" | "class" | "both", updateAll?: boolean | undefined], {
71
+ }, "transactionDetail/clearTransactionDetailLocalData">, resetLineItemsCategoryClassInLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, transaction: SupportedTransaction, lineIdsForReplace: string[], lineIdsForUpdateAll: string[], replace: "both" | "class" | "account", updateAll?: boolean | undefined], {
73
72
  transactionId: TransactionID;
74
73
  transaction: SupportedTransaction;
75
74
  lineIdsForReplace: string[];
76
75
  lineIdsForUpdateAll: string[];
77
- replace: "account" | "class" | "both";
76
+ replace: "both" | "class" | "account";
78
77
  updateAll: boolean | undefined;
79
78
  }, "transactionDetail/resetLineItemsCategoryClassInLocalData", never, never>, setAllLineItemsToCategoryClassInLocalData: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, transaction: SupportedTransaction, isUpdateAll: boolean, chosenAccount?: {
80
79
  account: AccountBase;
@@ -116,18 +115,10 @@ export declare const downloadAccountingProviderAttachment: import("@reduxjs/tool
116
115
  }, "transactionDetail/removeEntityRecommendationForLineIdForTransactionDetail", never, never>, updateSelectedVendor: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
117
116
  transactionId: TransactionID;
118
117
  vendorUpdates: TransactionVendorUpdates;
119
- entity?: Entity;
120
118
  resetRecommendations?: boolean;
121
- }, "transactionDetail/updateSelectedVendor">, updateSelectedCustomer: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
119
+ }, "transactionDetail/updateSelectedVendor">, resetVendor: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
122
120
  transactionId: TransactionID;
123
- customerUpdates: TransactionVendorUpdates;
124
- entity?: Entity;
125
- resetRecommendations?: boolean;
126
- }, "transactionDetail/updateSelectedCustomer">, resetVendor: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
127
- transactionId: TransactionID;
128
- }, "transactionDetail/resetVendor">, resetSelectedCustomer: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
129
- transactionId: TransactionID;
130
- }, "transactionDetail/resetSelectedCustomer">, updateLocalDataWithTransactionsUpdateWithVendorCheckbox: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
121
+ }, "transactionDetail/resetVendor">, updateLocalDataWithTransactionsUpdateWithVendorCheckbox: import("@reduxjs/toolkit").ActionCreatorWithPayload<{
131
122
  transactionId: TransactionID;
132
123
  isUpdateEnabled: boolean;
133
124
  }, "transactionDetail/updateLocalDataWithTransactionsUpdateWithVendorCheckbox">, updateVendorToAllLineItems: import("@reduxjs/toolkit").ActionCreatorWithPreparedPayload<[transactionId: TransactionID, transaction: SupportedTransaction, entity: Entity], {
@@ -4,10 +4,9 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  var _a;
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
- exports.setIsVendorUpdateAllChecked = exports.updateVendorBulkRecommendationsFetchStatus = exports.updateLatestSelectedEntity = exports.resetAllLineItemsToVendor = exports.updateVendorToAllLineItems = exports.updateLocalDataWithTransactionsUpdateWithVendorCheckbox = exports.resetSelectedCustomer = exports.resetVendor = exports.updateSelectedCustomer = exports.updateSelectedVendor = exports.removeEntityRecommendationForLineIdForTransactionDetail = exports.setEntityRecommendationForLineIdsForTransactionDetail = exports.setAllLineItemsLocalDataIsUpdateAllChecked = exports.setAllLineItemsToCategoryClassInLocalData = exports.resetLineItemsCategoryClassInLocalData = exports.clearTransactionDetailLocalData = exports.saveTransactionDetailLocalData = exports.initializeTransactionDetailLocalData = exports.saveTransactionDetail = exports.updateTransactionStateIfUpdateActionNotAllowed = exports.updateStatusConsolidatedSaveTransactionDetail = exports.updateStatusForTransactionNotMiscategorizedUpdate = exports.deleteTransactionAttachmentSuccess = exports.deleteTransactionAttachmentFailure = exports.deleteTransactionAttachment = exports.markTransactionAsNotMiscategorized = exports.clearTransactionDetailSaveStatus = exports.updateTransactionDetailSaveStatus = exports.updateTransactionDetail = exports.uploadMissingAttachmentSuccess = exports.clearTransactionDetail = exports.removeTransactionDetail = exports.updateTransactionDetailFetchState = exports.fetchTransactionDetail = exports.downloadAccountingProviderAttachmentFailure = exports.downloadAccountingProviderAttachmentSuccess = exports.downloadAccountingProviderAttachment = exports.initialState = void 0;
7
+ exports.setIsVendorUpdateAllChecked = exports.updateVendorBulkRecommendationsFetchStatus = exports.updateLatestSelectedEntity = exports.resetAllLineItemsToVendor = exports.updateVendorToAllLineItems = exports.updateLocalDataWithTransactionsUpdateWithVendorCheckbox = exports.resetVendor = exports.updateSelectedVendor = exports.removeEntityRecommendationForLineIdForTransactionDetail = exports.setEntityRecommendationForLineIdsForTransactionDetail = exports.setAllLineItemsLocalDataIsUpdateAllChecked = exports.setAllLineItemsToCategoryClassInLocalData = exports.resetLineItemsCategoryClassInLocalData = exports.clearTransactionDetailLocalData = exports.saveTransactionDetailLocalData = exports.initializeTransactionDetailLocalData = exports.saveTransactionDetail = exports.updateTransactionStateIfUpdateActionNotAllowed = exports.updateStatusConsolidatedSaveTransactionDetail = exports.updateStatusForTransactionNotMiscategorizedUpdate = exports.deleteTransactionAttachmentSuccess = exports.deleteTransactionAttachmentFailure = exports.deleteTransactionAttachment = exports.markTransactionAsNotMiscategorized = exports.clearTransactionDetailSaveStatus = exports.updateTransactionDetailSaveStatus = exports.updateTransactionDetail = exports.uploadMissingAttachmentSuccess = exports.clearTransactionDetail = exports.removeTransactionDetail = exports.updateTransactionDetailFetchState = exports.fetchTransactionDetail = exports.downloadAccountingProviderAttachmentFailure = exports.downloadAccountingProviderAttachmentSuccess = exports.downloadAccountingProviderAttachment = exports.initialState = void 0;
8
8
  const toolkit_1 = require("@reduxjs/toolkit");
9
9
  const get_1 = __importDefault(require("lodash/get"));
10
- const entity_1 = require("../../entity/genericEntity/entity");
11
10
  const transactionDetailLocalDataHelper_1 = require("./transactionDetailLocalDataHelper");
12
11
  const transactionDetailState_1 = require("./transactionDetailState");
13
12
  exports.initialState = {
@@ -338,32 +337,35 @@ const transactionDetail = (0, toolkit_1.createSlice)({
338
337
  };
339
338
  },
340
339
  },
341
- updateSelectedCustomer(draft, action) {
342
- const key = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
343
- const detail = (0, get_1.default)(draft.transactionDetailById, key, undefined);
344
- if (detail != null) {
345
- draft.transactionDetailById[key] = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: getUpdatedEntityLocalData(detail.transactionDetailLocalData, action.payload.customerUpdates, action.payload.entity, action.payload.resetRecommendations, 'customer') });
346
- }
347
- },
348
- resetSelectedCustomer(draft, action) {
349
- const key = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
350
- const detail = (0, get_1.default)(draft.transactionDetailById, key, undefined);
351
- if (detail != null) {
352
- draft.transactionDetailById[key] = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: getResetEntityLocalData(detail.transactionDetailLocalData, 'customer') });
353
- }
354
- },
355
340
  updateSelectedVendor(draft, action) {
356
341
  const key = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
357
342
  const detail = (0, get_1.default)(draft.transactionDetailById, key, undefined);
358
343
  if (detail != null) {
359
- draft.transactionDetailById[key] = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: getUpdatedEntityLocalData(detail.transactionDetailLocalData, action.payload.vendorUpdates, action.payload.entity, action.payload.resetRecommendations, 'vendor') });
344
+ const transactionDetailLocalData = Object.assign(Object.assign({}, detail.transactionDetailLocalData), { vendorUpdates: {
345
+ name: action.payload.vendorUpdates.name,
346
+ id: action.payload.vendorUpdates.id,
347
+ qboId: action.payload.vendorUpdates.qboId,
348
+ } });
349
+ // on creation success, we have to reset the recommendations
350
+ if (action.payload.resetRecommendations === true) {
351
+ for (const key in transactionDetailLocalData.lineItemById) {
352
+ transactionDetailLocalData.lineItemById[key].recommendedAccount =
353
+ undefined;
354
+ transactionDetailLocalData.lineItemById[key].recommendedClass =
355
+ undefined;
356
+ }
357
+ }
358
+ const transactionDetails = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: transactionDetailLocalData });
359
+ draft.transactionDetailById[key] = transactionDetails;
360
360
  }
361
361
  },
362
362
  resetVendor(draft, action) {
363
363
  const key = (0, transactionDetailState_1.getTransactionDetailKey)(action.payload.transactionId);
364
364
  const detail = (0, get_1.default)(draft.transactionDetailById, key, undefined);
365
365
  if (detail != null) {
366
- draft.transactionDetailById[key] = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: getResetEntityLocalData(detail.transactionDetailLocalData, 'vendor') });
366
+ const transactionDetailLocalData = Object.assign(Object.assign({}, detail.transactionDetailLocalData), { vendorUpdates: detail.transactionDetailLocalData.vendorDetails, updatePreviousTransactionsWithUpdatedVendor: false });
367
+ const transactionDetails = Object.assign(Object.assign({}, detail), { transactionDetailLocalData: transactionDetailLocalData });
368
+ draft.transactionDetailById[key] = transactionDetails;
367
369
  }
368
370
  },
369
371
  updateLocalDataWithTransactionsUpdateWithVendorCheckbox(draft, action) {
@@ -525,37 +527,5 @@ const transactionDetail = (0, toolkit_1.createSlice)({
525
527
  },
526
528
  },
527
529
  });
528
- _a = transactionDetail.actions, exports.downloadAccountingProviderAttachment = _a.downloadAccountingProviderAttachment, exports.downloadAccountingProviderAttachmentSuccess = _a.downloadAccountingProviderAttachmentSuccess, exports.downloadAccountingProviderAttachmentFailure = _a.downloadAccountingProviderAttachmentFailure, exports.fetchTransactionDetail = _a.fetchTransactionDetail, exports.updateTransactionDetailFetchState = _a.updateTransactionDetailFetchState, exports.removeTransactionDetail = _a.removeTransactionDetail, exports.clearTransactionDetail = _a.clearTransactionDetail, exports.uploadMissingAttachmentSuccess = _a.uploadMissingAttachmentSuccess, exports.updateTransactionDetail = _a.updateTransactionDetail, exports.updateTransactionDetailSaveStatus = _a.updateTransactionDetailSaveStatus, exports.clearTransactionDetailSaveStatus = _a.clearTransactionDetailSaveStatus, exports.markTransactionAsNotMiscategorized = _a.markTransactionAsNotMiscategorized, exports.deleteTransactionAttachment = _a.deleteTransactionAttachment, exports.deleteTransactionAttachmentFailure = _a.deleteTransactionAttachmentFailure, exports.deleteTransactionAttachmentSuccess = _a.deleteTransactionAttachmentSuccess, exports.updateStatusForTransactionNotMiscategorizedUpdate = _a.updateStatusForTransactionNotMiscategorizedUpdate, exports.updateStatusConsolidatedSaveTransactionDetail = _a.updateStatusConsolidatedSaveTransactionDetail, exports.updateTransactionStateIfUpdateActionNotAllowed = _a.updateTransactionStateIfUpdateActionNotAllowed, exports.saveTransactionDetail = _a.saveTransactionDetail, exports.initializeTransactionDetailLocalData = _a.initializeTransactionDetailLocalData, exports.saveTransactionDetailLocalData = _a.saveTransactionDetailLocalData, exports.clearTransactionDetailLocalData = _a.clearTransactionDetailLocalData, exports.resetLineItemsCategoryClassInLocalData = _a.resetLineItemsCategoryClassInLocalData, exports.setAllLineItemsToCategoryClassInLocalData = _a.setAllLineItemsToCategoryClassInLocalData, exports.setAllLineItemsLocalDataIsUpdateAllChecked = _a.setAllLineItemsLocalDataIsUpdateAllChecked, exports.setEntityRecommendationForLineIdsForTransactionDetail = _a.setEntityRecommendationForLineIdsForTransactionDetail, exports.removeEntityRecommendationForLineIdForTransactionDetail = _a.removeEntityRecommendationForLineIdForTransactionDetail, exports.updateSelectedVendor = _a.updateSelectedVendor, exports.updateSelectedCustomer = _a.updateSelectedCustomer, exports.resetVendor = _a.resetVendor, exports.resetSelectedCustomer = _a.resetSelectedCustomer, exports.updateLocalDataWithTransactionsUpdateWithVendorCheckbox = _a.updateLocalDataWithTransactionsUpdateWithVendorCheckbox, exports.updateVendorToAllLineItems = _a.updateVendorToAllLineItems, exports.resetAllLineItemsToVendor = _a.resetAllLineItemsToVendor, exports.updateLatestSelectedEntity = _a.updateLatestSelectedEntity, exports.updateVendorBulkRecommendationsFetchStatus = _a.updateVendorBulkRecommendationsFetchStatus, exports.setIsVendorUpdateAllChecked = _a.setIsVendorUpdateAllChecked;
530
+ _a = transactionDetail.actions, exports.downloadAccountingProviderAttachment = _a.downloadAccountingProviderAttachment, exports.downloadAccountingProviderAttachmentSuccess = _a.downloadAccountingProviderAttachmentSuccess, exports.downloadAccountingProviderAttachmentFailure = _a.downloadAccountingProviderAttachmentFailure, exports.fetchTransactionDetail = _a.fetchTransactionDetail, exports.updateTransactionDetailFetchState = _a.updateTransactionDetailFetchState, exports.removeTransactionDetail = _a.removeTransactionDetail, exports.clearTransactionDetail = _a.clearTransactionDetail, exports.uploadMissingAttachmentSuccess = _a.uploadMissingAttachmentSuccess, exports.updateTransactionDetail = _a.updateTransactionDetail, exports.updateTransactionDetailSaveStatus = _a.updateTransactionDetailSaveStatus, exports.clearTransactionDetailSaveStatus = _a.clearTransactionDetailSaveStatus, exports.markTransactionAsNotMiscategorized = _a.markTransactionAsNotMiscategorized, exports.deleteTransactionAttachment = _a.deleteTransactionAttachment, exports.deleteTransactionAttachmentFailure = _a.deleteTransactionAttachmentFailure, exports.deleteTransactionAttachmentSuccess = _a.deleteTransactionAttachmentSuccess, exports.updateStatusForTransactionNotMiscategorizedUpdate = _a.updateStatusForTransactionNotMiscategorizedUpdate, exports.updateStatusConsolidatedSaveTransactionDetail = _a.updateStatusConsolidatedSaveTransactionDetail, exports.updateTransactionStateIfUpdateActionNotAllowed = _a.updateTransactionStateIfUpdateActionNotAllowed, exports.saveTransactionDetail = _a.saveTransactionDetail, exports.initializeTransactionDetailLocalData = _a.initializeTransactionDetailLocalData, exports.saveTransactionDetailLocalData = _a.saveTransactionDetailLocalData, exports.clearTransactionDetailLocalData = _a.clearTransactionDetailLocalData, exports.resetLineItemsCategoryClassInLocalData = _a.resetLineItemsCategoryClassInLocalData, exports.setAllLineItemsToCategoryClassInLocalData = _a.setAllLineItemsToCategoryClassInLocalData, exports.setAllLineItemsLocalDataIsUpdateAllChecked = _a.setAllLineItemsLocalDataIsUpdateAllChecked, exports.setEntityRecommendationForLineIdsForTransactionDetail = _a.setEntityRecommendationForLineIdsForTransactionDetail, exports.removeEntityRecommendationForLineIdForTransactionDetail = _a.removeEntityRecommendationForLineIdForTransactionDetail, exports.updateSelectedVendor = _a.updateSelectedVendor, exports.resetVendor = _a.resetVendor, exports.updateLocalDataWithTransactionsUpdateWithVendorCheckbox = _a.updateLocalDataWithTransactionsUpdateWithVendorCheckbox, exports.updateVendorToAllLineItems = _a.updateVendorToAllLineItems, exports.resetAllLineItemsToVendor = _a.resetAllLineItemsToVendor, exports.updateLatestSelectedEntity = _a.updateLatestSelectedEntity, exports.updateVendorBulkRecommendationsFetchStatus = _a.updateVendorBulkRecommendationsFetchStatus, exports.setIsVendorUpdateAllChecked = _a.setIsVendorUpdateAllChecked;
529
531
  exports.default = transactionDetail.reducer;
530
- function getUpdatedEntityLocalData(detail, updates, entity, resetRecommendations, type) {
531
- const key = type === 'customer' ? 'customerUpdates' : 'vendorUpdates';
532
- const transactionDetailLocalData = Object.assign(Object.assign({}, detail), { [key]: {
533
- name: updates.name,
534
- id: updates.id,
535
- qboId: updates.qboId,
536
- }, selectedEntity: entity });
537
- if (resetRecommendations === true) {
538
- for (const key in transactionDetailLocalData.lineItemById) {
539
- transactionDetailLocalData.lineItemById[key].recommendedAccount =
540
- undefined;
541
- transactionDetailLocalData.lineItemById[key].recommendedClass = undefined;
542
- }
543
- }
544
- return transactionDetailLocalData;
545
- }
546
- function getResetEntityLocalData(detail, type) {
547
- const detailsKey = type === 'customer' ? 'customerDetails' : 'vendorDetails';
548
- const updatesKey = type === 'customer' ? 'customerUpdates' : 'vendorUpdates';
549
- const details = detail[detailsKey];
550
- return Object.assign(Object.assign(Object.assign({}, detail), { [updatesKey]: details, selectedEntity: details != null
551
- ? {
552
- id: details.id,
553
- name: details.name,
554
- qboId: details.qboId,
555
- type: (0, entity_1.toEntityType)(type),
556
- zeniId: details.id,
557
- }
558
- : undefined }), (type === 'vendor' && {
559
- updatePreviousTransactionsWithUpdatedVendor: false,
560
- }));
561
- }
@@ -8,9 +8,9 @@ import { Transaction, TransactionID } from '../../entity/transaction/stateTypes/
8
8
  import { VendorBase } from '../../entity/vendor/vendorState';
9
9
  import { EntityRecommendationKey } from '../recommendation/recommendationState';
10
10
  import { TransactionDetailLocalData } from './transactionDetailTypes';
11
- export declare const getTransactionDetailKey: (transactionId: TransactionID) => `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
11
+ export declare const getTransactionDetailKey: (transactionId: TransactionID) => `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
12
12
  export type TransactionDetailKey = ReturnType<typeof getTransactionDetailKey>;
13
- export declare const getZeniTransactionDetailKey: (transactionId: TransactionID) => `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_transfer` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
13
+ export declare const getZeniTransactionDetailKey: (transactionId: TransactionID) => `${string}_transfer` | `${string}_invoice` | `${string}_payment` | `${string}_credit_memo` | `${string}_sales_receipt` | `${string}_delayed_credit` | `${string}_delayed_charge` | `${string}_refund` | `${string}_expense` | `${string}_check` | `${string}_bill` | `${string}_bill_payment` | `${string}_bill_payment_check` | `${string}_bill_payment_credit_card` | `${string}_vendor_credit` | `${string}_credit_card_credit` | `${string}_credit_card_payment` | `${string}_deposit` | `${string}_journal_entry`;
14
14
  export type ZeniTransactionDetailKey = ReturnType<typeof getTransactionDetailKey>;
15
15
  export declare const getThirdPartyIdFromTransactionId: (transactionId: TransactionID) => string;
16
16
  /**
@@ -59,7 +59,6 @@ export interface TransactionUpdates {
59
59
  memo?: string;
60
60
  updatesByLineId: Record<ID, TransactionLineUpdates>;
61
61
  vendorId?: ID;
62
- customerId?: ID;
63
62
  }
64
63
  export interface EntityRelatedRecommendationUpdates {
65
64
  entityId: ID;