Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Corretto stampa localita git-svn-id: svn://10.65.10.50/trunk@7738 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									170ffe9811
								
							
						
					
					
						commit
						f7042030d7
					
				| @ -11,8 +11,9 @@ | ||||
| #include "at1.h" | ||||
| #include "at1300a.h" | ||||
| 
 | ||||
| #define ALIAS_BNZ	600 | ||||
| #define CAMPO_BENEM 10 // campo benemerenza in form per lettera
 | ||||
| 
 | ||||
| #define ALIAS_BNZ	600 | ||||
| #define ALIAS_LCPRES	101		// localita' postale di residenza
 | ||||
| #define ALIAS_LCPDOM	100		// localita' postale di domicilio
 | ||||
| #define ALIAS_COMRES 	502		// comune di residenza
 | ||||
| @ -20,6 +21,7 @@ | ||||
| #define ALIAS_COMNAS 	500		// comune di nascita
 | ||||
| 
 | ||||
| #define ETI_COGNOME 3			// numero campo cognome e nome in etichetta (deve essere sempre cosi') per famiglie
 | ||||
| #define LET_BENEM 10      // campo benemerenza in form per lettera
 | ||||
| 
 | ||||
| enum ts { undefined=0, sintetico=1, completo=2, etichette=3, lettere=4 }; | ||||
| 
 | ||||
| @ -154,6 +156,10 @@ void TStampaBenemerenze::set_page(int file, int cnt) | ||||
| 		case lettere: | ||||
| 		{ | ||||
| 			TPrint_section& corpo = _form_let->get_body(); | ||||
| 		  TForm_item& item_benem = corpo.find_field(LET_BENEM); | ||||
| 			TString80 benem = current_cursor()->curr(-ALIAS_BNZ).get("S0"); | ||||
| 			int new_x = (80-benem.len())/2; | ||||
| 			item_benem.set_x(new_x); | ||||
| 			corpo.update(); | ||||
|   		for (word i = 0; i < corpo.height(); i++) | ||||
|   		{ | ||||
| @ -197,23 +203,16 @@ bool TStampaBenemerenze::preprocess_page(int file, int counter) | ||||
| 		nome << current_cursor()->curr(LF_SOGGETTI).get(SOG_NOME); | ||||
| 		_cognome_nome = nome; | ||||
| 		TString256 localita = ""; | ||||
| 		localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S6"); | ||||
| 		if (localita.not_empty() && localita.ok()) | ||||
| 		{ | ||||
| 			localita << " "; | ||||
| 			localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0"); | ||||
| 			localita << " - ";		 | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			//localita = current_cursor()->curr(-ALIAS_COMDOM).get(COM_CAPCOM);
 | ||||
| 		localita = current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CAP); | ||||
| 		localita << " "; | ||||
| 		if (current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CODLOC).not_empty()) | ||||
| 		{ | ||||
| 			localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0"); | ||||
| 			localita << " - ";		 | ||||
| 		}	 | ||||
| 		localita << current_cursor()->curr(-ALIAS_COMDOM).get(COM_DENCOM); | ||||
| 		localita.trim(); | ||||
| 		_dencom = localita; | ||||
| 		 | ||||
| 		// salto pagina se cambio punto di rottura
 | ||||
| 		const TString16 tiponew = current_cursor()->curr().get(BEN_TIPOBEN);		 | ||||
| 		TString16 codsez, codsot; | ||||
|  | ||||
| @ -180,22 +180,16 @@ bool TStampaBenxGAz::preprocess_page(int file, int counter) | ||||
| 		nome << current_cursor()->curr(LF_SOGGETTI).get(SOG_NOME); | ||||
| 		_cognome_nome = nome; | ||||
| 		TString256 localita = ""; | ||||
| 		localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S6"); | ||||
| 		if (localita.not_empty() && localita.ok()) | ||||
| 		{ | ||||
| 		localita = current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CAP); | ||||
| 		localita << " "; | ||||
| 		if (current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CODLOC).not_empty()) | ||||
| 		{ | ||||
| 			localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0"); | ||||
| 			localita << " - ";		 | ||||
| 		}	 | ||||
| 		else | ||||
| 		{ | ||||
| 			localita = current_cursor()->curr(-ALIAS_COMDOM).get(COM_CAPCOM); | ||||
| 			localita << " "; | ||||
| 		}			 | ||||
| 		localita << current_cursor()->curr(-ALIAS_COMDOM).get(COM_DENCOM); | ||||
| 		localita.trim(); | ||||
| 		_dencom = localita; | ||||
| 		 | ||||
| 		// salto pagina se cambio punto di rottura
 | ||||
