From 2be5104848d367fc7e916ab9c3c10d7146338cd6 Mon Sep 17 00:00:00 2001 From: Saqib Ansari Date: Thu, 23 Dec 2021 11:52:10 +0530 Subject: [PATCH] fix: cannot save debit note with zero quantity --- erpnext/controllers/accounts_controller.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/controllers/accounts_controller.py b/erpnext/controllers/accounts_controller.py index 2c92820a74..85325ac6ec 100644 --- a/erpnext/controllers/accounts_controller.py +++ b/erpnext/controllers/accounts_controller.py @@ -112,7 +112,7 @@ class AccountsController(TransactionBase): _('{0} is blocked so this transaction cannot proceed').format(supplier_name), raise_exception=1) def validate(self): - if not self.get('is_return'): + if not self.get('is_return') and not self.get('is_debit_note'): self.validate_qty_is_not_zero() if self.get("_action") and self._action != "update_after_submit":