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

This commit is contained in:
Shllokkk
2026-06-03 12:04:19 +05:30
committed by GitHub
parent 5074597d00
commit 0c61ad4e6d
3 changed files with 50 additions and 5 deletions

View File

@@ -183,7 +183,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"
)