fix: incorrect status of the returned purchase receipt (#37300)

This commit is contained in:
rohitwaghchaure
2023-10-06 11:58:15 +05:30
committed by GitHub
parent 55a9a8fd51
commit 63f45739e0
4 changed files with 42 additions and 2 deletions

View File

@@ -190,7 +190,9 @@ class calculate_taxes_and_totals(object):
item.net_rate = item.rate
if not item.qty and self.doc.get("is_return"):
if (
not item.qty and self.doc.get("is_return") and self.doc.get("doctype") != "Purchase Receipt"
):
item.amount = flt(-1 * item.rate, item.precision("amount"))
elif not item.qty and self.doc.get("is_debit_note"):
item.amount = flt(item.rate, item.precision("amount"))