From e102fa3df587d3733eb8ceb8c7b30b2f2ea7cc55 Mon Sep 17 00:00:00 2001 From: Lance Edgar Date: Tue, 3 Jan 2017 12:32:02 -0600 Subject: [PATCH] Prefer received quantities over ordered quantities, for Order Form history --- tailbone/templates/purchases/batches/order_form.mako | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tailbone/templates/purchases/batches/order_form.mako b/tailbone/templates/purchases/batches/order_form.mako index cb56a15a..e6ca382a 100644 --- a/tailbone/templates/purchases/batches/order_form.mako +++ b/tailbone/templates/purchases/batches/order_form.mako @@ -196,10 +196,10 @@ % if data: <% item = data['items'].get(cost.product_uuid) %> % if item: - % if data['purchase']['date_ordered'] and (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))} - % elif item['cases_received'] is not None or item['units_received'] is not None: + % if 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))} + % 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