Prefer received quantities over ordered quantities, for Order Form history

This commit is contained in:
Lance Edgar 2017-01-03 12:32:02 -06:00
parent d43e1e4a5f
commit e102fa3df5

View file

@ -196,10 +196,10 @@
% if data: % if data:
<% item = data['items'].get(cost.product_uuid) %> <% item = data['items'].get(cost.product_uuid) %>
% if item: % if item:
% if data['purchase']['date_ordered'] and (item['cases_ordered'] is not None or item['units_ordered'] is not None): % if item['cases_received'] is not None or item['units_received'] is not None:
${'{} / {}'.format(int(item['cases_ordered'] or 0), int(item['units_ordered'] or 0))}
% elif item['cases_received'] is not None or item['units_received'] is not None:
${'{} / {}'.format(int(item['cases_received'] or 0), int(item['units_received'] or 0))} ${'{} / {}'.format(int(item['cases_received'] or 0), int(item['units_received'] or 0))}
% elif item['cases_ordered'] is not None or item['units_ordered'] is not None:
${'{} / {}'.format(int(item['cases_ordered'] or 0), int(item['units_ordered'] or 0))}
% endif % endif
% endif % endif
% endif % endif