cg1500.cpp Aggiornato uso TTempisamfile con nuovi parametri

cg1600.cpp    Corretto MI3557 stampa solo conti movimentati
cg5200a.uml   Aggiustata dimensione di un groupbox
cg2101.cpp    Tolto TDate& dai metodi write, rewrite e remove
cg2101.h      Tolto TDate& dai metodi write, rewrite e remove
              ATTENZIONE: Da Giugno la prima nota non cancellava le
              righe iva e contabili!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!


git-svn-id: svn://10.65.10.50/trunk@5602 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 1997-11-12 10:46:27 +00:00
parent 033988546b
commit 8f2b3c2ba3
5 changed files with 45 additions and 62 deletions

View File

@ -816,17 +816,17 @@ bool TStampa_bilanci::bil_sez_contr()
bool movimentato = FALSE;
CHECK(_tmp_saldi_att == NULL, "Non posso riaprire cg01");
_tmp_saldi_att = new TIsamtempfile(LF_SALDI, "cg01", 2);
_tmp_saldi_att = new TIsamtempfile(LF_SALDI, "cg01", TRUE, TRUE);
_prog->addstatus(1);
_tmp_saldi_pass = new TIsamtempfile(LF_SALDI, "cg02", 2);
_tmp_saldi_pass = new TIsamtempfile(LF_SALDI, "cg02", TRUE, TRUE);
_prog->addstatus(1);
_tmp_saldi_costi = new TIsamtempfile(LF_SALDI, "cg03", 2);
_tmp_saldi_costi = new TIsamtempfile(LF_SALDI, "cg03", TRUE, TRUE);
_prog->addstatus(1);
_tmp_saldi_ricavi = new TIsamtempfile(LF_SALDI, "cg04", 2);
_tmp_saldi_ricavi = new TIsamtempfile(LF_SALDI, "cg04", TRUE, TRUE);
_prog->addstatus(1);
_tmp_saldi_conti_uno = new TIsamtempfile(LF_SALDI, "cg05", 2);
_tmp_saldi_conti_uno = new TIsamtempfile(LF_SALDI, "cg05", TRUE, TRUE);
_prog->addstatus(1);
_tmp_saldi_conti_due = new TIsamtempfile(LF_SALDI, "cg06", 2);
_tmp_saldi_conti_due = new TIsamtempfile(LF_SALDI, "cg06", TRUE, TRUE);
_prog->addstatus(1);
_gp=-1;
@ -1232,7 +1232,7 @@ bool TStampa_bilanci::bil_verifica()
bool esiste_conto = FALSE, esiste_sc = FALSE, movimentato = FALSE;
CHECK(_tmp_saldi_att == NULL, "Non posso riaprire cg01");
_tmp_saldi_att = new TIsamtempfile(LF_SALDI, "cg01", 2);
_tmp_saldi_att = new TIsamtempfile(LF_SALDI, "cg01", TRUE, TRUE);
_gp=-1;
_cp=-1;
@ -2547,17 +2547,10 @@ bool TStampa_bilanci::preprocess_print(int file, int counter)
}
else
{
#ifdef DBG
if (_noseparator)
set_real_picture ("@@@@@@@@@@@@@@@@");
else
set_real_picture ("@@@@.@@@.@@@.@@@");
#else
if (_noseparator)
set_real_picture ("################");
else
set_real_picture ("####.###.###.###");
#endif
//if ( (_verifica == 3) && (_ordinamento == 1) )
// _tmp_saldi_att->setkey(2);

View File

@ -1572,19 +1572,25 @@ void TStampa_IVdirettiva::crea_sort_piano_conti_verifica()
if (_tipo_stampa == 2)
{
if (!_sld->ultima_immissione_verifica(_anno_esercizio,g,c,s,indbil,_stampa_mov_prov))
// continue;
/*
//modifica del 05/04/1995
{
if (indbil == 1 || indbil == 2 || indbil == 5)
app = _sld->saldofin_esprec(_anno_esercizio,g,c,s);
}
else app = _sld->saldoini();
//fine modifica
else
app = _sld->saldoini();
//fine modifica 05/04/1995
*/
//modifica del 11/11/1997 che rimette tutto come era prima
continue;
app = _sld->saldoini();
//fine modifica 11/11/1997
if (app < ZERO)
{
app = -app;
sld_prg_dare = ZERO;
sld_prg_avere = app;
sld_prg_avere = -app;
}
else
{
@ -1596,18 +1602,15 @@ void TStampa_IVdirettiva::crea_sort_piano_conti_verifica()
saldo = sld_prg_dare-sld_prg_avere+mov_dare-mov_avere;
//modifica del 05/04/1995
if (!(saldo == ZERO && _stampamov))
if (!(saldo.is_zero() && _stampamov))
{
_nuovo_tot_saldo_d += mov_dare;
_nuovo_tot_saldo_a += mov_avere;
real nuovo = _sld->saldoinisusaldi();
if (nuovo > ZERO)
const real nuovo = _sld->saldoinisusaldi();
if (nuovo >= ZERO)
_nuovo_tot_saldo_d += nuovo;
else
{
nuovo = -nuovo;
_nuovo_tot_saldo_a += nuovo;
}
_nuovo_tot_saldo_a -= nuovo;
}
//fine modifica
}
@ -1617,7 +1620,7 @@ void TStampa_IVdirettiva::crea_sort_piano_conti_verifica()
if (conto_dettagliato)
riempi_record(sez_conto,let_conto,numr_conto,num_conto,g,c,s,saldo,ZERO,sld_prg_dare,sld_prg_avere,mov_dare,mov_avere,tmcf);
if (!(saldo == ZERO && _stampamov))//Se non deve stampare i conti con saldo a zero, non aggiornare il totale del conto
if (!(saldo.is_zero() && _stampamov))//Se non deve stampare i conti con saldo a zero, non aggiornare il totale del conto
{
saldo_conto += saldo;
sld_prg_dare_conto += sld_prg_dare;
@ -2067,20 +2070,7 @@ bool TStampa_IVdirettiva::calcola(int g, int c, long s,
bool TStampa_IVdirettiva::set_print(int)
{
KEY tasto;
_msk->set_handler(F_DATALIM, data_limite);
_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);
_msk->set_handler(F_DATABILRAF, data_bil_raff);
_msk->set_handler(F_ANNORAFFR, anno_ese_raff);
tasto = _msk->run();
KEY tasto = _msk->run();
if (tasto == K_ENTER)
{
_datastampa = _msk->get(F_DATASTAMPA);
@ -2096,7 +2086,7 @@ bool TStampa_IVdirettiva::set_print(int)
_noseparator = _msk->get_bool(F_SEPARATOR);
if (_tipo_bilancio == 1)
_tipo_stampa = atoi(_msk->get(F_TIPOSTAMPA));
_tipo_stampa = _msk->get_int(F_TIPOSTAMPA);
else
_tipo_stampa = _msk->get_int(F_TIPOSTAMPA1);
@ -2113,24 +2103,15 @@ bool TStampa_IVdirettiva::set_print(int)
_cont_gcs = 0;
_reset_righe_stampa = TRUE;
//17/11/1995
if (_tipo_bilancio == 1)
set_real_picture("###.###.###.###.###");
else
{
#ifdef DBG
if (_noseparator)
set_real_picture("@@@@@@@@@@@@@@@@");
else
set_real_picture("@@@@.@@@.@@@.@@@");
#else
if (_noseparator)
set_real_picture("################");
else
set_real_picture("####.###.###.###");
#endif
}
//fine
set_print_zero(TRUE);
@ -2195,7 +2176,6 @@ bool TStampa_IVdirettiva::set_print(int)
crea_sort_piano_conti_verifica();
_sort->endsort();
crea_intestazione();
delete _bil;
delete _prog;
@ -2317,10 +2297,10 @@ void TStampa_IVdirettiva::stampa_totali()
if (_cont_num != 0)//(_cont_num >= 2)
{
//Fai il totale del numero romano e stampalo
int numeror = atoi(_numr);
TString numrom = itor(numeror);
if (numrom != "")
const int numeror = atoi(_numr);
if (numeror > 0)
{
TString numrom = itor(numeror);
set_row (_i,"@14gTotale@21g%s", (const char*) numrom);
set_row (_i++,"@81g%r", &_totale_numr);
}
@ -5201,6 +5181,16 @@ bool TStampa_IVdirettiva::user_create()
_msk = new TMask("cg1600a");
_msk->set_handler(F_DATALIM, data_limite);
_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);
_msk->set_handler(F_DATABILRAF, data_bil_raff);
_msk->set_handler(F_ANNORAFFR, anno_ese_raff);
return TRUE;
}

View File

@ -234,19 +234,19 @@ int TMovimentoPN::registra(bool re, bool force)
}
int TMovimentoPN::write(bool force, TDate&)
int TMovimentoPN::write(bool force)
{
return registra(FALSE, force);
}
int TMovimentoPN::rewrite(bool force, TDate&)
int TMovimentoPN::rewrite(bool force)
{
return registra(TRUE, force);
}
int TMovimentoPN::remove(TDate&)
int TMovimentoPN::remove()
{
int err = _cg.remove();

View File

@ -51,9 +51,9 @@ public:
virtual int last(TReclock lockop = _nolock) { return (file().last(lockop) || read_mov_rows()); }
virtual int skip(TRecnotype nrec, TReclock lockop = _nolock) { return (file().skip(nrec, lockop) || read_mov_rows()); }
virtual int read(TIsamop op = _isgteq, TReclock lockop = _nolock);
virtual int write (bool force = TRUE, TDate& atdate = (TDate&)botime);
virtual int rewrite(bool force = TRUE, TDate& atdate = (TDate&)botime);
virtual int remove (TDate& atdate = (TDate&)botime);
virtual int write (bool force = TRUE);
virtual int rewrite(bool force = TRUE);
virtual int remove();
const TRecord_array& cg_rows() const { return _cg; }
TRectype& cg(int i);

View File

@ -28,7 +28,7 @@ BEGIN
PROMPT 40 1 "Solo saldi dei movimenti scaricati"
END
GROUPBOX DLG_NULL 73 4
GROUPBOX DLG_NULL 73 5
BEGIN
PROMPT 3 2 ""
END