## -*- coding: utf-8; -*- <%inherit file="/mobile/master/view_row.mako" /> <%namespace file="/mobile/keypad.mako" import="keypad" /> <%def name="title()">Receiving » ${instance.batch.id_str} » ${row.upc.pretty()} <%def name="page_title()">${h.link_to("Receiving", url('mobile.receiving'))} » ${h.link_to(instance.batch.id_str, url('mobile.receiving.view', uuid=instance.batch_uuid))} » ${row.upc.pretty()} <% unit_uom = 'LB' if row.product and row.product.weighed else 'EA' uom = 'CS' if row.units_ordered and not row.cases_ordered: uom = 'EA' %>
% if instance.product:

${instance.brand_name or ""}

${instance.description} ${instance.size}

${h.pretty_quantity(row.case_quantity)} ${unit_uom} per CS

% else:

${instance.description}

% endif
${h.image(product_image_url, "product image")}
ordered ${h.pretty_quantity(row.cases_ordered or 0)} / ${h.pretty_quantity(row.units_ordered or 0)}
received ${h.pretty_quantity(row.cases_received or 0)} / ${h.pretty_quantity(row.units_received or 0)}
damaged ${h.pretty_quantity(row.cases_damaged or 0)} / ${h.pretty_quantity(row.units_damaged or 0)}
expired ${h.pretty_quantity(row.cases_expired or 0)} / ${h.pretty_quantity(row.units_expired or 0)}
% if request.session.peek_flash('receiving-warning'): % for error in request.session.pop_flash('receiving-warning'):
${error}
% endfor % endif % if not instance.batch.executed and not instance.batch.complete: ${h.form(request.current_route_url(), class_='receiving-update')} ${h.csrf_token(request)} ${h.hidden('row', value=row.uuid)} ${h.hidden('cases')} ${h.hidden('units')} ${keypad(unit_uom, uom)}
${h.radio('mode', value='received', label="received", checked=True)} ${h.radio('mode', value='damaged', label="damaged")} ${h.radio('mode', value='expired', label="expired")}
##
${h.end_form()} % endif