From 9da7ba21bf50e724d208dc794b788880873fd25b Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Mon, 10 Jul 2017 16:39:35 -0500 Subject: [PATCH] Sort mobile receiving batches by ID desc --- tailbone/views/purchasing/receiving.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tailbone/views/purchasing/receiving.py b/tailbone/views/purchasing/receiving.py index 32662bc4..81a1c343 100644 --- a/tailbone/views/purchasing/receiving.py +++ b/tailbone/views/purchasing/receiving.py @@ -120,7 +120,8 @@ class ReceivingBatchView(PurchasingBatchView): .filter(model.PurchaseBatch.executed == None)\ .filter(sa.or_( model.PurchaseBatch.complete == None, - model.PurchaseBatch.complete == False)) + model.PurchaseBatch.complete == False))\ + .order_by(model.PurchaseBatch.id.desc()) def configure_mobile_grid(self, g): super(ReceivingBatchView, self).configure_mobile_grid(g)