[fix] Sales order link to purchase order not working fixed
This commit is contained in:
parent
e37e5d6134
commit
4dc329f5ea
@ -65,7 +65,7 @@ class MaterialRequest(BuyingController):
|
||||
self.status = "Draft"
|
||||
|
||||
from erpnext.controllers.status_updater import validate_status
|
||||
validate_status(self.status,
|
||||
validate_status(self.status,
|
||||
["Draft", "Submitted", "Stopped", "Cancelled", "Pending",
|
||||
"Partially Ordered", "Ordered", "Issued", "Transferred"])
|
||||
|
||||
@ -240,7 +240,8 @@ def make_purchase_order(source_name, target_doc=None):
|
||||
["name", "material_request_item"],
|
||||
["parent", "material_request"],
|
||||
["uom", "stock_uom"],
|
||||
["uom", "uom"]
|
||||
["uom", "uom"],
|
||||
["sales_order", "sales_order"]
|
||||
],
|
||||
"postprocess": update_item,
|
||||
"condition": lambda doc: doc.ordered_qty < doc.stock_qty
|
||||
|
@ -472,8 +472,8 @@ def get_projected_qty(item_code, warehouse):
|
||||
@frappe.whitelist()
|
||||
def get_bin_details(item_code, warehouse):
|
||||
return frappe.db.get_value("Bin", {"item_code": item_code, "warehouse": warehouse},
|
||||
["projected_qty", "actual_qty"], as_dict=True) \
|
||||
or {"projected_qty": 0, "actual_qty": 0}
|
||||
["projected_qty", "actual_qty", "ordered_qty"], as_dict=True) \
|
||||
or {"projected_qty": 0, "actual_qty": 0, "ordered_qty": 0}
|
||||
|
||||
@frappe.whitelist()
|
||||
def get_serial_no_details(item_code, warehouse, stock_qty, serial_no):
|
||||
|
Loading…
Reference in New Issue
Block a user