refactor: financial reports to nestjs

This commit is contained in:
Ahmed Bouhuolia
2025-01-18 22:32:45 +02:00
parent 6dd854178d
commit dfc5674088
151 changed files with 5264 additions and 1296 deletions

View File

@@ -0,0 +1,52 @@
import { ICashFlowStatementQuery } from "./Cashflow.types";
export const DISPLAY_COLUMNS_BY = {
DATE_PERIODS: 'date_periods',
TOTAL: 'total',
};
export const MAP_CONFIG = { childrenPath: 'children', pathFormat: 'array' };
export const HtmlTableCustomCss = `
table tr.row-type--accounts td {
border-top: 1px solid #bbb;
}
table tr.row-id--cash-end-period td {
border-bottom: 3px double #333;
}
table tr.row-type--total {
font-weight: 600;
}
table tr.row-type--total td {
color: #000;
}
table tr.row-type--total:not(:first-child) td {
border-top: 1px solid #bbb;
}
table .column--name,
table .cell--name {
width: 400px;
}
table .column--total,
table .cell--total,
table [class*="column--date-range"],
table [class*="cell--date-range"] {
text-align: right;
}
`;
export const getDefaultCashflowQuery = (): ICashFlowStatementQuery => ({
displayColumnsType: 'total',
displayColumnsBy: 'day',
fromDate: moment().startOf('year').format('YYYY-MM-DD'),
toDate: moment().format('YYYY-MM-DD'),
numberFormat: {
precision: 2,
divideOn1000: false,
showZero: false,
formatMoney: 'total',
negativeFormat: 'mines',
},
noneZero: false,
noneTransactions: false,
basis: 'cash',
});