feat(SPG-935): add column payment_date_bank
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
3658ae4cdf
commit
ab9ec4ac0e
|
@ -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"`,
|
||||
);
|
||||
}
|
||||
}
|
|
@ -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`,
|
||||
|
|
|
@ -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`,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue