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;
|
||||
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)
|
||||
{
|
||||
att = tmpatt;
|
||||
look_plm(month,att); look_ptm(month,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
|
||||
for (int m = month - 3; m < month; m++)
|
||||
{
|
||||
if (!look_plm(m,att) || !look_ptm(m,att)) continue;
|
||||
|
||||
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");
|
||||
|
||||
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");
|
||||
}
|
||||
_ptm->get_real("R8");
|
||||
}
|
||||
}
|
||||
|
||||
@ -1477,7 +1458,13 @@ _DescrItem* TLiquidazione_app::recalc_rimborso(int month, const char* codatts)
|
||||
d->_r5 = iva_a;
|
||||
d->_r6 = alv * CENTO;
|
||||
d->_r7 = ala * CENTO;
|
||||
}
|
||||
|
||||
if (rimborsami)
|
||||
{
|
||||
look_lim(month);
|
||||
_lim->put("B2", "X");
|
||||
_lim->rewrite();
|
||||
}
|
||||
|
||||
return d;
|
||||
}
|
@ -13,7 +13,7 @@
|
||||
#include <sheet.h>
|
||||
#include <config.h>
|
||||
#include <prefix.h>
|
||||
#include <conto.h>
|
||||
#include "conto.h" // CI VOGLIONO LE VIRGOLETTE! CAPITELA!
|
||||
#include <nditte.h>
|
||||
#include <anagr.h>
|
||||
#include <comuni.h>
|
||||
|
Loading…
x
Reference in New Issue
Block a user