Merge branch 'develop' into fixed-transferred-materials-are-not-consumed

This commit is contained in:
Sagar Sharma
2022-06-21 13:23:37 +05:30
committed by GitHub
67 changed files with 1330 additions and 441 deletions

View File

@@ -1305,7 +1305,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters):
if not field in searchfields
]
query_filters = {"disabled": 0, "ifnull(end_of_life, '5050-50-50')": (">", today())}
query_filters = {"disabled": 0, "end_of_life": (">", today())}
or_cond_filters = {}
if txt:

View File

@@ -849,7 +849,7 @@ def get_subitems(
FROM
`tabBOM Item` bom_item
JOIN `tabBOM` bom ON bom.name = bom_item.parent
JOIN tabItem item ON bom_item.item_code = item.name
JOIN `tabItem` item ON bom_item.item_code = item.name
LEFT JOIN `tabItem Default` item_default
ON item.name = item_default.parent and item_default.company = %(company)s
LEFT JOIN `tabUOM Conversion Detail` item_uom
@@ -979,7 +979,7 @@ def get_sales_orders(self):
select distinct so.name, so.transaction_date, so.customer, so.base_grand_total
from `tabSales Order` so, `tabSales Order Item` so_item
where so_item.parent = so.name
and so.docstatus = 1 and so.status not in ("Stopped", "Closed")
and so.docstatus = 1 and so.status not in ('Stopped', 'Closed')
and so.company = %(company)s
and so_item.qty > so_item.work_order_qty {so_filter} {item_filter}
and (exists (select name from `tabBOM` bom where {bom_item}

View File

@@ -939,7 +939,7 @@ class WorkOrder(Document):
from `tabStock Entry` entry, `tabStock Entry Detail` detail
where
entry.work_order = %(name)s
and entry.purpose = "Material Transfer for Manufacture"
and entry.purpose = 'Material Transfer for Manufacture'
and entry.docstatus = 1
and detail.parent = entry.name
and (detail.item_code = %(item)s or detail.original_item = %(item)s)""",