fix: order transaction

This commit is contained in:
ilham 2021-12-30 09:38:18 +07:00
parent 146d0c8f96
commit 89d0895ff3
2 changed files with 4 additions and 0 deletions

View File

@ -6,4 +6,6 @@ export class OrderTransactionDto {
@IsNotEmpty()
destination: string;
trx_id: string;
}

View File

@ -377,6 +377,7 @@ export class TransactionService {
transactionData.type = typeTransaction.ORDER;
transactionData.product_price = product_price;
transactionData.destination = orderTransactionDto.destination;
transactionData.partner_trx_id = orderTransactionDto.trx_id;
await manager.insert(Transactions, transactionData);
await this.accountingTransaction({
@ -458,6 +459,7 @@ export class TransactionService {
transactionData.type = typeTransaction.ORDER;
transactionData.product_price = product_price;
transactionData.destination = orderTransactionDto.destination;
transactionData.partner_trx_id = orderTransactionDto.trx_id;
transactionData.supplier_trx_id = trxId;
if (!hitSupplier.success) {