Fix: Voucher Update would not filter out Zero quantity inventories.
This commit is contained in:
parent
7cf6775ea1
commit
d14250c0c7
@ -110,7 +110,7 @@ def do_save(
|
||||
item.kots.append(kot)
|
||||
db.add(kot)
|
||||
for index, i in enumerate(k.inventories):
|
||||
if i.quantity == 0:
|
||||
if round(i.quantity, 2) == 0:
|
||||
continue
|
||||
total_quantity = round(
|
||||
sum(inv.quantity for ko in data.kots for inv in ko.inventories if inv.product.id_ == i.product.id_),
|
||||
|
@ -110,6 +110,8 @@ def update_route(
|
||||
item.kots.append(kot)
|
||||
db.add(kot)
|
||||
for index, i in enumerate(k.inventories):
|
||||
if round(i.quantity, 2) == 0:
|
||||
continue
|
||||
product: ProductVersion = db.execute(
|
||||
select(ProductVersion).where(
|
||||
and_(
|
||||
|
Loading…
Reference in New Issue
Block a user