Fixed: Issue batch update failed because of wrong date check.

This commit is contained in:
Tanshu 2013-10-06 16:14:54 +05:30
parent 8bc0950e23
commit ff3c375295

View File

@ -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: