From f3f22d1beb9d34b7a07bd1d87c98124a218f893e Mon Sep 17 00:00:00 2001 From: Fadli Date: Thu, 8 Dec 2022 16:04:47 +0700 Subject: [PATCH 1/3] - fix order stg --- src/transaction/transaction.service.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/transaction/transaction.service.ts b/src/transaction/transaction.service.ts index e27fc18..98d2b44 100644 --- a/src/transaction/transaction.service.ts +++ b/src/transaction/transaction.service.ts @@ -441,6 +441,8 @@ export class TransactionService { transactionData.destination = orderTransactionDto.destination; transactionData.partner_trx_id = orderTransactionDto.trx_id; transactionData.supplier_trx_id = trxId; + transactionData.balance_remaining = + coaAccount.amount - product_price.mark_up_price - costInventory; await manager.insert(Transactions, transactionData); await this.accountingTransaction({ From 7f412abfa74c086e7b3f4fcadf80d6fd55a5b36e Mon Sep 17 00:00:00 2001 From: Fadli Date: Thu, 8 Dec 2022 16:07:37 +0700 Subject: [PATCH 2/3] - fix order stg --- src/transaction/transaction.service.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/transaction/transaction.service.ts b/src/transaction/transaction.service.ts index 98d2b44..c69b74c 100644 --- a/src/transaction/transaction.service.ts +++ b/src/transaction/transaction.service.ts @@ -367,6 +367,7 @@ export class TransactionService { userData.partner?.id, ); + let costInventory = product_price.price; let supervisorData = []; let profit = product_price.mark_up_price; From f4e6c5ac3c3d12c89f7fae200517e75b01031380 Mon Sep 17 00:00:00 2001 From: Fadli Date: Thu, 15 Dec 2022 15:39:38 +0700 Subject: [PATCH 3/3] - push logs send callback --- src/transaction/transaction.service.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/transaction/transaction.service.ts b/src/transaction/transaction.service.ts index c69b74c..812a949 100644 --- a/src/transaction/transaction.service.ts +++ b/src/transaction/transaction.service.ts @@ -1670,6 +1670,7 @@ export class TransactionService { ); if (!partnerData.callback_url) { + console.log('nopartnerurl', 'msk'); this.logger.error(`Call to partner failed, reason: no callback url`); return false; @@ -1684,9 +1685,10 @@ export class TransactionService { try { const res = await axios.get(url); - + console.log('successcallback', res); return res; } catch (e) { + console.log('errorsendcallback', 'msk'); this.logger.error(`Call to partner failed, reason: ${e.message}`); return false;