refactor: re-structure financial reports components.

This commit is contained in:
a.bouhuolia
2022-02-12 12:21:05 +02:00
parent d445fec8c0
commit 526181aa68
18 changed files with 301 additions and 118 deletions

View File

@@ -1,4 +1,5 @@
import intl from 'react-intl-universal';
import moment from 'moment';
export const filterAccountsOptions = [
{
@@ -9,6 +10,20 @@ export const filterAccountsOptions = [
{
key: 'with-transactions',
name: intl.get('accounts_with_transactions'),
hint: intl.get('include_accounts_once_has_transactions_on_given_date_period'),
hint: intl.get(
'include_accounts_once_has_transactions_on_given_date_period',
),
},
];
/**
* Retrieves the default general ledger query.
*/
export const getDefaultGeneralLedgerQuery = () => {
return {
fromDate: moment().startOf('year').format('YYYY-MM-DD'),
toDate: moment().endOf('year').format('YYYY-MM-DD'),
basis: 'accural',
filterByOption: 'with-transactions',
};
};