Merge branch 'development' into 'devops-staging'
fix: get product for transaction See merge request empatnusabangsa/ppob/ppob-backend!52
This commit is contained in:
commit
0eb95cd9df
|
@ -246,7 +246,12 @@ export class ProductService {
|
|||
'product.currentPrice',
|
||||
'product.priceHistory',
|
||||
'current_price',
|
||||
'current_price.partner_id is null',
|
||||
'current_price.partner_id is NULL and current_price.end_date is NULL',
|
||||
)
|
||||
.select(['product.id'])
|
||||
.addSelect(['product.name', 'product.code', 'sub_categories.name'])
|
||||
.addSelect(
|
||||
'(current_price.price + current_price.mark_up_price) as price',
|
||||
);
|
||||
|
||||
if (subCategories != 'null' && subCategories) {
|
||||
|
@ -256,9 +261,9 @@ export class ProductService {
|
|||
}
|
||||
|
||||
const data = await baseQuery
|
||||
.skip(page * (pageSize || 10))
|
||||
.take(pageSize || 10)
|
||||
.getMany();
|
||||
.offset(page * 10)
|
||||
.limit(10)
|
||||
.getRawMany();
|
||||
|
||||
const totalData = await baseQuery.getCount();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user