Added option to view Voided bills
This commit is contained in:
parent
17702a433b
commit
5ece52ad55
@ -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,
|
||||
|
@ -13,6 +13,7 @@
|
||||
<mat-option value="1">Regular Bill</mat-option>
|
||||
<mat-option value="4">Staff</mat-option>
|
||||
<mat-option value="2">No Charge</mat-option>
|
||||
<mat-option value="8">Void</mat-option>
|
||||
</mat-select>
|
||||
</mat-form-field>
|
||||
<mat-form-field fxFlex>
|
||||
|
@ -45,6 +45,9 @@ export class BillNumberComponent implements OnInit {
|
||||
case '2': // No Charge
|
||||
billId = 'NC-' + billNumber;
|
||||
break;
|
||||
case '8': // Void
|
||||
billId = 'V-' + billNumber;
|
||||
break;
|
||||
default:
|
||||
throw new Error('Unknown Bill Type');
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user