Refactor purchasing batch views per master4

This commit is contained in:
Lance Edgar 2018-02-05 12:59:34 -06:00
parent dfc5e0f50e
commit 8137d715df
6 changed files with 328 additions and 186 deletions

View file

@ -1,6 +1,6 @@
## -*- coding: utf-8; -*-
<%inherit file="/mobile/master/create_row.mako" />
<%def name="title()">${h.link_to(index_title, index_url)} &raquo; ${h.link_to(instance_title, instance_url)} &raquo; Add Item</%def>
<%def name="page_title()">${h.link_to(index_title, index_url)} &raquo; ${h.link_to(instance_title, instance_url)} &raquo; Add Item</%def>
${parent.body()}

View file

@ -288,5 +288,9 @@ ${h.end_form()}
<td class="case-qty">${h.pretty_quantity(cost.case_size)} ${"LB" if cost.product.weighed else "EA"}</td>
<td class="code">${cost.code or ''}</td>
<td class="preferred">${'X' if cost.preference == 1 else ''}</td>
<td class="unit-cost">$${'{:0.2f}'.format(cost.unit_cost)}</td>
<td class="unit-cost">
% if cost.unit_cost is not None:
$${'{:0.2f}'.format(cost.unit_cost)}
% endif
</td>
</%def>

View file

@ -1,4 +1,4 @@
## -*- coding: utf-8 -*-
## -*- coding: utf-8; -*-
<html>
<head>
<title>Receiving Worksheet</title>
@ -76,7 +76,7 @@
<tbody>
% for item in purchase.items:
<tr>
<td>${item.upc.pretty()}</td>
<td>${item.upc.pretty() if item.upc else item.item_id}</td>
<td>${item.vendor_code or ''}</td>
<td>${(item.brand_name or '')[:15]}</td>
<td>${item.description or ''}</td>