Add support for variance inventory batches, aggregation by product
kind of a rushed job but hopefully this is all good...
This commit is contained in:
parent
5bc4a1618b
commit
db645fb393
2 changed files with 127 additions and 38 deletions
|
@ -101,7 +101,13 @@
|
|||
$('#description').val(data.product.description);
|
||||
$('#size').val(data.product.size);
|
||||
$('#case_quantity').val(data.product.case_quantity);
|
||||
if (data.product.type2) {
|
||||
|
||||
if (data.already_present_in_batch) {
|
||||
$('#product-info .warning.present').show();
|
||||
$('#cases').val(data.cases);
|
||||
$('#units').val(data.units);
|
||||
|
||||
} else if (data.product.type2) {
|
||||
$('#units').val(data.product.units);
|
||||
}
|
||||
|
||||
|
@ -117,11 +123,18 @@
|
|||
% endif
|
||||
$('.field-wrapper.units input').prop('disabled', false);
|
||||
$('.buttons button').button('enable');
|
||||
|
||||
if (data.product.type2) {
|
||||
$('#units').focus().select();
|
||||
} else {
|
||||
% if allow_cases:
|
||||
$('#cases').focus().select();
|
||||
if ($('#cases').val()) {
|
||||
$('#cases').focus().select();
|
||||
} else if ($('#units').val()) {
|
||||
$('#units').focus().select();
|
||||
} else {
|
||||
$('#cases').focus().select();
|
||||
}
|
||||
% else:
|
||||
$('#units').focus().select();
|
||||
% endif
|
||||
|
@ -222,6 +235,7 @@
|
|||
<p>please ENTER a scancode</p>
|
||||
<div class="img-wrapper"><img /></div>
|
||||
<div class="warning notfound">please confirm UPC and provide more details</div>
|
||||
<div class="warning present">product already exists in batch, please confirm count</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue