fixing: check bill
This commit is contained in:
@@ -488,7 +488,7 @@ export class TransactionService {
|
||||
id: orderTransactionDto.bill_trx_id
|
||||
},
|
||||
});
|
||||
product_price.price = billId.amount
|
||||
product_price.price = billId.amount;
|
||||
} catch (e) {
|
||||
if (e instanceof EntityNotFoundError) {
|
||||
throw new HttpException(
|
||||
@@ -533,7 +533,7 @@ export class TransactionService {
|
||||
if (supplier.code != 'IRS') {
|
||||
const parsingResponse = hitSupplier.split(' ');
|
||||
hitSupplier = {
|
||||
success: hitSupplier.include('diproses'),
|
||||
success: hitSupplier.includes('diproses'),
|
||||
harga: parseInt(
|
||||
parsingResponse[parsingResponse.length - 2].replaceAll('.', ''),
|
||||
),
|
||||
@@ -723,7 +723,7 @@ export class TransactionService {
|
||||
if (supplier.code != 'IRS') {
|
||||
const parsingResponse = hitSupplier.split(' ');
|
||||
hitSupplier = {
|
||||
success: hitSupplier.include('diproses'),
|
||||
success: hitSupplier.includes('diproses'),
|
||||
harga: parseInt(
|
||||
parsingResponse[parsingResponse.length - 2].replaceAll('.', ''),
|
||||
),
|
||||
@@ -853,8 +853,9 @@ export class TransactionService {
|
||||
supplier,
|
||||
);
|
||||
const parsingResponse = hitSupplier.split(' ');
|
||||
console.log(hitSupplier,"ini dia")
|
||||
hitSupplier = {
|
||||
success: hitSupplier.include('diproses'),
|
||||
success: hitSupplier.includes('diproses'),
|
||||
msg: hitSupplier,
|
||||
};
|
||||
|
||||
@@ -1779,4 +1780,16 @@ export class TransactionService {
|
||||
|
||||
return transaction;
|
||||
}
|
||||
|
||||
async updateBill(trxId: string, amount: number, admin: number) {
|
||||
await this.checkBillHistoryRepository.update(
|
||||
{
|
||||
trx_id: trxId,
|
||||
},
|
||||
{
|
||||
amount: amount,
|
||||
admin_price: admin,
|
||||
},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user