Corretti errori priorita' 2 in cg4 e ampliati importi nei bilanci e cg3
git-svn-id: svn://10.65.10.50/trunk@2168 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									3d0f2970e7
								
							
						
					
					
						commit
						89f14cb943
					
				
							
								
								
									
										223
									
								
								cg/cg1500.cpp
									
									
									
									
									
								
							
							
						
						
									
										223
									
								
								cg/cg1500.cpp
									
									
									
									
									
								
							@ -3159,7 +3159,7 @@ void CG1500_application::stampa_riga_totali(int r)
 | 
			
		||||
    /*
 | 
			
		||||
       if (_tipo_stampa1 == 1)
 | 
			
		||||
       _nuovo_tot_saldo_a = -_nuovo_tot_saldo_a;
 | 
			
		||||
       */   
 | 
			
		||||
    */   
 | 
			
		||||
  }
 | 
			
		||||
  if (_stampa_width == 148)
 | 
			
		||||
  {
 | 
			
		||||
@ -3169,39 +3169,118 @@ void CG1500_application::stampa_riga_totali(int r)
 | 
			
		||||
  else
 | 
			
		||||
    set_row(r,"@49g!@82g!@114g!",(const char*)dep);  
 | 
			
		||||
  r++;
 | 
			
		||||
  
 | 
			
		||||
  //basta che ci sia un importo >= a mille miliardi che tutto
 | 
			
		||||
  //il resto della riga va stampato senza puntini!(P.Tresoldi)
 | 
			
		||||
  bool palla = FALSE;                                       
 | 
			
		||||
  TString16 sdt;
 | 
			
		||||
  TString16 sat;      
 | 
			
		||||
  TString16 mdt;      
 | 
			
		||||
  TString16 mat;      
 | 
			
		||||
  TString16 sft;      
 | 
			
		||||
  TString16 ntsd;      
 | 
			
		||||
  TString16 ntsa;          
 | 
			
		||||
  if (strlen(_saldo_dare_tot.string()) > 12 ||
 | 
			
		||||
      strlen(_saldo_avere_tot.string()) > 12 ||
 | 
			
		||||
      strlen(_mov_dare_tot.string()) > 12 ||
 | 
			
		||||
      strlen(_mov_avere_tot.string()) > 12 ||
 | 
			
		||||
      strlen(_saldo_finale_tot.string()) > 12)
 | 
			
		||||
  {    
 | 
			
		||||
    palla = TRUE;
 | 
			
		||||
    if (!_saldo_dare_tot.is_zero()) sdt = _saldo_dare_tot.string("#############");
 | 
			
		||||
    if (!_saldo_avere_tot.is_zero()) sat = _saldo_avere_tot.string("#############");      
 | 
			
		||||
    if (!_mov_dare_tot.is_zero()) mdt = _mov_dare_tot.string("#############");      
 | 
			
		||||
    if (!_mov_avere_tot.is_zero()) mat = _mov_avere_tot.string("#############");      
 | 
			
		||||
    if (!_saldo_finale_tot.is_zero()) sft = _saldo_finale_tot.string("#############");      
 | 
			
		||||
  }              
 | 
			
		||||
  
 | 
			
		||||
  if (_verifica == 2)
 | 
			
		||||
  {
 | 
			
		||||
    if (_stampa_width == 132)
 | 
			
		||||
      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);
 | 
			
		||||
    {
 | 
			
		||||
      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);
 | 
			
		||||
    }
 | 
			
		||||
    else if (app == 'D')
 | 
			
		||||
      set_row(r,"***@8gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@100g%r@115g!@116g%r@148g!",&_saldo_dare_tot,&_saldo_avere_tot,
 | 
			
		||||
              &_mov_dare_tot,&_mov_avere_tot,&_saldo_finale_tot);
 | 
			
		||||
    {
 | 
			
		||||
      if (!palla)
 | 
			
		||||
        set_row(r,"***@8gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@100g%r@115g!@116g%r@148g!",&_saldo_dare_tot,&_saldo_avere_tot,
 | 
			
		||||
                &_mov_dare_tot,&_mov_avere_tot,&_saldo_finale_tot);
 | 
			
		||||
      else
 | 
			
		||||
        set_row(r,"***@8gTOTALE GENERALE@49g!@52g%s@69g%s@82g!@85g%s@102g%s@115g!@118g%s@148g!",(const char*)sdt,(const char*)sat,
 | 
			
		||||
               (const char*)mdt,(const char*)mat,(const char*)sft);        
 | 
			
		||||
    }
 | 
			
		||||
    else 
 | 
			
		||||
      set_row(r,"***@8gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@100g%r@115g!@132g%r@148g!",&_saldo_dare_tot,&_saldo_avere_tot,
 | 
			
		||||
              &_mov_dare_tot,&_mov_avere_tot,&_saldo_finale_tot);
 | 
			
		||||
    {
 | 
			
		||||
      if (!palla)
 | 
			
		||||
        set_row(r,"***@8gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@100g%r@115g!@132g%r@148g!",&_saldo_dare_tot,&_saldo_avere_tot,
 | 
			
		||||
                &_mov_dare_tot,&_mov_avere_tot,&_saldo_finale_tot);
 | 
			
		||||
      else
 | 
			
		||||
        set_row(r,"***@8gTOTALE GENERALE@49g!@52g%s@69g%s@82g!@85g%s@102g%s@115g!@134g%s@148g!",(const char*)sdt,(const char*)sat,
 | 
			
		||||
                (const char*)mdt,(const char*)mat,(const char*)sft);        
 | 
			
		||||
    }          
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
  { 
 | 
			
		||||
    if (_stampa_width == 132)
 | 
			
		||||
    {
 | 
			
		||||
      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 %c",&_saldo_dare_tot,&_saldo_avere_tot,
 | 
			
		||||
                &_mov_dare_tot,&_mov_avere_tot,&_saldo_finale_tot,app);
 | 
			
		||||
      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);
 | 
			
		||||
      if ((_tipo_stampa1 == 1 && _datada == _dataini) || _tipo_stampa1 == 2)
 | 
			
		||||
        set_row(r,"@1g****** ********@18gTOTALE CON SALDI INIZIALI@49g!@82g!@83g%r@99g%r@114g!",&_nuovo_tot_saldo_d,&_nuovo_tot_saldo_a);
 | 
			
		||||
      {
 | 
			
		||||
        if (strlen(_nuovo_tot_saldo_d.string()) > 12 ||
 | 
			
		||||
            strlen(_nuovo_tot_saldo_a.string()) > 12)         
 | 
			
		||||
        {    
 | 
			
		||||
         if (!_nuovo_tot_saldo_d.is_zero()) ntsd = _nuovo_tot_saldo_d.string("#############");      
 | 
			
		||||
         if (!_nuovo_tot_saldo_a.is_zero()) ntsa = _nuovo_tot_saldo_a.string("#############"); 
 | 
			
		||||
         set_row(r,"@1g****** ********@18gTOTALE CON SALDI INIZIALI@49g!@82g!@85g%s@101g%s@114g!",(const char*)ntsd,(const char*)ntsa);
 | 
			
		||||
        }
 | 
			
		||||
        else set_row(r,"@1g****** ********@18gTOTALE CON SALDI INIZIALI@49g!@82g!@83g%r@99g%r@114g!",&_nuovo_tot_saldo_d,&_nuovo_tot_saldo_a);
 | 
			
		||||
      }  
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
      if (app == 'D')
 | 
			
		||||
        set_row(r++,"@1g****** ********@18gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@100g%r@115g!@116g%r@148g!",&_saldo_dare_tot,
 | 
			
		||||
                &_saldo_avere_tot,&_mov_dare_tot,&_mov_avere_tot,
 | 
			
		||||
                &_saldo_finale_tot);
 | 
			
		||||
      {
 | 
			
		||||
        if (!palla)
 | 
			
		||||
          set_row(r++,"@1g****** ********@18gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@100g%r@115g!@116g%r@148g!",&_saldo_dare_tot,
 | 
			
		||||
                  &_saldo_avere_tot,&_mov_dare_tot,&_mov_avere_tot,
 | 
			
		||||
                  &_saldo_finale_tot);
 | 
			
		||||
        else
 | 
			
		||||
          set_row(r++,"@1g****** ********@18gTOTALE GENERALE@49g!@52g%s@69g%s@82g!@85g%s@102g%s@115g!@118g%s@148g!",(const char*)sdt,
 | 
			
		||||
                  (const char*)sat,(const char*)mdt,(const char*)mat,
 | 
			
		||||
                  (const char*)sft);        
 | 
			
		||||
      }
 | 
			
		||||
      else
 | 
			
		||||
        set_row(r++,"@1g****** ********@18gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@100g%r@115g!@132g%r@148g!",&_saldo_dare_tot,
 | 
			
		||||
                &_saldo_avere_tot,&_mov_dare_tot,&_mov_avere_tot,
 | 
			
		||||
                &_saldo_finale_tot);  
 | 
			
		||||
      {       
 | 
			
		||||
        if (!palla)
 | 
			
		||||
          set_row(r++,"@1g****** ********@18gTOTALE GENERALE@49g!@50g%r@67g%r@82g!@83g%r@100g%r@115g!@132g%r@148g!",&_saldo_dare_tot,
 | 
			
		||||
                  &_saldo_avere_tot,&_mov_dare_tot,&_mov_avere_tot,
 | 
			
		||||
                  &_saldo_finale_tot);  
 | 
			
		||||
        else
 | 
			
		||||
          set_row(r++,"@1g****** ********@18gTOTALE GENERALE@49g!@52g%s@69g%s@82g!@85g%s@102g%s@115g!@134g%s@148g!",(const char*)sdt,
 | 
			
		||||
                  (const char*)sat,(const char*)mdt,(const char*)mat,
 | 
			
		||||
                  (const char*)sft);        
 | 
			
		||||
      }
 | 
			
		||||
      if ((_tipo_stampa1 == 1 && _datada == _dataini) || _tipo_stampa1 == 2)
 | 
			
		||||
        set_row(r,"@1g****** ********@18gTOTALE CON SALDI INIZIALI@49g!@82g!@83g%r@100g%r@115g!@148g!",&_nuovo_tot_saldo_d,&_nuovo_tot_saldo_a);
 | 
			
		||||
      {
 | 
			
		||||
        if (strlen(_nuovo_tot_saldo_d.string()) > 12 ||
 | 
			
		||||
            strlen(_nuovo_tot_saldo_a.string()) > 12)         
 | 
			
		||||
        {    
 | 
			
		||||
         if (!_nuovo_tot_saldo_d.is_zero()) ntsd = _nuovo_tot_saldo_d.string("#############");      
 | 
			
		||||
         if (!_nuovo_tot_saldo_a.is_zero()) ntsa = _nuovo_tot_saldo_a.string("#############"); 
 | 
			
		||||
         set_row(r,"@1g****** ********@18gTOTALE CON SALDI INIZIALI@49g!@82g!@85g%s@102g%s@115g!@148g!",(const char*)ntsd,(const char*)ntsa);
 | 
			
		||||
        }
 | 
			
		||||
        else set_row(r,"@1g****** ********@18gTOTALE CON SALDI INIZIALI@49g!@82g!@83g%r@100g%r@115g!@148g!",&_nuovo_tot_saldo_d,&_nuovo_tot_saldo_a);
 | 
			
		||||
      }  
 | 
			
		||||
    }          
 | 
			
		||||
  }
 | 
			
		||||
} 
 | 
			
		||||
@ -3230,19 +3309,35 @@ void CG1500_application::stampa_totali()
 | 
			
		||||
  set_row(_i++, (const char*)dep);
 | 
			
		||||
  set_row(_i++, (const char*)dep);
 | 
			
		||||
  set_row(_i++, (const char*)dep);
 | 
			
		||||
  set_row(_i++, "@39gTOTALE@49g%r@107gTOTALE@117g%r", 
 | 
			
		||||
          &_tot_dare, &_tot_avere);
 | 
			
		||||
  TString pal (_tot_dare.string("#.###.###.###.###"));
 | 
			
		||||
  TString bal (_tot_avere.string("#.###.###.###.###"));  
 | 
			
		||||
  //set_row(_i++, "@39gTOTALE@49g%r@107gTOTALE@117g%r", 
 | 
			
		||||
  //        &_tot_dare, &_tot_avere);
 | 
			
		||||
  set_row(_i++, "@39gTOTALE@47g%s@107gTOTALE@115g%s", 
 | 
			
		||||
          (const char*)pal, (const char*)bal);        
 | 
			
		||||
  TString sb (sbilancio.string("#.###.###.###.###"));     
 | 
			
		||||
  TString pa (pareggio.string("#.###.###.###.###"));        
 | 
			
		||||
  if (_tot_dare > _tot_avere)
 | 
			
		||||
  {
 | 
			
		||||
    /*
 | 
			
		||||
    set_row(_i++, "@85gSBILANCIO ESERCIZIO IN CORSO@117g%r", 
 | 
			
		||||
            &sbilancio);
 | 
			
		||||
    set_row(_i++, "@96gTOTALE A PAREGGIO@117g%r",&pareggio);
 | 
			
		||||
    */                                                      
 | 
			
		||||
    set_row(_i++, "@85gSBILANCIO ESERCIZIO IN CORSO@115g%s", 
 | 
			
		||||
            (const char*)sb);
 | 
			
		||||
    set_row(_i++, "@96gTOTALE A PAREGGIO@115g%s",(const char*)pa);
 | 
			
		||||
  }
 | 
			
		||||
  if (_tot_dare < _tot_avere)
 | 
			
		||||
  {
 | 
			
		||||
    /*
 | 
			
		||||
    set_row(_i++, "@17gSBILANCIO ESERCIZIO IN CORSO@49g%r", 
 | 
			
		||||
            &sbilancio);
 | 
			
		||||
    set_row(_i++, "@28gTOTALE A PAREGGIO@49g%r", &pareggio); 
 | 
			
		||||
    */
 | 
			
		||||
    set_row(_i++, "@17gSBILANCIO ESERCIZIO IN CORSO@47g%s", 
 | 
			
		||||
            (const char*)sb);
 | 
			
		||||
    set_row(_i++, "@28gTOTALE A PAREGGIO@47g%s",(const char*)pa);
 | 
			
		||||
  }
 | 
			
		||||
  _tot_dare  = ZERO;
 | 
			
		||||
  _tot_avere = ZERO;
 | 
			
		||||
@ -3266,7 +3361,7 @@ void CG1500_application::stampa_totali_uno(const real& r1,const real& r2)
 | 
			
		||||
     sbilancio = -sbilancio;
 | 
			
		||||
     pareggio  = _tot_dare + sbilancio + sbilprec;
 | 
			
		||||
     } 
 | 
			
		||||
     */
 | 
			
		||||
  */
 | 
			
		||||
  if (_prima_volta) //ho finito di stampare le attivita'/passivita'
 | 
			
		||||
    _prima_volta   = FALSE;
 | 
			
		||||
  else
 | 
			
		||||
@ -3279,48 +3374,92 @@ void CG1500_application::stampa_totali_uno(const real& r1,const real& r2)
 | 
			
		||||
  set_row(_i++, (const char*)dep);
 | 
			
		||||
  set_row(_i++, (const char*)dep);
 | 
			
		||||
  set_row(_i++, (const char*)dep);                  
 | 
			
		||||
  TString pal (_tot_dare.string("#.###.###.###.###"));
 | 
			
		||||
  TString bal (_tot_avere.string("#.###.###.###.###"));    
 | 
			
		||||
  set_row(_i++, "@39gTOTALE@47g%s@107gTOTALE@115g%s", 
 | 
			
		||||
          (const char*)pal, (const char*)bal);
 | 
			
		||||
  /*
 | 
			
		||||
  set_row(_i++, "@39gTOTALE@49g%r@107gTOTALE@117g%r", 
 | 
			
		||||
          &_tot_dare, &_tot_avere);
 | 
			
		||||
  */
 | 
			
		||||
  if (sbilancio > ZERO) //ho un utile => va stampato tra le passivita'
 | 
			
		||||
  {
 | 
			
		||||
    sbilprec = -sbilprec;
 | 
			
		||||
    pareggio = _tot_avere + sbilancio + sbilprec;
 | 
			
		||||
    if (sbilprec != ZERO)
 | 
			
		||||
      set_row(_i++, "@83gSBILANCIO ESERCIZIO PRECEDENTE@117g%r", 
 | 
			
		||||
              &sbilprec);
 | 
			
		||||
    {
 | 
			
		||||
      //set_row(_i++, "@83gSBILANCIO ESERCIZIO PRECEDENTE@117g%r", 
 | 
			
		||||
      //        &sbilprec);
 | 
			
		||||
      TString sb (sbilprec.string("#.###.###.###.###"));
 | 
			
		||||
      set_row(_i++, "@83gSBILANCIO ESERCIZIO PRECEDENTE@115g%s", 
 | 
			
		||||
              (const char*)sb);      
 | 
			
		||||
    } 
 | 
			
		||||
    /*
 | 
			
		||||
    set_row(_i++, "@85gSBILANCIO ESERCIZIO IN CORSO@117g%r", 
 | 
			
		||||
            &sbilancio);
 | 
			
		||||
    set_row(_i++, "@96gTOTALE A PAREGGIO@117g%r",&pareggio);
 | 
			
		||||
    */                                                      
 | 
			
		||||
    TString pal (sbilancio.string("#.###.###.###.###"));
 | 
			
		||||
    TString bal (pareggio.string("#.###.###.###.###"));
 | 
			
		||||
    set_row(_i++, "@85gSBILANCIO ESERCIZIO IN CORSO@115g%s", 
 | 
			
		||||
            (const char*)pal);
 | 
			
		||||
    set_row(_i++, "@96gTOTALE A PAREGGIO@115g%s",(const char*)bal);
 | 
			
		||||
  }
 | 
			
		||||
  else if (sbilancio < ZERO) //ho una perdita => va stampato tra le attivita'
 | 
			
		||||
  {
 | 
			
		||||
    sbilancio = -sbilancio;
 | 
			
		||||
    pareggio  = _tot_dare + sbilancio + sbilprec;
 | 
			
		||||
    if (sbilprec != ZERO)   
 | 
			
		||||
    {
 | 
			
		||||
      //set_row(_i++, "@15gSBILANCIO ESERCIZIO PRECEDENTE@49g%r", 
 | 
			
		||||
      //        &sbilprec);
 | 
			
		||||
      TString sb (sbilprec.string("#.###.###.###.###"));
 | 
			
		||||
      set_row(_i++, "@15gSBILANCIO ESERCIZIO PRECEDENTE@47g%s", 
 | 
			
		||||
             (const char*)sb);
 | 
			
		||||
    }
 | 
			
		||||
    /*
 | 
			
		||||
    set_row(_i++, "@17gSBILANCIO ESERCIZIO IN CORSO@49g%r", 
 | 
			
		||||
            &sbilancio);
 | 
			
		||||
    set_row(_i++, "@28gTOTALE A PAREGGIO@49g%r", &pareggio);
 | 
			
		||||
    */
 | 
			
		||||
    TString pal (sbilancio.string("#.###.###.###.###"));
 | 
			
		||||
    TString bal (pareggio.string("#.###.###.###.###"));
 | 
			
		||||
    set_row(_i++, "@17gSBILANCIO ESERCIZIO IN CORSO@47g%s", 
 | 
			
		||||
           (const char*)pal);
 | 
			
		||||
    set_row(_i++, "@28gTOTALE A PAREGGIO@47g%s",(const char*)bal);       
 | 
			
		||||
  }
 | 
			
		||||
     else if (sbilancio < ZERO) //ho una perdita => va stampato tra le attivita'
 | 
			
		||||
     {
 | 
			
		||||
       sbilancio = -sbilancio;
 | 
			
		||||
       pareggio  = _tot_dare + sbilancio + sbilprec;
 | 
			
		||||
       if (sbilprec != ZERO)
 | 
			
		||||
         set_row(_i++, "@15gSBILANCIO ESERCIZIO PRECEDENTE@49g%r", 
 | 
			
		||||
                 &sbilprec);
 | 
			
		||||
       set_row(_i++, "@17gSBILANCIO ESERCIZIO IN CORSO@49g%r", 
 | 
			
		||||
               &sbilancio);
 | 
			
		||||
       set_row(_i++, "@28gTOTALE A PAREGGIO@49g%r", &pareggio);
 | 
			
		||||
     }
 | 
			
		||||
  else //sbilancio es. in corso == 0
 | 
			
		||||
  {
 | 
			
		||||
    sbilprec = -sbilprec;
 | 
			
		||||
    if (sbilprec > ZERO) //va stampato sotto le passivita' 
 | 
			
		||||
    {
 | 
			
		||||
      TString pal (sbilprec.string("#.###.###.###.###"));
 | 
			
		||||
      pareggio = _tot_avere + sbilprec;
 | 
			
		||||
      TString bal (pareggio.string("#.###.###.###.###"));
 | 
			
		||||
      /*
 | 
			
		||||
      set_row(_i++, "@83gSBILANCIO ESERCIZIO PRECEDENTE@117g%r", 
 | 
			
		||||
              &sbilprec);
 | 
			
		||||
      set_row(_i++, "@96gTOTALE A PAREGGIO@117g%r", &pareggio);
 | 
			
		||||
      */                   
 | 
			
		||||
      set_row(_i++, "@83gSBILANCIO ESERCIZIO PRECEDENTE@115g%s", 
 | 
			
		||||
              (const char*)pal);
 | 
			
		||||
      set_row(_i++, "@96gTOTALE A PAREGGIO@115g%s", (const char*)bal);
 | 
			
		||||
    }
 | 
			
		||||
    else if (sbilprec < ZERO)
 | 
			
		||||
    {
 | 
			
		||||
     sbilprec = -sbilprec;
 | 
			
		||||
     pareggio = _tot_dare + sbilprec;
 | 
			
		||||
     TString pal (sbilprec.string("#.###.###.###.###"));
 | 
			
		||||
     TString bal (pareggio.string("#.###.###.###.###"));
 | 
			
		||||
     /*
 | 
			
		||||
     set_row(_i++, "@15gSBILANCIO ESERCIZIO PRECEDENTE@49g%r", 
 | 
			
		||||
             &sbilprec);
 | 
			
		||||
     set_row(_i++, "@28gTOTALE A PAREGGIO@49g%r",&pareggio);
 | 
			
		||||
     */
 | 
			
		||||
     set_row(_i++, "@15gSBILANCIO ESERCIZIO PRECEDENTE@47g%s", 
 | 
			
		||||
             (const char*)pal);
 | 
			
		||||
     set_row(_i++, "@28gTOTALE A PAREGGIO@47g%s",(const char*)bal);     
 | 
			
		||||
    }
 | 
			
		||||
     else if (sbilprec < ZERO)
 | 
			
		||||
     {
 | 
			
		||||
       sbilprec = -sbilprec;
 | 
			
		||||
       pareggio = _tot_dare + sbilprec;
 | 
			
		||||
       set_row(_i++, "@15gSBILANCIO ESERCIZIO PRECEDENTE@49g%r", 
 | 
			
		||||
               &sbilprec);
 | 
			
		||||
       set_row(_i++, "@28gTOTALE A PAREGGIO@49g%r",&pareggio);
 | 
			
		||||
     }
 | 
			
		||||
  }
 | 
			
		||||
  _tot_dare  = ZERO;
 | 
			
		||||
  _tot_avere = ZERO;
 | 
			
		||||
@ -3764,7 +3903,7 @@ int CG1500_application::stampa_intestazione_ditta()
 | 
			
		||||
  r++;
 | 
			
		||||
  printer().setdate(_data);
 | 
			
		||||
  riga = "Data @<  Pag. @#";
 | 
			
		||||
  riga.right_just(_stampa_width-5);
 | 
			
		||||
  riga.right_just(_stampa_width-6);
 | 
			
		||||
  //riga.right_just(127);
 | 
			
		||||
  riga.overwrite (format ("Partita iva %s Codice fiscale %s", (const char*)_paiva, (const char*)_cofi));
 | 
			
		||||
  set_header (r, "%s", (const char*) riga);
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										289
									
								
								cg/cg1600.cpp
									
									
									
									
									
								
							
							
						
						
									
										289
									
								
								cg/cg1600.cpp
									
									
									
									
									
								
							@ -2101,7 +2101,12 @@ if (tasto == K_ENTER)
 | 
			
		||||
  _cont_gcs  = 0;
 | 
			
		||||
  _reset_righe_stampa = TRUE;
 | 
			
		||||
 
 | 
			
		||||
  set_real_picture("###.###.###.###");  
 | 
			
		||||
  //17/11/1995
 | 
			
		||||
  if (_tipo_bilancio == 1)
 | 
			
		||||
    set_real_picture("#.###.###.###.###");  
 | 
			
		||||
  else set_real_picture("###.###.###.###");  
 | 
			
		||||
  //fine
 | 
			
		||||
  
 | 
			
		||||
//  if (_stampamov)
 | 
			
		||||
//    set_print_zero(FALSE);
 | 
			
		||||
//  else
 | 
			
		||||
@ -2213,7 +2218,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
          if (_num != 0)
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@18gTotale@25g%2d@27g)", _num);
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_numero);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
@ -2224,10 +2229,10 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
        if (_num_tot == "20" || _num_tot == "21")
 | 
			
		||||
        {
 | 
			
		||||
          set_row (_i,"@4gTotale delle partite straordinarie");
 | 
			
		||||
          set_row (_i++,"@86g%r", &_totale_parziale);
 | 
			
		||||
          set_row (_i++,"@84g%r", &_totale_parziale);
 | 
			
		||||
        }       
 | 
			
		||||
        set_row (_i,"@4gRisultato prima delle imposte");
 | 
			
		||||
        set_row (_i++,"@86g%r", &_totale_economico);
 | 
			
		||||
        set_row (_i++,"@84g%r", &_totale_economico);
 | 
			
		||||
        _risimp_fatto = FALSE;                                      
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
@ -2247,7 +2252,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
          if (_num != 0)
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@18gTotale@25g%2d@27g)", _num);
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_numero); 
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        if (_cont_num != 0)//(_cont_num >= 2)
 | 
			
		||||
@ -2258,7 +2263,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
          if (numrom != "")
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@14gTotale@21g%s", (const char*) numrom);
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_numr);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_numr);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@ -2282,7 +2287,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
        if (_num != 0)
 | 
			
		||||
        {
 | 
			
		||||
          set_row (_i,"@18gTotale@25g%2d@27g)", _num);
 | 
			
		||||
          set_row (_i++,"@86g%r", &_totale_numero);
 | 
			
		||||
          set_row (_i++,"@84g%r", &_totale_numero);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      if (_cont_num != 0)//(_cont_num >= 2)
 | 
			
		||||
@ -2293,7 +2298,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
        if (numrom != "")
 | 
			
		||||
        {
 | 
			
		||||
          set_row (_i,"@14gTotale@21g%s", (const char*) numrom);
 | 
			
		||||
          set_row (_i++,"@86g%r", &_totale_numr);
 | 
			
		||||
          set_row (_i++,"@84g%r", &_totale_numr);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      if (_cont_numr != 0)//(_cont_numr >= 2)
 | 
			
		||||
@ -2311,10 +2316,10 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
        if (_let != ' ')
 | 
			
		||||
        {
 | 
			
		||||
          if (_sez_stamp == '9' && _let_stamp != 'E')  
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_lettera);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_lettera);
 | 
			
		||||
          else
 | 
			
		||||
            if (_sez_stamp != '9')                    
 | 
			
		||||
              set_row (_i++,"@86g%r", &_totale_lettera);    
 | 
			
		||||
              set_row (_i++,"@84g%r", &_totale_lettera);    
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      
 | 
			
		||||
@ -2322,7 +2327,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
      { 
 | 
			
		||||
        if (_let_tot == 'A' || _let_tot == 'B') //Solo se esiste una delle due lettere
 | 
			
		||||
        {               
 | 
			
		||||
          set_row (_i++,"@4gDifferenza tra valore e costi della produzione@86g%r", &_totale_economico);
 | 
			
		||||
          set_row (_i++,"@4gDifferenza tra valore e costi della produzione@84g%r", &_totale_economico);
 | 
			
		||||
          _diffprod_fatto = FALSE;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@ -2339,7 +2344,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
          if (_num != 0)
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@18gTotale@25g%2d@27g)", _num);
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_numero);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        if (_cont_num != 0)//(_cont_num >= 2)
 | 
			
		||||
@ -2350,7 +2355,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
          if (numrom != "")
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@14gTotale@21g%s", (const char*) numrom);
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_numr);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_numr);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        if (_cont_numr != 0)//(_cont_numr >= 2)
 | 
			
		||||
@ -2359,7 +2364,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
          if (_let != ' ')
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@3gTotale@10g%c@12g)", _let);
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_lettera);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_lettera);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }   
 | 
			
		||||
@ -2370,7 +2375,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
      char app = ' ';
 | 
			
		||||
      set_row (_i++,"@0g%c", app);
 | 
			
		||||
      set_row (_i,"@0gTOTALE ATTIVO");  
 | 
			
		||||
      set_row (_i++,"@86g%r", &_totale_sezione);
 | 
			
		||||
      set_row (_i++,"@84g%r", &_totale_sezione);
 | 
			
		||||
      _totale_attivita = _totale_sezione;
 | 
			
		||||
      _totale_sezione = ZERO;
 | 
			
		||||
      _totale_attivita_gia_stampato = TRUE;
 | 
			
		||||
@ -2381,7 +2386,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
      char app = ' ';
 | 
			
		||||
      set_row (_i++,"@0g%c", app);
 | 
			
		||||
      set_row (_i,"@0gTOTALE PASSIVO");     
 | 
			
		||||
      set_row (_i++,"@86g%r", &_totale_sezione);
 | 
			
		||||
      set_row (_i++,"@84g%r", &_totale_sezione);
 | 
			
		||||
      _totale_passivita = _totale_sezione;
 | 
			
		||||
      _totale_sezione = ZERO;
 | 
			
		||||
      _totale_passivita_gia_stampato = TRUE;
 | 
			
		||||
@ -2391,9 +2396,9 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
    {
 | 
			
		||||
      char app = ' ';
 | 
			
		||||
      set_row (_i++,"@0g%c", app);
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D' ORDINE ATTIVI");
 | 
			
		||||
      set_row (_i++,"@86g%r", &_totale_ordine_attivo);
 | 
			
		||||
//      _totale_ordine_attivo = ZERO;
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D'ORDINE ATTIVI"); 
 | 
			
		||||
      set_row (_i++,"@84g%r", &_totale_ordine_attivo);
 | 
			
		||||
//    _totale_ordine_attivo = ZERO;
 | 
			
		||||
      gia_stampato_conto_ord = TRUE;
 | 
			
		||||
    }
 | 
			
		||||
    
 | 
			
		||||
