Refactor keypad widget for mobile receiving
logic for this is now held in common
This commit is contained in:
parent
32d256932e
commit
8a5dbc33a7
2 changed files with 13 additions and 39 deletions
|
@ -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') {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue