This commit is contained in:
Michael RICOIS 2018-02-13 09:56:36 +01:00
parent 3f1d411ce6
commit c4de0d3e8e

View File

@ -129,15 +129,9 @@ function qtyDown(el) {
if(input.parent().parent().hasClass('pack_item')){
packQtyDown(input.attr('data-id_order_detail'));
} else {
<<<<<<< HEAD
if(parseInt(input.val()) > 0) {
$(input).trigger("change");
}
=======
if(parseInt(input.val()) > 0) {
if(parseInt(input.val()) > 0) {
$(input).trigger("change");
}
>>>>>>> refs/heads/ticket-14739-PackLogistic
}
changeCarrier();
@ -147,19 +141,17 @@ function checkQuantityPack(id_order_detail){
var add_quantity = true;
var quantity_ok = {};
var pack_quantity = parseInt($('input[name="shipped['+id_order_detail+']"]').val());
$('.pack_'+id_order_detail+' input.input_quantity').each(function(){
id_item = $(this).data('item');
quantity = $(this).val();
item_pack_quantity = $('input[name="shipped['+id_order_detail+']"]').parent().parent().attr('data-pack_'+id_item);
result = quantity / (item_pack_quantity*(pack_quantity+1));
if(parseFloat(result)>=1){
quantity_ok[id_item] = parseInt(quantity / item_pack_quantity);
} else {
<<<<<<< HEAD
quantity_ok[id_item] = false;
=======
quantity_ok[id_item] = false;
>>>>>>> refs/heads/ticket-14739-PackLogistic
}
});