Avoid status updation for purchase invoice from paid to unpaid by issuing a paid debit note against it (backport #54382) (#55576)

Co-authored-by: Shllokkk <140623894+Shllokkk@users.noreply.github.com>
This commit is contained in:
mergify[bot]
2026-06-03 14:11:25 +05:30
committed by GitHub
parent 37b61f06ae
commit 8f9db3c72d
3 changed files with 50 additions and 5 deletions

View File

@@ -182,7 +182,7 @@ class AccountsController(TransactionBase):
if not get_meta(self.doctype).has_field("outstanding_amount"):
return
if self.get("is_return") and self.return_against and not self.get("is_pos"):
if self.get("is_return") and self.return_against and not (self.get("is_pos") or self.get("is_paid")):
against_voucher_outstanding = frappe.get_value(
self.doctype, self.return_against, "outstanding_amount"
)