Feat: add column supplier_name and product_price at get list history user
This commit is contained in:
parent
e014b70f6c
commit
f77fae0e16
|
@ -530,7 +530,6 @@ export class TransactionService {
|
|||
|
||||
if (supplier.code != 'IRS') {
|
||||
const parsingResponse = hitSupplier.split(' ');
|
||||
console.log
|
||||
const newHitSupplier = {
|
||||
success: hitSupplier.includes('diproses'),
|
||||
harga: parseInt(
|
||||
|
@ -1570,7 +1569,8 @@ export class TransactionService {
|
|||
)
|
||||
.leftJoin('transaction.product_price', 'product_price')
|
||||
.leftJoin('product_price.product', 'product')
|
||||
.addSelect('transaction.amount', 'price')
|
||||
.leftJoin('product.supplier', 'supplier')
|
||||
.addSelect('transaction.amount', 'price')
|
||||
.addSelect('transaction.destination')
|
||||
.addSelect('transaction.seri_number', 'seri_number')
|
||||
.addSelect('transaction.supplier_trx_id', 'transaction_code')
|
||||
|
@ -1579,8 +1579,10 @@ export class TransactionService {
|
|||
.addSelect('transaction.failed_reason', 'failed_reason')
|
||||
.addSelect('userData.name', 'buyer')
|
||||
.addSelect('product.name', 'name')
|
||||
.addSelect('product.id', 'product_id')
|
||||
.orderBy('transaction.created_at', 'DESC');
|
||||
.addSelect('product_price.price', 'product_price')
|
||||
.addSelect('product.name', 'supplier_name')
|
||||
.addSelect('supplier.name', 'supplier_name')
|
||||
.orderBy('transaction.created_at', 'DESC');
|
||||
|
||||
if (startDate && endDate) {
|
||||
baseQuery.andWhere(
|
||||
|
|
Loading…
Reference in New Issue
Block a user