mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-22 02:46:29 +00:00
fix: SCR return status (#36793)
(cherry picked from commit 723563c167)
Co-authored-by: s-aga-r <sagarsharma.s312@gmail.com>
This commit is contained in:
@@ -268,17 +268,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
|
||||
|
||||
Reference in New Issue
Block a user