Added option to view Voided bills
This commit is contained in:
1 parent
17702a433b
commit
5ece52ad55
3 files changed
+9
No files matched your search
@@ -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