Modifiche per abbassare lo stack di merda.

git-svn-id: svn://10.65.10.50/trunk@2775 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 1996-04-26 16:27:56 +00:00
parent a74abfe0b2
commit 45cc74409a
2 changed files with 29 additions and 24 deletions

View File

@ -152,23 +152,25 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
//if (_isfinal && _lim->get_bool("B1")) // && _month != 13) //if (_isfinal && _lim->get_bool("B1")) // && _month != 13)
// return TRUE; // return TRUE;
//fine //fine
TConfig cnf(CONFIG_DITTA, "cg");
_isdiffacc = cnf.get_bool("GeLiDi"); //usato per stampa acconto in coda ai registri
_isdifferita = _isdiffacc && _month != 13;
_isintr = !cnf.get_bool("InTrTr") && _freqviva != "M";
if (_isbenzinaro)
_gest4 = cnf.get_bool("GesT74");
// controlla che il periodo corrente non sia l'inizio dell'attivita'
// nel caso, differita va a FALSE
_monthinatt = 1;
TDate inatt(_nditte->lfile().get("DINIZIOATT"));
if (is_in_liq_period(inatt)) _isdifferita = FALSE;
if (inatt.year() == atoi(_year)) _monthinatt = inatt.month();
TConfig cnf1(CONFIG_STUDIO, "cg");
_isricacq = cnf1.get_bool("RicAcq");
{
TConfig cnf(CONFIG_DITTA, "cg");
_isdiffacc = cnf.get_bool("GeLiDi"); //usato per stampa acconto in coda ai registri
_isdifferita = _isdiffacc && _month != 13;
_isintr = !cnf.get_bool("InTrTr") && _freqviva != "M";
if (_isbenzinaro)
_gest4 = cnf.get_bool("GesT74");
// controlla che il periodo corrente non sia l'inizio dell'attivita'
// nel caso, differita va a FALSE
_monthinatt = 1;
}
TDate inatt(_nditte->lfile().get("DINIZIOATT"));
{
if (is_in_liq_period(inatt)) _isdifferita = FALSE;
if (inatt.year() == atoi(_year)) _monthinatt = inatt.month();
TConfig cnf1(CONFIG_STUDIO, "cg");
_isricacq = cnf1.get_bool("RicAcq");
}
// ricalcolo normale // ricalcolo normale
// lim c'e' solo per i trimestri // lim c'e' solo per i trimestri
bool ok = _lim->get_bool("B0"); bool ok = _lim->get_bool("B0");
@ -193,7 +195,7 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
_nditte->save_status(); _nditte->save_status();
if (_nditte->is_first_match(LF_ATTIV)) if (_nditte->is_first_match(LF_ATTIV))
{ {
char buf[256]; TString buf(256);
do do
{ {
TString16 codatt = _nditte->curr(LF_ATTIV).get("CODATT"); TString16 codatt = _nditte->curr(LF_ATTIV).get("CODATT");
@ -205,7 +207,7 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
// se diventa TRUE); // se diventa TRUE);
_mixed = FALSE; _mixed = FALSE;
sprintf (buf, _printonly ? "Stampa liquidazione (%d)...\n%s: %s\n" : buf.format( _printonly ? "Stampa liquidazione (%d)...\n%s: %s\n" :
"Calcolo liquidazione (%d)...\n%s: %s\n", "Calcolo liquidazione (%d)...\n%s: %s\n",
month, month,
(const char*)_nditte_r->get("RAGSOC"), (const char*)_nditte_r->get("RAGSOC"),

View File

@ -69,7 +69,7 @@ bool TLiquidazione_app::set_deleghe()
bool TLiquidazione_app::extract_deleghe() bool TLiquidazione_app::extract_deleghe()
{ {
char buf[256]; TArray desc; TString buf(256); TArray desc;
_prind = new TProgind(_calcall ? _n_ditte : _selected.ones(), _prind = new TProgind(_calcall ? _n_ditte : _selected.ones(),
" Estrazione deleghe \n" " Estrazione deleghe \n"
" preparazione archivi \n " " preparazione archivi \n "
@ -96,7 +96,7 @@ bool TLiquidazione_app::extract_deleghe()
look_lia(); look_lia();
_freqviva = _lia->get("S7"); _freqviva = _lia->get("S7");
sprintf (buf,"Estrazione deleghe (%d):\nditta %s\n ", buf.format("Estrazione deleghe (%d):\nditta %s\n ",
_month, _month,
(const char*)_nditte_r->get("RAGSOC")); (const char*)_nditte_r->get("RAGSOC"));
_prind->set_text(buf); _prind->set_text(buf);
@ -352,7 +352,7 @@ bool TLiquidazione_app::set_acconto(real& inf, real& ina)
bool TLiquidazione_app::recalc_acconti(real& inf, real& ina) bool TLiquidazione_app::recalc_acconti(real& inf, real& ina)
{ {
char buf[256]; TString buf(256);
bool onemade = FALSE; bool onemade = FALSE;
@ -392,7 +392,7 @@ bool TLiquidazione_app::recalc_acconti(real& inf, real& ina)
inf = _lia->get_real("R13"); inf = _lia->get_real("R13");
ina = _lia->get_real("R14"); ina = _lia->get_real("R14");
sprintf (buf,"Calcolo acconto:\nditta %s", buf.format("Calcolo acconto:\nditta %s",
(const char*)_nditte_r->get("RAGSOC")); (const char*)_nditte_r->get("RAGSOC"));
_prind->set_text(buf); _prind->set_text(buf);
recalc_acconto(inf, ina); recalc_acconto(inf, ina);
@ -408,7 +408,6 @@ bool TLiquidazione_app::recalc_acconti(real& inf, real& ina)
bool TLiquidazione_app::recalc_acconto(real& inf, real& ina) bool TLiquidazione_app::recalc_acconto(real& inf, real& ina)
{ {
TConfig cnf(CONFIG_DITTA, "cg");
real bc = 0.0; real bc = 0.0;
real acc = 0.0; real acc = 0.0;
real cre = 0.0; real cre = 0.0;
@ -421,8 +420,12 @@ bool TLiquidazione_app::recalc_acconto(real& inf, real& ina)
real iva_pro = 0.0; real iva_pro = 0.0;
real cre_pre = 0.0; real cre_pre = 0.0;
real acq_intr = 0.0; real acq_intr = 0.0;
bool isdifferita = cnf.get_bool("GeLiDi"); bool isdifferita = FALSE;
bool error = FALSE; bool error = FALSE;
{
TConfig cnf(CONFIG_DITTA, "cg");
isdifferita = cnf.get_bool("GeLiDi");
}
TString16 tipo_acc; TString16 tipo_acc;
// TBI rewrite from scratch // TBI rewrite from scratch