Merge branch 'development' into 'devops-staging'

Development

See merge request empatnusabangsa/ppob/ppob-backend!136
This commit is contained in:
ilham dwi pratama 2022-02-27 02:18:44 +00:00
commit 77b3a77ca8
2 changed files with 4 additions and 3 deletions

View File

@ -115,8 +115,8 @@ export class ProductHistoryPriceService {
const query = this.productHistoryPriceRepository const query = this.productHistoryPriceRepository
.createQueryBuilder('product_history_price') .createQueryBuilder('product_history_price')
.leftJoin('product_history_price.product', 'product') .leftJoin('product_history_price.product', 'product')
.where({ product: productId }) .where({ product: productId });
.andWhere('product_history_price.endDate IS NULL'); // .andWhere('product_history_price.endDate IS NULL');
if (supplierId !== 'null' && supplierId) { if (supplierId !== 'null' && supplierId) {
query.andWhere('product.supplier = :supplierId', { query.andWhere('product.supplier = :supplierId', {

View File

@ -181,7 +181,8 @@ export class ProductService {
.addSelect('current_price.price') .addSelect('current_price.price')
.addSelect( .addSelect(
'(current_price.price + current_price.mark_up_price) as mark_up_price', '(current_price.price + current_price.mark_up_price) as mark_up_price',
); )
.orderBy('product.code');
if (subCategories && filterSubCategories.length > 0) { if (subCategories && filterSubCategories.length > 0) {
baseQuery.where('product.sub_categories_id IN (:...subCategoryId)', { baseQuery.where('product.sub_categories_id IN (:...subCategoryId)', {