fix: mio_saleout bug
This commit is contained in:
parent
3f544ada2f
commit
b3a23ce9be
|
@ -12,7 +12,7 @@ class SamService:
|
|||
"""
|
||||
order = mio.order
|
||||
for i in MIOItem.objects.filter(mio=mio):
|
||||
orderitem = OrderItem.objects.get(order=order, product=i.material)
|
||||
orderitem = OrderItem.objects.get(order=order, material=i.material)
|
||||
delivered_count = orderitem.delivered_count + i.count
|
||||
if delivered_count > orderitem.count:
|
||||
raise ValidationError((f'{i.material.name}-超出订单所需数量'))
|
||||
|
|
Loading…
Reference in New Issue