mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 13:20:31 +00:00
fix(GeneralLedger): BIG-373 Issue general ledger report select specific account.
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import React from 'react';
|
||||
import { FormGroup, Classes } from '@blueprintjs/core';
|
||||
import { Classes } from '@blueprintjs/core';
|
||||
import { FormattedMessage as T } from 'components';
|
||||
import classNames from 'classnames';
|
||||
|
||||
import { AccountMultiSelect, Row, Col } from 'components';
|
||||
import { FFormGroup } from '../../../components/Forms';
|
||||
@@ -47,10 +46,10 @@ function GLHeaderGeneralPaneContent() {
|
||||
<Col xs={4}>
|
||||
<FFormGroup
|
||||
label={<T id={'specific_accounts'} />}
|
||||
name={'accounts'}
|
||||
name={'accountsIds'}
|
||||
className={Classes.FILL}
|
||||
>
|
||||
<AccountMultiSelect name="accounts" accounts={accounts} />
|
||||
<AccountMultiSelect name="accountsIds" accounts={accounts} />
|
||||
</FFormGroup>
|
||||
</Col>
|
||||
</Row>
|
||||
|
||||
@@ -32,7 +32,7 @@ export const getDefaultGeneralLedgerQuery = () => {
|
||||
basis: 'accural',
|
||||
filterByOption: 'with-transactions',
|
||||
branchesIds: [],
|
||||
accounts: [],
|
||||
accountsIds: [],
|
||||
};
|
||||
};
|
||||
|
||||
@@ -49,8 +49,9 @@ const parseGeneralLedgerQuery = (locationQuery) => {
|
||||
return {
|
||||
...transformed,
|
||||
|
||||
// Ensures the branches ids is always array.
|
||||
// Ensures the branches, accounts ids is always array.
|
||||
branchesIds: castArray(transformed.branchesIds),
|
||||
accountsIds: castArray(transformed.accountsIds),
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user