mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-15 20:30:33 +00:00
add server to monorepo.
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
import moment from 'moment';
|
||||
import { merge } from 'lodash';
|
||||
import { IProfitLossSheetQuery } from '@/interfaces';
|
||||
|
||||
/**
|
||||
* Default sheet filter query.
|
||||
* @return {IBalanceSheetQuery}
|
||||
*/
|
||||
export const getDefaultPLQuery = (): IProfitLossSheetQuery => ({
|
||||
fromDate: moment().startOf('year').format('YYYY-MM-DD'),
|
||||
toDate: moment().endOf('year').format('YYYY-MM-DD'),
|
||||
|
||||
numberFormat: {
|
||||
divideOn1000: false,
|
||||
negativeFormat: 'mines',
|
||||
showZero: false,
|
||||
formatMoney: 'total',
|
||||
precision: 2,
|
||||
},
|
||||
basis: 'accural',
|
||||
|
||||
noneZero: false,
|
||||
noneTransactions: false,
|
||||
|
||||
displayColumnsType: 'total',
|
||||
displayColumnsBy: 'month',
|
||||
|
||||
accountsIds: [],
|
||||
|
||||
percentageColumn: false,
|
||||
percentageRow: false,
|
||||
|
||||
percentageIncome: false,
|
||||
percentageExpense: false,
|
||||
|
||||
previousPeriod: false,
|
||||
previousPeriodAmountChange: false,
|
||||
previousPeriodPercentageChange: false,
|
||||
|
||||
previousYear: false,
|
||||
previousYearAmountChange: false,
|
||||
previousYearPercentageChange: false,
|
||||
});
|
||||
|
||||
/**
|
||||
*
|
||||
* @param query
|
||||
* @returns
|
||||
*/
|
||||
export const mergeQueryWithDefaults = (
|
||||
query: IProfitLossSheetQuery
|
||||
): IProfitLossSheetQuery => {
|
||||
return merge(getDefaultPLQuery(), query);
|
||||
};
|
||||
Reference in New Issue
Block a user