diff --git a/tailbone/static/js/tailbone.mobile.js b/tailbone/static/js/tailbone.mobile.js index 9a377e18..35d691e5 100644 --- a/tailbone/static/js/tailbone.mobile.js +++ b/tailbone/static/js/tailbone.mobile.js @@ -192,10 +192,10 @@ $(document).on('change', 'fieldset.receiving-mode input[name="mode"]', function( // handle receiving action buttons $(document).on('click', '.receiving-actions button', function() { var action = $(this).data('action'); - var form = $('form.receiving-update'); - var uom = form.find('[name="receiving-uom"]:checked').val(); + var form = $(this).parents('form:first'); + var uom = form.find('[name="keypad-uom"]:checked').val(); var mode = form.find('[name="mode"]:checked').val(); - var qty = form.find('.receiving-quantity').text(); + var qty = form.find('.keypad-quantity').text(); if (action == 'add' || action == 'subtract') { if (qty != '0') { if (action == 'subtract') { diff --git a/tailbone/templates/mobile/receiving/view_row.mako b/tailbone/templates/mobile/receiving/view_row.mako index ecc4d156..a1649560 100644 --- a/tailbone/templates/mobile/receiving/view_row.mako +++ b/tailbone/templates/mobile/receiving/view_row.mako @@ -1,10 +1,18 @@ ## -*- coding: utf-8; -*- <%inherit file="/mobile/master/view_row.mako" /> +<%namespace file="/mobile/keypad.mako" import="keypad" /> ## TODO: this is broken for actual page (header) title <%def name="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()}%def> -<% unit_uom = 'LB' if row.product and row.product.weighed else 'EA' %> +<% + 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' +%> +
${h.link_to("7", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -${h.link_to("8", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -${h.link_to("9", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -
${h.link_to("4", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -${h.link_to("5", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -${h.link_to("6", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -
${h.link_to("1", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -${h.link_to("2", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -${h.link_to("3", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -
${h.link_to("0", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -${h.link_to(".", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -${h.link_to("Del", '#', class_='keypad-button ui-btn ui-btn-inline ui-corner-all')} | -