feat: fix filter report
continuous-integration/drone/push Build is passing Details

pull/97/head
Firman Ramdhani 2024-09-20 17:25:28 +07:00
parent 1dfcaf7b15
commit c15b4d8079
3 changed files with 13 additions and 5 deletions

View File

@ -26,6 +26,9 @@ export default <ReportConfigEntity>{
values: [PosLogType.cash_witdrawal], values: [PosLogType.cash_witdrawal],
}, },
], ],
whereCondition(filterModel) {
return [`main.created_at is not null`];
},
column_configs: [ column_configs: [
{ {
column: 'main__date', column: 'main__date',
@ -105,7 +108,4 @@ export default <ReportConfigEntity>{
filter_type: FILTER_TYPE.NUMBER_EQUAL, filter_type: FILTER_TYPE.NUMBER_EQUAL,
}, },
], ],
whereCondition(filterModel) {
return [`main.created_at is not null`];
},
}; };

View File

@ -26,6 +26,9 @@ export default <ReportConfigEntity>{
values: [PosLogType.login, PosLogType.logout], values: [PosLogType.login, PosLogType.logout],
}, },
], ],
whereCondition(filterModel) {
return [`main.creator_name is not null`];
},
column_configs: [ column_configs: [
{ {
column: 'main__date', column: 'main__date',

View File

@ -37,6 +37,11 @@ export default <ReportConfigEntity>{
values: [false], values: [false],
}, },
], ],
whereCondition(filterModel) {
return [
`main.discount_percentage is not null or main.discount_value is not null`,
];
},
defaultOrderBy: [], defaultOrderBy: [],
lowLevelOrderBy: [], lowLevelOrderBy: [],
filter_period_config: { filter_period_config: {
@ -73,8 +78,8 @@ export default <ReportConfigEntity>{
format: DATA_FORMAT.TEXT, format: DATA_FORMAT.TEXT,
}, },
{ {
column: 'main__payment_total_profit', column: 'main__payment_sub_total',
query: 'main.payment_total_profit', query: 'main.payment_sub_total',
label: 'Total Transaksi', label: 'Total Transaksi',
type: DATA_TYPE.MEASURE, type: DATA_TYPE.MEASURE,
format: DATA_FORMAT.CURRENCY, format: DATA_FORMAT.CURRENCY,