diff --git a/src/product/history-price/history-price.service.ts b/src/product/history-price/history-price.service.ts index 0d1d06d..1a48c96 100644 --- a/src/product/history-price/history-price.service.ts +++ b/src/product/history-price/history-price.service.ts @@ -115,8 +115,8 @@ export class ProductHistoryPriceService { const query = this.productHistoryPriceRepository .createQueryBuilder('product_history_price') .leftJoin('product_history_price.product', 'product') - .where({ product: productId }) - .andWhere('product_history_price.endDate IS NULL'); + .where({ product: productId }); + // .andWhere('product_history_price.endDate IS NULL'); if (supplierId !== 'null' && supplierId) { query.andWhere('product.supplier = :supplierId', { diff --git a/src/product/product.service.ts b/src/product/product.service.ts index 0a29b68..9ec8bac 100644 --- a/src/product/product.service.ts +++ b/src/product/product.service.ts @@ -181,7 +181,8 @@ export class ProductService { .addSelect('current_price.price') .addSelect( '(current_price.price + current_price.mark_up_price) as mark_up_price', - ); + ) + .orderBy('product.code'); if (subCategories && filterSubCategories.length > 0) { baseQuery.where('product.sub_categories_id IN (:...subCategoryId)', {