diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml index ce383ced..b0a86f96 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/service.xml @@ -280,9 +280,6 @@ - - - diff --git a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo_calcolo.jsp b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo_calcolo.jsp index 4a892ec2..8dec774f 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo_calcolo.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-fe-portlet/docroot/html/fascicolofe/verify_fascicolo_calcolo.jsp @@ -936,8 +936,9 @@ $('.container-price__row input[type="checkbox"]').change(function() { if ($(this).is(':checked')) { if (price_input.hasClass('text_input')) { price_input.removeAttr('disabled'); - } else { - price_input.val(price); + } + if (price_input.val() == 0) { + price_input.val(Number(price).formatMoney(0)); } } else { if (price_input.hasClass('text_input')) { @@ -983,13 +984,15 @@ $(".text_input").each(function () { function calcolo() { var totale = 0; - $.each($('.field_price'), function(index, val) { - if ($(this).is(":not(:readonly)")) { - totale += parseFloat('0' + $(this).val()); + $.each($('.container-price__row input[type="checkbox"]'), function (index, val) { + if ($(this).is(':checked')) { + var price_el = $(this).attr('for'); + var price_input = $('input[name="' + price_el + '"]'); + totale += parseFloat('0' + price_input.val()); } + $('#importoSpeseIstruttoria').val(totale); + $("#importoIstruttoria").html("€ " + Number(totale).formatMoney(2, ',', '.')); }); - $('#importoSpeseIstruttoria').val(totale); - $("#importoIstruttoria").html("€ " + Number(totale).formatMoney(2, ',', '.')); } Number.prototype.formatMoney = function(c, d, t) {