@ -2401,8 +2406,8 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
    {
 | 
			
		||||
      char app = ' ';
 | 
			
		||||
      set_row (_i++,"@0g%c", app);
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D' ORDINE PASSIVI");
 | 
			
		||||
      set_row (_i++,"@86g%r", &_totale_ordine_passivo);
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D'ORDINE PASSIVI");
 | 
			
		||||
      set_row (_i++,"@84g%r", &_totale_ordine_passivo);
 | 
			
		||||
      _i++;
 | 
			
		||||
      
 | 
			
		||||
      if (!_attivo_o_passivo)
 | 
			
		||||
@ -2410,9 +2415,9 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
        real totale  = _totale_ordine_attivo - _totale_ordine_passivo;    
 | 
			
		||||
        if (totale != ZERO)
 | 
			
		||||
        {
 | 
			
		||||
          set_row (_i++,"@0gSALDO CONTI D' ORDINE");
 | 
			
		||||
          set_row (_i++,"@0gSALDO CONTI D'ORDINE");
 | 
			
		||||
          set_row (_i,"@0gSBILANCIO");           
 | 
			
		||||
          set_row (_i++,"@86g%r", &totale);
 | 
			
		||||
          set_row (_i++,"@84g%r", &totale); 
 | 
			
		||||
        }
 | 
			
		||||
        _totale_ordine_attivo = ZERO;
 | 
			
		||||
        _totale_ordine_passivo = ZERO;
 | 
			
		||||
@ -2440,7 +2445,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
          if (_num != 0)
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@18gTotale@25g%2d@27g)", _num);
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_numero);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        if (_cont_num != 0)//(_cont_num >= 2)
 | 
			
		||||
@ -2451,7 +2456,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
          if (numrom != "")
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@14gTotale@21g%s", (const char*) numrom);
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_numr);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_numr);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        if (_cont_numr != 0)//(_cont_numr >= 2)
 | 
			
		||||
@ -2462,13 +2467,13 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
            if (_sez_stamp == '9' && _let_stamp != 'E')
 | 
			
		||||
            {
 | 
			
		||||
              set_row (_i,"@3gTotale@10g%c@12g)", _let);
 | 
			
		||||
              set_row (_i++,"@86g%r", &_totale_lettera);
 | 
			
		||||
              set_row (_i++,"@84g%r", &_totale_lettera);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
              if (_sez_stamp != '9')
 | 
			
		||||
              {
 | 
			
		||||
                set_row (_i,"@3gTotale@10g%c@12g)", _let);
 | 
			
		||||
                set_row (_i++,"@86g%r", &_totale_lettera);
 | 
			
		||||
                set_row (_i++,"@84g%r", &_totale_lettera);
 | 
			
		||||
              }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
@ -2481,7 +2486,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
        char app = ' ';
 | 
			
		||||
        set_row (_i++,"@0g%c", app);
 | 
			
		||||
        set_row (_i,"@0gTOTALE ATTIVO");
 | 
			
		||||
        set_row (_i++,"@86g%r", &_totale_sezione);
 | 
			
		||||
        set_row (_i++,"@84g%r", &_totale_sezione);
 | 
			
		||||
        _totale_attivita = _totale_sezione;
 | 
			
		||||
        _totale_sezione = ZERO;
 | 
			
		||||
      }
 | 
			
		||||
@ -2492,7 +2497,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
        char app = ' ';
 | 
			
		||||
        set_row (_i++,"@0g%c", app);
 | 
			
		||||
        set_row (_i,"@0gTOTALE PASSIVO");
 | 
			
		||||
        set_row (_i++,"@86g%r", &_totale_sezione);
 | 
			
		||||
        set_row (_i++,"@84g%r", &_totale_sezione);
 | 
			
		||||
        _totale_passivita = _totale_sezione;
 | 
			
		||||
        _totale_sezione = ZERO;
 | 
			
		||||
      }  
 | 
			
		||||
@ -2511,7 +2516,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
            set_row (_i++,"@0gSALDO STATO PATRIMONIALE");
 | 
			
		||||
            set_row (_i,"@0gSBILANCIO (ATTIVO - PASSIVO)");
 | 
			
		||||
            //_totale_patrimoniale = _totale_attivita - _totale_passivita;
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_patrimoniale);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_patrimoniale);
 | 
			
		||||
            _totale_patrimoniale = ZERO;   
 | 
			
		||||
          }      
 | 
			
		||||
          _sbilancio_patr_gia_stampato = TRUE;
 | 
			
		||||
@ -2521,16 +2526,16 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
      {
 | 
			
		||||
        char app = ' ';
 | 
			
		||||
        set_row (_i++,"@0g%c", app);
 | 
			
		||||
        set_row (_i,"@0gTOTALE CONTI D' ORDINE ATTIVI");
 | 
			
		||||
        set_row (_i++,"@86g%r", &_totale_ordine_attivo);
 | 
			
		||||
        set_row (_i,"@0gTOTALE CONTI D'ORDINE ATTIVI");
 | 
			
		||||
        set_row (_i++,"@84g%r", &_totale_ordine_attivo);
 | 
			
		||||
        // _totale_ordine_attivo = ZERO;
 | 
			
		||||
      }
 | 
			
		||||
      if ((_sez_stamp == '2')&&(_let_stamp == 'Z'))
 | 
			
		||||
      {
 | 
			
		||||
        char app = ' ';
 | 
			
		||||
        set_row (_i++,"@0g%c", app);
 | 
			
		||||
        set_row (_i,"@0gTOTALE CONTI D' ORDINE PASSIVI");
 | 
			
		||||
        set_row (_i++,"@86g%r", &_totale_ordine_passivo);  
 | 
			
		||||
        set_row (_i,"@0gTOTALE CONTI D'ORDINE PASSIVI");  
 | 
			
		||||
        set_row (_i++,"@84g%r", &_totale_ordine_passivo);  
 | 
			
		||||
        _i++;   
 | 
			
		||||
        if (!_sbilancio_ordine)
 | 
			
		||||
        {
 | 
			
		||||
@ -2538,9 +2543,9 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
          if (totale != ZERO)
 | 
			
		||||
          {                           
 | 
			
		||||
            set_row (_i++,"@0g%c", app);
 | 
			
		||||
            set_row (_i++,"@0gSALDO CONTI D' ORDINE");
 | 
			
		||||
            set_row (_i++,"@0gSALDO CONTI D'ORDINE");
 | 
			
		||||
            set_row (_i,"@0gSBILANCIO");    
 | 
			
		||||
            set_row (_i++,"@86g%r", &totale);   
 | 
			
		||||
            set_row (_i++,"@84g%r", &totale);   
 | 
			
		||||
            _sbilancio_ordine = TRUE;
 | 
			
		||||
          }
 | 
			
		||||
          _totale_ordine_passivo = ZERO; 
 | 
			
		||||
@ -2562,7 +2567,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
          set_row (_i++,"@0gSALDO STATO PATRIMONIALE");
 | 
			
		||||
          set_row (_i,"@0gSBILANCIO (ATTIVO - PASSIVO)");
 | 
			
		||||
          //_totale_patrimoniale = _totale_attivita - _totale_passivita;
 | 
			
		||||
          set_row (_i++,"@86g%r", &_totale_patrimoniale);
 | 
			
		||||
          set_row (_i++,"@84g%r", &_totale_patrimoniale);
 | 
			
		||||
          _totale_patrimoniale = ZERO;   
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@ -2572,9 +2577,9 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
        if (totale != ZERO && !_sbilancio_ordine)
 | 
			
		||||
        {   
 | 
			
		||||
          set_row (_i++,"@0g%c", app);
 | 
			
		||||
          set_row (_i++,"@0gSALDO CONTI D' ORDINE");
 | 
			
		||||
          set_row (_i++,"@0gSALDO CONTI D'ORDINE");
 | 
			
		||||
          set_row (_i,"@0gSBILANCIO");    
 | 
			
		||||
          set_row (_i++,"@86g%r", &totale);
 | 
			
		||||
          set_row (_i++,"@84g%r", &totale);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
@ -2582,8 +2587,8 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
    {
 | 
			
		||||
      char app = ' ';
 | 
			
		||||
      set_row (_i++,"@0g%c", app);
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D' ORDINE");
 | 
			
		||||
      set_row (_i++,"@86g%r", &_totale_ordine);
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D'ORDINE");
 | 
			
		||||
      set_row (_i++,"@84g%r", &_totale_ordine);
 | 
			
		||||
      _totale_ordine = ZERO;
 | 
			
		||||
    }
 | 
			
		||||
    if (_sez_stamp == '9')
 | 
			
		||||
@ -2592,7 +2597,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
      {  
 | 
			
		||||
        if ((_let_stamp == 'A' || _let_stamp == 'B') && _diffprod_fatto)//Solo se esiste una delle due lettere
 | 
			
		||||
        {               
 | 
			
		||||
          set_row (_i++,"@4gDifferenza tra valore e costi della produzione@86g%r", &_totale_economico);
 | 
			
		||||
          set_row (_i++,"@4gDifferenza tra valore e costi della produzione@84g%r", &_totale_economico);
 | 
			
		||||
          _diffprod_fatto = FALSE;
 | 
			
		||||
        }
 | 
			
		||||
        if (_risimp_fatto)
 | 
			
		||||
@ -2600,13 +2605,13 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
          if (_let_da_stamp == 'E' && (_num_da_stamp == "20" || _num_da_stamp == "21"))
 | 
			
		||||
          { 
 | 
			
		||||
            set_row (_i,"@4gTotale delle partite straordinarie");
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_parziale);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_parziale);
 | 
			
		||||
          }
 | 
			
		||||
          
 | 
			
		||||
          if ( (classe > ris_imp && _risimp_fatto) || _buff == NULL)         
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@4gRisultato prima delle imposte");
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_economico);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_economico);
 | 
			
		||||
            _risimp_fatto = FALSE;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
@ -2617,7 +2622,7 @@ void CG1600_application::stampa_totali()
 | 
			
		||||
      if (_totale_economico != ZERO)
 | 
			
		||||
      {
 | 
			
		||||
        set_row (_i,"@0gRISULTATO CONTO ECONOMICO");
 | 
			
		||||
        set_row (_i++,"@86g%r", &_totale_economico);
 | 
			
		||||
        set_row (_i++,"@84g%r", &_totale_economico);
 | 
			
		||||
        _totale_economico = ZERO;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
@ -2670,8 +2675,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
          if (_num != 0)
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@18gTotale@25g%2d@27g)", _num);
 | 
			
		||||
            set_row (_i,"@86g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_num_raf);
 | 
			
		||||
            set_row (_i,"@84g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_num_raf);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
    } 
 | 
			
		||||
@ -2682,12 +2687,12 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
        if (_num_tot == "20" || _num_tot == "21")
 | 
			
		||||
        {
 | 
			
		||||
          set_row (_i,"@4gTotale delle partite straordinarie");
 | 
			
		||||
          set_row (_i,"@86g%r", &_totale_parziale);
 | 
			
		||||
          set_row (_i++,"@112g%r", &_totale_parziale_raf);
 | 
			
		||||
          set_row (_i,"@84g%r", &_totale_parziale);
 | 
			
		||||
          set_row (_i++,"@110g%r", &_totale_parziale_raf);
 | 
			
		||||
        }
 | 
			
		||||
        set_row (_i,"@4gRisultato prima delle imposte");
 | 
			
		||||
        set_row (_i,"@86g%r", &_totale_economico);
 | 
			
		||||
        set_row (_i++,"@112g%r", &_totale_economico_raf);
 | 
			
		||||
        set_row (_i,"@84g%r", &_totale_economico);
 | 
			
		||||
        set_row (_i++,"@110g%r", &_totale_economico_raf);
 | 
			
		||||
        _risimp_fatto = FALSE;
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
@ -2707,8 +2712,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
          if (_num != 0)
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@18gTotale@25g%2d@27g)", _num);
 | 
			
		||||
            set_row (_i,"@86g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_num_raf);
 | 
			
		||||
            set_row (_i,"@84g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_num_raf);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        if (_cont_num != 0)//(_cont_num >= 2)
 | 
			
		||||
@ -2719,8 +2724,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
          if (numrom != "")
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@14gTotale@21g%s", (const char*) numrom);
 | 
			
		||||
            set_row (_i,"@86g%r", &_totale_numr);
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_numr_raf);
 | 
			
		||||
            set_row (_i,"@84g%r", &_totale_numr);
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_numr_raf);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@ -2746,7 +2751,7 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
        if (_num != 0)
 | 
			
		||||
        {
 | 
			
		||||
          set_row (_i,"@18gTotale@25g%2d@27g)", _num); 
 | 
			
		||||
          set_row (_i++,"@86g%r", &_totale_numero);
 | 
			
		||||
          set_row (_i++,"@84g%r", &_totale_numero);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      if (_cont_num != 0)//(_cont_num >= 2)
 | 
			
		||||
@ -2757,7 +2762,7 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
        if (numrom != "")
 | 
			
		||||
        {
 | 
			
		||||
          set_row (_i,"@14gTotale@21g%s", (const char*) numrom);
 | 
			
		||||
          set_row (_i++,"@86g%r", &_totale_numr);
 | 
			
		||||
          set_row (_i++,"@84g%r", &_totale_numr);
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
      if (_cont_numr != 0)//(_cont_numr >= 2)
 | 
			
		||||
@ -2776,14 +2781,14 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
        {                 
 | 
			
		||||
          if (_sez_stamp == '9' && _let_stamp != 'E')
 | 
			
		||||
          {        
 | 
			
		||||
            set_row (_i,"@86g%r", &_totale_lettera);  
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_let_raf);
 | 
			
		||||
            set_row (_i,"@84g%r", &_totale_lettera);  
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_let_raf);   
 | 
			
		||||
          }
 | 
			
		||||
          else
 | 
			
		||||
            if (_sez_stamp != '9')
 | 
			
		||||
            {
 | 
			
		||||
              set_row (_i,"@86g%r", &_totale_lettera);  
 | 
			
		||||
              set_row (_i++,"@112g%r", &_totale_let_raf);
 | 
			
		||||
              set_row (_i,"@84g%r", &_totale_lettera);  
 | 
			
		||||
              set_row (_i++,"@110g%r", &_totale_let_raf); 
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
      } 
 | 
			
		||||
@ -2791,7 +2796,7 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
      { 
 | 
			
		||||
        if (_let_tot == 'A' || _let_tot == 'B')
 | 
			
		||||
        {               
 | 
			
		||||
          set_row (_i++,"@4gDifferenza tra valore e costi della produzione@86g%r@112g%r", &_totale_economico,&_totale_economico_raf);
 | 
			
		||||
          set_row (_i++,"@4gDifferenza tra valore e costi della produzione@84g%r@110g%r", &_totale_economico,&_totale_economico_raf);
 | 
			
		||||
          _diffprod_fatto = FALSE;
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@ -2809,8 +2814,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
          if (_num != 0)
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@18gTotale@25g%2d@27g)", _num);
 | 
			
		||||
            set_row (_i,"@86g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_num_raf); 
 | 
			
		||||
            set_row (_i,"@84g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_num_raf); 
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        if (_cont_num != 0)//(_cont_num >= 2)
 | 
			
		||||
@ -2821,8 +2826,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
          if (numrom != "")
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@14gTotale@21g%s", (const char*) numrom);
 | 
			
		||||
            set_row (_i,"@86g%r", &_totale_numr);
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_numr_raf);
 | 
			
		||||
            set_row (_i,"@84g%r", &_totale_numr);
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_numr_raf);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        if (_cont_numr != 0)//(_cont_numr >= 2)
 | 
			
		||||
@ -2831,8 +2836,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
          if (_let != ' ')
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@3gTotale@10g%c@12g)", _let);
 | 
			
		||||
            set_row (_i,"@86g%r", &_totale_lettera);
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_let_raf);  
 | 
			
		||||
            set_row (_i,"@84g%r", &_totale_lettera);
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_let_raf);  
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
      }
 | 
			
		||||
