Patch level : 188
Files correlati : ce2.exe ce0500b.msk Ricompilazione Demo : [ ] Commento : 0001041: Aggiungere nuove percentuali di deducibilita' al 40, 80 e 90 git-svn-id: svn://10.65.10.50/trunk@17842 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
99fe943879
commit
7ea3472e6f
@ -1,10 +1,12 @@
|
|||||||
#include "ce0500a.h"
|
#include "ce0500a.h"
|
||||||
|
|
||||||
TOOLBAR "topbar" 0 0 0 2
|
TOOLBAR "Toolbar" 0 -3 0 3
|
||||||
#include <relapbar.h>
|
|
||||||
|
#include <toolbar.h>
|
||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Cespite" 0 2 0 0
|
PAGE "Cespite" -1 -1 78 18
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 4
|
GROUPBOX DLG_NULL 78 4
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -484,16 +484,15 @@ real TCespite::get_limit() const
|
|||||||
switch(tipo_veicolo)
|
switch(tipo_veicolo)
|
||||||
{
|
{
|
||||||
case tv_automobile:
|
case tv_automobile:
|
||||||
|
switch (get_int(CESPI_USOPROM))
|
||||||
{
|
{
|
||||||
const int uso_promiscuo = get_int(CESPI_USOPROM);
|
case 1: break; // Uso strumentale deducibile al 100%
|
||||||
if (uso_promiscuo == 2)
|
case 3: limite = clm.get_real("R1"); break; // Agenti/rappresentanti
|
||||||
limite = clm.get_real("R0"); else
|
default: limite = clm.get_real("R0"); break; // 2,4,5 = casi standard
|
||||||
if (uso_promiscuo == 3)
|
|
||||||
limite = clm.get_real("R1");
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case tv_motociclo : limite = clm.get_real("R2"); break;
|
case tv_motociclo : limite = clm.get_real("R2"); break; // Limite motocicli
|
||||||
case tv_ciclomotore: limite = clm.get_real("R3"); break;
|
case tv_ciclomotore: limite = clm.get_real("R3"); break; // Limite ciclomotori
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -510,7 +509,7 @@ real TCespite::percentuale_deducibilita() const
|
|||||||
{
|
{
|
||||||
case 2: // Beni in uso promiscuo
|
case 2: // Beni in uso promiscuo
|
||||||
percento = 50;
|
percento = 50;
|
||||||
if (ditta_cespiti().legge_223_06())
|
if (ditta_cespiti().legge_223_06()) // Ormai sempre false
|
||||||
{
|
{
|
||||||
if (auto_o_moto()) // Automobili, motocicli e ciclomotori
|
if (auto_o_moto()) // Automobili, motocicli e ciclomotori
|
||||||
{
|
{
|
||||||
@ -521,12 +520,11 @@ real TCespite::percentuale_deducibilita() const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3: percento = 80; break; // Agenti/rappresentanti
|
||||||
percento = 80; // Beni raccomandati?
|
case 4: percento = 40; break; // Uso promiscuo a dipententi
|
||||||
break;
|
case 5: percento = 90; break; // Fringe benefit
|
||||||
default:
|
case 6: percento = 80; break; // Cellulari
|
||||||
percento = CENTO; // Beni strumentali al 100%
|
default: percento = CENTO; break; // Beni strumentali al 100%
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return percento;
|
return percento;
|
||||||
}
|
}
|
||||||
@ -839,7 +837,7 @@ int TCespite::test_rip(TRelation& rel)
|
|||||||
// Considera solo eliminazioni che SPESSO hanno segno '-' ma non sempre: prima testava solo segno -
|
// Considera solo eliminazioni che SPESSO hanno segno '-' ma non sempre: prima testava solo segno -
|
||||||
const TString4 tpmov = movsem.get(MOVCE_CODMOV);
|
const TString4 tpmov = movsem.get(MOVCE_CODMOV);
|
||||||
const TRectype& tmc = cache().get("%TMC", tpmov);
|
const TRectype& tmc = cache().get("%TMC", tpmov);
|
||||||
if (tmc.get("S6")[0] != 'E')
|
if (tmc.get_char("S6") != 'E')
|
||||||
return rip_flag;
|
return rip_flag;
|
||||||
|
|
||||||
const TRectype& movam = rel.curr(LF_MOVAM);
|
const TRectype& movam = rel.curr(LF_MOVAM);
|
||||||
@ -995,14 +993,20 @@ void TCespite::agg_quota(const real& movvalamm, TRectype& rec, const char* field
|
|||||||
|
|
||||||
HIDDEN const TString& catdi_get(const TRectype* pcatdi, const char* name, int sit)
|
HIDDEN const TString& catdi_get(const TRectype* pcatdi, const char* name, int sit)
|
||||||
{
|
{
|
||||||
CHECK(pcatdi, "NULL CATDI record");
|
if (pcatdi != NULL)
|
||||||
if (sit != 1)
|
|
||||||
{
|
{
|
||||||
TString16 fname(name);
|
if (sit != 1)
|
||||||
fname.overwrite("PC", 0);
|
{
|
||||||
return pcatdi->get(fname);
|
TString16 fname(name);
|
||||||
|
fname.overwrite("PC", 0);
|
||||||
|
return pcatdi->get(fname);
|
||||||
|
}
|
||||||
|
return pcatdi->get(name);
|
||||||
}
|
}
|
||||||
return pcatdi->get(name);
|
else
|
||||||
|
CHECK(false, "NULL CATDI record");
|
||||||
|
|
||||||
|
return EMPTY_STRING;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Non sempre basta prendere un campo da AMMINI così com'è:
|
// Non sempre basta prendere un campo da AMMINI così com'è:
|
||||||
@ -2119,14 +2123,15 @@ void TCespite::load_saldi(const int tiposit, const int esercizio)
|
|||||||
|
|
||||||
_ammmv.destroy();
|
_ammmv.destroy();
|
||||||
|
|
||||||
TDate inies, fines, dtalien = get(CESPI_DTALIEN);
|
const TDate dtalien = get(CESPI_DTALIEN);
|
||||||
ditta_cespiti().esercizio_corrente(inies, fines);
|
TEsercizi_contabili esc;
|
||||||
|
TDate inies, fines; esc.code2range(esercizio, inies, fines);
|
||||||
if (!dtalien.ok() || dtalien >= inies)
|
if (!dtalien.ok() || dtalien >= inies)
|
||||||
{
|
{
|
||||||
TRelation rel(LF_AMMMV);
|
TRelation rel(LF_AMMMV);
|
||||||
TRectype& ammmv = rel.curr();
|
TRectype& ammmv = rel.curr();
|
||||||
ammmv.put(AMMMV_IDCESPITE, get(CESPI_IDCESPITE));
|
ammmv.put(AMMMV_IDCESPITE, get(CESPI_IDCESPITE));
|
||||||
TString16 filter; filter.format("%s==%d", AMMMV_TPAMM, tiposit);
|
TString8 filter; filter.format("%s==%d", AMMMV_TPAMM, tiposit);
|
||||||
TCursor cur(&rel, filter, 1, &ammmv, &ammmv);
|
TCursor cur(&rel, filter, 1, &ammmv, &ammmv);
|
||||||
const TRecnotype items = cur.items();
|
const TRecnotype items = cur.items();
|
||||||
if (items > 0)
|
if (items > 0)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user