From 70c9d22bbc96ef715f1c11fc3f4243b751044c0b Mon Sep 17 00:00:00 2001 From: tanshu Date: Tue, 10 Aug 2021 07:50:08 +0530 Subject: [PATCH] Fix: Void bill now saves old bill id --- barker/barker/routers/voucher/void.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/barker/barker/routers/voucher/void.py b/barker/barker/routers/voucher/void.py index cf1bf6f..0d31118 100644 --- a/barker/barker/routers/voucher/void.py +++ b/barker/barker/routers/voucher/void.py @@ -28,7 +28,7 @@ def void( try: with SessionFuture() as db: item: Voucher = db.execute(select(Voucher).where(Voucher.id == id_)).scalar_one() - item.reason = reason + item.reason = f"{reason} / Old Bill ID was: {item.full_bill_id}" item.bill_id = None item.voucher_type = VoucherType.VOID do_update_settlements(item, [SettleSchema(id=SettleOption.VOID(), amount=round(item.amount))], db)