mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
fix: filtering accounts list.
This commit is contained in:
@@ -76,11 +76,6 @@ function PaymentMadeFormHeader({
|
||||
},
|
||||
[setFieldValue],
|
||||
);
|
||||
// Filter Payment accounts.
|
||||
const paymentAccounts = useMemo(
|
||||
() => accountsList.filter((a) => a?.type?.key === 'current_asset'),
|
||||
[accountsList],
|
||||
);
|
||||
|
||||
const handleReceiveFullAmountClick = () => {
|
||||
setFieldValue('full_amount', payableFullAmount);
|
||||
@@ -208,11 +203,12 @@ function PaymentMadeFormHeader({
|
||||
}
|
||||
>
|
||||
<AccountsSelectList
|
||||
accounts={paymentAccounts}
|
||||
accounts={accountsList}
|
||||
labelInfo={<FieldRequiredHint />}
|
||||
onAccountSelected={onChangeSelect('payment_account_id')}
|
||||
defaultSelectText={<T id={'select_payment_account'} />}
|
||||
selectedAccountId={values.payment_account_id}
|
||||
filterByTypes={['current_asset']}
|
||||
/>
|
||||
</FormGroup>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user