diff --git a/brewman/brewman/views/services/voucher/issue.py b/brewman/brewman/views/services/voucher/issue.py index e4f88483..c091f53e 100644 --- a/brewman/brewman/views/services/voucher/issue.py +++ b/brewman/brewman/views/services/voucher/issue.py @@ -41,8 +41,8 @@ def issue_create_inventory(voucher, item, batch_consumed): raise ValidationError("Quantity of {0} cannot be zero".format(item.product.name)) if batch_consumed == True and quantity > batch.quantity_remaining: raise ValidationError("Quantity available is {0} only".format(batch.quantity_remaining)) - if batch.name < voucher.date: - raise ValidationError("Batch of {0} was purchased after the issue date".format(item.product.name)) + if batch.name > voucher.date: + raise ValidationError("Batch of {0} was purchased after the issue date".format(batch.product.name)) if batch_consumed is None: pass elif batch_consumed: