Patch level :4.0 nopatch x ora

Files correlati     :cg7.exe
Ricompilazione Demo : [ ]
Commento            :tentativo di correggere errori enrichettici


git-svn-id: svn://10.65.10.50/trunk@14731 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2007-01-05 16:04:03 +00:00
parent f8c0767fb8
commit 659e7276b6

View File

@ -593,6 +593,10 @@ bool TInvioP::i_proforma_righe(TCursor& cur, TInvioP_file* trasfilerighe)
//assoc array contenente tutti i diversi conti che incontrera' nello scanning delle righe iva
TAssoc_array conti;
//causale del movimento: serve per conoscere il tipo di detraibilita' dell'iva (piu' sotto)
const TCausale caus(pn.curr().get(MOV_CODCAUS));
const int anno = pn.curr().get_date(MOV_DATAREG).year();
real imp_detr, iva_detr, imp_indetr, iva_indetr;
//scanning delle righe iva alla ricerca dei conti che compaiono
for (int l = 0; l < pn.iva_items(); l++)
@ -628,7 +632,12 @@ bool TInvioP::i_proforma_righe(TCursor& cur, TInvioP_file* trasfilerighe)
}
//accresce l'importo tot_imp relativo alla coppia codiva+codconto corrente
*tot_imp += pn.iva(l).get_real(RMI_IMPONIBILE);
const real imponibile = pn.iva(l).get_real(RMI_IMPONIBILE);
const real imposta = pn.iva(l).get_real(RMI_IMPOSTA);
const TString4 tipodet = pn.iva(l).get(RMI_TIPODET);
pn.analizza_riga_IVA(imponibile, imposta, caus, anno, codiva, tipodet, imp_detr,
iva_detr, imp_indetr, iva_indetr);
*tot_imp += imp_detr + imp_indetr + iva_indetr;
//aggiungere qui eventuale imposta
}