## -*- coding: utf-8; -*- <%inherit file="/master/view.mako" /> <%def name="extra_javascript()"> ${parent.extra_javascript()} % if not use_buefy and request.rattail_config.versioning_enabled() and master.has_perm('versions'): % endif %def> <%def name="extra_styles()"> ${parent.extra_styles()} %def> <%def name="render_main_fields(form)"> ${form.render_field_readonly('upc')} ${form.render_field_readonly('brand')} ${form.render_field_readonly('description')} ${form.render_field_readonly('size')} ${form.render_field_readonly('unit_size')} ${form.render_field_readonly('unit_of_measure')} ${form.render_field_readonly('case_size')} % if instance.is_pack_item(): ${form.render_field_readonly('pack_size')} ${form.render_field_readonly('unit')} ${form.render_field_readonly('default_pack')} % elif instance.packs: ${form.render_field_readonly('packs')} % endif ${self.extra_main_fields(form)} %def> <%def name="left_column()"> % if use_buefy: % else:
Seq | Code | % for code in instance._codes:
---|---|
${code.ordinal} | ${code.code} |
${costs_label_preferred} | ${costs_label_vendor} | ${costs_label_code} | ${costs_label_case_size} | Case Cost | Unit Cost | Status | % for i, cost in enumerate(instance.costs, 1):
---|---|---|---|---|---|---|
${'X' if cost.preference == 1 else ''} | % if request.has_perm('vendors.view'): ${h.link_to(cost.vendor, request.route_url('vendors.view', uuid=cost.vendor_uuid))} % else: ${cost.vendor} % endif | ${cost.code or ''} | ${h.pretty_quantity(cost.case_size)} | ${'$ %0.2f' % cost.case_cost if cost.case_cost is not None else ''} | ${'$ %0.4f' % cost.unit_cost if cost.unit_cost is not None else ''} | ${"discontinued" if cost.discontinued else "available"} |