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"
|
||||
|
||||
TOOLBAR "topbar" 0 0 0 2
|
||||
#include <relapbar.h>
|
||||
TOOLBAR "Toolbar" 0 -3 0 3
|
||||
|
||||
#include <toolbar.h>
|
||||
|
||||
ENDPAGE
|
||||
|
||||
PAGE "Cespite" 0 2 0 0
|
||||
PAGE "Cespite" -1 -1 78 18
|
||||
|
||||
GROUPBOX DLG_NULL 78 4
|
||||
BEGIN
|
||||
|
@ -484,16 +484,15 @@ real TCespite::get_limit() const
|
||||
switch(tipo_veicolo)
|
||||
{
|
||||
case tv_automobile:
|
||||
switch (get_int(CESPI_USOPROM))
|
||||
{
|
||||
const int uso_promiscuo = get_int(CESPI_USOPROM);
|
||||
if (uso_promiscuo == 2)
|
||||
limite = clm.get_real("R0"); else
|
||||
if (uso_promiscuo == 3)
|
||||
limite = clm.get_real("R1");
|
||||
case 1: break; // Uso strumentale deducibile al 100%
|
||||
case 3: limite = clm.get_real("R1"); break; // Agenti/rappresentanti
|
||||
default: limite = clm.get_real("R0"); break; // 2,4,5 = casi standard
|
||||
}
|
||||
break;
|
||||
case tv_motociclo : limite = clm.get_real("R2"); break;
|
||||
case tv_ciclomotore: limite = clm.get_real("R3"); break;
|
||||
case tv_motociclo : limite = clm.get_real("R2"); break; // Limite motocicli
|
||||
case tv_ciclomotore: limite = clm.get_real("R3"); break; // Limite ciclomotori
|
||||
default: break;
|
||||
}
|
||||
}
|
||||
@ -510,7 +509,7 @@ real TCespite::percentuale_deducibilita() const
|
||||
{
|
||||
case 2: // Beni in uso promiscuo
|
||||
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
|
||||
{
|
||||
@ -521,12 +520,11 @@ real TCespite::percentuale_deducibilita() const
|
||||
}
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
percento = 80; // Beni raccomandati?
|
||||
break;
|
||||
default:
|
||||
percento = CENTO; // Beni strumentali al 100%
|
||||
break;
|
||||
case 3: percento = 80; break; // Agenti/rappresentanti
|
||||
case 4: percento = 40; break; // Uso promiscuo a dipententi
|
||||
case 5: percento = 90; break; // Fringe benefit
|
||||
case 6: percento = 80; break; // Cellulari
|
||||
default: percento = CENTO; break; // Beni strumentali al 100%
|
||||
}
|
||||
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 -
|
||||
const TString4 tpmov = movsem.get(MOVCE_CODMOV);
|
||||
const TRectype& tmc = cache().get("%TMC", tpmov);
|
||||
if (tmc.get("S6")[0] != 'E')
|
||||
if (tmc.get_char("S6") != 'E')
|
||||
return rip_flag;
|
||||
|
||||
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)
|
||||
{
|
||||
CHECK(pcatdi, "NULL CATDI record");
|
||||
if (sit != 1)
|
||||
if (pcatdi != NULL)
|
||||
{
|
||||
TString16 fname(name);
|
||||
fname.overwrite("PC", 0);
|
||||
return pcatdi->get(fname);
|
||||
if (sit != 1)
|
||||
{
|
||||
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'è:
|
||||
@ -2119,14 +2123,15 @@ void TCespite::load_saldi(const int tiposit, const int esercizio)
|
||||
|
||||
_ammmv.destroy();
|
||||
|
||||
TDate inies, fines, dtalien = get(CESPI_DTALIEN);
|
||||
ditta_cespiti().esercizio_corrente(inies, fines);
|
||||
const TDate dtalien = get(CESPI_DTALIEN);
|
||||
TEsercizi_contabili esc;
|
||||
TDate inies, fines; esc.code2range(esercizio, inies, fines);
|
||||
if (!dtalien.ok() || dtalien >= inies)
|
||||
{
|
||||
TRelation rel(LF_AMMMV);
|
||||
TRectype& ammmv = rel.curr();
|
||||
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);
|
||||
const TRecnotype items = cur.items();
|
||||
if (items > 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user