Added option to view Voided bills
This commit is contained in:
@ -59,6 +59,11 @@ def from_bill(
|
||||
Voucher.bill_id == int(id_.replace("ST-", "")),
|
||||
Voucher.voucher_type == VoucherType.STAFF,
|
||||
)
|
||||
elif re.compile(r"^V-\d+$").match(id_):
|
||||
query = query.where(
|
||||
Voucher.kot_id == int(id_.replace("V-", "")),
|
||||
Voucher.voucher_type == VoucherType.VOID,
|
||||
)
|
||||
else:
|
||||
raise HTTPException(
|
||||
status_code=status.HTTP_422_UNPROCESSABLE_ENTITY,
|
||||
|
||||
Reference in New Issue
Block a user