fix: Division by zero error fix in group similar item
This commit is contained in:
parent
b8df611160
commit
e8d21cd8fa
@ -778,7 +778,12 @@ class AccountsController(TransactionBase):
|
||||
count += 1
|
||||
item.qty = group_item_qty[item.item_code]
|
||||
item.amount = group_item_amount[item.item_code]
|
||||
item.rate = flt(flt(item.amount) / flt(item.qty), item.precision("rate"))
|
||||
|
||||
if item.qty:
|
||||
item.rate = flt(flt(item.amount) / flt(item.qty), item.precision("rate"))
|
||||
else:
|
||||
item.rate = 0
|
||||
|
||||
item.idx = count
|
||||
del group_item_qty[item.item_code]
|
||||
else:
|
||||
|
Loading…
x
Reference in New Issue
Block a user