Merge branch 'development' into 'devops-staging'
Fix: balance remaining See merge request empatnusabangsa/ppob/ppob-backend!200
This commit is contained in:
commit
0fee77b615
|
@ -629,7 +629,7 @@ export class TransactionService {
|
|||
transactionData.partner_trx_id = orderTransactionDto.trx_id;
|
||||
transactionData.supplier_trx_id = trxId;
|
||||
transactionData.check_bill = orderTransactionDto.bill_trx_id;
|
||||
transactionData.balance_remaining = coaAccount.amount;
|
||||
transactionData.balance_remaining = coaAccount.amount - product_price.mark_up_price - costInventory;
|
||||
|
||||
if (!hitSupplier.success) {
|
||||
transactionData.status = statusTransaction.FAILED;
|
||||
|
@ -1349,19 +1349,12 @@ export class TransactionService {
|
|||
|
||||
const userData = await this.userService.findExist(dataTransaction.user);
|
||||
|
||||
const coaAccount = await this.coaService.findByUser(
|
||||
userData.id,
|
||||
coaType.WALLET,
|
||||
);
|
||||
|
||||
let supervisorData = [];
|
||||
|
||||
const product_price = await this.productHistoryPriceService.findById(
|
||||
dataTransaction.product_price.id,
|
||||
);
|
||||
|
||||
let costInventory = product_price.price;
|
||||
|
||||
const product = await this.productService.findOneById(
|
||||
product_price.product.id,
|
||||
);
|
||||
|
@ -1373,7 +1366,7 @@ export class TransactionService {
|
|||
`${coaType[coaType.EXPENSE]}-SYSTEM`,
|
||||
);
|
||||
|
||||
dataTransaction.balance_remaining = coaAccount.amount - product_price.mark_up_price - costInventory;
|
||||
// dataTransaction.balance_remaining = coaAccount.amount - product_price.mark_up_price - costInventory;
|
||||
|
||||
if (userData.partner == null) {
|
||||
//GET SALES
|
||||
|
|
Loading…
Reference in New Issue
Block a user