mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-21 19:25:16 +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"
|
status = "Draft"
|
||||||
elif self.docstatus == 1:
|
elif self.docstatus == 1:
|
||||||
status = "Completed"
|
status = "Completed"
|
||||||
|
|
||||||
if self.is_return:
|
if self.is_return:
|
||||||
status = "Return"
|
status = "Return"
|
||||||
return_against = frappe.get_doc("Subcontracting Receipt", self.return_against)
|
|
||||||
return_against.run_method("update_status")
|
|
||||||
elif self.per_returned == 100:
|
elif self.per_returned == 100:
|
||||||
status = "Return Issued"
|
status = "Return Issued"
|
||||||
|
|
||||||
elif self.docstatus == 2:
|
elif self.docstatus == 2:
|
||||||
status = "Cancelled"
|
status = "Cancelled"
|
||||||
|
|
||||||
|
if self.is_return:
|
||||||
|
frappe.get_doc("Subcontracting Receipt", self.return_against).update_status(
|
||||||
|
update_modified=update_modified
|
||||||
|
)
|
||||||
|
|
||||||
if status:
|
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):
|
def get_gl_entries(self, warehouse_account=None):
|
||||||
from erpnext.accounts.general_ledger import process_gl_map
|
from erpnext.accounts.general_ledger import process_gl_map
|
||||||
|
|||||||
Reference in New Issue
Block a user