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:
		
							parent
							
								
									033988546b
								
							
						
					
					
						commit
						8f2b3c2ba3
					
				@ -816,17 +816,17 @@ bool TStampa_bilanci::bil_sez_contr()
 | 
				
			|||||||
  bool movimentato = FALSE;
 | 
					  bool movimentato = FALSE;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  CHECK(_tmp_saldi_att == NULL, "Non posso riaprire cg01");  
 | 
					  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);
 | 
					  _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);
 | 
					  _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);
 | 
					  _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);
 | 
					  _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);
 | 
					  _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);
 | 
					  _prog->addstatus(1);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  _gp=-1;
 | 
					  _gp=-1;
 | 
				
			||||||
@ -1232,7 +1232,7 @@ bool TStampa_bilanci::bil_verifica()
 | 
				
			|||||||
  bool esiste_conto = FALSE, esiste_sc = FALSE, movimentato = FALSE;
 | 
					  bool esiste_conto = FALSE, esiste_sc = FALSE, movimentato = FALSE;
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  CHECK(_tmp_saldi_att == NULL, "Non posso riaprire cg01"); 
 | 
					  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;
 | 
					  _gp=-1;
 | 
				
			||||||
  _cp=-1;
 | 
					  _cp=-1;
 | 
				
			||||||
@ -2547,17 +2547,10 @@ bool TStampa_bilanci::preprocess_print(int file, int counter)
 | 
				
			|||||||
  }
 | 
					  }
 | 
				
			||||||
  else
 | 
					  else
 | 
				
			||||||
  { 
 | 
					  { 
 | 
				
			||||||
#ifdef DBG                                  
 | 
					 | 
				
			||||||
    if (_noseparator)
 | 
					 | 
				
			||||||
      set_real_picture ("@@@@@@@@@@@@@@@@");
 | 
					 | 
				
			||||||
    else  
 | 
					 | 
				
			||||||
      set_real_picture ("@@@@.@@@.@@@.@@@");
 | 
					 | 
				
			||||||
#else    
 | 
					 | 
				
			||||||
    if (_noseparator)
 | 
					    if (_noseparator)
 | 
				
			||||||
      set_real_picture ("################");
 | 
					      set_real_picture ("################");
 | 
				
			||||||
    else  
 | 
					    else  
 | 
				
			||||||
      set_real_picture ("####.###.###.###");
 | 
					      set_real_picture ("####.###.###.###");
 | 
				
			||||||
#endif      
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
    //if ( (_verifica == 3) && (_ordinamento == 1) )
 | 
					    //if ( (_verifica == 3) && (_ordinamento == 1) )
 | 
				
			||||||
    //   _tmp_saldi_att->setkey(2);
 | 
					    //   _tmp_saldi_att->setkey(2);
 | 
				
			||||||
 | 
				
			|||||||
@ -1572,19 +1572,25 @@ void TStampa_IVdirettiva::crea_sort_piano_conti_verifica()
 | 
				
			|||||||
        if (_tipo_stampa == 2)
 | 
					        if (_tipo_stampa == 2)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
          if (!_sld->ultima_immissione_verifica(_anno_esercizio,g,c,s,indbil,_stampa_mov_prov))
 | 
					          if (!_sld->ultima_immissione_verifica(_anno_esercizio,g,c,s,indbil,_stampa_mov_prov))
 | 
				
			||||||
          //  continue;
 | 
					/*          
 | 
				
			||||||
          //modifica del 05/04/1995
 | 
					          //modifica del 05/04/1995
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            if (indbil == 1 || indbil == 2 || indbil == 5)      
 | 
					            if (indbil == 1 || indbil == 2 || indbil == 5)      
 | 
				
			||||||
              app = _sld->saldofin_esprec(_anno_esercizio,g,c,s);
 | 
					              app = _sld->saldofin_esprec(_anno_esercizio,g,c,s);
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          else app = _sld->saldoini();
 | 
					          else 
 | 
				
			||||||
          //fine modifica
 | 
					            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)
 | 
					          if (app < ZERO)
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            app           = -app;
 | 
					 | 
				
			||||||
            sld_prg_dare  = ZERO;
 | 
					            sld_prg_dare  = ZERO;
 | 
				
			||||||
            sld_prg_avere = app;
 | 
					            sld_prg_avere = -app;
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          else
 | 
					          else
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@ -1596,18 +1602,15 @@ void TStampa_IVdirettiva::crea_sort_piano_conti_verifica()
 | 
				
			|||||||
          saldo     = sld_prg_dare-sld_prg_avere+mov_dare-mov_avere;
 | 
					          saldo     = sld_prg_dare-sld_prg_avere+mov_dare-mov_avere;
 | 
				
			||||||
          
 | 
					          
 | 
				
			||||||
          //modifica del 05/04/1995
 | 
					          //modifica del 05/04/1995
 | 
				
			||||||
          if (!(saldo == ZERO && _stampamov))
 | 
					          if (!(saldo.is_zero() && _stampamov))
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
            _nuovo_tot_saldo_d += mov_dare;
 | 
					            _nuovo_tot_saldo_d += mov_dare;
 | 
				
			||||||
            _nuovo_tot_saldo_a += mov_avere;
 | 
					            _nuovo_tot_saldo_a += mov_avere;
 | 
				
			||||||
            real nuovo = _sld->saldoinisusaldi();
 | 
					            const real nuovo = _sld->saldoinisusaldi();
 | 
				
			||||||
            if (nuovo > ZERO)
 | 
					            if (nuovo >= ZERO)
 | 
				
			||||||
              _nuovo_tot_saldo_d += nuovo;
 | 
					              _nuovo_tot_saldo_d += nuovo;
 | 
				
			||||||
            else
 | 
					            else
 | 
				
			||||||
            {
 | 
					             _nuovo_tot_saldo_a -= nuovo;         
 | 
				
			||||||
             nuovo = -nuovo;
 | 
					 | 
				
			||||||
             _nuovo_tot_saldo_a += nuovo;         
 | 
					 | 
				
			||||||
            } 
 | 
					 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
          //fine modifica 
 | 
					          //fine modifica 
 | 
				
			||||||
        }  
 | 
					        }  
 | 
				
			||||||
@ -1617,7 +1620,7 @@ void TStampa_IVdirettiva::crea_sort_piano_conti_verifica()
 | 
				
			|||||||
        if (conto_dettagliato)
 | 
					        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);
 | 
					          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;
 | 
					          saldo_conto         += saldo;
 | 
				
			||||||
          sld_prg_dare_conto  += sld_prg_dare;
 | 
					          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)
 | 
					bool TStampa_IVdirettiva::set_print(int)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  KEY tasto;
 | 
					  KEY tasto = _msk->run(); 
 | 
				
			||||||
 | 
					 | 
				
			||||||
  _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(); 
 | 
					 | 
				
			||||||
  
 | 
					 | 
				
			||||||
  if (tasto == K_ENTER) 
 | 
					  if (tasto == K_ENTER) 
 | 
				
			||||||
  {  
 | 
					  {  
 | 
				
			||||||
    _datastampa       = _msk->get(F_DATASTAMPA);    
 | 
					    _datastampa       = _msk->get(F_DATASTAMPA);    
 | 
				
			||||||
@ -2096,7 +2086,7 @@ bool TStampa_IVdirettiva::set_print(int)
 | 
				
			|||||||
    _noseparator      = _msk->get_bool(F_SEPARATOR);
 | 
					    _noseparator      = _msk->get_bool(F_SEPARATOR);
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    if (_tipo_bilancio == 1)
 | 
					    if (_tipo_bilancio == 1)
 | 
				
			||||||
      _tipo_stampa = atoi(_msk->get(F_TIPOSTAMPA));
 | 
					      _tipo_stampa = _msk->get_int(F_TIPOSTAMPA);
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      _tipo_stampa = _msk->get_int(F_TIPOSTAMPA1);
 | 
					      _tipo_stampa = _msk->get_int(F_TIPOSTAMPA1);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -2113,24 +2103,15 @@ bool TStampa_IVdirettiva::set_print(int)
 | 
				
			|||||||
    _cont_gcs  = 0;
 | 
					    _cont_gcs  = 0;
 | 
				
			||||||
    _reset_righe_stampa = TRUE;
 | 
					    _reset_righe_stampa = TRUE;
 | 
				
			||||||
   
 | 
					   
 | 
				
			||||||
    //17/11/1995
 | 
					 | 
				
			||||||
    if (_tipo_bilancio == 1)
 | 
					    if (_tipo_bilancio == 1)
 | 
				
			||||||
      set_real_picture("###.###.###.###.###");  
 | 
					      set_real_picture("###.###.###.###.###");  
 | 
				
			||||||
    else 
 | 
					    else 
 | 
				
			||||||
    {
 | 
					    {
 | 
				
			||||||
#ifdef DBG    
 | 
					 | 
				
			||||||
      if (_noseparator)                       
 | 
					 | 
				
			||||||
        set_real_picture("@@@@@@@@@@@@@@@@");  
 | 
					 | 
				
			||||||
      else
 | 
					 | 
				
			||||||
        set_real_picture("@@@@.@@@.@@@.@@@");  
 | 
					 | 
				
			||||||
#else
 | 
					 | 
				
			||||||
      if (_noseparator)                       
 | 
					      if (_noseparator)                       
 | 
				
			||||||
        set_real_picture("################");  
 | 
					        set_real_picture("################");  
 | 
				
			||||||
      else
 | 
					      else
 | 
				
			||||||
        set_real_picture("####.###.###.###");  
 | 
					        set_real_picture("####.###.###.###");  
 | 
				
			||||||
#endif        
 | 
					 | 
				
			||||||
    }  
 | 
					    }  
 | 
				
			||||||
    //fine
 | 
					 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
    set_print_zero(TRUE);
 | 
					    set_print_zero(TRUE);
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
@ -2195,7 +2176,6 @@ bool TStampa_IVdirettiva::set_print(int)
 | 
				
			|||||||
      crea_sort_piano_conti_verifica();
 | 
					      crea_sort_piano_conti_verifica();
 | 
				
			||||||
    _sort->endsort();
 | 
					    _sort->endsort();
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
    crea_intestazione();
 | 
					    crea_intestazione();
 | 
				
			||||||
    delete _bil;
 | 
					    delete _bil;
 | 
				
			||||||
    delete _prog;
 | 
					    delete _prog;
 | 
				
			||||||
@ -2317,10 +2297,10 @@ void TStampa_IVdirettiva::stampa_totali()
 | 
				
			|||||||
      if (_cont_num != 0)//(_cont_num >= 2)
 | 
					      if (_cont_num != 0)//(_cont_num >= 2)
 | 
				
			||||||
      {
 | 
					      {
 | 
				
			||||||
        //Fai il totale del numero romano e stampalo  
 | 
					        //Fai il totale del numero romano e stampalo  
 | 
				
			||||||
        int numeror = atoi(_numr);
 | 
					        const int numeror = atoi(_numr);
 | 
				
			||||||
        TString numrom  = itor(numeror);
 | 
					        if (numeror > 0)
 | 
				
			||||||
        if (numrom != "")
 | 
					 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
 | 
					          TString numrom  = itor(numeror);
 | 
				
			||||||
          set_row (_i,"@14gTotale@21g%s", (const char*) numrom);
 | 
					          set_row (_i,"@14gTotale@21g%s", (const char*) numrom);
 | 
				
			||||||
          set_row (_i++,"@81g%r", &_totale_numr);
 | 
					          set_row (_i++,"@81g%r", &_totale_numr);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
@ -5201,6 +5181,16 @@ bool TStampa_IVdirettiva::user_create()
 | 
				
			|||||||
  
 | 
					  
 | 
				
			||||||
  _msk     = new TMask("cg1600a");
 | 
					  _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;
 | 
					  return TRUE;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -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);
 | 
					  return registra(FALSE, force);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int TMovimentoPN::rewrite(bool force, TDate&)
 | 
					int TMovimentoPN::rewrite(bool force)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  return registra(TRUE, force);
 | 
					  return registra(TRUE, force);
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
int TMovimentoPN::remove(TDate&)
 | 
					int TMovimentoPN::remove()
 | 
				
			||||||
{         
 | 
					{         
 | 
				
			||||||
  int err = _cg.remove();
 | 
					  int err = _cg.remove();
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
				
			|||||||
@ -51,9 +51,9 @@ public:
 | 
				
			|||||||
  virtual int last(TReclock lockop = _nolock) { return (file().last(lockop) || read_mov_rows()); }
 | 
					  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 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 read(TIsamop op = _isgteq, TReclock lockop = _nolock);
 | 
				
			||||||
  virtual int write  (bool force = TRUE, TDate& atdate = (TDate&)botime);
 | 
					  virtual int write  (bool force = TRUE);
 | 
				
			||||||
  virtual int rewrite(bool force = TRUE, TDate& atdate = (TDate&)botime);
 | 
					  virtual int rewrite(bool force = TRUE);
 | 
				
			||||||
  virtual int remove (TDate& atdate = (TDate&)botime);
 | 
					  virtual int remove();
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  const TRecord_array& cg_rows() const { return _cg; }
 | 
					  const TRecord_array& cg_rows() const { return _cg; }
 | 
				
			||||||
  TRectype& cg(int i);
 | 
					  TRectype& cg(int i);
 | 
				
			||||||
 | 
				
			|||||||
@ -28,7 +28,7 @@ BEGIN
 | 
				
			|||||||
  PROMPT 40 1 "Solo saldi dei movimenti scaricati"
 | 
					  PROMPT 40 1 "Solo saldi dei movimenti scaricati"
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
GROUPBOX DLG_NULL 73 4
 | 
					GROUPBOX DLG_NULL 73 5
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  PROMPT 3 2 ""
 | 
					  PROMPT 3 2 ""
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user