Merge branch 'master' into 'devops-production'
Master See merge request empatnusabangsa/ppob/ppob-backend!137
This commit is contained in:
commit
eed469a382
|
@ -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', {
|
||||||
|
|
|
@ -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)', {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user