self.getParent().barcode_scanner.disconnect();
});
this.$('.js_qty').blur(function(){
- this.value = "";
+ var op_id = $(this).parents("[data-id]:first").data('id');
+ var value = parseFloat($(this).val());
+ if (value>=0){
+ self.getParent().set_operation_quantity(value, op_id);
+ }
+
self.getParent().barcode_scanner.connect(function(ean){
self.getParent().scan(ean);
});
//get all visible element and if none has positive qty, disable put in pack and process button
var self = this;
var processed = this.$('.js_pack_op_line.processed');
- var qties = this.$('.js_pack_op_line:not(.processed):not(.hidden) .js_qty').map(function(){return $(this).attr('placeholder')});
+ var qties = this.$('.js_pack_op_line:not(.processed):not(.hidden) .js_qty').map(function(){return $(this).val()});
var container = this.$('.js_pack_op_line.container_head:not(.processed):not(.hidden)')
var disabled = true;
$.each(qties,function(index, value){
<div class="input-group">
<span class="input-group-addon js_minus input-sm" t-att-data-product-id='row.cols.product_id'><a href="#"><i class="fa fa-minus"></i></a></span>
<form class="js_submit_value">
- <input type="text" class="form-control text-center js_qty" t-att-placeholder="row.cols.rem"></input>
+ <input type="text" class="form-control text-center js_qty" t-att-value="row.cols.rem"></input>
<!-- <input type="submit" class="hidden"></input> -->
</form>
<span class="input-group-addon js_plus input-sm" t-att-data-product-id='row.cols.product_id'><a href="#"><i class="fa fa-plus"></i></a></span>