Corretto MI2378, relativo ai non soggetti nel totale acquisti

beni per rivendita.


git-svn-id: svn://10.65.10.50/trunk@5641 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
angelo 1997-11-19 17:20:26 +00:00
parent 5a93a9b074
commit bff6efa085

View File

@ -371,6 +371,18 @@ void TProgressivi_iva::look_pim()
_iva1_array.add_riga(tipo,imponibile,imposta,detr);
}
break;
case acq_beni_riv:
tabiva.put("CODTAB",codiva);
if (tabiva.read() == NOERR)
// I non soggetti non vanno considerati nel totale acq. beni rivendita
if (tabiva.get("S1") != "NS")
{
if (_mese != 13)
_iva_array.add_riga(tipo,imponibile,imposta,ZERO);
if ((_st_inizio_anno && mese == _mese) || _mese == 13)
_iva1_array.add_riga(tipo,imponibile,imposta,ZERO);
}
break;
default:
if (_mese != 13)
_iva_array.add_riga(tipo,imponibile,imposta,ZERO);
@ -400,6 +412,7 @@ void TProgressivi_iva::look_pim()
void TProgressivi_iva::cerca_i_pim()
{
TTable pim("PIM");
TTable tabiva("%IVA");
TTable reg("REG");
TString80 codtab;
TString16 codatt,codiva,tipoiva,codreg;
@ -526,11 +539,15 @@ void TProgressivi_iva::cerca_i_pim()
break;
case acq_beni_riv:
if (_tipoprog == 1) break;
if (_tipo_attiv == 1)
{
impo += imponibile;
impos += imposta;
}
tabiva.put("CODTAB",codiva);
if (tabiva.read() == NOERR)
// I non soggetti non vanno considerati nel totale acq. beni rivendita
if (tabiva.get("S1") != "NS")
if (_tipo_attiv == 1)
{
impo += imponibile;
impos += imposta;
}
break;
case acq_beni_ammort:
if (_tipoprog == 1) break;