fix: order status in Production Planning Report
This commit is contained in:
parent
7cbb6c4de9
commit
632c08f7e0
@ -49,7 +49,7 @@ class ProductionPlanReport(object):
|
||||
parent.bom_no,
|
||||
parent.fg_warehouse.as_("warehouse"),
|
||||
)
|
||||
.where(parent.status.notin(["Completed", "Stopped"]))
|
||||
.where(parent.status.notin(["Completed", "Stopped", "Closed"]))
|
||||
)
|
||||
|
||||
if order_by == "Planned Start Date":
|
||||
@ -79,10 +79,11 @@ class ProductionPlanReport(object):
|
||||
query = query.where(child.parent.isin(self.filters.docnames))
|
||||
|
||||
if doctype == "Sales Order":
|
||||
query = query.select(
|
||||
child.delivery_date,
|
||||
parent.base_grand_total,
|
||||
).where((child.stock_qty > child.produced_qty) & (parent.per_delivered < 100.0))
|
||||
query = query.select(child.delivery_date, parent.base_grand_total,).where(
|
||||
(child.stock_qty > child.produced_qty)
|
||||
& (parent.per_delivered < 100.0)
|
||||
& (parent.status.notin(["Completed", "Closed"]))
|
||||
)
|
||||
|
||||
if order_by == "Delivery Date":
|
||||
query = query.orderby(child.delivery_date, order=Order.asc)
|
||||
@ -91,7 +92,9 @@ class ProductionPlanReport(object):
|
||||
|
||||
elif doctype == "Material Request":
|
||||
query = query.select(child.schedule_date,).where(
|
||||
(parent.per_ordered < 100) & (parent.material_request_type == "Manufacture")
|
||||
(parent.per_ordered < 100)
|
||||
& (parent.material_request_type == "Manufacture")
|
||||
& (parent.status != "Stopped")
|
||||
)
|
||||
|
||||
if order_by == "Required Date":
|
||||
|
Loading…
Reference in New Issue
Block a user