Fix: Kot move fixed. Kot id was missing on move. Also, voucher_type KOT as truthy not and would give bill not found error.
This commit is contained in:
parent
7550ced477
commit
565cffaef1
@ -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:
|
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()
|
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(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_404_NOT_FOUND,
|
status_code=status.HTTP_404_NOT_FOUND,
|
||||||
detail="Original bill not found",
|
detail="Original bill not found",
|
||||||
|
@ -220,7 +220,7 @@ export class BillsComponent implements OnInit {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
moveKot(kot: Kot) {
|
moveKot(kot: BillViewItem) {
|
||||||
const canMergeTables = this.auth.allowed('merge-tables');
|
const canMergeTables = this.auth.allowed('merge-tables');
|
||||||
this.chooseTable(canMergeTables)
|
this.chooseTable(canMergeTables)
|
||||||
.pipe(
|
.pipe(
|
||||||
@ -233,9 +233,9 @@ export class BillsComponent implements OnInit {
|
|||||||
return this.bs.moveTable(table);
|
return this.bs.moveTable(table);
|
||||||
}
|
}
|
||||||
if (table.status) {
|
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(
|
.subscribe(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user