Merge branch 'devops-staging' of https://gitlab.com/empatnusabangsa/ppob/ppob-backend
This commit is contained in:
commit
251308e5e4
|
@ -367,6 +367,7 @@ export class TransactionService {
|
||||||
userData.partner?.id,
|
userData.partner?.id,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
let costInventory = product_price.price;
|
||||||
let supervisorData = [];
|
let supervisorData = [];
|
||||||
let profit = product_price.mark_up_price;
|
let profit = product_price.mark_up_price;
|
||||||
|
|
||||||
|
@ -441,6 +442,8 @@ export class TransactionService {
|
||||||
transactionData.destination = orderTransactionDto.destination;
|
transactionData.destination = orderTransactionDto.destination;
|
||||||
transactionData.partner_trx_id = orderTransactionDto.trx_id;
|
transactionData.partner_trx_id = orderTransactionDto.trx_id;
|
||||||
transactionData.supplier_trx_id = trxId;
|
transactionData.supplier_trx_id = trxId;
|
||||||
|
transactionData.balance_remaining =
|
||||||
|
coaAccount.amount - product_price.mark_up_price - costInventory;
|
||||||
await manager.insert(Transactions, transactionData);
|
await manager.insert(Transactions, transactionData);
|
||||||
|
|
||||||
await this.accountingTransaction({
|
await this.accountingTransaction({
|
||||||
|
@ -1667,6 +1670,7 @@ export class TransactionService {
|
||||||
);
|
);
|
||||||
|
|
||||||
if (!partnerData.callback_url) {
|
if (!partnerData.callback_url) {
|
||||||
|
console.log('nopartnerurl', 'msk');
|
||||||
this.logger.error(`Call to partner failed, reason: no callback url`);
|
this.logger.error(`Call to partner failed, reason: no callback url`);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
@ -1681,9 +1685,10 @@ export class TransactionService {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const res = await axios.get(url);
|
const res = await axios.get(url);
|
||||||
|
console.log('successcallback', res);
|
||||||
return res;
|
return res;
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
console.log('errorsendcallback', 'msk');
|
||||||
this.logger.error(`Call to partner failed, reason: ${e.message}`);
|
this.logger.error(`Call to partner failed, reason: ${e.message}`);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user