feat(SPG-935): add column payment_date_bank
continuous-integration/drone/push Build is passing Details

pull/82/head
Firman Ramdhani 2024-09-10 17:11:20 +07:00
parent 3658ae4cdf
commit ab9ec4ac0e
6 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,19 @@
import { MigrationInterface, QueryRunner } from 'typeorm';
export class AddPaymentDateBankColumnAtTransaction1725962197762
implements MigrationInterface
{
name = 'AddPaymentDateBankColumnAtTransaction1725962197762';
public async up(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "transactions" ADD "payment_date_bank" date`,
);
}
public async down(queryRunner: QueryRunner): Promise<void> {
await queryRunner.query(
`ALTER TABLE "transactions" DROP COLUMN "payment_date_bank"`,
);
}
}

View File

@ -43,6 +43,7 @@ export class DetailReconciliationManager extends BaseDetailManager<TransactionEn
`${this.tableName}.payment_code_reference`,
`${this.tableName}.payment_code`,
`${this.tableName}.payment_date`,
`${this.tableName}.payment_date_bank`,
`${this.tableName}.payment_total`,
`${this.tableName}.payment_total_net_profit`,

View File

@ -58,6 +58,7 @@ export class IndexReconciliationManager extends BaseIndexManager<TransactionEnti
`${this.tableName}.payment_code_reference`,
`${this.tableName}.payment_code`,
`${this.tableName}.payment_date`,
`${this.tableName}.payment_date_bank`,
`${this.tableName}.payment_total`,
`${this.tableName}.payment_total_net_profit`,

View File

@ -25,6 +25,7 @@ export class UpdateReconciliationManager extends BaseUpdateManager<TransactionEn
reconciliation_mdr: this.data.reconciliation_mdr ?? null,
payment_total_net_profit: net_profit,
payment_date: this.data.payment_date ?? this.oldData.payment_date,
payment_date_bank: this.data.payment_date_bank ?? null,
});
return;

View File

@ -148,6 +148,9 @@ export class TransactionModel
@Column('date', { name: 'payment_date', nullable: true })
payment_date: Date;
@Column('date', { name: 'payment_date_bank', nullable: true })
payment_date_bank: Date;
// calculation data
@Column('decimal', { name: 'payment_sub_total', nullable: true })
payment_sub_total: number;

View File

@ -54,6 +54,7 @@ export interface TransactionEntity extends BaseStatusEntity {
payment_midtrans_token: string;
payment_midtrans_url: string;
payment_date: Date;
payment_date_bank: Date;
// calculation data
payment_sub_total: number; // total invoice tanpa discount