Risistemato rimborso infraanuale (old style)
git-svn-id: svn://10.65.10.50/trunk@911 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
fbe1a7d7f3
commit
7316ffc269
@ -1404,49 +1404,30 @@ _DescrItem* TLiquidazione_app::recalc_rimborso(int month, const char* codatts)
|
|||||||
const char* tmpatt;
|
const char* tmpatt;
|
||||||
TString att;
|
TString att;
|
||||||
|
|
||||||
real iva_v, iva_a, imp_a, es_ni, vol_aff;
|
real iva_v = 0.0;
|
||||||
|
real iva_a = 0.0;
|
||||||
|
real imp_a = 0.0;
|
||||||
|
real es_ni = 0.0;
|
||||||
|
real vol_aff = 0.0;;
|
||||||
|
|
||||||
while ((tmpatt = atts.get()) != NULL)
|
while ((tmpatt = atts.get()) != NULL)
|
||||||
{
|
{
|
||||||
att = tmpatt;
|
att = tmpatt;
|
||||||
look_plm(month,att); look_ptm(month,att);
|
for (int m = month - 3; m < month; m++)
|
||||||
|
{
|
||||||
real tvol(_ptm->get("S3"));
|
if (!look_plm(m,att) || !look_ptm(m,att)) continue;
|
||||||
vol_aff += tvol;
|
|
||||||
real esni(_plm->get("S1"));
|
real tvol(_ptm->get("S3"));
|
||||||
es_ni += esni;
|
vol_aff += tvol;
|
||||||
iva_a += _plm->get_real("R1");
|
real esni(_plm->get("S1"));
|
||||||
iva_v += _plm->get_real("R0");
|
es_ni += esni;
|
||||||
real aax(_ptm->get("S2"));
|
iva_a += _plm->get_real("R1");
|
||||||
imp_a += aax - // rilevanti per aliquota media
|
iva_v += _plm->get_real("R0");
|
||||||
_ptm->get_real("R3") - // toglie ammortizz. etc
|
real aax(_ptm->get("S2"));
|
||||||
|
imp_a += aax - // rilevanti per aliquota media
|
||||||
|
_ptm->get_real("R3") - // toglie ammortizz. etc
|
||||||
_ptm->get_real("R5") - // non detraibili non ci sono
|
_ptm->get_real("R5") - // non detraibili non ci sono
|
||||||
_ptm->get_real("R8");
|
_ptm->get_real("R8");
|
||||||
|
|
||||||
if (_freqviva == "M") // sommiamo i due mesi precedenti
|
|
||||||
{
|
|
||||||
for (int m = month - 2; m < month; m++)
|
|
||||||
{
|
|
||||||
bool ok = look_plm(m,att);
|
|
||||||
if (!ok)
|
|
||||||
if (!update_att(m, att))
|
|
||||||
describe_error("Attivita' non ricalcolate: possibili errori",
|
|
||||||
att);
|
|
||||||
|
|
||||||
look_ptm(m,att);
|
|
||||||
|
|
||||||
real tvol(_ptm->get("S3"));
|
|
||||||
vol_aff += tvol;
|
|
||||||
real esni(_plm->get("S1"));
|
|
||||||
es_ni += esni;
|
|
||||||
iva_a += _plm->get_real("R1");
|
|
||||||
iva_v += _plm->get_real("R0");
|
|
||||||
real aax(_ptm->get("S2"));
|
|
||||||
imp_a += aax - // rilevanti per aliquota media
|
|
||||||
_ptm->get_real("R3") - // toglie ammortizz. etc
|
|
||||||
_ptm->get_real("R5") - // non detraibili non ci sono
|
|
||||||
_ptm->get_real("R8");
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1477,7 +1458,13 @@ _DescrItem* TLiquidazione_app::recalc_rimborso(int month, const char* codatts)
|
|||||||
d->_r5 = iva_a;
|
d->_r5 = iva_a;
|
||||||
d->_r6 = alv * CENTO;
|
d->_r6 = alv * CENTO;
|
||||||
d->_r7 = ala * CENTO;
|
d->_r7 = ala * CENTO;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (rimborsami)
|
||||||
|
{
|
||||||
|
look_lim(month);
|
||||||
|
_lim->put("B2", "X");
|
||||||
|
_lim->rewrite();
|
||||||
}
|
}
|
||||||
|
|
||||||
return d;
|
return d;
|
||||||
}
|
}
|
@ -13,7 +13,7 @@
|
|||||||
#include <sheet.h>
|
#include <sheet.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <prefix.h>
|
#include <prefix.h>
|
||||||
#include <conto.h>
|
#include "conto.h" // CI VOGLIONO LE VIRGOLETTE! CAPITELA!
|
||||||
#include <nditte.h>
|
#include <nditte.h>
|
||||||
#include <anagr.h>
|
#include <anagr.h>
|
||||||
#include <comuni.h>
|
#include <comuni.h>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user