Modifiche ai bilanci in seguito agli errori segnalati da Milano

git-svn-id: svn://10.65.10.50/trunk@3170 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
ale 1996-07-09 13:00:08 +00:00
parent 3548200f29
commit 2921eda0a3
7 changed files with 221 additions and 75 deletions

View File

@ -44,12 +44,12 @@
#include "cg1.h"
#include "cg1500.h"
bool my_handler (TMask_field& f, KEY k);
bool mask_anno (TMask_field& f, KEY k);
bool mask_datalim (TMask_field& f, KEY k);
bool mask_date (TMask_field& f, KEY k);
bool mask_bilancio(TMask_field& f, KEY k);
bool mask_tipost (TMask_field& f, KEY k);
bool my_handler (TMask_field& f, KEY k);
bool mask_anno (TMask_field& f, KEY k);
bool mask_datalim (TMask_field& f, KEY k);
bool mask_date (TMask_field& f, KEY k);
bool mask_bilancio (TMask_field& f, KEY k);
bool mask_tipost (TMask_field& f, KEY k);
class CG1500_application : public TPrintapp
{
@ -125,9 +125,10 @@ class CG1500_application : public TPrintapp
TArray _clienti, _fornitori;
public:
TDate _inizioEs, _fineEs;
int date2esc(const TDate& d, int* prevesc = NULL);
bool menu (MENU_TAG m) { return TPrintapp::menu(m) ; }
virtual bool user_create() ;
virtual bool user_destroy();
@ -238,6 +239,24 @@ bool IsEsercizio (const TDate& datalim, int anno_eser)
return FALSE;
}
int CG1500_application::date2esc(const TDate& d, int* prevesc)
{
if (prevesc) *prevesc = 0;
TTable esc("ESC");
for (int err = esc.first(); err == NOERR; err = esc.next())
{
const TDate ia(esc.get("D0")); // Data inizio esercizio
const TDate fa(esc.get("D1")); // Data fine esercizio
const anno = esc.get_int("CODTAB");
app()._inizioEs = ia;
app()._fineEs = fa;
if (d >= ia && d <= fa)
return anno;
if (prevesc) *prevesc = anno;
}
return 0;
}
bool mask_anno(TMask_field& f, KEY k)
{
if (k == K_ENTER)
@ -287,12 +306,29 @@ bool mask_anno(TMask_field& f, KEY k)
f.mask().hide(96);
f.mask().hide(97);
}
}
if (k == K_TAB)
{
int tipo_bil, tipo_stp;
tipo_bil = f.mask().get_int(F_BILANCIO);
if (tipo_bil == 1)
tipo_stp = f.mask().get_int(F_STAMPA);
else
tipo_stp = f.mask().get_int(F_STAMPA1);
if (tipo_bil == 2 && tipo_stp == 1 && f.mask().get_int(F_ANNO) == 0)
f.mask().show(F_QUADRATURA);
else
{
f.mask().set (F_QUADRATURA,"");
f.mask().hide(F_QUADRATURA);
}
}
return TRUE;
}
bool mask_bilancio(TMask_field& f, KEY k)
{
{
int tipo_bil, tipo_stp;
TMask& m = f.mask();
if (k == K_SPACE)
@ -344,12 +380,21 @@ else
m.hide(96);
m.hide(97);
}
}
}
tipo_bil = f.mask().get_int(F_BILANCIO);
if (tipo_bil == 1)
tipo_stp = f.mask().get_int(F_STAMPA);
else
tipo_stp = f.mask().get_int(F_STAMPA1);
if (tipo_bil == 2 && tipo_stp == 1 && f.mask().get_int(F_ANNO) == 0)
f.mask().show(F_QUADRATURA);
else
f.mask().hide(F_QUADRATURA);
}
return TRUE;
}
bool mask_datalim (TMask_field& f, KEY k)
{
if (k == K_ENTER)
@ -378,7 +423,7 @@ bool mask_datalim (TMask_field& f, KEY k)
f.error_box ("La data limite e' obbligatoria");
return FALSE;
}
long anno = date2esc(datalim);
long anno = app().date2esc(datalim);
if (anno == 0)
{
f.error_box ("La data limite deve appartenere ad un esercizio attivo della ditta");
@ -400,7 +445,7 @@ bool mask_date(TMask_field& f, KEY k)
{
TDate data (f.get());
int bil = f.mask().get_int(F_BILANCIO);
int anno = date2esc(data);
int anno = app().date2esc(data);
TTable esc ("ESC");
TString dep (format("%04d", anno));
@ -409,7 +454,7 @@ bool mask_date(TMask_field& f, KEY k)
if (esc.read() == NOERR)
{
TDate dataini (esc.get_date("D1"));
if (data == dataini && bil == 2)
if (data == dataini && bil == 2 && f.mask().get_int(F_ANNO) == 0)
f.mask().show(F_QUADRATURA);
else
f.mask().hide(F_QUADRATURA);
@ -465,8 +510,8 @@ bool mask_date(TMask_field& f, KEY k)
if (id == F_DATAA)
{
TDate from (f.mask().get(id - 1));
app()._annoapp = date2esc(from);
if ( app()._annoapp != date2esc(data) )
app()._annoapp = app().date2esc(from);
if ( app()._annoapp != app().date2esc(data) )
{
f.error_box("Le date devono appartenere ad uno stesso esercizio attivo della ditta");
return FALSE;
@ -2894,8 +2939,10 @@ void CG1500_application::set_page(int file, int counter)
{
set_row(r,"@1g%6ld",(const char*)_sottoconto);
set_row(r," %s",(const char*)udata);
set_row(r,"@18g#a@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r %c",_d,&_saldo_dare,
&_saldo_avere,&_mov_dare,&_mov_avere,&_saldofinale,app);
set_row(r,"@18g#a@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r",_d,&_saldo_dare,
&_saldo_avere,&_mov_dare,&_mov_avere,&_saldofinale);
if (_saldofinale != ZERO)
set_row(r,"@131g%c", app);
if (_descr.len() > 30)
set_row(++r, "@49g!@82g!@114g!");
}
@ -2943,9 +2990,11 @@ void CG1500_application::set_page(int file, int counter)
if (_stampa_width == 132)
{
set_row(r,"%3d",_conto_succ);
set_row(r," @8g%-.40s@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r %c",
set_row(r," @8g%-.40s@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r",
(const char*)_descr_succ,&_saldoini_dare_succ,&_saldoini_avere_succ,
&_mov_dare_succ,&_mov_avere_succ,&_saldofinale_succ,app);
&_mov_dare_succ,&_mov_avere_succ,&_saldofinale_succ);
if (_saldofinale_succ != ZERO)
set_row(r,"@131g%c", app);
}
else if (app == 'D')
{
@ -2970,9 +3019,11 @@ void CG1500_application::set_page(int file, int counter)
{
set_row(r,"@1g%6ld",(const char*)_sottoconto_succ);
set_row(r," %s",(const char*)udata);
set_row(r,"@18g#a@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r %c",
set_row(r,"@18g#a@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r",
_d,&_saldoini_dare_succ,&_saldoini_avere_succ,
&_mov_dare_succ,&_mov_avere_succ,&_saldofinale_succ,app);
&_mov_dare_succ,&_mov_avere_succ,&_saldofinale_succ);
if (_saldofinale_succ != ZERO)
set_row(r,"@131g%c", app);
if (_descr_succ.len() > 30)
set_row(++r, "@49g!@82g!@114g!");
}
@ -3039,7 +3090,10 @@ int CG1500_application::stampa_record_conto(int g,int c,const TString& d,
// set_row(r++,"%3d-@8g%s@49g|@50g%r@67g%r@82g|@83g%r@100g%r@115g|@116g%r%s",g,d,&r1,&r2,&r3,&r4,&r5,(const char*)app);
set_row(r,"%3d-",g);
set_row(r,"@8g%-.40s",(const char*)d);
set_row(r++,"@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r %c",&r1,&r2,&r3,&r4,&r5,app);
set_row(r,"@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r",&r1,&r2,&r3,&r4,&r5);
if (r5 != ZERO)
set_row(r,"@131g%c", app);
r++;
}
else
if (app == 'D')
@ -3067,7 +3121,10 @@ int CG1500_application::stampa_record_conto(int g,int c,const TString& d,
set_row(r,"%3d-",g);
set_row(r,"%3d ********",c);
set_row(r,"@18g#a",_d);
set_row(r++,"@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r %c",&r1,&r2,&r3,&r4,&r5,app);
set_row(r,"@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r",&r1,&r2,&r3,&r4,&r5);
if (r5 != ZERO)
set_row(r,"@131g%c", app);
r++;
if (d.len() > 30)
set_row(r+1, "@49g!@82g!@114g!");
}
@ -3188,11 +3245,19 @@ void CG1500_application::stampa_riga_totali(int r)
if (_stampa_width == 132)
{
if (!palla)
set_row(r,"***@8gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r %c",&_saldo_dare_tot,&_saldo_avere_tot,&_mov_dare_tot,
&_mov_avere_tot,&_saldo_finale_tot,app);
else
set_row(r,"***@8gTOTALE GENERALE@49g!@52g%s@69g%s@82g!@85g%s@101g%s@114g!@117g%s %c",(const char*)sdt,(const char*)sat,(const char*)mdt,
(const char*)mat,(const char*)sft,app);
{
set_row(r,"***@8gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r",&_saldo_dare_tot,&_saldo_avere_tot,&_mov_dare_tot,
&_mov_avere_tot,&_saldo_finale_tot);
if (_saldo_finale_tot != ZERO)
set_row(r,"@131g%c", app);
}
else
{
set_row(r,"***@8gTOTALE GENERALE@49g!@52g%s@69g%s@82g!@85g%s@101g%s@114g!@117g%s",(const char*)sdt,(const char*)sat,(const char*)mdt,
(const char*)mat,(const char*)sft);
if (_saldo_finale_tot != ZERO)
set_row(r," %c", app);
}
}
else if (app == 'D')
{
@ -3217,12 +3282,22 @@ void CG1500_application::stampa_riga_totali(int r)
{
if (_stampa_width == 132)
{
if (!palla)
set_row(r++,"@1g****** ********@18gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r %c",&_saldo_dare_tot,&_saldo_avere_tot,
&_mov_dare_tot,&_mov_avere_tot,&_saldo_finale_tot,app);
if (!palla)
{
set_row(r,"@1g****** ********@18gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@99g%r@114g!@115g%r",&_saldo_dare_tot,&_saldo_avere_tot,
&_mov_dare_tot,&_mov_avere_tot,&_saldo_finale_tot);
if (_saldo_finale_tot != ZERO)
set_row(r,"@131g%c", app);
r++;
}
else
set_row(r++,"@1g****** ********@18gTOTALE GENERALE@49g!@52g%s@69g%s@82g!@85g%s@101g%s@114g!@117g%s %c",(const char*)sdt,(const char*)sat,
(const char*)mdt,(const char*)mat,(const char*)sft,app);
{
set_row(r,"@1g****** ********@18gTOTALE GENERALE@49g!@52g%s@69g%s@82g!@85g%s@101g%s@114g!@117g%s",(const char*)sdt,(const char*)sat,
(const char*)mdt,(const char*)mat,(const char*)sft);
if (_saldo_finale_tot != ZERO)
set_row(r," %c", app);
r++;
}
if ((_tipo_stampa1 == 1 && _datada == _dataini) || _tipo_stampa1 == 2)
{
if (strlen(_nuovo_tot_saldo_d.string()) > 12 ||
@ -3746,14 +3821,14 @@ bool CG1500_application::set_print(int)
_causale_chi = conf.get("CoCaCh");
}
*/
m.set_handler (F_VERIFICA, my_handler);
m.set_handler (F_BILANCIO, mask_bilancio);
m.set_handler (F_STAMPA1, mask_bilancio);
m.set_handler (F_STAMPA, mask_bilancio);
m.set_handler (F_DATALIM, mask_datalim);
m.set_handler (F_DATADA, mask_date);
m.set_handler (F_DATAA, mask_date);
m.set_handler (F_ANNO, mask_anno);
m.set_handler (F_VERIFICA, my_handler);
m.set_handler (F_BILANCIO, mask_bilancio);
m.set_handler (F_STAMPA1, mask_bilancio);
m.set_handler (F_STAMPA, mask_bilancio);
m.set_handler (F_DATALIM, mask_datalim);
m.set_handler (F_DATADA, mask_date);
m.set_handler (F_DATAA, mask_date);
m.set_handler (F_ANNO, mask_anno);
tasto = m.run();
if (tasto == K_ENTER)

View File

@ -54,7 +54,6 @@ BEGIN
MESSAGE HIDE,F_DATAA|RESET,F_DATAA|HIDE,F_SITUAZIONE|RESET,F_SITUAZIONE
MESSAGE HIDE,F_ORDINAMENTO|RESET,F_ORDINAMENTO|HIDE,F_STAMPAC|RESET,F_STAMPAC
MESSAGE HIDE,96|HIDE,97|HIDE,98|HIDE,99
MESSAGE HIDE,F_QUADRATURA
//MESSAGE HIDE,F_MODULO|RESET,F_MODULO
MESSAGE SHOW,F_STAMPA|K_SPACE,F_STAMPA
ITEM "2|Bilancio di verifica"
@ -63,7 +62,6 @@ BEGIN
MESSAGE HIDE,F_CODICI|RESET,F_CODICI|HIDE,F_SALDO|RESET,F_SALDO
MESSAGE HIDE,F_STAMPAV|RESET,F_STAMPAV
MESSAGE SHOW,F_VERIFICA|K_SPACE,F_VERIFICA|SHOW,F_STAMPA1|K_SPACE,F_STAMPA1
MESSAGE SHOW,F_QUADRATURA
//MESSAGE SHOW,F_MODULO|K_SPACE,F_MODULO
MESSAGE SHOW,96|SHOW,97|SHOW,98|SHOW,99
END

View File

@ -228,7 +228,7 @@ class CG1600_application : public TPrintapp
friend bool data_limite (TMask_field & f,KEY k);
friend bool tipo_stampa (TMask_field & f,KEY k);
friend bool data_bil_raff (TMask_field & f,KEY k);
friend bool tipo_bilancio (TMask_field & f,KEY k);
friend bool tipo_bilancio (TMask_field & f,KEY k);
friend bool data_inizio (TMask_field & f,KEY k);
friend bool data_fine (TMask_field & f,KEY k);
friend bool anno_esercizio (TMask_field & f,KEY k);
@ -666,12 +666,16 @@ bool anno_ese_raff (TMask_field& f, KEY key)
bool tipo_bilancio (TMask_field& f, KEY key)
{
int tipo_bil, anno;
int tipo_bil, anno, tipo_stampa;
if (key == K_SPACE)
{
tipo_bil = f.mask().get_int(F_TIPOBIL);
anno = f.mask().get_int(F_ANNOESE);
tipo_bil = f.mask().get_int(F_TIPOBIL);
if (tipo_bil == 1)
tipo_stampa = f.mask().get_int(F_TIPOSTAMPA);
else
tipo_stampa = f.mask().get_int(F_TIPOSTAMPA1);
anno = f.mask().get_int(F_ANNOESE);
if (tipo_bil == 1)
{
f.mask().hide (98);
@ -697,7 +701,11 @@ bool tipo_bilancio (TMask_field& f, KEY key)
f.mask().hide(96);
f.mask().hide(97);
}
}
}
if (tipo_bil == 2 && tipo_stampa == 1 && f.mask().get_int(F_ANNOESE) == 0)
f.mask().show(F_QUADRATURA);
else
f.mask().hide(F_QUADRATURA);
}
return TRUE;
}
@ -736,13 +744,31 @@ bool anno_esercizio (TMask_field& f, KEY key)
f.mask().hide(97);
}
}
}
if (key == K_TAB)
{
int tipo_bil, tipo_stp;
tipo_bil = f.mask().get_int(F_TIPOBIL);
if (tipo_bil == 1)
tipo_stp = f.mask().get_int(F_TIPOSTAMPA);
else
tipo_stp = f.mask().get_int(F_TIPOSTAMPA1);
if (tipo_bil == 2 && tipo_stp == 1 && f.mask().get_int(F_ANNOESE) == 0)
f.mask().show(F_QUADRATURA);
else
{
f.mask().set (F_QUADRATURA,"");
f.mask().hide(F_QUADRATURA);
}
}
return TRUE;
}
bool tipo_stampa(TMask_field& f,KEY k)
{
int tipo_stampa;
int tipo_bil, tipo_stampa;
if (k == K_ENTER)
{
@ -758,6 +784,21 @@ bool tipo_stampa(TMask_field& f,KEY k)
}
}
if (k == K_SPACE)
{
tipo_bil = f.mask().get_int(F_TIPOBIL);
if (tipo_bil == 1)
tipo_stampa = f.mask().get_int(F_TIPOSTAMPA);
else
tipo_stampa = f.mask().get_int(F_TIPOSTAMPA1);
if (tipo_bil == 2 && tipo_stampa == 1 && f.mask().get_int(F_ANNOESE) == 0)
f.mask().show(F_QUADRATURA);
else
f.mask().hide(F_QUADRATURA);
}
return TRUE;
}
@ -844,7 +885,7 @@ bool data_fine(TMask_field& f, KEY k)
if (esc.read() == NOERR)
{
TDate dataini (esc.get_date("D1"));
if (data == dataini && bil == 2)
if (data == dataini && bil == 2 && f.mask().get_int(F_ANNOESE) == 0)
f.mask().show(F_QUADRATURA);
else
f.mask().hide(F_QUADRATURA);
@ -1931,9 +1972,9 @@ bool CG1600_application::calcola_saldo(real& saldo, real& saldo_raf,int g,int c,
}
else if (_databilrafr == _data_fine_raf) //(_tipo_stampa == 2)
{
if (!_sld->ultima_immissione_bilancio(_anno_esercizio_raf,g,c,s,indbil,_stampa_mov_prov))
{
if (!_sld->esiste_saldo() || !_sld->significativo())
if (!_sld->ultima_immissione_bilancio(_anno_esercizio_raf,g,c,s,indbil,_stampa_mov_prov,FALSE)) // W96SALDI : ho aggiunto il parametro FALSE
{ // per dire che nel calcola del saldo non deve
if (!_sld->esiste_saldo() || !_sld->significativo()) // includere il saldo di chiusura
no_movimentato_raf = TRUE;
else
no_movimentato_raf = FALSE;
@ -2093,8 +2134,9 @@ bool CG1600_application::set_print(int)
*/
_msk->set_handler(F_DATALIM, data_limite);
_msk->set_handler(F_TIPOSTAMPA, tipo_stampa);
_msk->set_handler(F_TIPOBIL, tipo_bilancio);
_msk->set_handler(F_TIPOSTAMPA, tipo_stampa);
_msk->set_handler(F_TIPOSTAMPA1, tipo_stampa);
_msk->set_handler(F_TIPOBIL, tipo_bilancio);
_msk->set_handler(F_ANNOESE, anno_esercizio);
_msk->set_handler(F_DATAINI, data_inizio);
_msk->set_handler(F_DATAFINE, data_fine);
@ -3556,7 +3598,8 @@ void CG1600_application::stampa_saldo_132(const real& saldo)
{
set_row (_i,"@115g%r", &saldo);
set_row (_i,"@48g!@81g!@114g!");
set_row (_i++,"@131g%c", _tot_sez_saldo);
if (saldo != ZERO)
set_row (_i++,"@131g%c", _tot_sez_saldo);
}
print_action CG1600_application::postprocess_page(int file, int counter)
@ -4780,8 +4823,9 @@ void CG1600_application::setta_righe_verifica()
}
else
{
set_row (_i,"@115g%r", &_sale);
set_row (_i,"@131g%c", _sez_saldo);
set_row (_i,"@115g%r", &_sale);
if (_sale != ZERO)
set_row (_i,"@131g%c", _sez_saldo);
set_row (_i,"@48g!@81g!@114g!");
}
}
@ -4849,8 +4893,9 @@ void CG1600_application::setta_righe_verifica()
}
else
{
set_row (_i,"@115g%r", &_sale);
set_row (_i,"@131g%c", _sez_saldo);
set_row (_i,"@115g%r", &_sale);
if (_sale != ZERO)
set_row (_i,"@131g%c", _sez_saldo);
set_row (_i,"@48g!@81g!@114g!");
}
}

View File

@ -61,11 +61,9 @@ BEGIN
ITEM "1|Bilancio scalare"
MESSAGE HIDE,F_TIPOSTAMPA1|RESET,F_TIPOSTAMPA1|SHOW,F_TIPOSTAMPA|K_SPACE,F_TIPOSTAMPA
MESSAGE SHOW,F_ANNORAFFR|SHOW,F_DATABILRAF
MESSAGE HIDE,F_QUADRATURA
ITEM "2|Bilancio di verifica"
MESSAGE HIDE,F_TIPOSTAMPA|RESET,F_TIPOSTAMPA|SHOW,F_TIPOSTAMPA1|K_SPACE,F_TIPOSTAMPA1
MESSAGE HIDE,F_ANNORAFFR|HIDE,F_DATABILRAF
MESSAGE SHOW,F_QUADRATURA
END
LIST F_TIPOSTAMPA 23
@ -94,7 +92,7 @@ BEGIN
MESSAGE HIDE,F_DATALIM|HIDE,F_DATAINI|HIDE,F_DATAFINE
MESSAGE RESET,F_DATAINI|RESET,F_DATALIM|RESET,F_DATAFINE
MESSAGE SHOW,F_STAMPAINT|SHOW,F_STAMPACOD|SHOW,F_STAMPAMOV|SHOW,F_STAMPAMODULO
MESSAGE COPY,F_TIPOSTAMPA
MESSAGE COPY,F_TIPOSTAMPA
END
TEXT 96

View File

@ -83,7 +83,7 @@ public:
const char* causale_chiusura_es();
const char* causale_apertura_es();
bool ultima_immissione_bilancio(int anno,int g,int c,long s,int indbil,int prov);
bool ultima_immissione_bilancio(int anno,int g,int c,long s,int indbil,int prov,bool saldo_chiusura = TRUE);
bool ultima_immissione_verifica(int anno,int g,int c,long s,int indbil,int prov);
bool data_limite_bilancio(int,int,int,long,const TDate&,const TDate&,int,int);

View File

@ -374,14 +374,22 @@ bool TSaldo::ultima_immissione_verifica(int annoes,int g,int c,long s,int indbil
return esito;
}
//per bilancio a sezioni contrapposte all'ultima immissione
bool TSaldo::ultima_immissione_bilancio(int annoes,int g,int c,long s,int indbil,int stp_prov)
//per bilancio a sezioni contrapposte all'ultima immissione
// W96SALDI in questa funzione e' stato aggiunto il parametro saldo_chiusura che di default
// e' TRUE. A cosa serve ? Serve per includere nel calcolo del saldo all' ultima immissione
// anche il saldo finale compilato nei movimenti di chiusura (se non venisse considerato i conti
// risulterebbero aperti); siccome alcuni programmi (esempio il bilancio IV dir. CEE) non ne
// devono tenere conto, si e' data la possibilita' di usare la funzione passandogli il parametro a FALSE.
// Modifica del 09-07-96
bool TSaldo::ultima_immissione_bilancio(int annoes,int g,int c,long s,int indbil,int stp_prov,bool saldo_chiusura)
{
//Si considerano i saldi e non piu' i movimenti
char sezione;
int gruppo, conto, annoe;
long sottoconto;
real pdarepro, paverepro;
real pdarepro, paverepro;
real saldofinale;
char flagsf;
bool esito = FALSE;
_saldo_iniziale = ZERO;
@ -411,7 +419,9 @@ bool TSaldo::ultima_immissione_bilancio(int annoes,int g,int c,long s,int indbil
pdarepro = _saldi.get_real(SLD_PDAREPRO);
paverepro = _saldi.get_real(SLD_PAVEREPRO);
sezione = _saldi.get_char(SLD_FLAGSALINI);
flagsf = _saldi.get_char(SLD_FLAGSALFIN);
saldofinale = _saldi.get_real(SLD_SALDOFIN);
if (stp_prov == 1) //bilancio normale (senza provvisori)
esito = (_saldo_iniziale != ZERO || _prg_dare != ZERO || _prg_avere != ZERO);
@ -424,6 +434,10 @@ bool TSaldo::ultima_immissione_bilancio(int annoes,int g,int c,long s,int indbil
if (sezione == 'A') _saldo_iniziale = -_saldo_iniziale;
if (saldo_chiusura) // W96SALDI modifica inserita per il discorso di inclusione oppure
if (flagsf == 'A') // no del saldo di chiusura inserita il 09-07-96
saldofinale = -saldofinale;
_rec_presente_ec = esito;
}
@ -443,7 +457,10 @@ bool TSaldo::ultima_immissione_bilancio(int annoes,int g,int c,long s,int indbil
if (stp_prov == 3)
_saldo = pdarepro - paverepro;
if (saldo_chiusura) // W96SALDI modifica inserita per il discorso di inclusione oppure
_saldo += saldofinale; // no del saldo di chiusura inserita il 09-07-96
return esito;
}

View File

@ -277,13 +277,26 @@ const char* TTransfer_file::path(long codditta)
void TTransfer_file::remove_all(bool file_ditta)
{
TString sigle;
TString dir;
TString dir,trasfer;
if (file_ditta)
dir << main_app().get_firm_dir() << HEADER;
if (file_ditta)
{
dir << main_app().get_firm_dir();
trasfer = dir;
dir << HEADER;
trasfer << "\\trasfer";
}
else
dir << firm2dir(0) << HEADER;
{
dir << firm2dir(0);
trasfer = dir;
dir << HEADER;
trasfer << "\\trasfer";
}
if (fexist(trasfer))
fremove(trasfer);
open(dir,FALSE);
read_control_rec();
sigle = sigle_file();