@ -2843,8 +2848,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
      char app = ' ';
 | 
			
		||||
      set_row (_i++,"@0g%c", app);
 | 
			
		||||
      set_row (_i,"@0gTOTALE ATTIVO");   
 | 
			
		||||
      set_row (_i,"@86g%r", &_totale_sezione);
 | 
			
		||||
      set_row (_i++,"@112g%r", &_totale_sez_raf);
 | 
			
		||||
      set_row (_i,"@84g%r", &_totale_sezione);
 | 
			
		||||
      set_row (_i++,"@110g%r", &_totale_sez_raf);
 | 
			
		||||
      _totale_attivita = _totale_sezione;
 | 
			
		||||
      _totale_attiv_raf = _totale_sez_raf;
 | 
			
		||||
      _totale_sezione = ZERO;
 | 
			
		||||
@ -2857,8 +2862,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
      char app = ' ';
 | 
			
		||||
      set_row (_i++,"@0g%c", app);
 | 
			
		||||
      set_row (_i,"@0gTOTALE PASSIVO");
 | 
			
		||||
      set_row (_i,"@86g%r", &_totale_sezione);
 | 
			
		||||
      set_row (_i++,"@112g%r", &_totale_sez_raf);
 | 
			
		||||
      set_row (_i,"@84g%r", &_totale_sezione);
 | 
			
		||||
      set_row (_i++,"@110g%r", &_totale_sez_raf);
 | 
			
		||||
      _totale_passivita = _totale_sezione;
 | 
			
		||||
      _totale_passiv_raf = _totale_sez_raf;
 | 
			
		||||
      _totale_sezione = ZERO;
 | 
			
		||||
@ -2870,9 +2875,9 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
    {
 | 
			
		||||
      char app = ' ';
 | 
			
		||||
      set_row (_i++,"@0g%c", app);
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D' ORDINE ATTIVI");
 | 
			
		||||
      set_row (_i,"@86g%r", &_totale_ordine_attivo);
 | 
			
		||||
      set_row (_i++,"@112g%r", &_totale_ordine_attivo_raf);
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D'ORDINE ATTIVI");
 | 
			
		||||
      set_row (_i,"@84g%r", &_totale_ordine_attivo);
 | 
			
		||||
      set_row (_i++,"@110g%r", &_totale_ordine_attivo_raf);
 | 
			
		||||
      //_totale_ordine_attivo = ZERO;
 | 
			
		||||
      //_totale_ordine_attivo_raf = ZERO;
 | 
			
		||||
      gia_stampato_conto_ord = TRUE;
 | 
			
		||||
@ -2882,9 +2887,9 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
    {
 | 
			
		||||
      char app = ' ';
 | 
			
		||||
      set_row (_i++,"@0g%c", app);
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D' ORDINE PASSIVI");
 | 
			
		||||
      set_row (_i,"@86g%r", &_totale_ordine_passivo);
 | 
			
		||||
      set_row (_i++,"@112g%r", &_totale_ordine_passivo_raf);
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D'ORDINE PASSIVI");
 | 
			
		||||
      set_row (_i,"@84g%r", &_totale_ordine_passivo);
 | 
			
		||||
      set_row (_i++,"@110g%r", &_totale_ordine_passivo_raf);
 | 
			
		||||
      _i++; 
 | 
			
		||||
      gia_stampato_conto_ord     = TRUE;
 | 
			
		||||
      if (!_attivo_o_passivo)
 | 
			
		||||
@ -2893,10 +2898,10 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
        real tot_raf = _totale_ordine_attivo_raf - _totale_ordine_passivo_raf; 
 | 
			
		||||
        if (totale != ZERO || tot_raf != ZERO)
 | 
			
		||||
        {
 | 
			
		||||
          set_row (_i++,"@0gSALDO CONTI D' ORDINE");
 | 
			
		||||
          set_row (_i++,"@0gSALDO CONTI D'ORDINE");
 | 
			
		||||
          set_row (_i,"@0gSBILANCIO");     
 | 
			
		||||
          set_row (_i,"@86g%r", &totale); 
 | 
			
		||||
          set_row (_i++,"@112g%r", &tot_raf);
 | 
			
		||||
          set_row (_i,"@84g%r", &totale); 
 | 
			
		||||
          set_row (_i++,"@110g%r", &tot_raf);
 | 
			
		||||
        }
 | 
			
		||||
        _totale_ordine_attivo      = ZERO;
 | 
			
		||||
        _totale_ordine_attivo_raf  = ZERO;
 | 
			
		||||
@ -2929,8 +2934,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
          if (_num != 0)
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@18gTotale@25g%2d@27g)", _num);
 | 
			
		||||
            set_row (_i,"@86g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_num_raf);
 | 
			
		||||
            set_row (_i,"@84g%r", &_totale_numero);
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_num_raf);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        if (_cont_num != 0)//(_cont_num >= 2)
 | 
			
		||||
@ -2941,8 +2946,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
          if (numrom != "")
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@14gTotale@21g%s", (const char*) numrom);
 | 
			
		||||
            set_row (_i++,"@86g%r", &_totale_numr);
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_numr_raf);
 | 
			
		||||
            set_row (_i++,"@84g%r", &_totale_numr);
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_numr_raf);
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
        if (_cont_numr != 0)//(_cont_numr >= 2)
 | 
			
		||||
@ -2953,15 +2958,15 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
            if (_sez_stamp == '9' && _let_stamp != 'E')
 | 
			
		||||
            {
 | 
			
		||||
              set_row (_i,"@3gTotale@10g%c@12g)", _let);
 | 
			
		||||
              set_row (_i++,"@86g%r", &_totale_lettera);
 | 
			
		||||
              set_row (_i++,"@112g%r", &_totale_let_raf);
 | 
			
		||||
              set_row (_i++,"@84g%r", &_totale_lettera);
 | 
			
		||||
              set_row (_i++,"@110g%r", &_totale_let_raf);
 | 
			
		||||
            }
 | 
			
		||||
            else
 | 
			
		||||
              if (_sez_stamp != '9')
 | 
			
		||||
              {
 | 
			
		||||
                set_row (_i,"@3gTotale@10g%c@12g)", _let);
 | 
			
		||||
                set_row (_i++,"@86g%r", &_totale_lettera);
 | 
			
		||||
                set_row (_i++,"@112g%r", &_totale_let_raf);
 | 
			
		||||
                set_row (_i++,"@84g%r", &_totale_lettera);
 | 
			
		||||
                set_row (_i++,"@110g%r", &_totale_let_raf);
 | 
			
		||||
              }
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
@ -2974,8 +2979,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
        char app = ' ';
 | 
			
		||||
        set_row (_i++,"@0g%c", app);
 | 
			
		||||
        set_row (_i,"@0gTOTALE ATTIVO");
 | 
			
		||||
        set_row (_i,"@86g%r", &_totale_sezione);
 | 
			
		||||
        set_row (_i++,"@112g%r", &_totale_sez_raf);
 | 
			
		||||
        set_row (_i,"@84g%r", &_totale_sezione);
 | 
			
		||||
        set_row (_i++,"@110g%r", &_totale_sez_raf);
 | 
			
		||||
        _totale_attivita = _totale_sezione;
 | 
			
		||||
        _totale_attiv_raf = _totale_sez_raf;
 | 
			
		||||
        _totale_sezione = ZERO;
 | 
			
		||||
@ -2989,8 +2994,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
        char app = ' ';
 | 
			
		||||
        set_row (_i++,"@0g%c", app);
 | 
			
		||||
        set_row (_i,"@0gTOTALE PASSIVO");
 | 
			
		||||
        set_row (_i,"@86g%r", &_totale_sezione);
 | 
			
		||||
        set_row (_i++,"@112g%r", &_totale_sez_raf);
 | 
			
		||||
        set_row (_i,"@84g%r", &_totale_sezione);
 | 
			
		||||
        set_row (_i++,"@110g%r", &_totale_sez_raf);
 | 
			
		||||
        _totale_passivita = _totale_sezione;
 | 
			
		||||
        _totale_passiv_raf = _totale_sez_raf;
 | 
			
		||||
        _totale_sezione = ZERO;
 | 
			
		||||
@ -3014,8 +3019,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
            set_row (_i,"@0gSBILANCIO (ATTIVO - PASSIVO)");
 | 
			
		||||
            //_totale_patrimoniale = _totale_attivita - _totale_passivita;
 | 
			
		||||
            //_totale_patrim_raf   = _totale_attiv_raf - _totale_passiv_raf;
 | 
			
		||||
            set_row (_i,"@86g%r", &_totale_patrimoniale);
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_patrim_raf);
 | 
			
		||||
            set_row (_i,"@84g%r", &_totale_patrimoniale);
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_patrim_raf);
 | 
			
		||||
            _totale_patrimoniale = 0;
 | 
			
		||||
            _totale_patrim_raf   = 0;
 | 
			
		||||
          }
 | 
			
		||||
@ -3026,9 +3031,9 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
      {
 | 
			
		||||
        char app = ' ';
 | 
			
		||||
        set_row (_i++,"@0g%c", app);
 | 
			
		||||
        set_row (_i,"@0gTOTALE CONTI D' ORDINE ATTIVI");
 | 
			
		||||
        set_row (_i,"@86g%r", &_totale_ordine_attivo);   
 | 
			
		||||
        set_row (_i++,"@112g%r", &_totale_ordine_attivo_raf);
 | 
			
		||||
        set_row (_i,"@0gTOTALE CONTI D'ORDINE ATTIVI");
 | 
			
		||||
        set_row (_i,"@84g%r", &_totale_ordine_attivo);   
 | 
			
		||||
        set_row (_i++,"@110g%r", &_totale_ordine_attivo_raf);
 | 
			
		||||
        //_totale_ordine_attivo = ZERO; 
 | 
			
		||||
        //_totale_ordine_attivo_raf = ZERO;
 | 
			
		||||
      }
 | 
			
		||||
@ -3037,9 +3042,9 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
      {
 | 
			
		||||
        char app = ' ';
 | 
			
		||||
        set_row (_i++,"@0g%c", app);
 | 
			
		||||
        set_row (_i,"@0gTOTALE CONTI D' ORDINE PASSIVI");
 | 
			
		||||
        set_row (_i,"@86g%r", &_totale_ordine_passivo);  
 | 
			
		||||
        set_row (_i++,"@112g%r", &_totale_ordine_passivo_raf);
 | 
			
		||||
        set_row (_i,"@0gTOTALE CONTI D'ORDINE PASSIVI");
 | 
			
		||||
        set_row (_i,"@84g%r", &_totale_ordine_passivo);  
 | 
			
		||||
        set_row (_i++,"@110g%r", &_totale_ordine_passivo_raf);
 | 
			
		||||
        _i++;  
 | 
			
		||||
        if (!_sbilancio_ordine)
 | 
			
		||||
        {
 | 
			
		||||
@ -3048,10 +3053,10 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
          if (totale != ZERO || tot_raf != ZERO)
 | 
			
		||||
          {                                 
 | 
			
		||||
            set_row (_i++,"@0g%c", app);
 | 
			
		||||
            set_row (_i++,"@0gSALDO CONTI D' ORDINE");
 | 
			
		||||
            set_row (_i++,"@0gSALDO CONTI D'ORDINE");
 | 
			
		||||
            set_row (_i,"@0gSBILANCIO");    
 | 
			
		||||
            set_row (_i,"@86g%r", &totale); 
 | 
			
		||||
            set_row (_i++,"@112g%r", &tot_raf); 
 | 
			
		||||
            set_row (_i,"@84g%r", &totale); 
 | 
			
		||||
            set_row (_i++,"@110g%r", &tot_raf); 
 | 
			
		||||
            _sbilancio_ordine = TRUE;
 | 
			
		||||
          }
 | 
			
		||||
          _totale_ordine_attivo      = ZERO;
 | 
			
		||||
@ -3077,8 +3082,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
          set_row (_i,"@0gSBILANCIO (ATTIVO - PASSIVO)");
 | 
			
		||||
          //_totale_patrimoniale = _totale_attivita - _totale_passivita;
 | 
			
		||||
          //_totale_patrim_raf   = _totale_attiv_raf - _totale_passiv_raf;
 | 
			
		||||
          set_row (_i,"@86g%r", &_totale_patrimoniale);
 | 
			
		||||
          set_row (_i++,"@112g%r", &_totale_patrim_raf);
 | 
			
		||||
          set_row (_i,"@84g%r", &_totale_patrimoniale);
 | 
			
		||||
          set_row (_i++,"@110g%r", &_totale_patrim_raf);
 | 
			
		||||
          _totale_patrimoniale = 0;
 | 
			
		||||
          _totale_patrim_raf   = 0;
 | 
			
		||||
        } 
 | 
			
		||||
@ -3090,10 +3095,10 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
        if ((totale != ZERO || tot_raf != ZERO) && !_sbilancio_ordine)
 | 
			
		||||
        {                               
 | 
			
		||||
          set_row (_i++,"@0g%c", app);
 | 
			
		||||
          set_row (_i++,"@0gSALDO CONTI D' ORDINE");
 | 
			
		||||
          set_row (_i++,"@0gSALDO CONTI D'ORDINE");
 | 
			
		||||
          set_row (_i,"@0gSBILANCIO");    
 | 
			
		||||
          set_row (_i,"@86g%r", &totale); 
 | 
			
		||||
          set_row (_i++,"@112g%r", &tot_raf);
 | 
			
		||||
          set_row (_i,"@84g%r", &totale); 
 | 
			
		||||
          set_row (_i++,"@110g%r", &tot_raf);
 | 
			
		||||
        }
 | 
			
		||||
      }  
 | 
			
		||||
    }
 | 
			
		||||
@ -3101,9 +3106,9 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
    {
 | 
			
		||||
      char app = ' ';
 | 
			
		||||
      set_row (_i++,"@0g%c", app);
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D' ORDINE");
 | 
			
		||||
      set_row (_i,"@86g%r", &_totale_ordine);
 | 
			
		||||
      set_row (_i++,"@112g%r", &_totale_ordine_raf);
 | 
			
		||||
      set_row (_i,"@0gTOTALE CONTI D'ORDINE");
 | 
			
		||||
      set_row (_i,"@84g%r", &_totale_ordine);
 | 
			
		||||
      set_row (_i++,"@110g%r", &_totale_ordine_raf);
 | 
			
		||||
      _totale_ordine = 0;
 | 
			
		||||
      _totale_ordine_raf = 0;
 | 
			
		||||
    }
 | 
			
		||||
