Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Corretto ordine nella destroy(); TOOLBAR nella maschera; possibilita' di stampare il totale delle etichette stampate alla fine git-svn-id: svn://10.65.10.50/trunk@6922 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									10f65b5bbc
								
							
						
					
					
						commit
						550a3ddfce
					
				| @ -32,6 +32,8 @@ | |||||||
| #define ALIAS_BNZ			600		// benemerenze
 | #define ALIAS_BNZ			600		// benemerenze
 | ||||||
| #define ALIAS_GAZ			300   // gruppi aziendale
 | #define ALIAS_GAZ			300   // gruppi aziendale
 | ||||||
| 
 | 
 | ||||||
|  | #define ETI_INDIRIZZO 4			// numero campo indirizzo in etichetta (deve essere sempre cosi')
 | ||||||
|  | 
 | ||||||
| enum ts { undefined=0, sintetico=1, completo=2, schede=3, etichette=4, cartoline=5, personale=6 }; | enum ts { undefined=0, sintetico=1, completo=2, schede=3, etichette=4, cartoline=5, personale=6 }; | ||||||
| 
 | 
 | ||||||
| // definizione form per etichette
 | // definizione form per etichette
 | ||||||
| @ -78,7 +80,7 @@ class TStampaPerCategorie : public TPrintapp | |||||||
| 	TString80					_note, _intest1, _intest2, _intest3, _intest4; | 	TString80					_note, _intest1, _intest2, _intest3, _intest4; | ||||||
| 	bool							_usomodo, _usasez; | 	bool							_usomodo, _usasez; | ||||||
|   int								_etlarghezza, _etcolonne, _schxpag, _lenpage; |   int								_etlarghezza, _etcolonne, _schxpag, _lenpage; | ||||||
|   bool							_stampa80; |   bool							_stampa80, _etictot; | ||||||
|    |    | ||||||
| protected: | protected: | ||||||
|   virtual bool user_create(); |   virtual bool user_create(); | ||||||
| @ -174,6 +176,15 @@ void TStampaPerCategorie::filtra_sezioni() | |||||||
| void TStampaPerCategorie::footer_gruppo() | void TStampaPerCategorie::footer_gruppo() | ||||||
| { | { | ||||||
| 	// stampa totale soggetti appartenenti al gruppo
 | 	// stampa totale soggetti appartenenti al gruppo
 | ||||||
|  | 	if (_tipostampa == etichette && _etictot) | ||||||
|  | 	{ | ||||||
|  | 	  TString80 totale = format("TOTALE %d", _contatore); | ||||||
|  | 	  TPrintrow riga; | ||||||
|  | 	  riga.put(totale); | ||||||
|  | 	  printer().print(riga); | ||||||
|  | 	} | ||||||
|  | 	else | ||||||
|  | 	{	 | ||||||
| 		reset_footer(); | 		reset_footer(); | ||||||
| 		TString sep(80); | 		TString sep(80); | ||||||
| 		sep.fill('-'); | 		sep.fill('-'); | ||||||
| @ -182,6 +193,7 @@ void TStampaPerCategorie::footer_gruppo() | |||||||
| 		printer().formfeed();  | 		printer().formfeed();  | ||||||
| 		reset_footer(); | 		reset_footer(); | ||||||
| 	}		 | 	}		 | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| print_action TStampaPerCategorie::postprocess_print(int file, int counter) | print_action TStampaPerCategorie::postprocess_print(int file, int counter) | ||||||
| {  | {  | ||||||
| @ -200,6 +212,15 @@ print_action TStampaPerCategorie::postprocess_print(int file, int counter) | |||||||
| void TStampaPerCategorie::footer_sezione() | void TStampaPerCategorie::footer_sezione() | ||||||
| { | { | ||||||
| 	// stampa totale soggetti appartenenti alla sezione
 | 	// stampa totale soggetti appartenenti alla sezione
 | ||||||
|  | 	if (_tipostampa == etichette && _etictot) | ||||||
|  | 	{ | ||||||
|  | 	  TString80 totale = format("TOTALE %d", _contatore); | ||||||
|  | 	  TPrintrow riga; | ||||||
|  | 	  riga.put(totale); | ||||||
|  | 	  printer().print(riga); | ||||||
|  | 	} | ||||||
|  | 	else | ||||||
|  | 	{ | ||||||
| 		reset_footer(); | 		reset_footer(); | ||||||
| 		TString sep(80); | 		TString sep(80); | ||||||
| 		sep.fill('-'); | 		sep.fill('-'); | ||||||
| @ -208,6 +229,7 @@ void TStampaPerCategorie::footer_sezione() | |||||||
| 		printer().formfeed();  | 		printer().formfeed();  | ||||||
| 		reset_footer(); | 		reset_footer(); | ||||||
| 	}		 | 	}		 | ||||||
|  | } | ||||||
| 
 | 
 | ||||||
| void TStampaPerCategorie::header_gruppo(const TString16 gruppo) | void TStampaPerCategorie::header_gruppo(const TString16 gruppo) | ||||||
| { | { | ||||||
| @ -249,7 +271,11 @@ void TStampaPerCategorie::set_page(int file, int cnt) | |||||||
|   					set_row(i+1,riga1); |   					set_row(i+1,riga1); | ||||||
| 					} | 					} | ||||||
| 					if (r < _etcolonne)  			 | 					if (r < _etcolonne)  			 | ||||||
|  | 					{ | ||||||
| 						++(*current_cursor()); | 						++(*current_cursor()); | ||||||
|  | 						if (current_cursor()->pos()<current_cursor()->items()) | ||||||
|  | 							preprocess_page(file, cnt); | ||||||
|  | 					}						 | ||||||
| 				}					 | 				}					 | ||||||
| 			}				 | 			}				 | ||||||
| 		} | 		} | ||||||
| @ -274,7 +300,7 @@ void TStampaPerCategorie::set_page(int file, int cnt) | |||||||
| 		case schede: | 		case schede: | ||||||
| 		{ | 		{ | ||||||
| 			TPrint_section& corpo = _form_sch->get_body(); | 			TPrint_section& corpo = _form_sch->get_body(); | ||||||
| 			corpo.update_and_print(TRUE); | 			corpo.update_and_print(printmode_normal, TRUE); | ||||||
| 			force_setpage(TRUE); | 			force_setpage(TRUE); | ||||||
| 		} | 		} | ||||||
| 		break; | 		break; | ||||||
| @ -531,8 +557,10 @@ bool TStampaPerCategorie::preprocess_page(int file, int counter) | |||||||
| 		// cerco ultima benemerenza
 | 		// cerco ultima benemerenza
 | ||||||
