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.currentPrice',
|
||||||
'product.priceHistory',
|
'product.priceHistory',
|
||||||
'current_price',
|
'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) {
|
if (subCategories != 'null' && subCategories) {
|
||||||
|
@ -256,9 +261,9 @@ export class ProductService {
|
||||||
}
|
}
|
||||||
|
|
||||||
const data = await baseQuery
|
const data = await baseQuery
|
||||||
.skip(page * (pageSize || 10))
|
.offset(page * 10)
|
||||||
.take(pageSize || 10)
|
.limit(10)
|
||||||
.getMany();
|
.getRawMany();
|
||||||
|
|
||||||
const totalData = await baseQuery.getCount();
|
const totalData = await baseQuery.getCount();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user