@ -3113,7 +3118,7 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
      { 
 | 
			
		||||
        if ((_let_stamp == 'A' || _let_stamp == 'B') && _diffprod_fatto)
 | 
			
		||||
        {               
 | 
			
		||||
          set_row (_i++,"@4gDifferenza tra valore e costi della produzione@86g%r@112g%r", &_totale_economico,&_totale_economico_raf);
 | 
			
		||||
          set_row (_i++,"@4gDifferenza tra valore e costi della produzione@84g%r@110g%r", &_totale_economico,&_totale_economico_raf);
 | 
			
		||||
          _diffprod_fatto = FALSE;
 | 
			
		||||
        }
 | 
			
		||||
        if (_risimp_fatto)
 | 
			
		||||
@ -3121,15 +3126,15 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
          if (_let_da_stamp == 'E' && (_num_da_stamp == "20" || _num_da_stamp == "21"))
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@4gTotale delle partite straordinarie");
 | 
			
		||||
            set_row (_i,"@86g%r", &_totale_parziale);
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_parziale_raf);
 | 
			
		||||
            set_row (_i,"@84g%r", &_totale_parziale);
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_parziale_raf);
 | 
			
		||||
          }
 | 
			
		||||
 | 
			
		||||
          if ( (classe > ris_imp && _risimp_fatto) || _buff == NULL) 
 | 
			
		||||
          {
 | 
			
		||||
            set_row (_i,"@4gRisultato prima delle imposte");
 | 
			
		||||
            set_row (_i,"@86g%r", &_totale_economico);
 | 
			
		||||
            set_row (_i++,"@112g%r", &_totale_economico_raf);
 | 
			
		||||
            set_row (_i,"@84g%r", &_totale_economico);
 | 
			
		||||
            set_row (_i++,"@110g%r", &_totale_economico_raf);
 | 
			
		||||
            _risimp_fatto = FALSE;
 | 
			
		||||
          }
 | 
			
		||||
        }
 | 
			
		||||
@ -3139,8 +3144,8 @@ void CG1600_application::stampa_totali_con_raffronto()
 | 
			
		||||
      if (_totale_economico != ZERO || _totale_economico_raf != ZERO)
 | 
			
		||||
      {
 | 
			
		||||
        set_row (_i,"@0gRISULTATO CONTO ECONOMICO");
 | 
			
		||||
        set_row (_i,"@86g%r", &_totale_economico);
 | 
			
		||||
        set_row (_i++,"@112g%r", &_totale_economico_raf);
 | 
			
		||||
        set_row (_i,"@84g%r", &_totale_economico);
 | 
			
		||||
        set_row (_i++,"@110g%r", &_totale_economico_raf);
 | 
			
		||||
        _totale_economico = 0;
 | 
			
		||||
        _totale_economico_raf = 0;
 | 
			
		||||
      }
 | 
			
		||||
@ -3936,10 +3941,29 @@ bool CG1600_application::preprocess_stampa_verifica(int counter)
 | 
			
		||||
  {
 | 
			
		||||
    stampa_totali_verifica();
 | 
			
		||||
    set_row (_i,"@0g****** ******** TOTALE GENERALE"); 
 | 
			
		||||
    set_row (_i,"@49g%r", &_tot_gen_prg_d);
 | 
			
		||||
    set_row (_i,"@65g%r", &_tot_gen_prg_a);
 | 
			
		||||
    set_row (_i,"@82g%r", &_tot_gen_mov_d);
 | 
			
		||||
    set_row (_i,"@98g%r", &_tot_gen_mov_a);
 | 
			
		||||
    //17/11/1995
 | 
			
		||||
    if (strlen(_tot_gen_prg_d.string()) > 12 ||
 | 
			
		||||
        strlen(_tot_gen_prg_a.string()) > 12 ||
 | 
			
		||||
        strlen(_tot_gen_mov_d.string()) > 12 ||           
 | 
			
		||||
        strlen(_tot_gen_mov_a.string()) > 12)
 | 
			
		||||
    {
 | 
			
		||||
     TString tgpd (_tot_gen_prg_d.string("#############"));
 | 
			
		||||
     TString tgpa (_tot_gen_prg_a.string("#############"));
 | 
			
		||||
     TString tgmd (_tot_gen_mov_d.string("#############"));
 | 
			
		||||
     TString tgma (_tot_gen_mov_a.string("#############"));
 | 
			
		||||
     set_row (_i,"@51g%s", (const char*)tgpd);
 | 
			
		||||
     set_row (_i,"@67g%s", (const char*)tgpa);
 | 
			
		||||
     set_row (_i,"@84g%s", (const char*)tgmd);
 | 
			
		||||
     set_row (_i,"@100g%s",(const char*)tgma);
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {    
 | 
			
		||||
     set_row (_i,"@49g%r", &_tot_gen_prg_d);
 | 
			
		||||
     set_row (_i,"@65g%r", &_tot_gen_prg_a);
 | 
			
		||||
     set_row (_i,"@82g%r", &_tot_gen_mov_d);
 | 
			
		||||
     set_row (_i,"@98g%r", &_tot_gen_mov_a);
 | 
			
		||||
    } 
 | 
			
		||||
    //fine
 | 
			
		||||
    
 | 
			
		||||
    if (!_stampa_modulo)
 | 
			
		||||
    {
 | 
			
		||||
@ -3957,7 +3981,16 @@ bool CG1600_application::preprocess_stampa_verifica(int counter)
 | 
			
		||||
    
 | 
			
		||||
    //modifica 05/04/1995
 | 
			
		||||
    if ((_tipo_stampa == 1 && _dataini == _data_ini_ese) || _tipo_stampa == 2)
 | 
			
		||||
      set_row(_i,"@0g****** ******** TOTALE CON SALDI INIZIALI@48g!@81g!@82g%r@98g%r@114g!",&_nuovo_tot_saldo_d,&_nuovo_tot_saldo_a);
 | 
			
		||||
    {
 | 
			
		||||
      if (strlen(_nuovo_tot_saldo_d.string()) > 12 ||
 | 
			
		||||
            strlen(_nuovo_tot_saldo_a.string()) > 12)         
 | 
			
		||||
      {    
 | 
			
		||||
        TString ntsd (_nuovo_tot_saldo_d.string("#############"));
 | 
			
		||||
        TString ntsa (_nuovo_tot_saldo_a.string("#############"));      
 | 
			
		||||
        set_row(_i,"@0g****** ******** TOTALE CON SALDI INIZIALI@48g!@81g!@84g%s@100g%s@114g!",(const char*)ntsd,(const char*)ntsa);
 | 
			
		||||
      }
 | 
			
		||||
      else set_row(_i,"@0g****** ******** TOTALE CON SALDI INIZIALI@48g!@81g!@82g%r@98g%r@114g!",&_nuovo_tot_saldo_d,&_nuovo_tot_saldo_a);
 | 
			
		||||
    }
 | 
			
		||||
    //fine modifica
 | 
			
		||||
    
 | 
			
		||||
    _sez_da_stamp = ' ';
 | 
			
		||||
@ -4415,9 +4448,9 @@ void CG1600_application::setta_righe(const char * titolo)
 | 
			
		||||
        set_row (_i,"@22g%s", bil->conto);
 | 
			
		||||
        set_row (_i,"@26g%s", bil->sottoc);
 | 
			
		||||
        set_row (_i,"@33g%s", (const char*) descr_sottoc);
 | 
			
		||||
        set_row (_i,"@86g%r", &_sale);
 | 
			
		||||
        set_row (_i,"@84g%r", &_sale);
 | 
			
		||||
        if (_annoeserafr != 0 || _databilrafr != botime)
 | 
			
		||||
          set_row (_i,"@112g%r", &_salerafr);
 | 
			
		||||
          set_row (_i,"@110g%r", &_salerafr);
 | 
			
		||||
        _i++;
 | 
			
		||||
      }  
 | 
			
		||||
    }
 | 
			
		||||
@ -4437,9 +4470,9 @@ void CG1600_application::setta_righe(const char * titolo)
 | 
			
		||||
        if (descr_classe != descr_sottoc)
 | 
			
		||||
        {                       
 | 
			
		||||
          set_row (_i,"@20g%s", (const char*) descr_sottoc);
 | 
			
		||||
          set_row (_i,"@86g%r", &_sale);
 | 
			
		||||
          set_row (_i,"@84g%r", &_sale);
 | 
			
		||||
          if (_annoeserafr != 0 || _databilrafr != botime)
 | 
			
		||||
            set_row (_i,"@112g%r", &_salerafr);
 | 
			
		||||
            set_row (_i,"@110g%r", &_salerafr);
 | 
			
		||||
          _i++;
 | 
			
		||||
        } 
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
@ -863,17 +863,19 @@ void TListaMov_application::stampa_intestazione()
 | 
			
		||||
  else 
 | 
			
		||||
    set_row (2, "@bFornitore@10g@6n", FLD(LF_MOV,MOV_CODCF));
 | 
			
		||||
  set_row (2, "@b@18g#.35t", &_ragsoc);
 | 
			
		||||
  set_row (2, "@b@54gInd #.29t", &_indcf);
 | 
			
		||||
  set_row (2, "@b@87g#.10t", &_civcf);
 | 
			
		||||
  //set_row (2, "@b@54gInd #.29t", &_indcf);
 | 
			
		||||
  //set_row (2, "@b@84g#.10t", &_civcf);
 | 
			
		||||
  set_row (2, "@b@54gInd #-.29t #-.10t", &_indcf, &_civcf);
 | 
			
		||||
  set_row (2, "@b@98gP.I. #11t", &_paiv);
 | 
			
		||||
  if (_alleg == 0)
 | 
			
		||||
    set_row (2, "@b@121gAllegato NO");
 | 
			
		||||
  else 
 | 
			
		||||
    set_row (2, "@b@121gAllegato SI");
 | 
			
		||||
  else 
 | 
			
		||||
    set_row (2, "@b@121gAllegato NO");
 | 
			
		||||
  set_row (3, "@b@54gCap #5t",  &_capcf);
 | 
			
		||||
  set_row (3,"@b@64g%s #.20t", (const char*)_app, &_dencom);
 | 
			
		||||
  set_row (3,"@b@89gPr #.5t",   &_provcom);
 | 
			
		||||
  set_row (3, "@b@98gC.F. #16t", &_cofi);
 | 
			
		||||
  set_row (3,"@b@64g%s #-.20t Pr #-.5t", 
 | 
			
		||||
          (const char*)_app, &_dencom, &_provcom);
 | 
			
		||||
  //set_row (3,"@b@89gPr #-.5t",   &_provcom);
 | 
			
		||||
  set_row (3, "@b@98gC.F. #-16t", &_cofi);
 | 
			
		||||
  if (_alleg == 0)
 | 
			
		||||
    set_row (3, "@b@120gRifer@126g#6d", &_codalleg);
 | 
			
		||||
}
 | 
			
		||||
@ -1219,8 +1221,8 @@ bool TListaMov_application::preprocess_page(int file,int counter)
 | 
			
		||||
        set_row(2,"@49g@3s",FLD(LF_MOV,MOV_CODCAUS));
 | 
			
		||||
        set_row(2,"@53g@2s",FLD(LF_MOV,MOV_TIPODOC));
 | 
			
		||||
        set_row(2,"@56g%-.12s", (const char *)_descr_doc);
 | 
			
		||||
        set_row(2,"@68g@pN",FLD(LF_MOV,MOV_TOTDOC,"###.###.###.###"));
 | 
			
		||||
        set_row(2,"@84g@pN",FLD(LF_RMOVIVA,RMI_IMPONIBILE,"###.###.###.###"));      
 | 
			
		||||
        set_row(2,"@69g@pN",FLD(LF_MOV,MOV_TOTDOC,"###.###.###.###"));
 | 
			
		||||
        set_row(2,"@85g@pN",FLD(LF_RMOVIVA,RMI_IMPONIBILE,"###.###.###.###"));      
 | 
			
		||||
        set_row(2,"@101g@4s",FLD(LF_RMOVIVA,RMI_CODIVA));
 | 
			
		||||
        set_row(2,"@105g@1n",FLD(LF_RMOVIVA,RMI_TIPODET));
 | 
			
		||||
        if (_tipoatt == "E")
 | 
			
		||||
@ -1229,8 +1231,8 @@ bool TListaMov_application::preprocess_page(int file,int counter)
 | 
			
		||||
          else if (_ricser == 2)
 | 
			
		||||
            set_row(2,"@109g2");
 | 
			
		||||
        set_row(2,"@111g@f",FLD(LF_RMOVIVA,RMI_INTRA));
 | 
			
		||||
        set_row(2,"@113g@pN",FLD(LF_RMOVIVA,RMI_IMPOSTA,"###.###.###.###"));
 | 
			
		||||
        if (!_allegb)
 | 
			
		||||
        set_row(2,"@114g@pN",FLD(LF_RMOVIVA,RMI_IMPOSTA,"###.###.###.###"));
 | 
			
		||||
        if (_allegb)
 | 
			
		||||
          set_row(2,"@131g*");
 | 
			
		||||
 | 
			
		||||
        incrementa_totali();        
 | 
			
		||||
@ -1240,9 +1242,9 @@ bool TListaMov_application::preprocess_page(int file,int counter)
 | 
			
		||||
      else if (_settata_prima_riga)
 | 
			
		||||
      {
 | 
			
		||||
        reset_print();
 | 
			
		||||
        set_row(1,"@84g@pN", FLD(LF_RMOVIVA,RMI_IMPONIBILE,"###.###.###.###"));
 | 
			
		||||
        set_row(1,"@85g@pN", FLD(LF_RMOVIVA,RMI_IMPONIBILE,"###.###.###.###"));
 | 
			
		||||
        set_row(1,"@101g@4s", FLD(LF_RMOVIVA,RMI_CODIVA));
 | 
			
		||||
        set_row(1,"@113g@pN", FLD(LF_RMOVIVA,RMI_IMPOSTA,"###.###.###.###"));
 | 
			
		||||
        set_row(1,"@114g@pN", FLD(LF_RMOVIVA,RMI_IMPOSTA,"###.###.###.###"));
 | 
			
		||||
        incrementa_totali();                           
 | 
			
		||||
      }
 | 
			
		||||
      return TRUE;                  
 | 
			
		||||
@ -1369,8 +1371,10 @@ print_action TListaMov_application::postprocess_page(int file,int count)
 | 
			
		||||
          TString data = _datareg.string();
 | 
			
		||||
          set_row(n, "@b@60gTotali del");
 | 
			
		||||
          set_row(n, "@b@71ggiorno %s", (const char *)data);
 | 
			
		||||
          set_row(n, "@b@93g%r",        &_tot_dare_giornaliero);
 | 
			
		||||
          set_row(n++, "@b@111g%r",     &_tot_avere_giornaliero);
 | 
			
		||||
          TString pall (_tot_dare_giornaliero.string("#.###.###.###.###"));
 | 
			
		||||
          TString ball (_tot_avere_giornaliero.string("#.###.###.###.###"));          
 | 
			
		||||
          set_row(n, "@b@91g%s", (const char*)pall);
 | 
			
		||||
          set_row(n++, "@b@109g%s", (const char*)ball);
 | 
			
		||||
          _tot_avere_giornaliero = 0;
 | 
			
		||||
          _tot_dare_giornaliero  = 0;
 | 
			
		||||
        }
 | 
			
		||||
@ -1378,10 +1382,14 @@ print_action TListaMov_application::postprocess_page(int file,int count)
 | 
			
		||||
        {
 | 
			
		||||
          TString sep;     
 | 
			
		||||
          sep = "";
 | 
			
		||||
          set_row (n,(const char*)sep);   
 | 
			
		||||
          set_row(n,(const char*)sep);   
 | 
			
		||||
          set_row(++n, "@b@60gTotale generale");
 | 
			
		||||
          set_row(n, "@b@93g%r", &_tot_dare_generale);
 | 
			
		||||
          set_row(n++, "@b@111g%r", &_tot_avere_generale);
 | 
			
		||||
          TString pal (_tot_dare_generale.string("#.###.###.###.###"));
 | 
			
		||||
          TString bal (_tot_avere_generale.string("#.###.###.###.###"));          
 | 
			
		||||
          set_row(n, "@b@91g%s", (const char*)pal);
 | 
			
		||||
          set_row(n++, "@b@109g%s", (const char*)bal);
 | 
			
		||||
          //set_row(n, "@b@93g%r", &_tot_dare_generale);
 | 
			
		||||
          //set_row(n++, "@b@111g%r", &_tot_avere_generale);
 | 
			
		||||
        }  
 | 
			
		||||
      } 
 | 
			
		||||
      
 | 
			
		||||
@ -2423,7 +2431,7 @@ void TListaMov_application::preprocess_header()
 | 
			
		||||
  sep = "";
 | 
			
		||||
  sep << "Data @< Pag. @#";
 | 
			
		||||
  
 | 
			
		||||
  sep.right_just(127);
 | 
			
		||||
  sep.right_just(126);
 | 
			
		||||
  
 | 
			
		||||
  switch (_tipo_lista)
 | 
			
		||||
  {
 | 
			
		||||
@ -2499,7 +2507,7 @@ void TListaMov_application::preprocess_header()
 | 
			
		||||
      } 
 | 
			
		||||
      sep.fill('-');
 | 
			
		||||
      set_header (++soh, (const char *) sep);
 | 
			
		||||
      set_header (++soh, "Rg  Cod Causale@30gDescrizione@56gCodice conto@71gDescrizione conto@98gDare@116gAvere@130gSB");
 | 
			
		||||
      set_header (++soh, "Rg  Cod Causale@30gDescrizione@56gCodice conto@71gDescrizione conto@103gDare@120gAvere@130gSB");
 | 
			
		||||
    }
 | 
			
		||||
    else
 | 
			
		||||
    {
 | 
			
		||||
@ -2542,7 +2550,7 @@ void TListaMov_application::preprocess_header()
 | 
			
		||||
        set_header (soh++, "@86gtutte le causali");
 | 
			
		||||
      sep.fill('-');
 | 
			
		||||
      set_header (soh++, (const char *) sep);
 | 
			
		||||
      set_header (soh, "Rg  Cod Causale@30gDescrizione@56gCodice conto@71gDescrizione conto@98gDare@116gAvere@130gSB");
 | 
			
		||||
      set_header (soh, "Rg  Cod Causale@30gDescrizione@56gCodice conto@71gDescrizione conto@103gDare@120gAvere@130gSB");
 | 
			
		||||
    }
 | 
			
		||||
    break;
 | 
			
		||||
 | 
			
		||||
@ -2573,8 +2581,8 @@ void TListaMov_application::preprocess_header()
 | 
			
		||||
    }
 | 
			
		||||
    sep.fill('-');
 | 
			
		||||
    set_header (++soh, (const char *) sep);
 | 
			
		||||
    set_header (++soh, "Registrazione @17gCod Protoc.     Documento@49gCod Tp @68gTotale@101gCd  Tp  T O@129gNo");
 | 
			
		||||
    set_header (++soh, "Numero  Data@17gReg Numero      Data@42gNumero@49gCau Dc @56gDescrizione@68gDocumento@84gImponibile @101gIv  Det A I@113gImposta@129gAll"); 
 | 
			
		||||
    set_header (++soh, "Registrazione @17gCod Protoc.     Documento@49gCod Tp @75gTotale@101gCd  Tp  T O@129gNo");
 | 
			
		||||
    set_header (++soh, "Numero  Data@17gReg Numero      Data@42gNumero@49gCau Dc @56gDescrizione@75gDocumento@90gImponibile@101gIv  Det A I@121gImposta@129gAll"); 
 | 
			
		||||
    break;
 | 
			
		||||
    
 | 
			
		||||
  case movimenti_sezionale:
 | 
			
		||||
 | 
			
		||||
							
								
								
									
										154
									
								
								cg/cg3400.cpp
									
									
									
									
									
								
							
							
						
						
									
										154
									
								
								cg/cg3400.cpp
									
									
									
									
									
								
							@ -27,6 +27,7 @@
 | 
			
		||||
#include "cg3400a.h"
 | 
			
		||||
#include "cg3400b.h"
 | 
			
		||||
 | 
			
		||||
HIDDEN const char*  TOT_PICTURE  = "#.###.###.###.###";
 | 
			
		||||
HIDDEN const char*  REAL_PICTURE = "###.###.###.###";
 | 
			
		||||
 | 
			
		||||
HIDDEN const int    RIGHE_FOOTER = 3;
 | 
			
		||||
@ -41,6 +42,11 @@ HIDDEN const int    AVERE132    = 112;
 | 
			
		||||
HIDDEN const int    DARE198     = 150;
 | 
			
		||||
HIDDEN const int    AVERE198    = 174;
 | 
			
		||||
 | 
			
		||||
  const int SCRITTA = 26;  // prima era 29               
 | 
			
		||||
  const int TOTDARE132 = 88; // prima era 92
 | 
			
		||||
  const int SEZA132 = 108;  // prima era 111
 | 
			
		||||
  const int TOTAVERE132 = 110; // prima era 112
 | 
			
		||||
 | 
			
		||||
HIDDEN TString256 tmp;
 | 
			
		||||
 | 
			
		||||
HIDDEN int  date2esc(const TDate& d, int* prevesc = NULL);
 | 
			
		||||
@ -82,9 +88,7 @@ const TString& TContoOccas::descrizione()
 | 
			
		||||
    clifo.zero();
 | 
			
		||||
    clifo.put(CLI_CODCF,  (long)_s);
 | 
			
		||||
    clifo.put(CLI_TIPOCF, _t);
 | 
			
		||||
 | 
			
		||||
    const bool clifo_ok = (clifo.read() == NOERR);
 | 
			
		||||
 | 
			
		||||
    if (clifo_ok) really_occas = clifo.get_bool(CLI_OCCAS);
 | 
			
		||||
  }
 | 
			
		||||
 | 
			
		||||
@ -93,19 +97,10 @@ const TString& TContoOccas::descrizione()
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
    TLocalisamfile occ(LF_OCCAS);
 | 
			
		||||
    
 | 
			
		||||
    occ.zero();
 | 
			
		||||
    occ.put(OCC_CFPI, _occfpi);
 | 
			
		||||
    if (occ.read() != NOERR) occ.zero();
 | 
			
		||||
    
 | 
			
		||||
    _descrizione = occ.get("RAGSOC");
 | 
			
		||||
    
 | 
			
		||||
    /* Immissione occasionale: la ragione sociale e' un campo unico
 | 
			
		||||
       TString80 nome = _descrizione.mid(30);
 | 
			
		||||
       _descrizione.cut(30);
 | 
			
		||||
       _descrizione.trim();
 | 
			
		||||
       nome.trim();
 | 
			
		||||
       _descrizione << ' ' << nome;*/
 | 
			
		||||
  } 
 | 
			
		||||
  return _descrizione;
 | 
			
		||||
}
 | 
			
		||||
@ -300,7 +295,7 @@ TRectype& CG3400_application::look_com (const char * cod)
 | 
			
		||||
  return _com->curr();
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
const char * CG3400_application::get_descr_caus (const char * codcaus)
 | 
			
		||||
