diff --git a/.sami b/.sami index b6552e0db..6516afb58 100644 --- a/.sami +++ b/.sami @@ -1,6 +1,7 @@ = 0 ? true : false, + allowMinus: !$this.attr('min-value') || $this.attr('min-value') < 0 ? true : false, digits: $this.attr('decimals') ? $this.attr('decimals') : globals.cifre_decimali, - digitsOptional: false, + digitsOptional: true, // Necessario per un problema di inputmask con i numeri negativi durante l'init enforceDigitsOnBlur: true, rightAlign: true, autoGroup: true, @@ -1151,7 +1151,7 @@ String.prototype.toLocale = function () { if (globals.thousands) { x[0] = x[0].split("").reverse().join(""); - x[0] = x[0].replace(/(.{3})/g,"$1" + globals.thousands); + x[0] = x[0].replace(/(.{3})/g, "$1" + globals.thousands); x[0] = x[0].split("").reverse().join(""); } diff --git a/modules/scadenzario/actions.php b/modules/scadenzario/actions.php index 97b671e04..0e4c37e1c 100644 --- a/modules/scadenzario/actions.php +++ b/modules/scadenzario/actions.php @@ -6,7 +6,7 @@ switch (post('op')) { case 'update': // Calcolo il totale da pagare $rs = $dbo->fetchArray('SELECT SUM(da_pagare) AS totale_da_pagare FROM co_scadenziario GROUP BY iddocumento HAVING iddocumento=(SELECT iddocumento FROM co_scadenziario s WHERE id='.prepare($id_record).')'); - $totale_da_pagare = abs($rs[0]['totale_da_pagare']); + $totale_da_pagare = $rs[0]['totale_da_pagare']; $totale_utente = 0;