Merge branch 'development' into 'master'

add: order by in product retail

See merge request empatnusabangsa/ppob/ppob-backend!140
This commit is contained in:
ilham dwi pratama 2022-03-10 17:25:52 +00:00
commit ea54c113fa

View File

@ -263,9 +263,8 @@ export class ProductService {
) )
.select(['product.id']) .select(['product.id'])
.addSelect(['product.name', 'product.code', 'sub_categories.name']) .addSelect(['product.name', 'product.code', 'sub_categories.name'])
.addSelect( .addSelect('(current_price.price + current_price.mark_up_price) as price')
'(current_price.price + current_price.mark_up_price) as price', .orderBy('price', 'ASC');
);
if (subCategories != 'null' && subCategories) { if (subCategories != 'null' && subCategories) {
baseQuery.andWhere('product.sub_categories_id = :id', { baseQuery.andWhere('product.sub_categories_id = :id', {