fix: SCR return status (#36793)
This commit is contained in:
parent
54ffe41b54
commit
723563c167
@ -270,17 +270,24 @@ class SubcontractingReceipt(SubcontractingController):
|
||||
status = "Draft"
|
||||
elif self.docstatus == 1:
|
||||
status = "Completed"
|
||||
|
||||
if self.is_return:
|
||||
status = "Return"
|
||||
return_against = frappe.get_doc("Subcontracting Receipt", self.return_against)
|
||||
return_against.run_method("update_status")
|
||||
elif self.per_returned == 100:
|
||||
status = "Return Issued"
|
||||
|
||||
elif self.docstatus == 2:
|
||||
status = "Cancelled"
|
||||
|
||||
if self.is_return:
|
||||
frappe.get_doc("Subcontracting Receipt", self.return_against).update_status(
|
||||
update_modified=update_modified
|
||||
)
|
||||
|
||||
if status:
|
||||
frappe.db.set_value("Subcontracting Receipt", self.name, "status", status, update_modified)
|
||||
frappe.db.set_value(
|
||||
"Subcontracting Receipt", self.name, "status", status, update_modified=update_modified
|
||||
)
|
||||
|
||||
def get_gl_entries(self, warehouse_account=None):
|
||||
from erpnext.accounts.general_ledger import process_gl_map
|
||||
|
Loading…
x
Reference in New Issue
Block a user