fix: Item qty cannot be zero in Purchase Receipt (#19779)
This commit is contained in:
parent
728f8d09c8
commit
c68a940aac
@ -415,9 +415,10 @@ class AccountsController(TransactionBase):
|
|||||||
return gl_dict
|
return gl_dict
|
||||||
|
|
||||||
def validate_qty_is_not_zero(self):
|
def validate_qty_is_not_zero(self):
|
||||||
for item in self.items:
|
if self.doctype != "Purchase Receipt":
|
||||||
if not item.qty:
|
for item in self.items:
|
||||||
frappe.throw(_("Item quantity can not be zero"))
|
if not item.qty:
|
||||||
|
frappe.throw(_("Item quantity can not be zero"))
|
||||||
|
|
||||||
def validate_account_currency(self, account, account_currency=None):
|
def validate_account_currency(self, account, account_currency=None):
|
||||||
valid_currency = [self.company_currency]
|
valid_currency = [self.company_currency]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user