| 		TString80 benemerenza = "";    | 		TString80 benemerenza = "";    | ||||||
| 		const long codice = recsog.get_long(SOG_CODICE); | 		const long codice = recsog.get_long(SOG_CODICE); | ||||||
| 		TRectype* key = new TRectype(LF_BENEM); | 		//TRectype* key = new TRectype(LF_BENEM);
 | ||||||
| 		key->put(BEN_CODICE,codice); | 		TRectype key = TRectype(LF_BENEM); | ||||||
|  | 		//key->put(BEN_CODICE,codice);
 | ||||||
|  | 		key.put(BEN_CODICE,codice); | ||||||
| 		const int err = _sbenemerenze->read(key); | 		const int err = _sbenemerenze->read(key); | ||||||
| 		if (err == NOERR) | 		if (err == NOERR) | ||||||
| 		{                                    | 		{                                    | ||||||
| @ -858,6 +886,7 @@ bool TStampaPerCategorie::user_create() | |||||||
|   _etcolonne = config.get_int("EtColonne"); |   _etcolonne = config.get_int("EtColonne"); | ||||||
| 	_form_eti = new TEti_percat_form(etformato); | 	_form_eti = new TEti_percat_form(etformato); | ||||||
|   _stampa80 = config.get_bool("Stampa80"); |   _stampa80 = config.get_bool("Stampa80"); | ||||||
|  |   _etictot = config.get_bool("EticTot"); | ||||||
| 	_form_car = new TEti_percat_form("ATCARTO1"); | 	_form_car = new TEti_percat_form("ATCARTO1"); | ||||||
|   TString16 schformato = config.get("SchFormato"); |   TString16 schformato = config.get("SchFormato"); | ||||||
|   _schxpag = config.get_int("SchXPag"); |   _schxpag = config.get_int("SchXPag"); | ||||||
| @ -870,21 +899,21 @@ bool TStampaPerCategorie::user_create() | |||||||
| 
 | 
 | ||||||
| bool TStampaPerCategorie::user_destroy() | bool TStampaPerCategorie::user_destroy() | ||||||
| { | { | ||||||
|  | 	delete _form_per;   | ||||||
|  |   delete _form_sch;		   | ||||||
|  |   delete _form_car; | ||||||
|  |   delete _form_eti; | ||||||
|   delete _msk; |   delete _msk; | ||||||
|   delete _rel; |   delete _sbenemerenze; | ||||||
|   delete _benem; |   delete _benem; | ||||||
|   delete _donaz; |   delete _donaz; | ||||||
|   delete _sbenemerenze; |   delete _rel; | ||||||
|   delete _form_eti; |  | ||||||
|   delete _form_car; |  | ||||||
|   delete _form_sch;		   |  | ||||||
| 	delete _form_per;   |  | ||||||
|   return TRUE; |   return TRUE; | ||||||
| } | } | ||||||
| 
 | 
 | ||||||
| int at2700(int argc, char* argv[]) | int at2700(int argc, char* argv[]) | ||||||
| { | { | ||||||
|   TStampaPerCategorie a; |   TStampaPerCategorie a; | ||||||
|   a.run(argc, argv, "Stampa soggetti per categorie"); |   a.run(argc, argv, "Soggetti per categorie"); | ||||||
|   return 0; |   return 0; | ||||||
| } | } | ||||||
|  | |||||||
| @ -4,38 +4,38 @@ TOOLBAR "" 0 20 0 2 | |||||||
| 
 | 
 | ||||||
| BUTTON F_SINTETICO 9 2 | BUTTON F_SINTETICO 9 2 | ||||||
| BEGIN | BEGIN | ||||||
|    PROMPT -17 -11 "Sintetico" |    PROMPT -17 -11 "~Sintetico" | ||||||
|    MESSAGE EXIT,F_SINTETICO |    MESSAGE EXIT,F_SINTETICO | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON F_COMPLETO 9 2 | BUTTON F_COMPLETO 9 2 | ||||||
| BEGIN | BEGIN | ||||||
|    PROMPT -27 -11 "Completo" |    PROMPT -27 -11 "~Completo" | ||||||
|    MESSAGE EXIT,F_COMPLETO |    MESSAGE EXIT,F_COMPLETO | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON F_PERSONALE 9 2 | BUTTON F_PERSONALE 9 2 | ||||||
| BEGIN | BEGIN | ||||||
|    PROMPT -37 -11 "Personale" |    PROMPT -37 -11 "~Personale" | ||||||
|    MESSAGE EXIT,F_PERSONALE |    MESSAGE EXIT,F_PERSONALE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| BUTTON F_SCHEDE 9 2 | BUTTON F_SCHEDE 9 2 | ||||||
| BEGIN | BEGIN | ||||||
|    PROMPT -47 -11 "Schede" |    PROMPT -47 -11 "Sc~hede" | ||||||
|    MESSAGE EXIT,F_SCHEDE |    MESSAGE EXIT,F_SCHEDE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON F_ETICHETTE 9 2 | BUTTON F_ETICHETTE 9 2 | ||||||
| BEGIN | BEGIN | ||||||
|    PROMPT -57 -11 "Etichette" |    PROMPT -57 -11 "~Etichette" | ||||||
|    MESSAGE EXIT,F_ETICHETTE |    MESSAGE EXIT,F_ETICHETTE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
| BUTTON F_CARTOLINE 9 2 | BUTTON F_CARTOLINE 9 2 | ||||||
| BEGIN | BEGIN | ||||||
|    PROMPT -67 -11 "Cartoline" |    PROMPT -67 -11 "C~artoline" | ||||||
|    MESSAGE EXIT,F_CARTOLINE |    MESSAGE EXIT,F_CARTOLINE | ||||||
| END | END | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user