Corretta le stampa del codice articolo e l'abilitazione delle
intestazioni per livelli codice (art e giac) quando non abilitato da config git-svn-id: svn://10.65.10.50/trunk@5025 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									e2b35c7b64
								
							
						
					
					
						commit
						01d70b8140
					
				@ -95,7 +95,9 @@ bool TForm_schedemag::validate(TForm_item &cf, TToken_string &s)
 | 
				
			|||||||
    }
 | 
					    }
 | 
				
			||||||
    if (subcode=="CODGRUPPOART") {
 | 
					    if (subcode=="CODGRUPPOART") {
 | 
				
			||||||
      TString valore(relation()->lfile(LF_ANAMAG).get("CODART"));
 | 
					      TString valore(relation()->lfile(LF_ANAMAG).get("CODART"));
 | 
				
			||||||
      cf.set(valore.cut(min(valore.len(),_artlev->packed_lenght(_tolivart))));
 | 
					      if (_artlev->enabled())
 | 
				
			||||||
 | 
					        valore.cut(min(valore.len(),_artlev->packed_lenght(_tolivart)));
 | 
				
			||||||
 | 
					      cf.set(valore);
 | 
				
			||||||
      return TRUE;
 | 
					      return TRUE;
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
    if (subcode=="GRUPPOART") {
 | 
					    if (subcode=="GRUPPOART") {
 | 
				
			||||||
@ -171,18 +173,20 @@ bool TForm_schedemag::ragg_exprs(int livart,int livgiac)
 | 
				
			|||||||
  // ***********
 | 
					  // ***********
 | 
				
			||||||
  int tolivart,tolivgiac;
 | 
					  int tolivart,tolivgiac;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  tolivart =livart  ? livart  : (_artlev->enabled() ? _artlev->last_level() : 25) ;
 | 
					  tolivart =livart  ? livart  : _artlev->last_level() ;
 | 
				
			||||||
  tolivgiac=livgiac ? livgiac : (_giaclev->enabled() ? _giaclev->last_level() : 15);
 | 
					  tolivgiac=livgiac ? livgiac : _giaclev->last_level();
 | 
				
			||||||
  // sezioni livello codice 
 | 
					  // sezioni livello codice 
 | 
				
			||||||
  piece="CODART";
 | 
					  piece="CODART";
 | 
				
			||||||
  piece << "[1," << _artlev->packed_lenght(tolivart) <<']';
 | 
					  if (_artlev->enabled())
 | 
				
			||||||
 | 
					    piece << "[1," << _artlev->packed_lenght(tolivart) <<']';
 | 
				
			||||||
  *_rmov_raggcond<< (_rmov_raggcond->empty()? "":"+" )<<piece;
 | 
					  *_rmov_raggcond<< (_rmov_raggcond->empty()? "":"+" )<<piece;
 | 
				
			||||||
  _rmov_sortexp->add(piece);
 | 
					  _rmov_sortexp->add(piece);
 | 
				
			||||||
  _rmov_joinexp->cut(0) << piece << "==" << piece;
 | 
					  _rmov_joinexp->cut(0) << piece << "==" << piece;
 | 
				
			||||||
  if (livart==0)
 | 
					  if (livart==0)
 | 
				
			||||||
  {
 | 
					  {
 | 
				
			||||||
    piece="LIVGIAC";
 | 
					    piece="LIVGIAC";
 | 
				
			||||||
    piece << "[1," << _giaclev->packed_lenght(tolivgiac) <<']';
 | 
					    if (_giaclev->enabled())
 | 
				
			||||||
 | 
					      piece << "[1," << _giaclev->packed_lenght(tolivgiac) <<']';
 | 
				
			||||||
    *_rmov_raggcond << '+' << piece;
 | 
					    *_rmov_raggcond << '+' << piece;
 | 
				
			||||||
    _rmov_sortexp->add(piece);
 | 
					    _rmov_sortexp->add(piece);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
@ -200,7 +204,7 @@ void TForm_schedemag::setdett_percatmer(bool sottocat,int livart,int livgiac,boo
 | 
				
			|||||||
  TForm_subsection &h_g=(TForm_subsection &)find_field('B',odd_page,"HEADER_GRMOV");
 | 
					  TForm_subsection &h_g=(TForm_subsection &)find_field('B',odd_page,"HEADER_GRMOV");
 | 
				
			||||||
  h_g.enable((livart ==0 || livgiac !=0 || sudd_mag));
 | 
					  h_g.enable((livart ==0 || livgiac !=0 || sudd_mag));
 | 
				
			||||||
  TForm_subsection &h_l=(TForm_subsection &)find_field('B',odd_page,"HEADER_LIVGIAC");
 | 
					  TForm_subsection &h_l=(TForm_subsection &)find_field('B',odd_page,"HEADER_LIVGIAC");
 | 
				
			||||||
  h_l.enable(livgiac !=0 );
 | 
					  h_l.enable(_giaclev->enabled() && livgiac !=0 );
 | 
				
			||||||
  TForm_subsection &h_m=(TForm_subsection &)find_field('B',odd_page,"HEADER_MAG");
 | 
					  TForm_subsection &h_m=(TForm_subsection &)find_field('B',odd_page,"HEADER_MAG");
 | 
				
			||||||
  h_m.enable(sudd_mag );
 | 
					  h_m.enable(sudd_mag );
 | 
				
			||||||
  TForm_subsection &h_d=(TForm_subsection &)find_field('B',odd_page,"HEADER_DEP");
 | 
					  TForm_subsection &h_d=(TForm_subsection &)find_field('B',odd_page,"HEADER_DEP");
 | 
				
			||||||
@ -244,7 +248,7 @@ void TForm_schedemag::setdett_permag(bool sudd_dep,bool show_dett,int livart,int
 | 
				
			|||||||
  TForm_subsection &h_a=(TForm_subsection &)find_field('B',odd_page,"HEADER_ARTICOLO");
 | 
					  TForm_subsection &h_a=(TForm_subsection &)find_field('B',odd_page,"HEADER_ARTICOLO");
 | 
				
			||||||
  h_a.enable(show_dett);
 | 
					  h_a.enable(show_dett);
 | 
				
			||||||
  TForm_subsection &h_g=(TForm_subsection &)find_field('B',odd_page,"HEADER_LIVGIAC");
 | 
					  TForm_subsection &h_g=(TForm_subsection &)find_field('B',odd_page,"HEADER_LIVGIAC");
 | 
				
			||||||
  h_g.enable((livart ==0 || livgiac !=0 ));
 | 
					  h_g.enable(_giaclev->enabled() && (livart ==0 || livgiac !=0 ));
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  *_rmov_raggcond="CODMAG[1,3]";
 | 
					  *_rmov_raggcond="CODMAG[1,3]";
 | 
				
			||||||
  _rmov_sortexp->add("CODMAG[1,3]");
 | 
					  _rmov_sortexp->add("CODMAG[1,3]");
 | 
				
			||||||
@ -287,7 +291,7 @@ void TForm_schedemag::setdett_perart(bool percatmer,bool sottocatmer,int livart,
 | 
				
			|||||||
  TForm_subsection &h_g=(TForm_subsection &)find_field('B',odd_page,"HEADER_GRMOV");
 | 
					  TForm_subsection &h_g=(TForm_subsection &)find_field('B',odd_page,"HEADER_GRMOV");
 | 
				
			||||||
  h_g.enable((livart ==0 || livgiac !=0 || sudd_mag));
 | 
					  h_g.enable((livart ==0 || livgiac !=0 || sudd_mag));
 | 
				
			||||||
  TForm_subsection &h_l=(TForm_subsection &)find_field('B',odd_page,"HEADER_LIVGIAC");
 | 
					  TForm_subsection &h_l=(TForm_subsection &)find_field('B',odd_page,"HEADER_LIVGIAC");
 | 
				
			||||||
  h_l.enable(livart ==0 || livgiac !=0 );
 | 
					  h_l.enable(_giaclev->enabled() && (livart ==0 || livgiac !=0 ));
 | 
				
			||||||
  TForm_subsection &h_m=(TForm_subsection &)find_field('B',odd_page,"HEADER_MAG");
 | 
					  TForm_subsection &h_m=(TForm_subsection &)find_field('B',odd_page,"HEADER_MAG");
 | 
				
			||||||
  h_m.enable(sudd_mag );
 | 
					  h_m.enable(sudd_mag );
 | 
				
			||||||
  TForm_subsection &h_d=(TForm_subsection &)find_field('B',odd_page,"HEADER_DEP");
 | 
					  TForm_subsection &h_d=(TForm_subsection &)find_field('B',odd_page,"HEADER_DEP");
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user