Skip to content

Commit

Permalink
fix: Advance Wallet changes - should not add company account to payme…
Browse files Browse the repository at this point in the history
…nt mode when advance wallet id is present (#3073)
  • Loading branch information
mvaishnavi committed Jun 13, 2024
1 parent c7bfdb7 commit f7f4f03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/app/core/services/accounts.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ export class AccountsService {
}

//Add current expense account to allowedPaymentModes if it is not present
if (etxn?.source?.account_id) {
if (etxn?.source?.account_id && !etxn?.tx?.advance_wallet_id) {
let paymentModeOfExpense = etxn.source.account_type;
if (etxn.source.account_type === AccountType.PERSONAL && etxn.tx.skip_reimbursement) {
paymentModeOfExpense = AccountType.COMPANY;
Expand Down
1 change: 1 addition & 0 deletions src/app/core/services/org-settings.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,7 @@ export class OrgSettingsService {
advance_wallets_enabled:
incoming.advances_settings &&
incoming.advances_settings.allowed &&
incoming.advances_settings.enabled &&
incoming.advances_settings.advance_wallets_enabled,
},
projects: {
Expand Down

0 comments on commit f7f4f03

Please sign in to comment.