Tweaks to improve handling of "missing" items for receiving
This commit is contained in:
parent
e894d1d1f4
commit
70956a2c47
4 changed files with 27 additions and 1 deletions
|
@ -280,6 +280,15 @@ class ReceivingBatchRowViews(APIBatchRowView):
|
|||
]},
|
||||
])
|
||||
|
||||
# is_missing
|
||||
elif filtr['field'] == 'is_missing' and filtr['op'] == 'eq' and filtr['value'] is True:
|
||||
filters.extend([
|
||||
{'or': [
|
||||
{'field': 'cases_missing', 'op': '!=', 'value': 0},
|
||||
{'field': 'units_missing', 'op': '!=', 'value': 0},
|
||||
]},
|
||||
])
|
||||
|
||||
else: # just some filter, use as-is
|
||||
filters.append(filtr)
|
||||
|
||||
|
@ -326,6 +335,9 @@ class ReceivingBatchRowViews(APIBatchRowView):
|
|||
data['cases_expired'] = row.cases_expired
|
||||
data['units_expired'] = row.units_expired
|
||||
|
||||
data['cases_missing'] = row.cases_missing
|
||||
data['units_missing'] = row.units_missing
|
||||
|
||||
cases, units = self.batch_handler.get_unconfirmed_counts(row)
|
||||
data['cases_unconfirmed'] = cases
|
||||
data['units_unconfirmed'] = units
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue