- Correzioni al quadro G:
- E' stato sistemato il problema che mandava in loop il prg quando non c'erano persone giuridiche - E' stato sistemato nel 77qg.frm l'importo imputabile a ciascuna azione o quota per quanto riguarda la posizione - E' stato sistemato nel 77qgd.frm il campo numero quote sia nelle fisiche che nelle giuridiche (non stampava i decimali) - Ora i totali vengono stampati solo quando e' finita la dichiarazione e non in ogni modulo, mentre la firma viene stampata a fine ogni modulo git-svn-id: svn://10.65.10.50/trunk@3788 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									d81ad850e6
								
							
						
					
					
						commit
						f388854d77
					
				@ -429,7 +429,7 @@ END
 | 
				
			|||||||
NUMBER 55
 | 
					NUMBER 55
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  KEY "IMP.IMPUT.AZ.QUOT"
 | 
					  KEY "IMP.IMPUT.AZ.QUOT"
 | 
				
			||||||
  PROMPT 120 48 ""
 | 
					  PROMPT 116 48 ""
 | 
				
			||||||
  FIELD 70->P2IMPQ
 | 
					  FIELD 70->P2IMPQ
 | 
				
			||||||
  PICTURE "###.###.###.###"    
 | 
					  PICTURE "###.###.###.###"    
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
				
			|||||||
@ -142,9 +142,9 @@ END
 | 
				
			|||||||
NUMBER 11
 | 
					NUMBER 11
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  KEY "NUMERO QUOTE"
 | 
					  KEY "NUMERO QUOTE"
 | 
				
			||||||
  PROMPT 120 5 ""
 | 
					  PROMPT 117 5 ""
 | 
				
			||||||
  FIELD 101->NUMQUOTE   
 | 
					  FIELD 101->NUMQUOTE   
 | 
				
			||||||
  PICTURE "###.###.###"
 | 
					  PICTURE "###.###.###,@@"
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
NUMBER 12
 | 
					NUMBER 12
 | 
				
			||||||
@ -244,9 +244,9 @@ END
 | 
				
			|||||||
NUMBER 11
 | 
					NUMBER 11
 | 
				
			||||||
BEGIN
 | 
					BEGIN
 | 
				
			||||||
  KEY "NUMERO QUOTE"
 | 
					  KEY "NUMERO QUOTE"
 | 
				
			||||||
  PROMPT 120 3 ""
 | 
					  PROMPT 117 3 ""
 | 
				
			||||||
  FIELD 101->NUMQUOTE 
 | 
					  FIELD 101->NUMQUOTE 
 | 
				
			||||||
  PICTURE "###.###.###"   
 | 
					  PICTURE "###.###.###,@@"   
 | 
				
			||||||
END
 | 
					END
 | 
				
			||||||
 | 
					
 | 
				
			||||||
NUMBER 12
 | 
					NUMBER 12
 | 
				
			||||||
 | 
				
			|||||||
							
								
								
									
										244
									
								
								m770/77stq.cpp
									
									
									
									
									
								
							
							
						
						
									
										244
									
								
								m770/77stq.cpp
									
									
									
									
									
								
							@ -1111,7 +1111,7 @@ HIDDEN const int QGD_RIGHE_SECONDA = 6;
 | 
				
			|||||||
class TDistintaG : public TQuadroG
 | 
					class TDistintaG : public TQuadroG
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  private:  
 | 
					  private:  
 | 
				
			||||||
    virtual void  stampa_totali(TPrinter& pr);
 | 
					    virtual void  stampa_totali(TPrinter& pr, bool tot);
 | 
				
			||||||
    virtual void  next_page(TPrinter& pr);
 | 
					    virtual void  next_page(TPrinter& pr);
 | 
				
			||||||
    virtual void  set_body(TPrinter& pr, const char tipo);
 | 
					    virtual void  set_body(TPrinter& pr, const char tipo);
 | 
				
			||||||
    int calcola_firma();
 | 
					    int calcola_firma();
 | 
				
			||||||
@ -1140,7 +1140,7 @@ int TDistintaG::calcola_firma()
 | 
				
			|||||||
  return y;
 | 
					  return y;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
void TDistintaG::stampa_totali(TPrinter& pr)
 | 
					void TDistintaG::stampa_totali(TPrinter& pr, bool tot)
 | 
				
			||||||
{ 
 | 
					{ 
 | 
				
			||||||
  PaginaQuadro PagCorr = curr_page();
 | 
					  PaginaQuadro PagCorr = curr_page();
 | 
				
			||||||
  if (PagCorr == PRIMA)
 | 
					  if (PagCorr == PRIMA)
 | 
				
			||||||
@ -1164,7 +1164,10 @@ void TDistintaG::stampa_totali(TPrinter& pr)
 | 
				
			|||||||
      const int lasty = calcola_firma();      
 | 
					      const int lasty = calcola_firma();      
 | 
				
			||||||
      for (int i = 0; i < totali.items(); i++)
 | 
					      for (int i = 0; i < totali.items(); i++)
 | 
				
			||||||
      {      
 | 
					      {      
 | 
				
			||||||
        pr.print(totali.row(i));
 | 
					        TPrintrow& row = totali.row(i);
 | 
				
			||||||
 | 
					        if (i < lasty && !tot)
 | 
				
			||||||
 | 
					          row.reset();
 | 
				
			||||||
 | 
					        pr.print(row);
 | 
				
			||||||
        _RigaCorr++;
 | 
					        _RigaCorr++;
 | 
				
			||||||
      }            
 | 
					      }            
 | 
				
			||||||
      totali.reset();
 | 
					      totali.reset();
 | 
				
			||||||
@ -1176,34 +1179,11 @@ void TDistintaG::stampa_totali(TPrinter& pr)
 | 
				
			|||||||
void TDistintaG::next_page(TPrinter& pr)
 | 
					void TDistintaG::next_page(TPrinter& pr)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  PaginaQuadro PagCorr = curr_page();
 | 
					  PaginaQuadro PagCorr = curr_page();
 | 
				
			||||||
  if (PagCorr == PRIMA)
 | 
					 | 
				
			||||||
    jump_to_line(pr,58); 
 | 
					 | 
				
			||||||
  else
 | 
					 | 
				
			||||||
    if (PagCorr == SECONDA)
 | 
					 | 
				
			||||||
      jump_to_line(pr,52);
 | 
					 | 
				
			||||||
  stampa_totali(pr);  
 | 
					 | 
				
			||||||
//  TPrint_section& body = section('F', last_page);
 | 
					 | 
				
			||||||
//  body.reset();  
 | 
					 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  fill_page(pr, -1);   // formfeed "adattato"  
 | 
					  fill_page(pr, -1);   // formfeed "adattato"  
 | 
				
			||||||
  inc_curr_page();
 | 
					  inc_curr_page();
 | 
				
			||||||
  
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
/*void TDistintaG::stampa_testata(TPrinter& pr)
 | 
					 | 
				
			||||||
{
 | 
					 | 
				
			||||||
  TPrint_section& head = section('H', 1);
 | 
					 | 
				
			||||||
  const word r = head.height()-1;
 | 
					 | 
				
			||||||
  TPrintrow& head_row = head.row(r-1);                    
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// Setta il numero di pagina e poi lo incrementa
 | 
					 | 
				
			||||||
  TForm_item& nf = head.find_field(H_NUM_FOGLIO);          
 | 
					 | 
				
			||||||
  TString fstr(10); fstr << _num_foglio;
 | 
					 | 
				
			||||||
  nf.set(fstr);      
 | 
					 | 
				
			||||||
  _num_foglio++;   
 | 
					 | 
				
			||||||
  fill_page(pr, HEADER_PRIMA_GD);  
 | 
					 | 
				
			||||||
}*/
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
void TDistintaG::set_body(TPrinter& pr, const char tipo)
 | 
					void TDistintaG::set_body(TPrinter& pr, const char tipo)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  if (tipo == 'F')   
 | 
					  if (tipo == 'F')   
 | 
				
			||||||
@ -1247,6 +1227,9 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
 | 
				
			|||||||
  long PtrFis = -1L, PtrNoFis=-1L;
 | 
					  long PtrFis = -1L, PtrNoFis=-1L;
 | 
				
			||||||
  TPrinter& pr = printer(); 
 | 
					  TPrinter& pr = printer(); 
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
 | 
					  bool StampatiTotaliFis = FALSE;
 | 
				
			||||||
 | 
					  bool StampatiTotaliGiu = FALSE;
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
  _CtrFisStampati = _CtrNoFisStampati = 0;
 | 
					  _CtrFisStampati = _CtrNoFisStampati = 0;
 | 
				
			||||||
  _finite_fis = _finite_nofis = FALSE;
 | 
					  _finite_fis = _finite_nofis = FALSE;
 | 
				
			||||||
  _GiaStampatiFis = _GiaStampatiNoFis = FALSE;
 | 
					  _GiaStampatiFis = _GiaStampatiNoFis = FALSE;
 | 
				
			||||||
@ -1267,6 +1250,194 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
 | 
				
			|||||||
      
 | 
					      
 | 
				
			||||||
      if (_PaginaCorrente == PRIMA)
 | 
					      if (_PaginaCorrente == PRIMA)
 | 
				
			||||||
      {                     
 | 
					      {                     
 | 
				
			||||||
 | 
					        attiva_totali('F');
 | 
				
			||||||
 | 
					        if (_modulaser) ClearFlagModulaser();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        for (int righe=0; righe < QGD_RIGHE_PRIMA; righe++)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					// Stampa intestazione, solo sul primo foglio.
 | 
				
			||||||
 | 
					          if (!righe)    
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            (*cur) = PtrFis >= 0L ? PtrFis : 0L;
 | 
				
			||||||
 | 
					            stampa_testata(pr);
 | 
				
			||||||
 | 
					            _CtrFisStampati = 0; // conta quelli che stampo sulla prima
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					          if (_finite_fis || StabilitaInesistenzaFis)
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					// La prima volta si deve posizionare sul primo record di p.f.
 | 
				
			||||||
 | 
					          if (PtrFis < 0L && !StabilitaInesistenzaFis)
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            const char tipo = cur->curr().get(QGD_TIPOA)[0];
 | 
				
			||||||
 | 
					            const bool Trovato = tipo == 'F';
 | 
				
			||||||
 | 
					            StabilitaInesistenzaFis = _finite_fis = !Trovato;
 | 
				
			||||||
 | 
					            PtrFis  = 0L;
 | 
				
			||||||
 | 
					          }                                        
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					          if (StabilitaInesistenzaFis)
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					                          
 | 
				
			||||||
 | 
					          (*cur) = PtrFis;
 | 
				
			||||||
 | 
					                                    
 | 
				
			||||||
 | 
					          const char tipo = cur->curr().get(QGD_TIPOA)[0];
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					          if (tipo != 'F')      
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					          else
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            CtrFis--;
 | 
				
			||||||
 | 
					            if (CtrFis == 0L) _finite_fis = TRUE;
 | 
				
			||||||
 | 
					            set_body(pr, 'F');
 | 
				
			||||||
 | 
					// La stampa e' finita se ho STAMPATO l'ultimo record
 | 
				
			||||||
 | 
					            LastRecord     = cur->pos() >= items-1;
 | 
				
			||||||
 | 
					//            _EndPrintDitta = LastRecord;
 | 
				
			||||||
 | 
					            _CtrFisStampati++;
 | 
				
			||||||
 | 
					            if (!LastRecord)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              ++(*cur);
 | 
				
			||||||
 | 
					              PtrFis     = cur->pos();
 | 
				
			||||||
 | 
					              LastRecord = cur->pos() >= items-1;
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }   // for righe..
 | 
				
			||||||
 | 
					        PtrFis = cur->pos();  
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					        if (_finite_fis && !StampatiTotaliFis)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          jump_to_line(pr,58);
 | 
				
			||||||
 | 
					          stampa_totali(pr,TRUE);
 | 
				
			||||||
 | 
					          StampatiTotaliFis = TRUE;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					      if (_PaginaCorrente == SECONDA)
 | 
				
			||||||
 | 
					      {
 | 
				
			||||||
 | 
					// Reset del flag di pagina con posiz.      
 | 
				
			||||||
 | 
					        if (_posiziona && _PaginaPosizionamento) _PaginaPosizionamento = FALSE;
 | 
				
			||||||
 | 
					        for (int righe=0; righe < QGD_RIGHE_SECONDA; righe++)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          if (!righe)
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            _CtrNoFisStampati = 0;
 | 
				
			||||||
 | 
					            // All'inizio salta le righe in alto
 | 
				
			||||||
 | 
					            fill_page(pr, HEADER_SECONDA_GD);
 | 
				
			||||||
 | 
					          }  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          if (_finite_nofis || StabilitaInesistenzaNoFis)
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// La prima volta si deve posizionare sul primo record di p.g.
 | 
				
			||||||
 | 
					          if (PtrNoFis<0L && !StabilitaInesistenzaNoFis)
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            bool Trovato = FALSE;
 | 
				
			||||||
 | 
					            bool eof = FALSE;
 | 
				
			||||||
 | 
					            (*cur) = PtrFis-1 > 0L ? PtrFis-1 : 0L;  // parti dall'inizio
 | 
				
			||||||
 | 
					            while (!Trovato && !eof)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              eof = cur->pos() >= items-1;                    
 | 
				
			||||||
 | 
					              const char tipo = cur->curr().get(QGD_TIPOA)[0];
 | 
				
			||||||
 | 
					              if (tipo == 'G')
 | 
				
			||||||
 | 
					              {
 | 
				
			||||||
 | 
					                PtrNoFis = cur->pos();
 | 
				
			||||||
 | 
					                Trovato = TRUE;
 | 
				
			||||||
 | 
					                break;
 | 
				
			||||||
 | 
					              }
 | 
				
			||||||
 | 
					              else
 | 
				
			||||||
 | 
					                ++(*cur);            
 | 
				
			||||||
 | 
					            }                                        
 | 
				
			||||||
 | 
					            StabilitaInesistenzaNoFis = _finite_nofis = !Trovato;
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					// Gestisce i casi in cui non ci sono percipienti nella distinta..
 | 
				
			||||||
 | 
					//          if (items==0) _EndPrintDitta=TRUE;                    
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					          if (StabilitaInesistenzaNoFis)
 | 
				
			||||||
 | 
					            break;             
 | 
				
			||||||
 | 
					        
 | 
				
			||||||
 | 
					          (*cur) = PtrNoFis;
 | 
				
			||||||
 | 
					          const char tipo = cur->curr().get(QGD_TIPOA)[0];
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					          if (tipo != 'G')      
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					          else
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            CtrNoFis--;                          
 | 
				
			||||||
 | 
					            if (CtrNoFis == 0L) _finite_nofis = TRUE;          
 | 
				
			||||||
 | 
					            set_body(pr, 'G'); 
 | 
				
			||||||
 | 
					            LastRecord     = cur->pos() >= items-1;                    
 | 
				
			||||||
 | 
					//            _EndPrintDitta = LastRecord;
 | 
				
			||||||
 | 
					            _CtrNoFisStampati++;   
 | 
				
			||||||
 | 
					            if (!LastRecord)
 | 
				
			||||||
 | 
					            {
 | 
				
			||||||
 | 
					              ++(*cur);
 | 
				
			||||||
 | 
					              PtrNoFis   = cur->pos();
 | 
				
			||||||
 | 
					              LastRecord = PtrNoFis >= items-1;          
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					        }          
 | 
				
			||||||
 | 
					        PtrNoFis = cur->pos();     
 | 
				
			||||||
 | 
					        jump_to_line(pr,52);
 | 
				
			||||||
 | 
					        const bool stampa = _finite_nofis && !StampatiTotaliGiu;
 | 
				
			||||||
 | 
					        if (stampa)
 | 
				
			||||||
 | 
					        {
 | 
				
			||||||
 | 
					          stampa_totali(pr,TRUE);
 | 
				
			||||||
 | 
					          StampatiTotaliGiu = TRUE;
 | 
				
			||||||
 | 
					        }
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					          stampa_totali(pr,FALSE);
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					        _EndPrintDitta = _finite_fis && _finite_nofis;  
 | 
				
			||||||
 | 
					      }
 | 
				
			||||||
 | 
					    }  // for pagina..
 | 
				
			||||||
 | 
					  } // while !EndPrintDitta
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  if (usa_progind()) 
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    delete _prog;
 | 
				
			||||||
 | 
					    _prog = NULL;
 | 
				
			||||||
 | 
					  }  
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  return TRUE;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					/*
 | 
				
			||||||
 | 
					  VECCHIA PRINT DELLA DISTINTA
 | 
				
			||||||
 | 
					  TCursor* cur = cursor();
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  bool StabilitaInesistenzaNoFis = FALSE;
 | 
				
			||||||
 | 
					  bool StabilitaInesistenzaFis = FALSE;  
 | 
				
			||||||
 | 
					  long CtrFis   = NumFis;
 | 
				
			||||||
 | 
					  long CtrNoFis = NumNoFis;
 | 
				
			||||||
 | 
					  long PtrFis = -1L, PtrNoFis=-1L;
 | 
				
			||||||
 | 
					  TPrinter& pr = printer();
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					  _CtrFisStampati = _CtrNoFisStampati = 0;
 | 
				
			||||||
 | 
					  _finite_fis = _finite_nofis = FALSE;
 | 
				
			||||||
 | 
					  _GiaStampatiFis = _GiaStampatiNoFis = FALSE;
 | 
				
			||||||
 | 
					  _EndPrintDitta = FALSE;  // Vero se stampato l'ultimo record
 | 
				
			||||||
 | 
					  bool LastRecord = FALSE; // Vero se letto l'ultimo record
 | 
				
			||||||
 | 
					  _PaginaCorrente = PRIMA;      
 | 
				
			||||||
 | 
					  
 | 
				
			||||||
 | 
					  _codditta = codditta;  
 | 
				
			||||||
 | 
					  _RigaCorr = 0;  
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  const long items = filtra(codditta);    
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					  while (!_EndPrintDitta)
 | 
				
			||||||
 | 
					  {
 | 
				
			||||||
 | 
					    for (int pagina=1; pagina <= QGD_PAGINE; pagina++, next_page(pr))
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					      pr.formlen(QGD_FORMLEN);             
 | 
				
			||||||
 | 
					      
 | 
				
			||||||
 | 
					      if (_PaginaCorrente == PRIMA)
 | 
				
			||||||
 | 
					      {                      
 | 
				
			||||||
 | 
					          _EndPrintDitta=(_finite_fis && _finite_nofis);
 | 
				
			||||||
 | 
					          
 | 
				
			||||||
 | 
					          if (_EndPrintDitta )
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					            
 | 
				
			||||||
 | 
					          if (_finite_fis || StabilitaInesistenzaFis)
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (_modulaser) ClearFlagModulaser();
 | 
					        if (_modulaser) ClearFlagModulaser();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        for (int righe=0; righe < QGD_RIGHE_PRIMA; righe++)
 | 
					        for (int righe=0; righe < QGD_RIGHE_PRIMA; righe++)
 | 
				
			||||||
@ -1278,11 +1449,6 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
 | 
				
			|||||||
            stampa_testata(pr);
 | 
					            stampa_testata(pr);
 | 
				
			||||||
          }
 | 
					          }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
          _EndPrintDitta=_finite_fis && _finite_nofis;          
 | 
					 | 
				
			||||||
          
 | 
					 | 
				
			||||||
          if (_finite_fis || StabilitaInesistenzaFis)
 | 
					 | 
				
			||||||
            break;
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
// La prima volta si deve posizionare sul primo record di p.f.
 | 
					// La prima volta si deve posizionare sul primo record di p.f.
 | 
				
			||||||
          if (PtrFis<0L && !StabilitaInesistenzaFis)
 | 
					          if (PtrFis<0L && !StabilitaInesistenzaFis)
 | 
				
			||||||
          {
 | 
					          {
 | 
				
			||||||
@ -1307,7 +1473,10 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
          if (StabilitaInesistenzaFis)
 | 
					          if (StabilitaInesistenzaFis)
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					             _finite_fis=TRUE;
 | 
				
			||||||
            break;            
 | 
					            break;            
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
         
 | 
					         
 | 
				
			||||||
          (*cur) = PtrFis;
 | 
					          (*cur) = PtrFis;
 | 
				
			||||||
          const char tipo = cur->curr().get(QGD_TIPOA)[0];
 | 
					          const char tipo = cur->curr().get(QGD_TIPOA)[0];
 | 
				
			||||||
@ -1358,11 +1527,8 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
 | 
				
			|||||||
            while (!Trovato && !eof)
 | 
					            while (!Trovato && !eof)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
              eof = cur->pos() >= items-1;                    
 | 
					              eof = cur->pos() >= items-1;                    
 | 
				
			||||||
              const long ditta = cur->curr().get_long(QGD_CODDITTA);
 | 
					 | 
				
			||||||
              if (ditta != codditta)
 | 
					 | 
				
			||||||
                break;
 | 
					 | 
				
			||||||
              const char tipo = cur->curr().get(QGD_TIPOA)[0];
 | 
					              const char tipo = cur->curr().get(QGD_TIPOA)[0];
 | 
				
			||||||
              if (tipo != 'F')
 | 
					              if (tipo == 'G')
 | 
				
			||||||
              {
 | 
					              {
 | 
				
			||||||
                PtrNoFis = cur->pos();
 | 
					                PtrNoFis = cur->pos();
 | 
				
			||||||
                Trovato = TRUE;
 | 
					                Trovato = TRUE;
 | 
				
			||||||
@ -1375,10 +1541,13 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
 | 
				
			|||||||
          }
 | 
					          }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
// Gestisce i casi in cui non ci sono percipienti nella distinta..
 | 
					// Gestisce i casi in cui non ci sono percipienti nella distinta..
 | 
				
			||||||
          if (items==0) _EndPrintDitta=TRUE;                    
 | 
					//          if (items==0) _EndPrintDitta=TRUE;                    
 | 
				
			||||||
          
 | 
					          
 | 
				
			||||||
          if (StabilitaInesistenzaNoFis)
 | 
					          if (StabilitaInesistenzaNoFis)
 | 
				
			||||||
 | 
					          {
 | 
				
			||||||
 | 
					            _finite_nofis=TRUE;
 | 
				
			||||||
            break;             
 | 
					            break;             
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
          (*cur) = PtrNoFis;
 | 
					          (*cur) = PtrNoFis;
 | 
				
			||||||
          const char tipo = cur->curr().get(QGD_TIPOA)[0];
 | 
					          const char tipo = cur->curr().get(QGD_TIPOA)[0];
 | 
				
			||||||
@ -1413,6 +1582,7 @@ bool TDistintaG::print(const long codditta, const long NumFis, const long NumNoF
 | 
				
			|||||||
  }  
 | 
					  }  
 | 
				
			||||||
  
 | 
					  
 | 
				
			||||||
  return TRUE;  
 | 
					  return TRUE;  
 | 
				
			||||||
 | 
					*/  
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -2454,7 +2624,7 @@ bool TQuadroD1::print(const long codditta, const long NumFis, const long NumNoFi
 | 
				
			|||||||
      {
 | 
					      {
 | 
				
			||||||
#ifdef DBG      
 | 
					#ifdef DBG      
 | 
				
			||||||
        if (UltimoRitenutaImposta >= 0L)
 | 
					        if (UltimoRitenutaImposta >= 0L)
 | 
				
			||||||
          NFCHECK("Bad sorting on cursor");
 | 
					          /*NF*/ CHECK(FALSE,"Bad sorting on cursor");
 | 
				
			||||||
#endif          
 | 
					#endif          
 | 
				
			||||||
        UltimoRitenutaAcconto = cur.pos();
 | 
					        UltimoRitenutaAcconto = cur.pos();
 | 
				
			||||||
      }  
 | 
					      }  
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user