mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
fix: BIG-132 AR/AP aging summary report filter by none transactions/zero contacts.
This commit is contained in:
@@ -17,7 +17,7 @@ import withAPAgingSummaryActions from './withAPAgingSummaryActions';
|
|||||||
import { compose } from 'utils';
|
import { compose } from 'utils';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AP aging summary report.
|
* A/P aging summary report.
|
||||||
*/
|
*/
|
||||||
function APAgingSummary({
|
function APAgingSummary({
|
||||||
// #withSettings
|
// #withSettings
|
||||||
@@ -28,9 +28,10 @@ function APAgingSummary({
|
|||||||
}) {
|
}) {
|
||||||
const [filter, setFilter] = useState({
|
const [filter, setFilter] = useState({
|
||||||
asDate: moment().endOf('day').format('YYYY-MM-DD'),
|
asDate: moment().endOf('day').format('YYYY-MM-DD'),
|
||||||
agingBeforeDays: 30,
|
agingDaysBefore: 30,
|
||||||
agingPeriods: 3,
|
agingPeriods: 3,
|
||||||
vendorsIds: [],
|
vendorsIds: [],
|
||||||
|
filterByOption: 'without-zero-balance',
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle filter submit.
|
// Handle filter submit.
|
||||||
|
|||||||
@@ -49,6 +49,7 @@ function APAgingSummaryHeader({
|
|||||||
agingDaysBefore: 30,
|
agingDaysBefore: 30,
|
||||||
agingPeriods: 3,
|
agingPeriods: 3,
|
||||||
vendorsIds: [],
|
vendorsIds: [],
|
||||||
|
filterByOption: 'without-zero-balance',
|
||||||
};
|
};
|
||||||
// Formik initial values.
|
// Formik initial values.
|
||||||
const initialValues = transformToForm(pageFilter, defaultValues);
|
const initialValues = transformToForm(pageFilter, defaultValues);
|
||||||
@@ -61,10 +62,14 @@ function APAgingSummaryHeader({
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Handle cancel button click.
|
// Handle cancel button click.
|
||||||
const handleCancelClick = () => { toggleFilterDrawerDisplay(false); };
|
const handleCancelClick = () => {
|
||||||
|
toggleFilterDrawerDisplay(false);
|
||||||
|
};
|
||||||
|
|
||||||
// Handle the drawer closing.
|
// Handle the drawer closing.
|
||||||
const handleDrawerClose = () => { toggleFilterDrawerDisplay(false); };
|
const handleDrawerClose = () => {
|
||||||
|
toggleFilterDrawerDisplay(false);
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FinancialStatementHeader
|
<FinancialStatementHeader
|
||||||
|
|||||||
@@ -17,6 +17,8 @@ import {
|
|||||||
FieldHint,
|
FieldHint,
|
||||||
} from 'components';
|
} from 'components';
|
||||||
import { useAPAgingSummaryGeneralContext } from './APAgingSummaryGeneralProvider';
|
import { useAPAgingSummaryGeneralContext } from './APAgingSummaryGeneralProvider';
|
||||||
|
import FinancialStatementsFilter from '../FinancialStatementsFilter';
|
||||||
|
import { filterVendorsOptions } from './constants';
|
||||||
import {
|
import {
|
||||||
momentFormatter,
|
momentFormatter,
|
||||||
tansformDateValue,
|
tansformDateValue,
|
||||||
@@ -90,6 +92,15 @@ export default function APAgingSummaryHeaderGeneralContent() {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
|
<Row>
|
||||||
|
<Col xs={5}>
|
||||||
|
<FinancialStatementsFilter
|
||||||
|
items={filterVendorsOptions}
|
||||||
|
label={<T id={'AP_aging_summary.filter_options.label'} />}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={5}>
|
<Col xs={5}>
|
||||||
<Field name={'vendorsIds'}>
|
<Field name={'vendorsIds'}>
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React, { useMemo, createContext, useContext } from 'react';
|
import React, { useMemo, createContext, useContext } from 'react';
|
||||||
|
|
||||||
import FinancialReportPage from '../FinancialReportPage';
|
import FinancialReportPage from '../FinancialReportPage';
|
||||||
import { useAPAgingSummaryReport, useVendors } from 'hooks/query';
|
import { useAPAgingSummaryReport } from '../../../hooks/query';
|
||||||
import { transformFilterFormToQuery } from '../common';
|
import { transformFilterFormToQuery } from '../common';
|
||||||
|
|
||||||
const APAgingSummaryContext = createContext();
|
const APAgingSummaryContext = createContext();
|
||||||
|
|||||||
@@ -0,0 +1,14 @@
|
|||||||
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
|
export const filterVendorsOptions = [
|
||||||
|
{
|
||||||
|
key: 'all-vendors',
|
||||||
|
name: intl.get('AP_aging_summary.filter_vendors.all_vendors'),
|
||||||
|
hint: intl.get('AP_aging_summary.filter_vendors.all_vendors.hint'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'without-zero-balance',
|
||||||
|
name: intl.get('AP_aging_summary.filter_vendors.without_zero_balance'),
|
||||||
|
hint: intl.get('AP_aging_summary.filter_vendors.without_zero_balance.hint'),
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -32,6 +32,7 @@ function ReceivableAgingSummarySheet({
|
|||||||
agingDaysBefore: 30,
|
agingDaysBefore: 30,
|
||||||
agingPeriods: 3,
|
agingPeriods: 3,
|
||||||
customersIds: [],
|
customersIds: [],
|
||||||
|
filterByOption: 'without-zero-balance',
|
||||||
});
|
});
|
||||||
|
|
||||||
// Handle filter submit.
|
// Handle filter submit.
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ function ARAgingSummaryHeader({
|
|||||||
// #withARAgingSummary
|
// #withARAgingSummary
|
||||||
isFilterDrawerOpen,
|
isFilterDrawerOpen,
|
||||||
}) {
|
}) {
|
||||||
|
// Validation schema.
|
||||||
const validationSchema = Yup.object().shape({
|
const validationSchema = Yup.object().shape({
|
||||||
asDate: Yup.date().required().label('asDate'),
|
asDate: Yup.date().required().label('asDate'),
|
||||||
agingDaysBefore: Yup.number()
|
agingDaysBefore: Yup.number()
|
||||||
@@ -46,6 +47,7 @@ function ARAgingSummaryHeader({
|
|||||||
agingDaysBefore: 30,
|
agingDaysBefore: 30,
|
||||||
agingPeriods: 3,
|
agingPeriods: 3,
|
||||||
customersIds: [],
|
customersIds: [],
|
||||||
|
filterByOption: 'without-zero-balance',
|
||||||
};
|
};
|
||||||
// Initial values.
|
// Initial values.
|
||||||
const initialValues = transformToForm(
|
const initialValues = transformToForm(
|
||||||
@@ -67,7 +69,6 @@ function ARAgingSummaryHeader({
|
|||||||
const handleCancelClick = () => {
|
const handleCancelClick = () => {
|
||||||
toggleFilterDrawerDisplay(false);
|
toggleFilterDrawerDisplay(false);
|
||||||
};
|
};
|
||||||
|
|
||||||
// Handle the drawer close.
|
// Handle the drawer close.
|
||||||
const handleDrawerClose = () => {
|
const handleDrawerClose = () => {
|
||||||
toggleFilterDrawerDisplay(false);
|
toggleFilterDrawerDisplay(false);
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ import {
|
|||||||
} from '@blueprintjs/core';
|
} from '@blueprintjs/core';
|
||||||
import classNames from 'classnames';
|
import classNames from 'classnames';
|
||||||
|
|
||||||
|
import FinancialStatementsFilter from '../FinancialStatementsFilter';
|
||||||
import {
|
import {
|
||||||
FormattedMessage as T,
|
FormattedMessage as T,
|
||||||
ContactsMultiSelect,
|
ContactsMultiSelect,
|
||||||
@@ -19,6 +20,7 @@ import {
|
|||||||
} from 'components';
|
} from 'components';
|
||||||
import { momentFormatter } from 'utils';
|
import { momentFormatter } from 'utils';
|
||||||
import { useARAgingSummaryGeneralContext } from './ARAgingSummaryGeneralProvider';
|
import { useARAgingSummaryGeneralContext } from './ARAgingSummaryGeneralProvider';
|
||||||
|
import { filterCustomersOptions } from './constants';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* AR Aging Summary - Drawer Header - General Fields.
|
* AR Aging Summary - Drawer Header - General Fields.
|
||||||
@@ -96,6 +98,16 @@ export default function ARAgingSummaryHeaderGeneralContent() {
|
|||||||
</FastField>
|
</FastField>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
|
<Row>
|
||||||
|
<Col xs={5}>
|
||||||
|
<FinancialStatementsFilter
|
||||||
|
items={filterCustomersOptions}
|
||||||
|
label={<T id={'AR_aging_summary.filter_options.label'} />}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={5}>
|
<Col xs={5}>
|
||||||
<Field name="customersIds">
|
<Field name="customersIds">
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ const ARAgingSummaryContext = createContext();
|
|||||||
* A/R aging summary provider.
|
* A/R aging summary provider.
|
||||||
*/
|
*/
|
||||||
function ARAgingSummaryProvider({ filter, ...props }) {
|
function ARAgingSummaryProvider({ filter, ...props }) {
|
||||||
// Transformes the filter from to the Url query.
|
// Transformes the filter from to the url query.
|
||||||
const query = useMemo(() => transformFilterFormToQuery(filter), [filter]);
|
const query = useMemo(() => transformFilterFormToQuery(filter), [filter]);
|
||||||
|
|
||||||
// A/R aging summary sheet context.
|
// A/R aging summary sheet context.
|
||||||
|
|||||||
@@ -13,8 +13,6 @@ export default function ReceivableAgingSummaryTable({
|
|||||||
// #ownProps
|
// #ownProps
|
||||||
organizationName,
|
organizationName,
|
||||||
}) {
|
}) {
|
||||||
|
|
||||||
|
|
||||||
// AR aging summary report context.
|
// AR aging summary report context.
|
||||||
const { ARAgingSummary, isARAgingLoading } = useARAgingSummaryContext();
|
const { ARAgingSummary, isARAgingLoading } = useARAgingSummaryContext();
|
||||||
|
|
||||||
@@ -23,10 +21,6 @@ export default function ReceivableAgingSummaryTable({
|
|||||||
|
|
||||||
const rowClassNames = (row) => [`row-type--${row.original.rowType}`];
|
const rowClassNames = (row) => [`row-type--${row.original.rowType}`];
|
||||||
|
|
||||||
const handleFetchData = useCallback((...args) => {
|
|
||||||
// onFetchData && onFetchData(...args);
|
|
||||||
}, []);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<FinancialSheet
|
<FinancialSheet
|
||||||
companyName={organizationName}
|
companyName={organizationName}
|
||||||
@@ -40,7 +34,6 @@ export default function ReceivableAgingSummaryTable({
|
|||||||
columns={columns}
|
columns={columns}
|
||||||
data={ARAgingSummary.tableRows}
|
data={ARAgingSummary.tableRows}
|
||||||
rowClassNames={rowClassNames}
|
rowClassNames={rowClassNames}
|
||||||
onFetchData={handleFetchData}
|
|
||||||
noInitialFetch={true}
|
noInitialFetch={true}
|
||||||
sticky={true}
|
sticky={true}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
|
export const filterCustomersOptions = [
|
||||||
|
{
|
||||||
|
key: 'all-customers',
|
||||||
|
name: intl.get('AR_aging_summary.filter_customers.all_customers'),
|
||||||
|
hint: intl.get('AR_aging_summary.filter_customers.all_customers.hint'),
|
||||||
|
},
|
||||||
|
{
|
||||||
|
key: 'without-zero-balance',
|
||||||
|
name: intl.get('AR_aging_summary.filter_customers.without_zero_balance'),
|
||||||
|
hint: intl.get(
|
||||||
|
'AR_aging_summary.filter_customers.without_zero_balance.hint',
|
||||||
|
),
|
||||||
|
},
|
||||||
|
];
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { Row, Col } from '../../../components';
|
||||||
|
|
||||||
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
||||||
import SelectDisplayColumnsBy from '../SelectDisplayColumnsBy';
|
import SelectDisplayColumnsBy from '../SelectDisplayColumnsBy';
|
||||||
import RadiosAccountingBasis from '../RadiosAccountingBasis';
|
import RadiosAccountingBasis from '../RadiosAccountingBasis';
|
||||||
@@ -12,9 +15,12 @@ export default function BalanceSheetHeaderGeneralTab({}) {
|
|||||||
<div>
|
<div>
|
||||||
<FinancialStatementDateRange />
|
<FinancialStatementDateRange />
|
||||||
<SelectDisplayColumnsBy />
|
<SelectDisplayColumnsBy />
|
||||||
<FinancialStatementsFilter
|
|
||||||
initialSelectedItem={'all-accounts'}
|
<Row>
|
||||||
/>
|
<Col xs={4}>
|
||||||
|
<FinancialStatementsFilter initialSelectedItem={'all-accounts'} />
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
<RadiosAccountingBasis key={'basis'} />
|
<RadiosAccountingBasis key={'basis'} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { Row, Col } from '../../../components';
|
||||||
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
||||||
import FinancialStatementsFilter from '../FinancialStatementsFilter';
|
import FinancialStatementsFilter from '../FinancialStatementsFilter';
|
||||||
import RadiosAccountingBasis from '../RadiosAccountingBasis';
|
import RadiosAccountingBasis from '../RadiosAccountingBasis';
|
||||||
@@ -13,7 +15,14 @@ export default function CashFlowStatementHeaderGeneralPanel() {
|
|||||||
<div>
|
<div>
|
||||||
<FinancialStatementDateRange />
|
<FinancialStatementDateRange />
|
||||||
<SelectDisplayColumnsBy />
|
<SelectDisplayColumnsBy />
|
||||||
<FinancialStatementsFilter initialSelectedItem={'with-transactions'} />
|
|
||||||
|
<Row>
|
||||||
|
<Col xs={4}>
|
||||||
|
<FinancialStatementsFilter
|
||||||
|
initialSelectedItem={'with-transactions'}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
<RadiosAccountingBasis key={'basis'} />
|
<RadiosAccountingBasis key={'basis'} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -68,11 +68,15 @@ export default function CustomersBalanceSummaryGeneralPanelContent() {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<FinancialStatementsFilter
|
<Row>
|
||||||
items={filterCustomersOptions}
|
<Col xs={5}>
|
||||||
label={<T id={'customers.label_filter_customers'} />}
|
<FinancialStatementsFilter
|
||||||
initialSelectedItem={'with-transactions'}
|
items={filterCustomersOptions}
|
||||||
/>
|
label={<T id={'customers.label_filter_customers'} />}
|
||||||
|
initialSelectedItem={'with-transactions'}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={5}>
|
<Col xs={5}>
|
||||||
|
|||||||
@@ -37,13 +37,19 @@ function CustomersTransactionsHeaderGeneralPanelContent() {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<FinancialStatementDateRange />
|
<FinancialStatementDateRange />
|
||||||
<FinancialStatementsFilter
|
|
||||||
items={filterCustomersOptions}
|
|
||||||
label={<T id={'customers.label_filter_customers'} />}
|
|
||||||
initialSelectedItem={'with-transactions'}
|
|
||||||
/>
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={5}>
|
<Col xs={4}>
|
||||||
|
<FinancialStatementsFilter
|
||||||
|
items={filterCustomersOptions}
|
||||||
|
label={<T id={'customers.label_filter_customers'} />}
|
||||||
|
initialSelectedItem={'with-transactions'}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
<Row>
|
||||||
|
<Col xs={4}>
|
||||||
<Field name={'customersIds'}>
|
<Field name={'customersIds'}>
|
||||||
{({ form: { setFieldValue }, field: { value } }) => (
|
{({ form: { setFieldValue }, field: { value } }) => (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
|
|||||||
@@ -11,10 +11,9 @@ import classNames from 'classnames';
|
|||||||
import { FastField } from 'formik';
|
import { FastField } from 'formik';
|
||||||
|
|
||||||
import { CLASSES } from 'common/classes';
|
import { CLASSES } from 'common/classes';
|
||||||
import { Col, Row, ListSelect, MODIFIER } from 'components';
|
import { ListSelect, MODIFIER } from 'components';
|
||||||
import { filterAccountsOptions } from './constants';
|
import { filterAccountsOptions } from './constants';
|
||||||
|
|
||||||
|
|
||||||
export default function FinancialStatementsFilter({
|
export default function FinancialStatementsFilter({
|
||||||
items = filterAccountsOptions,
|
items = filterAccountsOptions,
|
||||||
label = <T id={'filter_accounts'} />,
|
label = <T id={'filter_accounts'} />,
|
||||||
@@ -43,33 +42,29 @@ export default function FinancialStatementsFilter({
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Row>
|
<FastField name={'filterByOption'}>
|
||||||
<Col xs={4}>
|
{({ form: { setFieldValue }, field: { value } }) => (
|
||||||
<FastField name={'filterByOption'}>
|
<FormGroup
|
||||||
{({ form: { setFieldValue }, field: { value } }) => (
|
label={label}
|
||||||
<FormGroup
|
className="form-group--select-list bp3-fill"
|
||||||
label={label}
|
inline={false}
|
||||||
className="form-group--select-list bp3-fill"
|
>
|
||||||
inline={false}
|
<ListSelect
|
||||||
>
|
items={items}
|
||||||
<ListSelect
|
itemRenderer={filterRenderer}
|
||||||
items={items}
|
popoverProps={{ minimal: true }}
|
||||||
itemRenderer={filterRenderer}
|
filterable={false}
|
||||||
popoverProps={{ minimal: true }}
|
selectedItem={value}
|
||||||
filterable={false}
|
selectedItemProp={'key'}
|
||||||
selectedItem={value}
|
textProp={'name'}
|
||||||
selectedItemProp={'key'}
|
onItemSelect={(item) => {
|
||||||
textProp={'name'}
|
setFieldValue('filterByOption', item.key);
|
||||||
onItemSelect={(item) => {
|
}}
|
||||||
setFieldValue('filterByOption', item.key);
|
className={classNames(CLASSES.SELECT_LIST_FILL_POPOVER)}
|
||||||
}}
|
{...restProps}
|
||||||
className={classNames(CLASSES.SELECT_LIST_FILL_POPOVER)}
|
/>
|
||||||
{...restProps}
|
</FormGroup>
|
||||||
/>
|
)}
|
||||||
</FormGroup>
|
</FastField>
|
||||||
)}
|
|
||||||
</FastField>
|
|
||||||
</Col>
|
|
||||||
</Row>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,10 +33,15 @@ function GLHeaderGeneralPaneContent() {
|
|||||||
return (
|
return (
|
||||||
<React.Fragment>
|
<React.Fragment>
|
||||||
<FinancialStatementDateRange />
|
<FinancialStatementDateRange />
|
||||||
<FinancialStatementsFilter
|
|
||||||
items={filterAccountsOptions}
|
<Row>
|
||||||
initialSelectedItem={'with-transactions'}
|
<Col xs={4}>
|
||||||
/>
|
<FinancialStatementsFilter
|
||||||
|
items={filterAccountsOptions}
|
||||||
|
initialSelectedItem={'with-transactions'}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={4}>
|
<Col xs={4}>
|
||||||
<FormGroup
|
<FormGroup
|
||||||
|
|||||||
@@ -35,7 +35,6 @@ export function useGeneralLedgerTableColumns() {
|
|||||||
return row.date;
|
return row.date;
|
||||||
},
|
},
|
||||||
className: 'date',
|
className: 'date',
|
||||||
textOverview: true,
|
|
||||||
width: 120,
|
width: 120,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,8 +1,6 @@
|
|||||||
import React, { useMemo, useCallback } from 'react';
|
import React, { useMemo } from 'react';
|
||||||
import intl from 'react-intl-universal';
|
import intl from 'react-intl-universal';
|
||||||
|
|
||||||
import classNames from 'classnames';
|
|
||||||
|
|
||||||
import FinancialSheet from 'components/FinancialSheet';
|
import FinancialSheet from 'components/FinancialSheet';
|
||||||
import { DataTable } from 'components';
|
import { DataTable } from 'components';
|
||||||
import { useInventoryItemDetailsColumns } from './components';
|
import { useInventoryItemDetailsColumns } from './components';
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import React from 'react';
|
|
||||||
import * as R from 'ramda';
|
import * as R from 'ramda';
|
||||||
import { getColumnWidth, getForceWidth } from 'utils';
|
import { getColumnWidth } from 'utils';
|
||||||
|
import { CellForceWidth } from '../../../components';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* columns mapper.
|
* columns mapper.
|
||||||
@@ -9,25 +9,15 @@ const columnsMapper = (data, index, column) => ({
|
|||||||
id: column.key,
|
id: column.key,
|
||||||
key: column.key,
|
key: column.key,
|
||||||
Header: column.label,
|
Header: column.label,
|
||||||
accessor: ({ cells }) => {
|
Cell: CellForceWidth,
|
||||||
return (
|
accessor: `cells[${index}].value`,
|
||||||
<span
|
forceWidthAccess: `cells[0].value`,
|
||||||
className={'force-width'}
|
|
||||||
style={{
|
|
||||||
minWidth: getForceWidth(cells[0].value),
|
|
||||||
}}
|
|
||||||
>
|
|
||||||
{cells[index]?.value}
|
|
||||||
</span>
|
|
||||||
);
|
|
||||||
},
|
|
||||||
className: column.key,
|
className: column.key,
|
||||||
width: getColumnWidth(data, `cells.${index}.key`, {
|
width: getColumnWidth(data, `cells.${index}.key`, {
|
||||||
minWidth: 130,
|
minWidth: 130,
|
||||||
magicSpacing: 10,
|
magicSpacing: 10,
|
||||||
}),
|
}),
|
||||||
disableSortBy: true,
|
disableSortBy: true,
|
||||||
// textOverview: true,
|
|
||||||
});
|
});
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -69,11 +69,16 @@ function InventoryValuationHeaderGeneralPanelContent() {
|
|||||||
</FastField>
|
</FastField>
|
||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
<FinancialStatementsFilter
|
|
||||||
items={filterInventoryValuationOptions}
|
<Row>
|
||||||
label={<T id={'items.label_filter_items'} />}
|
<Col xs={4}>
|
||||||
initialSelectedItem={'all-items'}
|
<FinancialStatementsFilter
|
||||||
/>
|
items={filterInventoryValuationOptions}
|
||||||
|
label={<T id={'items.label_filter_items'} />}
|
||||||
|
initialSelectedItem={'all-items'}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={4}>
|
<Col xs={4}>
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { Row, Col } from '../../../components';
|
||||||
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
||||||
import SelectDisplayColumnsBy from '../SelectDisplayColumnsBy';
|
import SelectDisplayColumnsBy from '../SelectDisplayColumnsBy';
|
||||||
import RadiosAccountingBasis from '../RadiosAccountingBasis';
|
import RadiosAccountingBasis from '../RadiosAccountingBasis';
|
||||||
@@ -13,7 +14,14 @@ export default function ProfitLossSheetHeaderGeneralPane({}) {
|
|||||||
<div>
|
<div>
|
||||||
<FinancialStatementDateRange />
|
<FinancialStatementDateRange />
|
||||||
<SelectDisplayColumnsBy />
|
<SelectDisplayColumnsBy />
|
||||||
<FinancialStatementsFilter initialSelectedItem={'with-transactions'} />
|
|
||||||
|
<Row>
|
||||||
|
<Col xs={4}>
|
||||||
|
<FinancialStatementsFilter
|
||||||
|
initialSelectedItem={'with-transactions'}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
<RadiosAccountingBasis key={'basis'} />
|
<RadiosAccountingBasis key={'basis'} />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -37,11 +37,16 @@ function PurchasesByItemsGeneralPanelContent() {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<FinancialStatementDateRange />
|
<FinancialStatementDateRange />
|
||||||
<FinancialStatementsFilter
|
|
||||||
items={filterItemsOptions}
|
<Row>
|
||||||
label={<T id={'items.label_filter_items'} />}
|
<Col xs={4}>
|
||||||
initialSelectedItem={'with-transactions'}
|
<FinancialStatementsFilter
|
||||||
/>
|
items={filterItemsOptions}
|
||||||
|
label={<T id={'items.label_filter_items'} />}
|
||||||
|
initialSelectedItem={'with-transactions'}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={4}>
|
<Col xs={4}>
|
||||||
|
|||||||
@@ -33,11 +33,15 @@ function SalesByItemsHeaderGeneralPanelContent() {
|
|||||||
<div>
|
<div>
|
||||||
<FinancialStatementDateRange />
|
<FinancialStatementDateRange />
|
||||||
|
|
||||||
<FinancialStatementsFilter
|
<Row>
|
||||||
items={filterItemsOptions}
|
<Col xs={4}>
|
||||||
label={<T id={'items.label_filter_items'} />}
|
<FinancialStatementsFilter
|
||||||
initialSelectedItem={'with-transactions'}
|
items={filterItemsOptions}
|
||||||
/>
|
label={<T id={'items.label_filter_items'} />}
|
||||||
|
initialSelectedItem={'with-transactions'}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={4}>
|
<Col xs={4}>
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
|
|
||||||
|
import { Row, Col } from '../../../components';
|
||||||
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
import FinancialStatementDateRange from 'containers/FinancialStatements/FinancialStatementDateRange';
|
||||||
import RadiosAccountingBasis from '../RadiosAccountingBasis';
|
import RadiosAccountingBasis from '../RadiosAccountingBasis';
|
||||||
import FinancialStatementsFilter from '../FinancialStatementsFilter';
|
import FinancialStatementsFilter from '../FinancialStatementsFilter';
|
||||||
@@ -6,13 +8,18 @@ import FinancialStatementsFilter from '../FinancialStatementsFilter';
|
|||||||
/**
|
/**
|
||||||
* Trial balance sheet - Drawer header - General panel.
|
* Trial balance sheet - Drawer header - General panel.
|
||||||
*/
|
*/
|
||||||
export default function TrialBalanceSheetHeaderGeneralPanel({
|
export default function TrialBalanceSheetHeaderGeneralPanel({}) {
|
||||||
|
|
||||||
}) {
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<FinancialStatementDateRange />
|
<FinancialStatementDateRange />
|
||||||
<FinancialStatementsFilter initialSelectedItem={'with-transactions'} />
|
|
||||||
|
<Row>
|
||||||
|
<Col xs={4}>
|
||||||
|
<FinancialStatementsFilter
|
||||||
|
initialSelectedItem={'with-transactions'}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
<RadiosAccountingBasis />
|
<RadiosAccountingBasis />
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
@@ -74,14 +74,18 @@ export default function VendorsBalanceSummaryHeaderGeneralContent() {
|
|||||||
</Col>
|
</Col>
|
||||||
</Row>
|
</Row>
|
||||||
|
|
||||||
<FinancialStatementsFilter
|
<Row>
|
||||||
items={filterVendorsOptions}
|
<Col xs={5}>
|
||||||
label={<T id={'vendors.label_filter_vendors'} />}
|
<FinancialStatementsFilter
|
||||||
initialSelectedItem={'with-transactions'}
|
items={filterVendorsOptions}
|
||||||
/>
|
label={<T id={'vendors.label_filter_vendors'} />}
|
||||||
|
initialSelectedItem={'with-transactions'}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={4}>
|
<Col xs={5}>
|
||||||
<Field name={'vendorsIds'}>
|
<Field name={'vendorsIds'}>
|
||||||
{({ form: { setFieldValue } }) => (
|
{({ form: { setFieldValue } }) => (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
|
|||||||
@@ -39,13 +39,19 @@ function VendorsTransactionsHeaderGeneralPanelContent() {
|
|||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<FinancialStatementDateRange />
|
<FinancialStatementDateRange />
|
||||||
<FinancialStatementsFilter
|
|
||||||
items={filterVendorsOptions}
|
|
||||||
label={<T id={'vendors.label_filter_vendors'} />}
|
|
||||||
initialSelectedItem={'all-vendors'}
|
|
||||||
/>
|
|
||||||
<Row>
|
<Row>
|
||||||
<Col xs={5}>
|
<Col xs={4}>
|
||||||
|
<FinancialStatementsFilter
|
||||||
|
items={filterVendorsOptions}
|
||||||
|
label={<T id={'vendors.label_filter_vendors'} />}
|
||||||
|
initialSelectedItem={'all-vendors'}
|
||||||
|
/>
|
||||||
|
</Col>
|
||||||
|
</Row>
|
||||||
|
|
||||||
|
<Row>
|
||||||
|
<Col xs={4}>
|
||||||
<Field name={'vendorsIds'}>
|
<Field name={'vendorsIds'}>
|
||||||
{({ form: { setFieldValue }, field: { value } }) => (
|
{({ form: { setFieldValue }, field: { value } }) => (
|
||||||
<FormGroup
|
<FormGroup
|
||||||
|
|||||||
@@ -37,7 +37,7 @@ export const transformAccountsFilter = (form) => {
|
|||||||
*/
|
*/
|
||||||
export const transformFilterFormToQuery = (form) => {
|
export const transformFilterFormToQuery = (form) => {
|
||||||
return R.compose(
|
return R.compose(
|
||||||
flatten,
|
R.curry(flatten)({ safe: true }),
|
||||||
transfromToSnakeCase,
|
transfromToSnakeCase,
|
||||||
transformAccountsFilter,
|
transformAccountsFilter,
|
||||||
transformDisplayColumnsType,
|
transformDisplayColumnsType,
|
||||||
|
|||||||
@@ -1345,7 +1345,7 @@
|
|||||||
"filter.value": "Value",
|
"filter.value": "Value",
|
||||||
"payment_made.empty_status.title": "The organization doesn't pay to vendors, yet!",
|
"payment_made.empty_status.title": "The organization doesn't pay to vendors, yet!",
|
||||||
"estimate.delete.error.estimate_converted_to_invoice": "Could not delete sale estimate that converted to invoice",
|
"estimate.delete.error.estimate_converted_to_invoice": "Could not delete sale estimate that converted to invoice",
|
||||||
"items.option.only_active": "Only active",
|
"items.option.only_active": "Items only active",
|
||||||
"items.option_all_items.hint": "All items, including that ones have zero-balance.",
|
"items.option_all_items.hint": "All items, including that ones have zero-balance.",
|
||||||
"items.option_with_transactions": "Items with transactions",
|
"items.option_with_transactions": "Items with transactions",
|
||||||
"items.option_without_zero_balance": "Items without zero-balance",
|
"items.option_without_zero_balance": "Items without zero-balance",
|
||||||
@@ -1406,5 +1406,19 @@
|
|||||||
"cash_flow_money_in": "Money In",
|
"cash_flow_money_in": "Money In",
|
||||||
"cash_flow_money_out": "Money Out",
|
"cash_flow_money_out": "Money Out",
|
||||||
"cash_flow_transaction.switch_item": "Transactions {value}",
|
"cash_flow_transaction.switch_item": "Transactions {value}",
|
||||||
"cash_flow_transaction.balance_in_bigcapital": "Balance in Bigcapital"
|
"cash_flow_transaction.balance_in_bigcapital": "Balance in Bigcapital",
|
||||||
|
|
||||||
|
"AR_aging_summary.filter_customers.all_customers": "All customers",
|
||||||
|
"AR_aging_summary.filter_customers.all_customers.hint": "All customers, include that ones have zero-balance.",
|
||||||
|
"AR_aging_summary.filter_customers.without_zero_balance": "Customers without zero balance",
|
||||||
|
"AR_aging_summary.filter_customers.without_zero_balance.hint": "Include customers that onces have transactions on the given date period only.",
|
||||||
|
"AR_aging_summary.filter_options.label": "Filter customers",
|
||||||
|
"AP_aging_summary.filter_vendors.all_vendors": "All vendors",
|
||||||
|
"AP_aging_summary.filter_vendors.all_vendors.hint": "All vendors, include that onces have zero-balance.",
|
||||||
|
"AP_aging_summary.filter_vendors.without_zero_balance": "Vendors without zero balance",
|
||||||
|
"AP_aging_summary.filter_vendors.without_zero_balance.hint": "Include vendors that onces have transactions on the given date period only.",
|
||||||
|
"AP_aging_summary.filter_options.label": "Filter vendors",
|
||||||
|
"item.error.type_cannot_change_with_item_has_transactions": "Cannot change item type to inventory with item has associated transactions.",
|
||||||
|
"item.error.cannot_change_inventory_account": "Cannot change item inventory account while the item has transactions.",
|
||||||
|
"customer.link.customer_details": "Customer details ({amount})"
|
||||||
}
|
}
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
.financial-header-drawer{
|
.financial-header-drawer{
|
||||||
.bp3-drawer{
|
.bp3-drawer{
|
||||||
max-height: 450px;
|
max-height: 550px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -84,8 +84,7 @@
|
|||||||
.financial-statement--transactions {
|
.financial-statement--transactions {
|
||||||
.financial-header-drawer {
|
.financial-header-drawer {
|
||||||
.bp3-drawer {
|
.bp3-drawer {
|
||||||
// max-height: 350px;
|
max-height: 450px;
|
||||||
max-height: 415px;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,7 +33,7 @@
|
|||||||
.financial-header-drawer {
|
.financial-header-drawer {
|
||||||
.bp3-drawer {
|
.bp3-drawer {
|
||||||
// max-height: 400px;
|
// max-height: 400px;
|
||||||
max-height: 415px;
|
max-height: 450px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -41,7 +41,7 @@
|
|||||||
.financial-statement--inventory-valuation {
|
.financial-statement--inventory-valuation {
|
||||||
.financial-header-drawer {
|
.financial-header-drawer {
|
||||||
.bp3-drawer {
|
.bp3-drawer {
|
||||||
max-height: 350px;
|
max-height: 400px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user