mirror of
https://github.com/frappe/erpnext.git
synced 2026-10-29 22:57:42 +00:00
fix(accounts): refresh invoice status after returns
This commit is contained in:
@@ -884,6 +884,9 @@ class PurchaseInvoice(BuyingController):
|
||||
|
||||
self.process_common_party_accounting()
|
||||
|
||||
if self.is_return and self.return_against:
|
||||
frappe.get_doc(self.doctype, self.return_against).set_status(update=True)
|
||||
|
||||
def on_update_after_submit(self):
|
||||
fields_to_check = [
|
||||
"cash_bank_account",
|
||||
@@ -1842,6 +1845,9 @@ class PurchaseInvoice(BuyingController):
|
||||
)
|
||||
self.update_advance_tax_references(cancel=1)
|
||||
|
||||
if self.is_return and self.return_against:
|
||||
frappe.get_doc(self.doctype, self.return_against).set_status(update=True)
|
||||
|
||||
def update_project(self):
|
||||
update_purchase_cost({d.project for d in self.items if d.project})
|
||||
|
||||
|
||||
@@ -537,6 +537,9 @@ class SalesInvoice(SellingController):
|
||||
|
||||
self.process_common_party_accounting()
|
||||
|
||||
if self.is_return and self.return_against:
|
||||
frappe.get_doc(self.doctype, self.return_against).set_status(update=True)
|
||||
|
||||
def validate_pos_return(self):
|
||||
if self.is_consolidated:
|
||||
# pos return is already validated in pos invoice
|
||||
@@ -640,6 +643,9 @@ class SalesInvoice(SellingController):
|
||||
|
||||
self.delete_auto_created_batches()
|
||||
|
||||
if self.is_return and self.return_against:
|
||||
frappe.get_doc(self.doctype, self.return_against).set_status(update=True)
|
||||
|
||||
def update_status_updater_args(self):
|
||||
if cint(self.update_stock):
|
||||
self.status_updater.append(
|
||||
|
||||
Reference in New Issue
Block a user