From d5efc51d61d9bdbe2acd9a84482a6f0fe0ae86a5 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 5 Mar 2019 11:03:24 -0600 Subject: [PATCH] Tweak the "incomplete" row filter for mobile receiving batch this really is not ideal...hopefully good enough to limp along for a while yet --- 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 40d0db29..b34fabd8 100644 --- a/tailbone/views/purchasing/receiving.py +++ b/tailbone/views/purchasing/receiving.py @@ -69,12 +69,13 @@ class MobileItemStatusFilter(grids.filters.MobileFilter): if value == 'incomplete': # looking for any rows with "ordered" quantity, but where the # status does *not* signify a "settled" row so to speak + # TODO: would be nice if we had a simple flag to leverage? return query.filter(sa.or_(model.PurchaseBatchRow.cases_ordered != 0, model.PurchaseBatchRow.units_ordered != 0))\ .filter(~model.PurchaseBatchRow.status_code.in_(( model.PurchaseBatchRow.STATUS_OK, model.PurchaseBatchRow.STATUS_PRODUCT_NOT_FOUND, - model.PurchaseBatchRow.STATUS_TRUCKDUMP_CLAIMED))) + model.PurchaseBatchRow.STATUS_CASE_QUANTITY_DIFFERS))) if value == 'invalid': return query.filter(model.PurchaseBatchRow.status_code.in_((