feat: add report CashierLogReport and CashWithdrawalsReport
continuous-integration/drone/tag Build is passing
Details
continuous-integration/drone/tag Build is passing
Details
parent
746e24feb6
commit
d14d9101ae
|
@ -1,40 +1,87 @@
|
|||
import { DATA_FORMAT, DATA_TYPE, REPORT_GROUP } from '../../../constant';
|
||||
import { PosLogType } from 'src/modules/configuration/log/domain/entities/pos-log.entity';
|
||||
import {
|
||||
DATA_FORMAT,
|
||||
DATA_TYPE,
|
||||
FILTER_FIELD_TYPE,
|
||||
FILTER_TYPE,
|
||||
REPORT_GROUP,
|
||||
} from '../../../constant';
|
||||
import { ReportConfigEntity } from '../../../entities/report-config.entity';
|
||||
|
||||
export default <ReportConfigEntity>{
|
||||
group_name: REPORT_GROUP.transaction_report,
|
||||
unique_name: `${REPORT_GROUP.transaction_report}__cash_withdrawals`,
|
||||
label: 'Penarikan Kas',
|
||||
table_schema: 'season_types main',
|
||||
table_schema: 'logs_pos main',
|
||||
main_table_alias: 'main',
|
||||
defaultOrderBy: [],
|
||||
lowLevelOrderBy: [],
|
||||
filter_period_config: {
|
||||
hidden: true,
|
||||
},
|
||||
|
||||
whereDefaultConditions: [
|
||||
{
|
||||
column: 'main.type',
|
||||
filter_type: FILTER_TYPE.TEXT_IN_MEMBER,
|
||||
values: [PosLogType.cash_witdrawal],
|
||||
},
|
||||
],
|
||||
column_configs: [
|
||||
{
|
||||
column: 'main__created_at',
|
||||
query: 'main.created_at',
|
||||
label: 'Created Date',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.DATE_EPOCH,
|
||||
},
|
||||
{
|
||||
column: 'main__updated_at',
|
||||
query: 'main.updated_at',
|
||||
label: 'Updated Date',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.DATE_EPOCH,
|
||||
},
|
||||
{
|
||||
column: 'main__name',
|
||||
query: 'main.name',
|
||||
label: 'Name',
|
||||
column: 'main__date',
|
||||
query: `TO_CHAR(to_timestamp(main.created_at::double precision / 1000), 'DD-MM-YYYY')`,
|
||||
label: 'Tanggal',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.TEXT,
|
||||
},
|
||||
{
|
||||
column: 'main__time',
|
||||
query: `TO_CHAR(to_timestamp(main.created_at::double precision / 1000), 'HH24:MI')`,
|
||||
label: 'Jam',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.TEXT,
|
||||
},
|
||||
{
|
||||
column: 'main__drawn_by_name',
|
||||
query: 'main.drawn_by_name',
|
||||
label: 'Nama Penarik',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.TEXT,
|
||||
},
|
||||
{
|
||||
column: 'main__creator_name',
|
||||
query: 'main.creator_name',
|
||||
label: 'Nama Kasir',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.TEXT,
|
||||
},
|
||||
{
|
||||
column: 'main__pos_number',
|
||||
query: 'main.pos_number',
|
||||
label: 'No. PoS',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.TEXT,
|
||||
},
|
||||
{
|
||||
column: 'main__total_balance',
|
||||
query: 'main.total_balance',
|
||||
label: 'Total Penarikan',
|
||||
type: DATA_TYPE.MEASURE,
|
||||
format: DATA_FORMAT.CURRENCY,
|
||||
},
|
||||
],
|
||||
filter_configs: [
|
||||
{
|
||||
filed_label: 'Nama Penarik',
|
||||
filter_column: 'main__drawn_by_name',
|
||||
field_type: FILTER_FIELD_TYPE.input_tag,
|
||||
filter_type: FILTER_TYPE.TEXT_MULTIPLE_CONTAINS,
|
||||
},
|
||||
{
|
||||
filed_label: 'Nama Kasir',
|
||||
filter_column: 'main__creator_name',
|
||||
field_type: FILTER_FIELD_TYPE.input_tag,
|
||||
filter_type: FILTER_TYPE.TEXT_MULTIPLE_CONTAINS,
|
||||
},
|
||||
],
|
||||
filter_configs: [],
|
||||
};
|
||||
|
|
|
@ -1,40 +1,81 @@
|
|||
import { DATA_FORMAT, DATA_TYPE, REPORT_GROUP } from '../../../constant';
|
||||
import { PosLogType } from 'src/modules/configuration/log/domain/entities/pos-log.entity';
|
||||
import {
|
||||
DATA_FORMAT,
|
||||
DATA_TYPE,
|
||||
FILTER_FIELD_TYPE,
|
||||
FILTER_TYPE,
|
||||
REPORT_GROUP,
|
||||
} from '../../../constant';
|
||||
import { ReportConfigEntity } from '../../../entities/report-config.entity';
|
||||
|
||||
export default <ReportConfigEntity>{
|
||||
group_name: REPORT_GROUP.transaction_report,
|
||||
unique_name: `${REPORT_GROUP.transaction_report}__cashier_log`,
|
||||
label: 'Kasir Log',
|
||||
table_schema: 'season_types main',
|
||||
table_schema: 'logs_pos main',
|
||||
main_table_alias: 'main',
|
||||
defaultOrderBy: [],
|
||||
lowLevelOrderBy: [],
|
||||
filter_period_config: {
|
||||
hidden: true,
|
||||
},
|
||||
|
||||
whereDefaultConditions: [
|
||||
{
|
||||
column: 'main.type',
|
||||
filter_type: FILTER_TYPE.TEXT_IN_MEMBER,
|
||||
values: [PosLogType.login, PosLogType.logout],
|
||||
},
|
||||
],
|
||||
column_configs: [
|
||||
{
|
||||
column: 'main__created_at',
|
||||
query: 'main.created_at',
|
||||
label: 'Created Date',
|
||||
column: 'main__date',
|
||||
query: `TO_CHAR(to_timestamp(main.created_at::double precision / 1000), 'DD-MM-YYYY')`,
|
||||
label: 'Tanggal',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.DATE_EPOCH,
|
||||
format: DATA_FORMAT.TEXT,
|
||||
},
|
||||
{
|
||||
column: 'main__updated_at',
|
||||
query: 'main.updated_at',
|
||||
label: 'Updated Date',
|
||||
column: 'main__time',
|
||||
query: `TO_CHAR(to_timestamp(main.created_at::double precision / 1000), 'HH24:MI')`,
|
||||
label: 'Jam',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.DATE_EPOCH,
|
||||
format: DATA_FORMAT.TEXT,
|
||||
},
|
||||
{
|
||||
column: 'main__name',
|
||||
query: 'main.name',
|
||||
label: 'Name',
|
||||
column: 'main__type',
|
||||
query: 'main.type',
|
||||
label: 'Tipe',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.TEXT,
|
||||
},
|
||||
{
|
||||
column: 'main__creator_name',
|
||||
query: 'main.creator_name',
|
||||
label: 'Nama Staff',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.TEXT,
|
||||
},
|
||||
{
|
||||
column: 'main__pos_number',
|
||||
query: 'main.pos_number',
|
||||
label: 'No. PoS',
|
||||
type: DATA_TYPE.DIMENSION,
|
||||
format: DATA_FORMAT.TEXT,
|
||||
},
|
||||
],
|
||||
filter_configs: [],
|
||||
filter_configs: [
|
||||
{
|
||||
filed_label: 'Tipe',
|
||||
filter_column: 'main__type',
|
||||
field_type: FILTER_FIELD_TYPE.select,
|
||||
filter_type: FILTER_TYPE.TEXT_IN_MEMBER,
|
||||
select_custom_options: [PosLogType.login, PosLogType.logout],
|
||||
},
|
||||
{
|
||||
filed_label: 'Nama Staff',
|
||||
filter_column: 'main__creator_name',
|
||||
field_type: FILTER_FIELD_TYPE.input_tag,
|
||||
filter_type: FILTER_TYPE.TEXT_MULTIPLE_CONTAINS,
|
||||
},
|
||||
],
|
||||
};
|
||||
|
|
|
@ -18,6 +18,6 @@ export const TransactionReportConfig: ReportConfigEntity[] = [
|
|||
// TimePerRideReport,
|
||||
BookingReport,
|
||||
RefundsReport,
|
||||
// CashierLogReport,
|
||||
// CashWithdrawalsReport,
|
||||
CashierLogReport,
|
||||
CashWithdrawalsReport,
|
||||
];
|
||||
|
|
Loading…
Reference in New Issue