From c73b81291144866efb80448415214ffe7b8e2ea6 Mon Sep 17 00:00:00 2001 From: tanshu Date: Fri, 2 Jul 2021 09:28:12 +0530 Subject: [PATCH] Fix: Rare case where after bill is printed and nother kot added, the void bill kots have same time and a wrong kot can be printed. This orders the kots by code, not time and so should take care of the issue --- barker/barker/models/voucher.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/barker/barker/models/voucher.py b/barker/barker/models/voucher.py index e46b2b8..a568646 100644 --- a/barker/barker/models/voucher.py +++ b/barker/barker/models/voucher.py @@ -52,7 +52,7 @@ class Voucher(Base): backref="voucher", cascade="delete, delete-orphan", cascade_backrefs=False, - order_by=Kot.date, + order_by=Kot.code, ) settlements = relationship( "Settlement",