mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-16 11:39:18 +00:00
Update fix_invoice_outstanding.py
This commit is contained in:
@@ -6,7 +6,8 @@ import frappe
|
|||||||
from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt
|
from erpnext.accounts.doctype.gl_entry.gl_entry import update_outstanding_amt
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
frappe.reload_doctype("Sales Invoice")
|
||||||
return_entries = frappe.get_list("Sales Invoice", filters={"is_return": 1, "docstatus": 1},
|
return_entries = frappe.get_list("Sales Invoice", filters={"is_return": 1, "docstatus": 1},
|
||||||
fields=["debit_to", "customer", "return_against"])
|
fields=["debit_to", "customer", "return_against"])
|
||||||
for d in return_entries:
|
for d in return_entries:
|
||||||
update_outstanding_amt(d.debit_to, "Customer", d.customer, "Sales Invoice", d.return_against)
|
update_outstanding_amt(d.debit_to, "Customer", d.customer, "Sales Invoice", d.return_against)
|
||||||
|
|||||||
Reference in New Issue
Block a user