diff --git a/brewman/brewman/views/services/voucher/issue.py b/brewman/brewman/views/services/voucher/issue.py index c091f53e..cd93baf0 100644 --- a/brewman/brewman/views/services/voucher/issue.py +++ b/brewman/brewman/views/services/voucher/issue.py @@ -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: