mirror of
https://github.com/devcode-it/openstamanager.git
synced 2025-02-02 00:46:44 +01:00
Corretto problema calcolo sbilancio in JS su prima nota
This commit is contained in:
parent
8f8b4b3b18
commit
15c9a0ca3a
@ -278,19 +278,19 @@ include_once __DIR__.'/../../core.php';
|
||||
$('input[id*=dare]').each( function(){
|
||||
if( $(this).val() == '' ) valore = 0;
|
||||
else valore = $(this).val().toEnglish();
|
||||
totale_dare += valore;
|
||||
totale_dare += Math.round(valore*100)/100;
|
||||
});
|
||||
|
||||
$('input[id*=avere]').each( function(){
|
||||
if( $(this).val() == '' ) valore = 0;
|
||||
else valore = $(this).val().toEnglish();
|
||||
totale_avere += valore;
|
||||
totale_avere += Math.round(valore*100)/100;
|
||||
});
|
||||
|
||||
$('#totale_dare').text(totale_dare.toLocale());
|
||||
$('#totale_avere').text(totale_avere.toLocale());
|
||||
|
||||
bilancio = totale_dare - totale_avere;
|
||||
bilancio = Math.round(totale_dare*100)/100 - Math.round(totale_avere*100)/100;
|
||||
|
||||
if(bilancio == 0){
|
||||
$("#testo_aggiuntivo").removeClass('text-danger').html("");
|
||||
|
Loading…
x
Reference in New Issue
Block a user