- change status to product history status
This commit is contained in:
@@ -282,8 +282,9 @@ export class ProductService {
|
|||||||
'current_price',
|
'current_price',
|
||||||
'current_price.partner_id is NULL and current_price.end_date is NULL',
|
'current_price.partner_id is NULL and current_price.end_date is NULL',
|
||||||
)
|
)
|
||||||
|
.leftJoin('product.statusHistory', 'status_history')
|
||||||
.where(
|
.where(
|
||||||
`product.supplier_id = :supplier_id and product.status = 'ACTIVE'`,
|
`product.supplier_id = :supplier_id and status_history.status = 'ACTIVE'`,
|
||||||
{
|
{
|
||||||
supplier_id: supplier,
|
supplier_id: supplier,
|
||||||
},
|
},
|
||||||
@@ -451,7 +452,6 @@ export class ProductService {
|
|||||||
relations: ['supplier'],
|
relations: ['supplier'],
|
||||||
where: {
|
where: {
|
||||||
code: code,
|
code: code,
|
||||||
status: 'ACTIVE',
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user