add: new partner
This commit is contained in:
@@ -448,6 +448,10 @@ export class TransactionService {
|
||||
orderTransactionDto.productCode,
|
||||
);
|
||||
|
||||
const supplier = await this.supplierService.findByCode(
|
||||
product.supplier.code,
|
||||
);
|
||||
|
||||
let product_price = await this.productHistoryPriceService.findOne(
|
||||
product.id,
|
||||
userData.partner?.id,
|
||||
@@ -489,12 +493,21 @@ export class TransactionService {
|
||||
})
|
||||
.join('');
|
||||
|
||||
const hitSupplier = await doTransaction(
|
||||
let hitSupplier = await doTransaction(
|
||||
orderTransactionDto.productCode,
|
||||
orderTransactionDto.destination,
|
||||
trxId,
|
||||
supplier
|
||||
);
|
||||
|
||||
if (supplier.code != 'IRS') {
|
||||
const parsingResponse = hitSupplier.split(' ');
|
||||
hitSupplier = {
|
||||
success: hitSupplier.include('diproses');
|
||||
harga: parseInt(parsingResponse[parsingResponse.length - 2].replaceAll(".","")),
|
||||
msg: hitSupplier
|
||||
};
|
||||
}
|
||||
// const hitSupplier = {
|
||||
// harga: 2000,
|
||||
// success: true,
|
||||
|
||||
Reference in New Issue
Block a user