diff --git a/ve/listadoc.frm b/ve/listadoc.frm index 6d6d0b9ac..acc0edaf9 100755 --- a/ve/listadoc.frm +++ b/ve/listadoc.frm @@ -174,9 +174,9 @@ END NUMBER 24 15 BEGIN - KEY "Totale imponibile" + KEY "Totale imponibile (senza spese)" PROMPT 86 1 "" - MESSAGE _TOTIMPONIBILI,1 + MESSAGE _TOTIMPONIBILI,0 PICTURE "###.###.###.###" END diff --git a/ve/ve1100.cpp b/ve/ve1100.cpp index 130e40587..5e6ea70c3 100755 --- a/ve/ve1100.cpp +++ b/ve/ve1100.cpp @@ -890,13 +890,13 @@ bool TDocumento_form::validate(TForm_item &cf, TToken_string &s) { // sintassi: _TOTIMPONIBILI, // dove: funge da filtro per la somma degli imponibili // vedi _RIEPILOGOIVA per la spiegazione dei filtri selettivi + // In piu' il selettore 0 restituisce il tot imp. meno le spese. byte sel = atoi(s.get()); - valore = _doc->tot_imponibili(sel).string(); + real r = _doc->tot_imponibili(sel); + if (sel == 0) r -= _doc->spese(); - real x(valore); - TString picture(cf.picture()); - if (x != 0.0) - valore = x.string(picture); // Riformatta il valore + if (r != 0.0) + valore = r.string(cf.picture()); // Riformatta il valore else valore = ""; cf.put_paragraph(valore);