fix: transaction service

This commit is contained in:
ilham 2022-02-27 09:02:11 +07:00
parent ec6e8da63c
commit ddda6020a3

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', {