diff --git a/barker/barker/routers/voucher/merge_move.py b/barker/barker/routers/voucher/merge_move.py index c0d144a..4b68898 100644 --- a/barker/barker/routers/voucher/merge_move.py +++ b/barker/barker/routers/voucher/merge_move.py @@ -165,7 +165,7 @@ def update_settlements(vouchers: List[uuid.UUID], db: Session): def check_if_voucher_is_unprinted(voucher_id: uuid.UUID, db: Session) -> None: voucher_type: VoucherType = db.query(Voucher.voucher_type).filter(Voucher.id == voucher_id).scalar() - if not voucher_type: + if voucher_type is None: raise HTTPException( status_code=status.HTTP_404_NOT_FOUND, detail="Original bill not found", diff --git a/bookie/src/app/sales/bills/bills.component.ts b/bookie/src/app/sales/bills/bills.component.ts index 776d1b4..58ecf81 100644 --- a/bookie/src/app/sales/bills/bills.component.ts +++ b/bookie/src/app/sales/bills/bills.component.ts @@ -220,7 +220,7 @@ export class BillsComponent implements OnInit { ); } - moveKot(kot: Kot) { + moveKot(kot: BillViewItem) { const canMergeTables = this.auth.allowed('merge-tables'); this.chooseTable(canMergeTables) .pipe( @@ -233,9 +233,9 @@ export class BillsComponent implements OnInit { return this.bs.moveTable(table); } if (table.status) { - return this.bs.mergeKot(kot.id as string, table); + return this.bs.mergeKot(kot.kotId as string, table); } - return this.bs.moveKot(kot.id as string, table); + return this.bs.moveKot(kot.kotId as string, table); }), ) .subscribe(