| 		TString16 grupponew; | ||||
| 		if (app()._tiposta == 'S') | ||||
|  | ||||
| @ -184,13 +184,13 @@ void TStampaPerEta::header_sezione(const TString16 codsez, const TString16 codso | ||||
| 	TString intestazione(132); | ||||
| 	intestazione = "Sezione: "; | ||||
| 	intestazione << codsez; | ||||
| 	intestazione << "/"; | ||||
| 	intestazione << '/'; | ||||
| 	intestazione << codsot; | ||||
| 	intestazione << " "; | ||||
| 	intestazione << ' '; | ||||
| 	intestazione << densez; | ||||
| 	if ((densot.ok())&& (densot.not_empty())) | ||||
| 	{ | ||||
| 		intestazione << "/"; | ||||
| 		intestazione << '/'; | ||||
| 		intestazione << densot; | ||||
| 	}		 | ||||
| 	if (_stampa80) | ||||
| @ -207,26 +207,20 @@ bool TStampaPerEta::preprocess_page(int file, int counter) | ||||
| 	{ | ||||
| 		TRectype recsog = current_cursor()->curr(); | ||||
| 		TString80 nome = recsog.get(SOG_COGNOME); | ||||
| 		nome << " "; | ||||
| 		nome << ' '; | ||||
| 		nome << recsog.get(SOG_NOME); | ||||
| 		_cognome_nome = nome; | ||||
| 		TString256 localita = ""; | ||||
| 		localita << current_cursor()->curr(-ALIAS_LCP).get("S6"); | ||||
| 		if (localita.not_empty() && localita.ok()) | ||||
| 		localita = recsog.get(SOG_DOM_CAP);			 | ||||
| 		localita << ' '; | ||||
| 		if (recsog.get(SOG_DOM_CODLOC).not_empty()) | ||||
| 		{ | ||||
| 			localita << " "; | ||||
| 			localita << current_cursor()->curr(-ALIAS_LCP).get("S0"); | ||||
| 			localita << " - ";		 | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			localita = current_cursor()->curr(LF_COMUNI).get(COM_CAPCOM); | ||||
| 			localita << " "; | ||||
| 		}			 | ||||
| 		localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM); | ||||
| 		localita.trim(); | ||||
| 		_dencom = localita; | ||||
| 
 | ||||
| 		// salto pagina se cambio sezione
 | ||||
| 		const TString16 codsez = recsog.get(SOG_CODSEZ);		 | ||||
| 		const TString16 codsot = recsog.get(SOG_CODSOT);		 | ||||
|  | ||||
| @ -171,19 +171,14 @@ bool TStampaModificati::preprocess_page(int file, int counter) | ||||
| 		nome << recsog.get(SOG_NOME); | ||||
| 		_cognome_nome = nome; | ||||
| 		TString256 localita = ""; | ||||
| 		localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S6"); | ||||
| 		if (localita.not_empty() && localita.ok()) | ||||
| 		localita = recsog.get(SOG_DOM_CAP);			 | ||||
| 		localita << ' '; | ||||
| 		if (recsog.get(SOG_DOM_CODLOC).not_empty()) | ||||
| 		{ | ||||
| 			localita << " "; | ||||
| 			localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0"); | ||||
| 			localita << " - ";		 | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			localita = current_cursor()->curr(-ALIAS_COMDOM).get(COM_CAPCOM); | ||||
| 			localita << " "; | ||||
| 		}			 | ||||
| 		localita << current_cursor()->curr(-ALIAS_COMDOM).get(COM_DENCOM); | ||||
| 		localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM); | ||||
| 		localita.trim(); | ||||
| 		_dencom = localita; | ||||
| 		// salto pagina se cambio sezione
 | ||||
|  | ||||
| @ -233,18 +233,13 @@ bool TStampaNonDon::preprocess_page(int file, int counter) | ||||
| 		nome << recsog.get(SOG_NOME); | ||||
| 		_cognome_nome = nome; | ||||
| 		TString256 localita = "";      | ||||
| 		localita << current_cursor()->curr(-ALIAS_LCP).get("S6"); | ||||
| 		if (localita.not_empty() && localita.ok()) | ||||
| 		localita = recsog.get(SOG_DOM_CAP);			 | ||||
| 		localita << ' '; | ||||
| 		if (recsog.get(SOG_DOM_CODLOC).not_empty()) | ||||
| 		{ | ||||
| 			localita << " "; | ||||
| 			localita << current_cursor()->curr(-ALIAS_LCP).get("S0"); | ||||
| 			localita << " - ";		 | ||||
| 		} | ||||
| 		else | ||||
| 		{ | ||||
| 			localita = current_cursor()->curr(LF_COMUNI).get(COM_CAPCOM); | ||||
| 			localita << " "; | ||||
| 		}			 | ||||
| 		localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM); | ||||
| 		localita.trim(); | ||||
| 		_dencom = localita; | ||||
| @ -255,7 +250,6 @@ bool TStampaNonDon::preprocess_page(int file, int counter) | ||||
| 		if ((_codsez!=codsez)||(_codsot!=codsot)) | ||||
| 		{ | ||||
| 			if (_codsez != "**") | ||||
| 				//printer().formfeed();
 | ||||
| 				footer_sezione(); | ||||
| 			_codsez = codsez; | ||||
| 			_codsot = codsot; | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user