Fix: Date was not updated when the bill was printed.

This commit is contained in:
Amritanshu Agrawal 2023-03-14 00:15:35 +05:30
parent 77c7b167ef
commit 65700d2760

View File

@ -71,6 +71,8 @@ def update_route(
status_code=status.HTTP_500_INTERNAL_SERVER_ERROR,
detail="Internal error, reprints should not reach here",
)
if item.voucher_type == VoucherType.KOT and voucher_type != VoucherType.KOT:
item.date = now
item.voucher_type = voucher_type
item.user_id = user.id_
item.last_edit_date = now