function recalc(id) {
var el = $('input[name='+id+']');
var current = el.val();
var min = 0;
var step = el.attr('step');
var max = el.attr('max');
var avalible = $('#v-sin > input').prop('checked');
// Округляем кратно step (количества товаров в упаковке)
current = Math.ceil(current/step)*step;
if (current < 0) current = 0;
if (current > max && avalible) current = max;
el.val(current);
}