Merge pull request #38258 from ruthra-kumar/rename_unreconcile

refactor: rename 'Unreconcile Payments' doctype to singular 'Unreconcile Payment'
This commit is contained in:
ruthra kumar
2023-11-22 10:03:13 +05:30
committed by GitHub
13 changed files with 29 additions and 29 deletions

View File

@@ -239,7 +239,7 @@ class AccountsController(TransactionBase):
references_map.setdefault(x.parent, []).append(x.name)
for doc, rows in references_map.items():
unreconcile_doc = frappe.get_doc("Unreconcile Payments", doc)
unreconcile_doc = frappe.get_doc("Unreconcile Payment", doc)
for row in rows:
unreconcile_doc.remove(unreconcile_doc.get("allocations", {"name": row})[0])
@@ -248,9 +248,9 @@ class AccountsController(TransactionBase):
unreconcile_doc.save(ignore_permissions=True)
# delete docs upon parent doc deletion
unreconcile_docs = frappe.db.get_all("Unreconcile Payments", filters={"voucher_no": self.name})
unreconcile_docs = frappe.db.get_all("Unreconcile Payment", filters={"voucher_no": self.name})
for x in unreconcile_docs:
_doc = frappe.get_doc("Unreconcile Payments", x.name)
_doc = frappe.get_doc("Unreconcile Payment", x.name)
if _doc.docstatus == 1:
_doc.cancel()
_doc.delete()