Fix: Void bill now saves old bill id
This commit is contained in:
parent
baefaeb228
commit
70c9d22bbc
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user