Compare commits

..

No commits in common. "a2be2bb331c5b087c6c981bd18c2abcf808d664b" and "d2db62339fdf1cfd00c57ce25c5bda0fde81b94c" have entirely different histories.

11 changed files with 2 additions and 46 deletions

View File

@ -1,21 +0,0 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddPosNameColumn1726033041774 implements MigrationInterface {
name = 'AddPosNameColumn1726033041774';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "transactions" ADD "creator_counter_name" character varying`,
);
await queryRunner.query(
`ALTER TABLE "logs_pos" ADD "pos_name" character varying`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(`ALTER TABLE "logs_pos" DROP COLUMN "pos_name"`);
await queryRunner.query(
`ALTER TABLE "transactions" DROP COLUMN "creator_counter_name"`,
);
}
}

View File

@ -14,9 +14,6 @@ export class PosLogModel
@Column('bigint', { name: 'pos_number', nullable: true })
pos_number: number;
@Column('varchar', { name: 'pos_name', nullable: true })
pos_name: string;
@Column('decimal', { name: 'total_balance', nullable: true })
total_balance: number;

View File

@ -3,7 +3,6 @@ import { BaseCoreEntity } from 'src/core/modules/domain/entities/base-core.entit
export interface PosLogEntity extends BaseCoreEntity {
type: PosLogType;
pos_number: number;
pos_name: string;
total_balance: number;
created_at: number;
creator_name: string;

View File

@ -26,7 +26,6 @@ export class RecordPosLogHandler implements IEventHandler<ChangeDocEvent> {
type: PosLogType[data.type],
total_balance: data.withdrawal_cash ?? data.opening_cash_balance,
pos_number: data.pos_number,
pos_name: data.pos_name,
creator_id: data.pos_admin?.id,
creator_name: data.pos_admin?.name ?? data.pos_admin?.username,
drawn_by_id: data.withdraw_user?.id,

View File

@ -47,7 +47,6 @@ export class IndexReconciliationManager extends BaseIndexManager<TransactionEnti
`${this.tableName}.customer_name`,
`${this.tableName}.creator_counter_no`,
`${this.tableName}.creator_counter_name`,
`${this.tableName}.invoice_code`,
`${this.tableName}.booking_date`,
@ -112,20 +111,11 @@ export class IndexReconciliationManager extends BaseIndexManager<TransactionEnti
});
}
if (this.filterParam.counter_no) {
if (this.filterParam.couner_no) {
queryBuilder.andWhere(
`${this.tableName}.creator_counter_no In (:...counters)`,
{
counters: [this.filterParam.counter_no],
},
);
}
if (this.filterParam.counter_name) {
queryBuilder.andWhere(
`${this.tableName}.creator_counter_name In (:...counterNames)`,
{
counterNames: [this.filterParam.counter_name],
counters: [this.filterParam.couner_no],
},
);
}

View File

@ -146,7 +146,6 @@ export class RecapReconciliationManager extends BaseCustomManager<TransactionEnt
booking_date: payment_date,
payment_date: payment_date,
creator_counter_no: first_transaction.creator_counter_no,
creator_counter_name: first_transaction.creator_counter_name,
payment_type: first_transaction.payment_type_counter,
payment_type_counter: first_transaction.payment_type_counter,
payment_type_method_id: first_transaction.payment_type_method_id,

View File

@ -36,9 +36,6 @@ export class TransactionModel
@Column('int', { name: 'creator_counter_no', nullable: true })
creator_counter_no: number;
@Column('varchar', { name: 'creator_counter_name', nullable: true })
creator_counter_name: string;
// season data
@Column('varchar', { name: 'season_period_id', nullable: true })
season_period_id: string;

View File

@ -13,7 +13,6 @@ export interface TransactionEntity extends BaseStatusEntity {
type: TransactionType;
invoice_code: string;
creator_counter_no: number; // nomor pos transaksi dibuat
creator_counter_name: string; // name pos transaksi dibuat
// season data
season_period_id: string;

View File

@ -42,7 +42,6 @@ export class DetailTransactionManager extends BaseDetailManager<TransactionEntit
return [
`${this.tableName}.id`,
`${this.tableName}.creator_counter_no`,
`${this.tableName}.creator_counter_name`,
`${this.tableName}.creator_name`,
`${this.tableName}.created_at`,
`${this.tableName}.updated_at`,

View File

@ -118,7 +118,6 @@ export function mappingRevertTransaction(data, type) {
Object.assign(data, {
id: data.booking_id ?? data._id,
creator_counter_no: Number(data.pos_number),
creator_counter_name: data.pos_name,
settlement_date: new Date(data.created_at),
payment_date: isCancel ? null : new Date(data.created_at),
invoice_date: new Date(data.created_at),

View File

@ -55,7 +55,6 @@ export class IndexTransactionManager extends BaseIndexManager<TransactionEntity>
`${this.tableName}.status`,
`${this.tableName}.invoice_code`,
`${this.tableName}.creator_counter_no`,
`${this.tableName}.creator_counter_name`,
`${this.tableName}.booking_date`,
`${this.tableName}.no_of_group`,
`${this.tableName}.type`,