- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
- 29
- 30
- 31
- 32
- 33
- 34
- 35
- 36
- 37
- 38
- 39
- 40
- 41
- 42
- 43
- 44
- 45
- 46
- 47
- 48
- 49
- 50
function stepUp(id, step, num, price) {
var price_nds = $("input[name='PROP_" + id + "_PRICE_NDS']").val();
var curr_name = $("[name='CURRENCY_PROPOSAL']").val();
var curr_val = parseFloat($("[name='CURR[" + curr_name + "]']").val());
if (($("#zero_" + num).attr("checked") == 'checked')) {
} else {
$("#zero_" + num).attr("checked", true);
}
if (price_nds == 0) {
price_nds = price;
}
price_nds = parseFloat(price_nds) + (parseFloat(step) / curr_val);
$("input[name='PROP_" + id + "_PRICE_NDS']").val(price_nds.toFixed(2));
$("input[name='PROP_" + id + "_PRICE_NDS_dis']").val(price_nds.toFixed(2));
//if($("#zero_"+id).attr("checked") == 'checked') {
$("#zero_" + num).parent('a').parent('td').parent('tr').removeClass('gr_style');
//$("input[name='PROP_"+id+"_PRICE_NDS']").val(cur_price.toFixed(2));
//$("input[name='PROP_"+id+"_PRICE_NDS_dis']").val(cur_price.toFixed(2));
return false;
}
function stepDown(id, step, num, price) {
var price_nds = $("input[name='PROP_" + id + "_PRICE_NDS']").val();
var curr_name = $("[name='CURRENCY_PROPOSAL']").val();
var curr_val = parseFloat($("[name='CURR[" + curr_name + "]']").val());
if (($("#zero_" + num).attr("checked") == 'checked')) {
} else {
$("#zero_" + num).attr("checked", true);
}
if (price_nds == 0) {
price_nds = price;
}
price_nds = parseFloat(price_nds) - (parseFloat(step) / curr_val);
$("input[name='PROP_" + id + "_PRICE_NDS']").val(price_nds.toFixed(2));
$("input[name='PROP_" + id + "_PRICE_NDS_dis']").val(price_nds.toFixed(2));
$("#zero_" + num).parent('a').parent('td').parent('tr').removeClass('gr_style');
return false;
}
Увеличение/уменьшение цены в текстовом поле по нажатию на стрелки вверх/вниз рядом с полем
Комментарии (0) RSS
Добавить комментарий