From 4dc504cc0f010b00998c0d02af42f2059faa44c9 Mon Sep 17 00:00:00 2001 From: angelo Date: Mon, 9 Dec 1996 08:34:51 +0000 Subject: [PATCH] Corretto MI2264, cambiata la nomenclatura degli articoli AF ed A36. In realta' i nomi di A36 sono stati cambiati in A13, come da nuove disposizioni. git-svn-id: svn://10.65.10.50/trunk@3979 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg4304.cpp | 70 +++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 51 insertions(+), 19 deletions(-) diff --git a/cg/cg4304.cpp b/cg/cg4304.cpp index b6db9c84d..dc3edf47c 100755 --- a/cg/cg4304.cpp +++ b/cg/cg4304.cpp @@ -386,7 +386,35 @@ void TLiquidazione_app::describe_viaggio(int month, const char* codatt) // credito di costo precedente (CHECK annuale) d->_r8 = credito_costo_prec(month); - + + d->_r7 = (d->_r4 * CENTO)/(d->_r4 + d->_r6); d->_r7.round(2); // percentuale + d->_r9 = (d->_r1 * d->_r7)/CENTO; + // Solita minchiatina dell'arrotondamento alle 1000 lirette se siamo in annuale + if (month == 13) + { + d->_r0.round(ROUND_MILLELIRE); + d->_r1.round(ROUND_MILLELIRE); + d->_r2.round(ROUND_MILLELIRE); + d->_r3.round(ROUND_MILLELIRE); + d->_r4.round(ROUND_MILLELIRE); + d->_r5.round(ROUND_MILLELIRE); + d->_r6.round(ROUND_MILLELIRE); + d->_r8.round(ROUND_MILLELIRE); + d->_r9.round(ROUND_MILLELIRE); + } + else + d->_r9.round(ROUND_LIRA); + // Calcola l'iva a debito, visto che servira' anche nel calcolo liquidazione (solo annuale) + const real aliva = aliquota_agvia(); + const real alcnt = aliva + CENTO; + d->_r10 = (d->_r0 + d->_r9) - (d->_r3 + d->_r4 + d->_r8); // base imponibile lorda + if (d->_r10.sign() > 0) + { + d->_r11 = (d->_r10/(alcnt/CENTO)) * (aliva/CENTO); // iva dovuta + if (month == 13) d->_r11.round(ROUND_MILLELIRE); + else d->_r11.ceil(ROUND_LIRA); + } + _descr_arr.add(d); } @@ -568,7 +596,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt) if (!corrisp || (!cfv.is_zero() || !cfi.is_zero())) { real adf, adi; // autofatture non residenti art. 17 - real a36i, a36v; // ammontare art 40 c. 5/6/8 + real a13i, a13v; // ammontare art 40 c. 5/6/8 real vendi = corrisp ? cfi : _pim->get_real("R0"); real vendv = corrisp ? cfv : _pim->get_real("R1"); @@ -578,21 +606,21 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt) if (month == 13) { TToken_string kr(_pim->get("S0"),'!'); - a36i = kr.get(0); - a36v = kr.get(1); + a13i = kr.get(0); + a13v = kr.get(1); adf = _pim->get_real("R7"); adi = _pim->get_real("R8"); } - d->_r0 += vendi - adf - a36i; - d->_r1 += vendv - adi - a36v; + d->_r0 += vendi - adf - a13i; + d->_r1 += vendv - adi - a13v; t0 += vendi /* - adf */; t1 += vendv /* - adi */; autodafe += adf; autodafe_iva += adi; - art40 += a36i; - art40_iva += a36v; + art40 += a13i; + art40_iva += a13v; } } if (isnew) @@ -626,7 +654,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt) { _DescrItem* ads = new _DescrItem(PIM_ROW); ads->_s0 = ref; - ads->_s1 = "A36"; + ads->_s1 = "A13"; ads->_r0 = art40; ads->_r1 = art40_iva; if (isfirst) @@ -1249,7 +1277,7 @@ void TLiquidazione_app::set_pim(_DescrItem& d) int rw = 1; if (d._s1 == "AF") //Il dio sistema colpisce ancora, non va bene A35, ma AF... d._s2 = "Artt.17c3/74c1"; // La descrizione non la metto uguale perche' cosi e' piu' fika - else if (d._s1 == "A36") // Sempre per merito del dio sistema ho dovuto aggiungere A36. + else if (d._s1 == "A13") // Sempre per merito del dio sistema ho dovuto aggiungere A13. d._s2 = "Art.40c5/6/8 a.i."; else if (d._s0 == "74TER") rw++; @@ -1805,10 +1833,10 @@ bool TLiquidazione_app::set_annual(_DescrItem& d) set_row(row++, "%% PRO-RATA ed IVA non detraibile (%s%%)@69g%r", (const char*)(d._r2.string()), &(d._r6)); //set_row(row++,""); - set_row(row++,"Operazioni esenti riga B1@30g%r", &(d._r1)); - set_row(row++,"Operazioni esenti riga B2@30g%r", &(d._r4)); - set_row(row++,"Operazioni esenti riga B3@30g%r", &(d._r5)); - set_row(row++,"Volume d'affari riga B4@30g%r", &(d._r0)); + set_row(row++,"B1 - Operazioni esenti, escluse da nr. 1 a 9 e 11 art. 10 %r", &(d._r1)); + set_row(row++,"B2 - Operazioni esenti, di cui nr. 11 art. 10 %r", &(d._r4)); + set_row(row++,"B3 - Operazioni esenti da nr. 1 a 9 art. 10 %r", &(d._r5)); + set_row(row++,"Volume d'affari - B3 %r", &(d._r0)); set_row(row++,"Indetraibilita'@30g%r%%", &(d._r2)); if (!(d._r3.is_zero())) { @@ -1953,13 +1981,17 @@ void TLiquidazione_app::set_viaggio(_DescrItem& d) real& acq_misCEE = d._r4; real& acq_noCEE = d._r5; real& acq_misnoCEE = d._r6; + real& perc_r = d._r7; real& cred_cos = d._r8; + real& ivm = d._r9; - real perc_r = (acq_misCEE * CENTO)/(acq_misCEE + acq_misnoCEE); perc_r.round(2); - real ivm = (corr_misCEE * perc_r)/CENTO; ivm.round(ROUND_LIRA); + //real perc_r = (acq_misCEE * CENTO)/(acq_misCEE + acq_misnoCEE); perc_r.round(2); + //real ivm = (corr_misCEE * perc_r)/CENTO; ivm.round(ROUND_LIRA); real tc = (corr_CEE + ivm); real ta = (acq_CEE + acq_misCEE); - real bi = tc - ta - cred_cos; + //real bi = tc - ta - cred_cos; + real& bi = d._r10; + real& dovuta = d._r11; real tcc = corr_CEE + corr_noCEE + corr_misCEE; real tco = acq_CEE + acq_noCEE + acq_misCEE + acq_misnoCEE; @@ -2086,8 +2118,8 @@ void TLiquidazione_app::set_viaggio(_DescrItem& d) { real aliva = aliquota_agvia(); real alcnt = aliva + CENTO; - real dovuta = (bi/(alcnt/CENTO)) * (aliva/CENTO); - dovuta.ceil(ROUND_LIRA); // ceil voluto da MI3074 + //real dovuta = (bi/(alcnt/CENTO)) * (aliva/CENTO); + //dovuta.ceil(ROUND_LIRA); // ceil voluto da MI3074 tmp = bi.string(REAL_PICTURE); tmp.ltrim(); up = tmp;