From bff6efa08575c076d7348422a0079ceb4f80e175 Mon Sep 17 00:00:00 2001 From: angelo Date: Wed, 19 Nov 1997 17:20:26 +0000 Subject: [PATCH] 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 --- cg/cg0400.cpp | 27 ++++++++++++++++++++++----- 1 file changed, 22 insertions(+), 5 deletions(-) diff --git a/cg/cg0400.cpp b/cg/cg0400.cpp index 27083e936..0127b49a3 100755 --- a/cg/cg0400.cpp +++ b/cg/cg0400.cpp @@ -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;