const char* CG3400_application::get_descr_caus (const char * codcaus)
 | 
			
		||||
{
 | 
			
		||||
  TLocalisamfile& caus = *_causali;
 | 
			
		||||
  
 | 
			
		||||
@ -459,21 +454,21 @@ int CG3400_application::set_totali_giorno(const TDate& data, const int righeiva)
 | 
			
		||||
 | 
			
		||||
  r = righeiva == 0 ? 1 : righeiva + 1;
 | 
			
		||||
 | 
			
		||||
  // Se e' l'unico totale lo stampo anche se e' zero
 | 
			
		||||
// Se e' l'unico totale lo stampo anche se e' zero
 | 
			
		||||
  if (competenza_ec() || (_tot_avere_gg != ZERO || _tot_dare_gg != ZERO))
 | 
			
		||||
  {
 | 
			
		||||
    TString td(_tot_dare_gg.string(REAL_PICTURE));
 | 
			
		||||
    TString ta(_tot_avere_gg.string(REAL_PICTURE));
 | 
			
		||||
    TString td(_tot_dare_gg.string (TOT_PICTURE));
 | 
			
		||||
    TString ta(_tot_avere_gg.string(TOT_PICTURE));
 | 
			
		||||
 | 
			
		||||
    sprintf(dep, "@b@%dgTotale operazioni del %s @%dg%c %s @%dg%c @%dg%s", 
 | 
			
		||||
            _stampa_width == 132 ? DARE132-STACC : DARE198-STACC,
 | 
			
		||||
            _stampa_width == 132 ? SCRITTA : DARE198-STACC,
 | 
			
		||||
            data.string(),
 | 
			
		||||
            _stampa_width == 132 ? DARE132-3 : DARE198-2,
 | 
			
		||||
            _stampa_width == 132 ? TOTDARE132 : DARE198-2,
 | 
			
		||||
            'D',            
 | 
			
		||||
            (const char*)td, 
 | 
			
		||||
            _stampa_width == 132 ? DARE132+16 : DARE198+20,
 | 
			
		||||
            _stampa_width == 132 ? SEZA132 : DARE198+20,
 | 
			
		||||
            'A',                        
 | 
			
		||||
            _stampa_width == 132 ? AVERE132 : AVERE198,                
 | 
			
		||||
            _stampa_width == 132 ? TOTAVERE132 : AVERE198,                
 | 
			
		||||
            (const char*)ta
 | 
			
		||||
            );
 | 
			
		||||
    
 | 
			
		||||
@ -483,18 +478,18 @@ int CG3400_application::set_totali_giorno(const TDate& data, const int righeiva)
 | 
			
		||||
  
 | 
			
		||||
  if (competenza_ep() || (_tot_avere_gg_ap != ZERO || _tot_dare_gg_ap != ZERO))
 | 
			
		||||
  {                
 | 
			
		||||
    TString tdp(_tot_dare_gg_ap.string(REAL_PICTURE));
 | 
			
		||||
    TString tap(_tot_avere_gg_ap.string(REAL_PICTURE));
 | 
			
		||||
    TString tdp(_tot_dare_gg_ap.string(TOT_PICTURE));
 | 
			
		||||
    TString tap(_tot_avere_gg_ap.string(TOT_PICTURE));
 | 
			
		||||
 | 
			
		||||
    sprintf (dep, "@b@%dgTotale operazioni del %s Anno precedente @%dg%c %s @%dg%c @%dg%s", 
 | 
			
		||||
             _stampa_width == 132 ? DARE132-STACC : DARE198-STACC,
 | 
			
		||||
             _stampa_width == 132 ? SCRITTA : DARE198-STACC,
 | 
			
		||||
             data.string(),
 | 
			
		||||
             _stampa_width == 132 ? DARE132-3 : DARE198-2,
 | 
			
		||||
             _stampa_width == 132 ? TOTDARE132 : DARE198-2,
 | 
			
		||||
             'D',            
 | 
			
		||||
             (const char*)tdp,                             
 | 
			
		||||
             _stampa_width == 132 ? DARE132+16 : DARE198+20,             
 | 
			
		||||
             _stampa_width == 132 ? SEZA132 : DARE198+20,             
 | 
			
		||||
             'A',            
 | 
			
		||||
             _stampa_width == 132 ? AVERE132 : AVERE198,                
 | 
			
		||||
             _stampa_width == 132 ? TOTAVERE132 : AVERE198,                
 | 
			
		||||
             (const char*)tap
 | 
			
		||||
             );
 | 
			
		||||
 | 
			
		||||
@ -524,7 +519,7 @@ void CG3400_application::postclose_print()
 | 
			
		||||
void CG3400_application::preprocess_footer()
 | 
			
		||||
{
 | 
			
		||||
  TString           progr_dare_ap(22), progr_avere_ap(22);
 | 
			
		||||
  TString           progr_dare, progr_avere, dts, ats;
 | 
			
		||||
  TString           progr_dare(25), progr_avere(25), dts(25), ats(25);
 | 
			
		||||
  TString256        riga;
 | 
			
		||||
  bool              ap = FALSE;
 | 
			
		||||
  int               r=2;
 | 
			
		||||
@ -535,8 +530,8 @@ void CG3400_application::preprocess_footer()
 | 
			
		||||
  
 | 
			
		||||
  if (_tot_avere_progr_ap != ZERO || _tot_dare_progr_ap != ZERO)
 | 
			
		||||
  {
 | 
			
		||||
    progr_dare_ap  = _tot_dare_progr_ap.string(REAL_PICTURE);
 | 
			
		||||
    progr_avere_ap = _tot_avere_progr_ap.string(REAL_PICTURE);
 | 
			
		||||
    progr_dare_ap  = _tot_dare_progr_ap.string(TOT_PICTURE);
 | 
			
		||||
    progr_avere_ap = _tot_avere_progr_ap.string(TOT_PICTURE);
 | 
			
		||||
    ap = TRUE;
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
@ -555,18 +550,18 @@ void CG3400_application::preprocess_footer()
 | 
			
		||||
  {
 | 
			
		||||
    dt = _tot_dare_progr  + _tot_dare_progr_ap;
 | 
			
		||||
    at = _tot_avere_progr + _tot_avere_progr_ap;
 | 
			
		||||
    dts = dt.string(REAL_PICTURE);
 | 
			
		||||
    ats = at.string(REAL_PICTURE);
 | 
			
		||||
    dts = dt.string(TOT_PICTURE);
 | 
			
		||||
    ats = at.string(TOT_PICTURE);
 | 
			
		||||
 | 
			
		||||
    riga.format ("@b@%dg%s@%dg%c %s @%dg%c @%dg%s", 
 | 
			
		||||
                 _stampa_width == 132 ? DARE132-STUMB : DARE198-STUMB,                          
 | 
			
		||||
                 _stampa_width == 132 ? SCRITTA : DARE198-STUMB,                          
 | 
			
		||||
                 (_nuovo_mese && !_forza_ariportare) ? "Totale progressivi generali    " : "A riportare                    ",
 | 
			
		||||
                 _stampa_width == 132 ? DARE132-3  : DARE198,
 | 
			
		||||
                 _stampa_width == 132 ? TOTDARE132  : DARE198,
 | 
			
		||||
                 'D',                   
 | 
			
		||||
                 (const char *) dts,    
 | 
			
		||||
                 _stampa_width == 132 ? DARE132+16 : DARE198+20,
 | 
			
		||||
                 _stampa_width == 132 ? SEZA132 : DARE198+20,
 | 
			
		||||
                 'A',                   
 | 
			
		||||
                 _stampa_width == 132 ? AVERE132 : AVERE198,
 | 
			
		||||
                 _stampa_width == 132 ? TOTAVERE132 : AVERE198,
 | 
			
		||||
                 (const char *) ats);
 | 
			
		||||
    set_footer (r++, (const char*) riga);          
 | 
			
		||||
    
 | 
			
		||||
@ -578,19 +573,18 @@ void CG3400_application::preprocess_footer()
 | 
			
		||||
int CG3400_application::set_totali_pagina(int righe)
 | 
			
		||||
{
 | 
			
		||||
  TString           progr_dare_ap(22), progr_avere_ap(22);
 | 
			
		||||
  TString           progr_dare, progr_avere, dts, ats;
 | 
			
		||||
  TString           progr_dare(22), progr_avere(22), dts(22), ats(22);
 | 
			
		||||
  TString256        riga;
 | 
			
		||||
  bool              ap = FALSE; 
 | 
			
		||||
  const int SHIFT  = 15;
 | 
			
		||||
  const int STUMB  = 51 + SHIFT;
 | 
			
		||||
  real              dt, at;
 | 
			
		||||
  int               r = righe == 0 ? 1 : righe;  
 | 
			
		||||
  //  reset_footer();
 | 
			
		||||
  
 | 
			
		||||
  if (_tot_avere_progr_ap != ZERO || _tot_dare_progr_ap != ZERO)
 | 
			
		||||
  {
 | 
			
		||||
    progr_dare_ap  = _tot_dare_progr_ap.string(REAL_PICTURE);
 | 
			
		||||
    progr_avere_ap = _tot_avere_progr_ap.string(REAL_PICTURE);
 | 
			
		||||
    progr_dare_ap  = _tot_dare_progr_ap.string(TOT_PICTURE);
 | 
			
		||||
    progr_avere_ap = _tot_avere_progr_ap.string(TOT_PICTURE);
 | 
			
		||||
    ap = TRUE;
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
@ -601,17 +595,17 @@ int CG3400_application::set_totali_pagina(int righe)
 | 
			
		||||
    // I totali distinti tra anno precedente e corrente SOLO SE STAMPA DI PROVA
 | 
			
		||||
    if (!_stampa_definitiva)
 | 
			
		||||
    {  
 | 
			
		||||
      progr_dare  = _tot_dare_progr.string(REAL_PICTURE);
 | 
			
		||||
      progr_avere = _tot_avere_progr.string(REAL_PICTURE);  
 | 
			
		||||
      progr_dare  = _tot_dare_progr.string (TOT_PICTURE);
 | 
			
		||||
      progr_avere = _tot_avere_progr.string(TOT_PICTURE);  
 | 
			
		||||
      riga = "";        
 | 
			
		||||
      riga.format("@b@%dgTotale progressivi @%dg%c %s @%dg%c @%dg%s", 
 | 
			
		||||
                  _stampa_width == 132 ? DARE132-STUMB : DARE198-STUMB,
 | 
			
		||||
                  _stampa_width == 132 ? DARE132-3  : DARE198-2,
 | 
			
		||||
                  _stampa_width == 132 ? SCRITTA : DARE198-STUMB,
 | 
			
		||||
                  _stampa_width == 132 ? TOTDARE132 : DARE198-2,
 | 
			
		||||
                  'D',
 | 
			
		||||
                  (const char *) progr_dare, 
 | 
			
		||||
                  _stampa_width == 132 ? DARE132+16 : DARE198+20,                  
 | 
			
		||||
                  _stampa_width == 132 ? SEZA132 : DARE198+20,                  
 | 
			
		||||
                  'A',
 | 
			
		||||
                  _stampa_width == 132 ? AVERE132 : AVERE198,
 | 
			
		||||
                  _stampa_width == 132 ? TOTAVERE132 : AVERE198,
 | 
			
		||||
                  (const char *) progr_avere
 | 
			
		||||
                  );    
 | 
			
		||||
 | 
			
		||||
@ -620,13 +614,13 @@ int CG3400_application::set_totali_pagina(int righe)
 | 
			
		||||
      if (ap)
 | 
			
		||||
      {
 | 
			
		||||
        riga.format("@b@%dgTotale progressivi anno precedente @%dg%c %s @%dg%c @%dg%s", 
 | 
			
		||||
                    _stampa_width == 132 ? DARE132-STUMB : DARE198-STUMB,
 | 
			
		||||
                    _stampa_width == 132 ? DARE132-3  : DARE198-2,
 | 
			
		||||
                    _stampa_width == 132 ? SCRITTA : DARE198-STUMB,
 | 
			
		||||
                    _stampa_width == 132 ? TOTDARE132  : DARE198-2,
 | 
			
		||||
                    'D',
 | 
			
		||||
                    (const char *) progr_dare_ap, 
 | 
			
		||||
                    _stampa_width == 132 ? DARE132+16 : DARE198+20,                    
 | 
			
		||||
                    _stampa_width == 132 ? SEZA132 : DARE198+20,                    
 | 
			
		||||
                    'A',
 | 
			
		||||
                    _stampa_width == 132 ? AVERE132 : AVERE198,
 | 
			
		||||
                    _stampa_width == 132 ? TOTAVERE132 : AVERE198,
 | 
			
		||||
                    (const char *) progr_avere_ap
 | 
			
		||||
                    );    
 | 
			
		||||
        set_row (r++, (const char*) riga);
 | 
			
		||||
@ -635,17 +629,17 @@ int CG3400_application::set_totali_pagina(int righe)
 | 
			
		||||
    
 | 
			
		||||
    _tot_dare_generale  = _tot_dare_progr  + _tot_dare_progr_ap;
 | 
			
		||||
    _tot_avere_generale = _tot_avere_progr + _tot_avere_progr_ap;
 | 
			
		||||
    dts = _tot_dare_generale.string(REAL_PICTURE);
 | 
			
		||||
    ats = _tot_avere_generale.string(REAL_PICTURE);
 | 
			
		||||
    dts = _tot_dare_generale.string (TOT_PICTURE);
 | 
			
		||||
    ats = _tot_avere_generale.string(TOT_PICTURE);
 | 
			
		||||
    
 | 
			
		||||
    riga.format("@b@%dgTotale progressivi generali @%dg%c %s @%dg%c @%dg%s", 
 | 
			
		||||
                _stampa_width == 132 ? DARE132-STUMB : DARE198-STUMB,
 | 
			
		||||
                _stampa_width == 132 ? DARE132-3  : DARE198-2,
 | 
			
		||||
                _stampa_width == 132 ? SCRITTA : DARE198-STUMB,
 | 
			
		||||
                _stampa_width == 132 ? TOTDARE132 : DARE198-2,
 | 
			
		||||
                'D',
 | 
			
		||||
                (const char *) dts, 
 | 
			
		||||
                _stampa_width == 132 ? DARE132+16 : DARE198+20,                
 | 
			
		||||
                _stampa_width == 132 ? SEZA132 : DARE198+20,                
 | 
			
		||||
                'A',
 | 
			
		||||
                _stampa_width == 132 ? AVERE132 : AVERE198,
 | 
			
		||||
                _stampa_width == 132 ? TOTAVERE132 : AVERE198,
 | 
			
		||||
                (const char *) ats
 | 
			
		||||
                );    
 | 
			
		||||
 | 
			
		||||
@ -653,27 +647,27 @@ int CG3400_application::set_totali_pagina(int righe)
 | 
			
		||||
  }
 | 
			
		||||
  else      // Non ancora totale generale
 | 
			
		||||
  { 
 | 
			
		||||
    // Se il movimento ha righe che continuano nella pagina successiva
 | 
			
		||||
    // "A riportare" viene stampato dalla preprocess_footer senno' qui
 | 
			
		||||
// Se il movimento ha righe che continuano nella pagina successiva
 | 
			
		||||
// "A riportare" viene stampato dalla preprocess_footer senno' qui
 | 
			
		||||
 | 
			
		||||
    _gia_settato_ariportare  = TRUE;
 | 
			
		||||
    
 | 
			
		||||
    dt = _tot_dare_progr  + _tot_dare_progr_ap;
 | 
			
		||||
    at = _tot_avere_progr + _tot_avere_progr_ap;
 | 
			
		||||
    dts = dt.string(REAL_PICTURE);
 | 
			
		||||
    ats = at.string(REAL_PICTURE);
 | 
			
		||||
    dts = dt.string(TOT_PICTURE);
 | 
			
		||||
    ats = at.string(TOT_PICTURE);
 | 
			
		||||
 | 
			
		||||
    // "Se il mese e' finito devo scrivere Totale progressivi generali
 | 
			
		||||
      // invece che A riportare"
 | 
			
		||||
// "Se il mese e' finito devo scrivere Totale progressivi generali
 | 
			
		||||
// invece che A riportare"
 | 
			
		||||
 | 
			
		||||
      riga.format ("@b@%dgTotale progressivi generali @%dg%c %s @%dg%c @%dg%s", 
 | 
			
		||||
                   _stampa_width == 132 ? DARE132-STUMB : DARE198-STUMB,    
 | 
			
		||||
                   _stampa_width == 132 ? DARE132-3  : DARE198-2,
 | 
			
		||||
    riga.format ("@b@%dgTotale progressivi generali @%dg%c %s @%dg%c @%dg%s", 
 | 
			
		||||
                   _stampa_width == 132 ? SCRITTA : DARE198-STUMB,    
 | 
			
		||||
                   _stampa_width == 132 ? TOTDARE132  : DARE198-2,
 | 
			
		||||
                   'D',                   
 | 
			
		||||
                   (const char *) dts,  
 | 
			
		||||
                   _stampa_width == 132 ? DARE132+16 : DARE198+20,                   
 | 
			
		||||
                   _stampa_width == 132 ? SEZA132 : DARE198+20,                   
 | 
			
		||||
                   'A',                   
 | 
			
		||||
                   _stampa_width == 132 ? AVERE132 : AVERE198,
 | 
			
		||||
                   _stampa_width == 132 ? TOTAVERE132 : AVERE198,
 | 
			
		||||
                   (const char *) ats);
 | 
			
		||||
    set_row (r++, (const char*) riga);          
 | 
			
		||||
  }      
 | 
			
		||||
@ -802,16 +796,17 @@ void CG3400_application::preprocess_header()
 | 
			
		||||
        return;
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
    TString dare (riporto_dare.string(REAL_PICTURE));
 | 
			
		||||
    TString avere(riporto_avere.string(REAL_PICTURE));
 | 
			
		||||
    TString dare (riporto_dare.string (TOT_PICTURE));
 | 
			
		||||
    TString avere(riporto_avere.string(TOT_PICTURE));
 | 
			
		||||
 | 
			
		||||
    riporto.format("@b@%dgRiporto: %c @%dg%15s  %c@%dg%15s", 
 | 
			
		||||
                   _stampa_width == 132 ? 83 : DARE198-11,
 | 
			
		||||
    riporto.format("@b@%dgRiporto: @%dg%c %17s  @%dg%c@%dg%17s",  // prima erano %15s
 | 
			
		||||
                   _stampa_width == 132 ? SCRITTA : DARE198-11,
 | 
			
		||||
                   _stampa_width == 132 ? TOTDARE132 : DARE198,
 | 
			
		||||
                   _stampa_width == 132 ? 'D' : ' ',
 | 
			
		||||
                   _stampa_width == 132 ? DARE132-1 : DARE198,
 | 
			
		||||
                   (const char *) dare,       
 | 
			
		||||
                   _stampa_width == 132 ? SEZA132 : SEZA132,
 | 
			
		||||
                   _stampa_width == 132 ? 'A' : ' ',                   
 | 
			
		||||
                   _stampa_width == 132 ? AVERE132 : AVERE198,
 | 
			
		||||
                   _stampa_width == 132 ? TOTAVERE132 : AVERE198,
 | 
			
		||||
                   (const char *) avere 
 | 
			
		||||
                   );    
 | 
			
		||||
 | 
			
		||||
@ -1150,11 +1145,11 @@ void CG3400_application::set_rows (int file, int counter)
 | 
			
		||||
 | 
			
		||||
    if (_stampa_width == 132)
 | 
			
		||||
    {
 | 
			
		||||
      set_row (r, "@112g%r", &_importo);
 | 
			
		||||
      set_row (r, "@110g%r", &_importo);  // prima era 110
 | 
			
		||||
      set_row (r, "@128g%c", _sezione);  
 | 
			
		||||
    }
 | 
			
		||||
    else  //  stampa_width == 198
 | 
			
		||||
      set_row (r, _sezione == 'D' ? "@150g%r" : "@174g%r", &_importo);      
 | 
			
		||||
      set_row (r, _sezione == 'D' ? "@152g%r" : "@174g%r", &_importo);  // il primo era 150
 | 
			
		||||
    
 | 
			
		||||
    if (_MovGiaStampato && !_stampa_definitiva)
 | 
			
		||||
      set_row(r,format("@%dg*",_stampa_width == 132 ? 131 : 197));
 | 
			
		||||
@ -1178,14 +1173,14 @@ bool CG3400_application::preprocess_page(int file, int counter)
 | 
			
		||||
  switch (file)  {
 | 
			
		||||
    
 | 
			
		||||
  case LF_MOV:
 | 
			
		||||
    _annoEsMov      = _anno_iva = 0;    
 | 
			
		||||
    _annoEsMov = _anno_iva = 0;    
 | 
			
		||||
    _iva_array.destroy();
 | 
			
		||||
    *_RecArrivoA = _cur->file(LF_MOV).curr();
 | 
			
		||||
    _nprog_mov++;           
 | 
			
		||||
    // Il numero di operazione deve ripartire da 0 per ogni movimento    
 | 
			
		||||
    _num_rig            = 0;
 | 
			
		||||
    _data_corr   = _cur->file(LF_MOV).get_date(MOV_DATAREG);
 | 
			
		||||
    // _ultima_data_mov finisce sul registro come ultima data di stampa
 | 
			
		||||
// Il numero di operazione deve ripartire da 0 per ogni movimento    
 | 
			
		||||
    _num_rig = 0;
 | 
			
		||||
    _data_corr = _cur->file(LF_MOV).get_date(MOV_DATAREG);
 | 
			
		||||
// _ultima_data_mov finisce sul registro come ultima data di stampa
 | 
			
		||||
    if (_data_corr > _ultima_data_mov) _ultima_data_mov = _data_corr;
 | 
			
		||||
    _mese_corr = _data_corr.month();    
 | 
			
		||||
    break;
 | 
			
		||||
@ -1817,7 +1812,8 @@ void CG3400_application::init_print()
 | 
			
		||||
 | 
			
		||||
  for (int i=1; i<RIGHE_FOOTER; i++) set_footer(i, "%s", " ");
 | 
			
		||||
 | 
			
		||||
  set_real_picture (REAL_PICTURE);
 | 
			
		||||
//  set_real_picture (REAL_PICTURE);
 | 
			
		||||
  set_real_picture (TOT_PICTURE);
 | 
			
		||||
  set_print_zero(TRUE);
 | 
			
		||||
 | 
			
		||||
  if (_stampa_width == 1) 
 | 
			
		||||
 | 
			
		||||
@ -723,13 +723,24 @@ void CG3500_application::setta_riga_totale()
 | 
			
		||||
  _saldo_tot = _prg_dare_tot - _prg_avere_tot;
 | 
			
		||||
  if (_scelta == 1) r = 8;
 | 
			
		||||
  else r = 6; 
 | 
			
		||||
  set_row(r,"****  TOTALE GENERALE @57g%r@77g%r",&_prg_dare_tot,&_prg_avere_tot);
 | 
			
		||||
  //17/11/1995
 | 
			
		||||
  TString pdt(_prg_dare_tot.string("#.###.###.###.###"));
 | 
			
		||||
  TString pat(_prg_avere_tot.string("#.###.###.###.###"));
 | 
			
		||||
  //set_row(r,"****  TOTALE GENERALE @57g%r@77g%r",&_prg_dare_tot,&_prg_avere_tot);
 | 
			
		||||
  set_row(r,"****  TOTALE GENERALE @55g%s@75g%s",(const char*)pdt,(const char*)pat);
 | 
			
		||||
 | 
			
		||||
  if (_saldo_tot > 0.00)
 | 
			
		||||
    set_row(r,"@97g%r",&_saldo_tot);
 | 
			
		||||
  {
 | 
			
		||||
    //set_row(r,"@97g%r",&_saldo_tot);
 | 
			
		||||
    TString st(_saldo_tot.string("#.###.###.###.###"));
 | 
			
		||||
    set_row(r,"@95g%s",(const char*)st);
 | 
			
		||||
  }
 | 
			
		||||
  else
 | 
			
		||||
  {
 | 
			
		||||
    _saldo_tot = _saldo_tot * (-1.00);
 | 
			
		||||
    set_row(r,"@117g%r",&_saldo_tot);
 | 
			
		||||
    TString st(_saldo_tot.string("#.###.###.###.###"));
 | 
			
		||||
    //set_row(r,"@117g%r",&_saldo_tot);
 | 
			
		||||
    set_row(r,"@115g%s",(const char*)st);    
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
@ -847,32 +847,38 @@ _DescrItem* TLiquidazione_app::describe_deleghe(int month)
 | 
			
		||||
  int mese = month; 
 | 
			
		||||
  if (_freqviva == "T" && _isannual) mese = 12;
 | 
			
		||||
  
 | 
			
		||||
  //17/11/1995
 | 
			
		||||
  /*
 | 
			
		||||
  if (!look_del(month,month == 13 ? 2 : 1) && 
 | 
			
		||||
      !look_del(mese,7) && !stampa_vers) return NULL; 
 | 
			
		||||
  */
 | 
			
		||||
  if (!look_del(mese,7) && !stampa_vers) return NULL;    
 | 
			
		||||
  //fine
 | 
			
		||||
  
 | 
			
		||||
  _DescrItem* d = new _DescrItem(DELEGA);
 | 
			
		||||
  
 | 
			
		||||
  d->_f0 = 0;
 | 
			
		||||
  
 | 
			
		||||
  if (look_del(month,month == 13 ? 2 : 1))
 | 
			
		||||
  {
 | 
			
		||||
    if (_del->get("S9").not_empty())
 | 
			
		||||
      d->_f0 = 2;
 | 
			
		||||
    else d->_f0 = 1;  
 | 
			
		||||
    if (_del->get_bool("B0"))
 | 
			
		||||
  if (stampa_vers) //solo se sono a debito 
 | 
			
		||||
    if (look_del(month,month == 13 ? 2 : 1))
 | 
			
		||||
    {
 | 
			
		||||
     if (_del->get("S9").not_empty())
 | 
			
		||||
       d->_f0 = 2;
 | 
			
		||||
     else d->_f0 = 1;  
 | 
			
		||||
     if (_del->get_bool("B0"))
 | 
			
		||||
     {
 | 
			
		||||
      d->_s0 = _del->get("S2");  // ufficio iva/concessione
 | 
			
		||||
      d->_s1 = _del->get("S1");  // descrizione banca
 | 
			
		||||
      d->_s2 = _del->get("S7");  // ABI
 | 
			
		||||
      d->_s3 = _del->get("S8");  // CAB   
 | 
			
		||||
      d->_r0 = _del->get_real("R0");
 | 
			
		||||
      d->_d0 = _del->get_date("D0");
 | 
			
		||||
    } // altrimenti lascia tutto in bianco e ci scriveranno i dati a mano
 | 
			
		||||
  } 
 | 
			
		||||
     } // altrimenti lascia tutto in bianco e ci scriveranno i dati a mano
 | 
			
		||||
    } 
 | 
			
		||||
  
 | 
			
		||||
  if ( (month == 12 && (_freqviva == "M" || (_isbenzinaro && _gest4)))
 | 
			
		||||
      || (_isannual && _freqviva == "T" && !(_isbenzinaro && _gest4)) )
 | 
			
		||||
    if (look_del(12,7))
 | 
			
		||||
    if (look_del(12,7)) //sia che sia a debito oppure a credito
 | 
			
		||||
    {
 | 
			
		||||
      d->_s4 = "ACC";  
 | 
			
		||||
      if (_del->get("S9").not_empty())
 | 
			
		||||
 | 
			
		||||
@ -2089,7 +2089,7 @@ bool CG4400_application::preprocess_page(int file, int counter)
 | 
			
		||||
  return TRUE;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
void CG4400_application::scrivi_reg()
 | 
			
		||||
void CG4400_application::scrivi_reg(const TDate& data)
 | 
			
		||||
{
 | 
			
		||||
  TString16 codtab; 
 | 
			
		||||
  TTable Tabreg ("REG");
 | 
			
		||||
@ -2102,8 +2102,7 @@ void CG4400_application::scrivi_reg()
 | 
			
		||||
    const TDate d = Tabreg.get_date("D3");
 | 
			
		||||
    if (!_mov_empty) //cioe' se e' stata stampata almeno una pagina
 | 
			
		||||
    {
 | 
			
		||||
//      TDate ultima_data = format("%02d/%02d/%4d", _datareg.last_day(_datareg.month(), _annoes), _datareg.month(), _annoes);
 | 
			
		||||
      TDate ultima_data(_datareg); 
 | 
			
		||||
      TDate ultima_data(data); 
 | 
			
		||||
      ultima_data.set_end_month();       // Meglio cosi'
 | 
			
		||||
      
 | 
			
		||||
      if (ultima_data > d) 
 | 
			
		||||
@ -2150,10 +2149,10 @@ void CG4400_application::aggiorna_reg(const bool aggiorna_vidi)
 | 
			
		||||
  {
 | 
			
		||||
    TDate d = Tabreg.get_date("D3");
 | 
			
		||||
    if (!_mov_empty) //cioe' se e' stata stampata almeno una pagina
 | 
			
		||||
    {
 | 
			
		||||
//      TDate ultima_data = format("%02d/%02d/%4d", _datareg.last_day(_datareg.month(), _annoes), _datareg.month(), _annoes);
 | 
			
		||||
    {                //controllo inutile visto che e' chiamata nella
 | 
			
		||||
                     //preprocess_header
 | 
			
		||||
      TDate ultima_data(_datareg); 
 | 
			
		||||
      ultima_data.set_end_month();       // Meglio cosi'
 | 
			
		||||
      ultima_data.set_end_month();       
 | 
			
		||||
 | 
			
		||||
      if (ultima_data > d) 
 | 
			
		||||
        Tabreg.put("D3", ultima_data);
 | 
			
		||||
@ -2446,8 +2445,23 @@ print_action CG4400_application::postprocess_page (int file, int counter)
 | 
			
		||||
      TRecnotype pos   = _cur->pos();
 | 
			
		||||
      long       items = _cur->items();
 | 
			
		||||
      if (pos == items-1) 
 | 
			
		||||
      { 
 | 
			
		||||
        if (_tipo_stampa != 3 && _liquidazione)  
 | 
			
		||||
          stampa_liq_mesi_succ(); 
 | 
			
		||||
        //09/11/1995
 | 
			
		||||
        if (_tipo_stampa != 1) 
 | 
			
		||||
        {
 | 
			
		||||
          int da = _datareg.month() + 1;
 | 
			
		||||
          int a  = _data_a.month();   
 | 
			
		||||
          for (int m=da; m<=a; m++)
 | 
			
		||||
          {
 | 
			
		||||
            TDate data(1, m, _annoes); 
 | 
			
		||||
            data.set_end_month(); 
 | 
			
		||||
            scrivi_reg(data);    
 | 
			
		||||
          }   
 | 
			
		||||
        }
 | 
			
		||||
        //fine  
 | 
			
		||||
      }    
 | 
			
		||||
      //fine modifica        
 | 
			
		||||
    } 
 | 
			
		||||
    if (!counter)
 | 
			
		||||
@ -2565,7 +2579,7 @@ bool CG4400_application::set_print(int n)
 | 
			
		||||
          _u_stampata  = m.get_int(ULTIMA_PAGINA);
 | 
			
		||||
          _rif_vid     = m.get_bool(RIF_VID);
 | 
			
		||||
          _primast     = _u_stampata;
 | 
			
		||||
//          _data_da     = format("01/%02d/%04d", _fino_a_mese, _annoes); 
 | 
			
		||||
//        _data_da     = format("01/%02d/%04d", _fino_a_mese, _annoes); 
 | 
			
		||||
          _data_da     = TDate(1, _fino_a_mese, _annoes);   // Meglio cosi'
 | 
			
		||||
        }     
 | 
			
		||||
        if (_fino_a_mese == 12)
 | 
			
		||||
@ -2583,7 +2597,7 @@ bool CG4400_application::set_print(int n)
 | 
			
		||||
          
 | 
			
		||||
          giorni_del_mese = primo.day();
 | 
			
		||||
        }
 | 
			
		||||
//        _data_a=format("%02d/%02d/%4d",giorni_del_mese,_fino_a_mese,_annoes);
 | 
			
		||||
//      _data_a=format("%02d/%02d/%4d",giorni_del_mese,_fino_a_mese,_annoes);
 | 
			
		||||
        _data_a = TDate(giorni_del_mese, _fino_a_mese, _annoes);  // Meglio cosi'
 | 
			
		||||
      }
 | 
			
		||||
      _stampa_data_reg = stampa_datareg();
 | 
			
		||||
@ -2718,7 +2732,7 @@ void CG4400_application::no_movimenti()
 | 
			
		||||
    }
 | 
			
		||||
    if (printer().isopen()) printer().close();
 | 
			
		||||
  }
 | 
			
		||||
  if (_tipo_stampa != 1) scrivi_reg(); //aggiorno il registro anche se non ho stampato proprio nulla per quel mese!        
 | 
			
		||||
  if (_tipo_stampa != 1) scrivi_reg(_datareg); //aggiorno il registro anche se non ho stampato proprio nulla per quel mese!        
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
bool CG4400_application::stampa_registri_IVA(const TMask& m) 
 | 
			
		||||
@ -2751,6 +2765,11 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
 | 
			
		||||
      {
 | 
			
		||||
        _scelta = controlla_b0();
 | 
			
		||||
        _cur->set_filterfunction(filter_func);
 | 
			
		||||
        //modifica del 09/11/1995
 | 
			
		||||
        //la filter function viene chiamata quando posiziono il cursore
 | 
			
		||||
        //e' lei che determina _stampa_mese da settare in setta_mask
 | 
			
		||||
        (*_cur) = 0L; 
 | 
			
		||||
        //fine
 | 
			
		||||
        ok = setta_mask(i); 
 | 
			
		||||
        if (!ok) continue;
 | 
			
		||||
        if (_liquidazione)
 | 
			
		||||
@ -2763,8 +2782,7 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
 | 
			
		||||
          if (_scelta == non_proseguire) 
 | 
			
		||||
            return FALSE;
 | 
			
		||||
        } 
 | 
			
		||||
        
 | 
			
		||||
        (*_cur) = 0L; //la filter function viene chiamata quando posiziono il cursore
 | 
			
		||||
        //(*_cur) = 0L; 
 | 
			
		||||
        const long item = _cur->items();
 | 
			
		||||
 | 
			
		||||
        // 17.5.95 Leggo parametri di stampa del registro  
 | 
			
		||||
@ -2774,10 +2792,14 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
 | 
			
		||||
        config.format("REG%05ld%03s", codditta, reg);
 | 
			
		||||
        printer().read_configuration(config);
 | 
			
		||||
        
 | 
			
		||||
        //09/11/1995
 | 
			
		||||
        _mov_empty = TRUE;
 | 
			
		||||
        //fine
 | 
			
		||||
        
 | 
			
		||||
        if (item > 0l)
 | 
			
		||||
        {
 | 
			
		||||
          //modifica del 26/07/1995
 | 
			
		||||
          _mov_empty = TRUE;
 | 
			
		||||
          //_mov_empty = TRUE;
 | 
			
		||||
          //fine
 | 
			
		||||
          
 | 
			
		||||
          print(); 
 | 
			
		||||
@ -2867,6 +2889,12 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
 | 
			
		||||
              _scelta = controlla_b0(); //sul registro non va stampata la liq. ma comunque 
 | 
			
		||||
              //va richiamata per il calcolo progressivi (a seconda di b0) 
 | 
			
		||||
              //se non e' stampa di prova
 | 
			
		||||
              
 | 
			
		||||
              //modifica del 09/11/1995
 | 
			
		||||
              _cur->set_filterfunction(NULL);
 | 
			
		||||
              _cur->set_filterfunction(filter_func); 
 | 
			
		||||
              (*_cur) = 0L;
 | 
			
		||||
              //fine
 | 
			
		||||
              ok = setta_mask(i);    
 | 
			
		||||
              if (!ok) continue;
 | 
			
		||||
              
 | 
			
		||||
@ -2880,12 +2908,12 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
 | 
			
		||||
                if (_scelta == non_proseguire) 
 | 
			
		||||
                  return FALSE;
 | 
			
		||||
              } 
 | 
			
		||||
              
 | 
			
		||||
              /***
 | 
			
		||||
              _cur->set_filterfunction(NULL);
 | 
			
		||||
              _cur->set_filterfunction(filter_func); 
 | 
			
		||||
              
 | 
			
		||||
              // Vado a vedere se ci sono movimenti              
 | 
			
		||||
              (*_cur) = 0L;                        
 | 
			
		||||
              ***/
 | 
			
		||||
              // Guardo se ci sono movimenti
 | 
			
		||||
              const long items = _cur->items();
 | 
			
		||||
 | 
			
		||||
              // 17.5.95 Leggo parametri di stampa del registro  
 | 
			
		||||
@ -2895,10 +2923,14 @@ bool CG4400_application::stampa_registri_IVA(const TMask& m)
 | 
			
		||||
              config.format("REG%05ld%03s", codditta, reg);
 | 
			
		||||
              printer().read_configuration(config);
 | 
			
		||||
              
 | 
			
		||||
              //09/11/1995
 | 
			
		||||
              _mov_empty = TRUE;
 | 
			
		||||
              //fine
 | 
			
		||||
              
 | 
			
		||||
              if (items > 0l)
 | 
			
		||||
              {  
 | 
			
		||||
                //modifica del 26/07/1995;
 | 
			
		||||
                _mov_empty = TRUE;
 | 
			
		||||
                //_mov_empty = TRUE;
 | 
			
		||||
                //fine
 | 
			
		||||
                
 | 
			
		||||
                print(); 
 | 
			
		||||
@ -3199,10 +3231,10 @@ void CG4400_application::preprocess_header()
 | 
			
		||||
    set_header(r, "RIFERIMENTI VIDIMAZIONE"); 
 | 
			
		||||
  }
 | 
			
		||||
  
 | 
			
		||||
  if (_intesta_liq)
 | 
			
		||||
  {
 | 
			
		||||
    /*
 | 
			
		||||
    r++;
 | 
			
		||||
  if (_intesta_liq) //se sto stampando sul registro la liquidazione
 | 
			
		||||
  {                 //l'intestazione (piuttosto dettagliata) e' gestita
 | 
			
		||||
    /*              //dal prg di liquidazione perche' molte info che devono 
 | 
			
		||||
    r++;            //comparire in questa intestazione la stampa reg. non le conosce.
 | 
			
		||||
    set_header(r++, "CALCOLO LIQUIDAZIONE IVA");
 | 
			
		||||
    set_header(r++,riga);
 | 
			
		||||
    TString title (80);
 | 
			
		||||
 | 
			
		||||
@ -139,7 +139,7 @@ public:
 | 
			
		||||
  void          stampa_plafonds(int);
 | 
			
		||||
  void          get_dati_ditta();
 | 
			
		||||
  void          stampa_vidi();
 | 
			
		||||
  void          scrivi_reg();
 | 
			
		||||
  void          scrivi_reg(const TDate&);
 | 
			
		||||
  int           stampa_acquisti(int);
 | 
			
		||||
  real          stampa_valori_plafonds(const real&, const int, TTable&, const char*);
 | 
			
		||||
  void          build_nomiditte(TProgind* pnd = NULL);
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user