Fixed: Issue batch update failed because of wrong date check.
This commit is contained in:
parent
8bc0950e23
commit
ff3c375295
@ -117,7 +117,7 @@ def issue_update_inventory(voucher, newInventories, batch_consumed):
|
||||
if batch_consumed == True and new_quantity - old_quantity > quantity_remaining:
|
||||
raise ValidationError("Maximum quantity available for {0} is {1}".format(item.product.full_name,
|
||||
old_quantity + quantity_remaining))
|
||||
if item.batch.name < voucher.date:
|
||||
if item.batch.name > voucher.date:
|
||||
raise ValidationError("Batch of {0} was purchased after the issue date".format(item.product.name))
|
||||
|
||||
if batch_consumed is None:
|
||||
|
Loading…
Reference in New Issue
Block a user