Skip to content

Commit 729651c

Browse files
authored
ORV2-4162 Credit Account Fixes (#2173)
1 parent 8ecfee4 commit 729651c

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

frontend/src/features/settings/pages/ViewCreditAccount.tsx

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,12 @@ export const ViewCreditAccount = ({
9494
permissionMatrixFunctionKey:
9595
"VIEW_CREDIT_ACCOUNT_INFO_BANNER_ACCOUNT_HOLDER",
9696
}}
97-
additionalConditionToCheck={() => isAccountHolder}
97+
additionalConditionToCheck={() =>
98+
isAccountHolder &&
99+
(!creditAccount?.isVerified ||
100+
creditAccount?.creditAccountStatusType !==
101+
CREDIT_ACCOUNT_STATUS_TYPE.ACTIVE)
102+
}
98103
/>
99104
</Box>
100105
<RenderIf

vehicles/src/modules/credit-account/credit-account.service.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,6 +1406,7 @@ export class CreditAccountService {
14061406
// If it's a REFUND transaction but the account is not closed, return the account ID
14071407
return creditAccount;
14081408
} else if (
1409+
creditAccount?.company?.isSuspended ||
14091410
// Check if the credit account is not verified, or is not active
14101411
!creditAccount?.isVerified ||
14111412
creditAccount?.creditAccountStatusType !==

0 commit comments

Comments
 (0)