Add support for zero quantity for mobile inventory batch rows
This commit is contained in:
parent
c1e2c5551c
commit
076d3d8189
3 changed files with 16 additions and 4 deletions
|
@ -53,7 +53,17 @@
|
|||
% endif
|
||||
${h.hidden('units')}
|
||||
|
||||
${keypad(unit_uom, uom, quantity=(row.cases or row.units or 1) if allow_cases else (row.units or 1), allow_cases=allow_cases)}
|
||||
<%
|
||||
quantity = 1
|
||||
if allow_cases:
|
||||
if row.cases is not None:
|
||||
quantity = row.cases
|
||||
elif row.units is not None:
|
||||
quantity = row.units
|
||||
elif row.units is not None:
|
||||
quantity = row.units
|
||||
%>
|
||||
${keypad(unit_uom, uom, quantity=quantity, allow_cases=allow_cases)}
|
||||
|
||||
<fieldset data-role="controlgroup" data-type="horizontal" class="inventory-actions">
|
||||
<button type="button" class="ui-btn-inline ui-corner-all save">Save</button>
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
</table>
|
||||
|
||||
<fieldset data-role="controlgroup" data-type="horizontal">
|
||||
<button type="button" class="ui-btn-active keypad-quantity">${h.pretty_quantity(quantity or 1)}</button>
|
||||
<button type="button" class="ui-btn-active keypad-quantity">${h.pretty_quantity(1 if quantity is None else quantity)}</button>
|
||||
<button type="button" disabled="disabled"> </button>
|
||||
% if allow_cases:
|
||||
${h.radio('keypad-uom', value='CS', checked=selected_uom == 'CS', label="CS")}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue