Clean up some inventory batch UI logic; prefer units by default

This commit is contained in:
Lance Edgar 2018-12-18 15:13:01 -06:00
parent d61d9cc574
commit c7496d7018
5 changed files with 22 additions and 17 deletions

View file

@ -5,19 +5,6 @@
## TODO: this is broken for actual page (header) title
<%def name="title()">${h.link_to("Inventory", url('mobile.batch.inventory'))} &raquo; ${h.link_to(batch.id_str, url('mobile.batch.inventory.view', uuid=batch.uuid))} &raquo; ${row.upc.pretty()}</%def>
<%
unit_uom = 'LB' if row.product and row.product.weighed else 'EA'
if row.cases and allow_cases:
uom = 'CS'
elif row.units:
uom = unit_uom
elif row.case_quantity and allow_cases:
uom = 'CS'
else:
uom = unit_uom
%>
<div class="ui-grid-a">
<div class="ui-block-a">
% if instance.product: