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 "at1.h"
 | 
				
			||||||
#include "at1300a.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_LCPRES	101		// localita' postale di residenza
 | 
				
			||||||
#define ALIAS_LCPDOM	100		// localita' postale di domicilio
 | 
					#define ALIAS_LCPDOM	100		// localita' postale di domicilio
 | 
				
			||||||
#define ALIAS_COMRES 	502		// comune di residenza
 | 
					#define ALIAS_COMRES 	502		// comune di residenza
 | 
				
			||||||
@ -20,6 +21,7 @@
 | 
				
			|||||||
#define ALIAS_COMNAS 	500		// comune di nascita
 | 
					#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 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 };
 | 
					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:
 | 
							case lettere:
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			TPrint_section& corpo = _form_let->get_body();
 | 
								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();
 | 
								corpo.update();
 | 
				
			||||||
  		for (word i = 0; i < corpo.height(); i++)
 | 
					  		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);
 | 
							nome << current_cursor()->curr(LF_SOGGETTI).get(SOG_NOME);
 | 
				
			||||||
		_cognome_nome = nome;
 | 
							_cognome_nome = nome;
 | 
				
			||||||
		TString256 localita = "";
 | 
							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 = current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CAP);
 | 
				
			||||||
		localita << " ";
 | 
							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 << current_cursor()->curr(-ALIAS_COMDOM).get(COM_DENCOM);
 | 
				
			||||||
		localita.trim();
 | 
							localita.trim();
 | 
				
			||||||
		_dencom = localita;
 | 
							_dencom = localita;
 | 
				
			||||||
		
 | 
					 | 
				
			||||||
		// salto pagina se cambio punto di rottura
 | 
							// salto pagina se cambio punto di rottura
 | 
				
			||||||
		const TString16 tiponew = current_cursor()->curr().get(BEN_TIPOBEN);		
 | 
							const TString16 tiponew = current_cursor()->curr().get(BEN_TIPOBEN);		
 | 
				
			||||||
		TString16 codsez, codsot;
 | 
							TString16 codsez, codsot;
 | 
				
			||||||
 | 
				
			|||||||
@ -180,22 +180,16 @@ bool TStampaBenxGAz::preprocess_page(int file, int counter)
 | 
				
			|||||||
		nome << current_cursor()->curr(LF_SOGGETTI).get(SOG_NOME);
 | 
							nome << current_cursor()->curr(LF_SOGGETTI).get(SOG_NOME);
 | 
				
			||||||
		_cognome_nome = nome;
 | 
							_cognome_nome = nome;
 | 
				
			||||||
		TString256 localita = "";
 | 
							TString256 localita = "";
 | 
				
			||||||
		localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S6");
 | 
							localita = current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CAP);
 | 
				
			||||||
		if (localita.not_empty() && localita.ok())
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
		localita << " ";
 | 
							localita << " ";
 | 
				
			||||||
 | 
							if (current_cursor()->curr(LF_SOGGETTI).get(SOG_DOM_CODLOC).not_empty())
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
			localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0");
 | 
								localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0");
 | 
				
			||||||
			localita << " - ";		
 | 
								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(-ALIAS_COMDOM).get(COM_DENCOM);
 | 
				
			||||||
		localita.trim();
 | 
							localita.trim();
 | 
				
			||||||
		_dencom = localita;
 | 
							_dencom = localita;
 | 
				
			||||||
		
 | 
					 | 
				
			||||||
		// salto pagina se cambio punto di rottura
 | 
							// salto pagina se cambio punto di rottura
 | 
				
			||||||
		TString16 grupponew;
 | 
							TString16 grupponew;
 | 
				
			||||||
		if (app()._tiposta == 'S')
 | 
							if (app()._tiposta == 'S')
 | 
				
			||||||
 | 
				
			|||||||
@ -184,13 +184,13 @@ void TStampaPerEta::header_sezione(const TString16 codsez, const TString16 codso
 | 
				
			|||||||
	TString intestazione(132);
 | 
						TString intestazione(132);
 | 
				
			||||||
	intestazione = "Sezione: ";
 | 
						intestazione = "Sezione: ";
 | 
				
			||||||
	intestazione << codsez;
 | 
						intestazione << codsez;
 | 
				
			||||||
	intestazione << "/";
 | 
						intestazione << '/';
 | 
				
			||||||
	intestazione << codsot;
 | 
						intestazione << codsot;
 | 
				
			||||||
	intestazione << " ";
 | 
						intestazione << ' ';
 | 
				
			||||||
	intestazione << densez;
 | 
						intestazione << densez;
 | 
				
			||||||
	if ((densot.ok())&& (densot.not_empty()))
 | 
						if ((densot.ok())&& (densot.not_empty()))
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		intestazione << "/";
 | 
							intestazione << '/';
 | 
				
			||||||
		intestazione << densot;
 | 
							intestazione << densot;
 | 
				
			||||||
	}		
 | 
						}		
 | 
				
			||||||
	if (_stampa80)
 | 
						if (_stampa80)
 | 
				
			||||||
@ -207,26 +207,20 @@ bool TStampaPerEta::preprocess_page(int file, int counter)
 | 
				
			|||||||
	{
 | 
						{
 | 
				
			||||||
		TRectype recsog = current_cursor()->curr();
 | 
							TRectype recsog = current_cursor()->curr();
 | 
				
			||||||
		TString80 nome = recsog.get(SOG_COGNOME);
 | 
							TString80 nome = recsog.get(SOG_COGNOME);
 | 
				
			||||||
		nome << " ";
 | 
							nome << ' ';
 | 
				
			||||||
		nome << recsog.get(SOG_NOME);
 | 
							nome << recsog.get(SOG_NOME);
 | 
				
			||||||
		_cognome_nome = nome;
 | 
							_cognome_nome = nome;
 | 
				
			||||||
		TString256 localita = "";
 | 
							TString256 localita = "";
 | 
				
			||||||
		localita << current_cursor()->curr(-ALIAS_LCP).get("S6");
 | 
							localita = recsog.get(SOG_DOM_CAP);			
 | 
				
			||||||
		if (localita.not_empty() && localita.ok())
 | 
							localita << ' ';
 | 
				
			||||||
 | 
							if (recsog.get(SOG_DOM_CODLOC).not_empty())
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			localita << " ";
 | 
					 | 
				
			||||||
			localita << current_cursor()->curr(-ALIAS_LCP).get("S0");
 | 
								localita << current_cursor()->curr(-ALIAS_LCP).get("S0");
 | 
				
			||||||
			localita << " - ";		
 | 
								localita << " - ";		
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			localita = current_cursor()->curr(LF_COMUNI).get(COM_CAPCOM);
 | 
					 | 
				
			||||||
			localita << " ";
 | 
					 | 
				
			||||||
		}			
 | 
					 | 
				
			||||||
		localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM);
 | 
							localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM);
 | 
				
			||||||
		localita.trim();
 | 
							localita.trim();
 | 
				
			||||||
		_dencom = localita;
 | 
							_dencom = localita;
 | 
				
			||||||
 | 
					 | 
				
			||||||
		// salto pagina se cambio sezione
 | 
							// salto pagina se cambio sezione
 | 
				
			||||||
		const TString16 codsez = recsog.get(SOG_CODSEZ);		
 | 
							const TString16 codsez = recsog.get(SOG_CODSEZ);		
 | 
				
			||||||
		const TString16 codsot = recsog.get(SOG_CODSOT);		
 | 
							const TString16 codsot = recsog.get(SOG_CODSOT);		
 | 
				
			||||||
 | 
				
			|||||||
@ -171,19 +171,14 @@ bool TStampaModificati::preprocess_page(int file, int counter)
 | 
				
			|||||||
		nome << recsog.get(SOG_NOME);
 | 
							nome << recsog.get(SOG_NOME);
 | 
				
			||||||
		_cognome_nome = nome;
 | 
							_cognome_nome = nome;
 | 
				
			||||||
		TString256 localita = "";
 | 
							TString256 localita = "";
 | 
				
			||||||
		localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S6");
 | 
							localita = recsog.get(SOG_DOM_CAP);			
 | 
				
			||||||
		if (localita.not_empty() && localita.ok())
 | 
							localita << ' ';
 | 
				
			||||||
 | 
							if (recsog.get(SOG_DOM_CODLOC).not_empty())
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			localita << " ";
 | 
					 | 
				
			||||||
			localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0");
 | 
								localita << current_cursor()->curr(-ALIAS_LCPDOM).get("S0");
 | 
				
			||||||
			localita << " - ";		
 | 
								localita << " - ";		
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		else
 | 
							localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM);
 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			localita = current_cursor()->curr(-ALIAS_COMDOM).get(COM_CAPCOM);
 | 
					 | 
				
			||||||
			localita << " ";
 | 
					 | 
				
			||||||
		}			
 | 
					 | 
				
			||||||
		localita << current_cursor()->curr(-ALIAS_COMDOM).get(COM_DENCOM);
 | 
					 | 
				
			||||||
		localita.trim();
 | 
							localita.trim();
 | 
				
			||||||
		_dencom = localita;
 | 
							_dencom = localita;
 | 
				
			||||||
		// salto pagina se cambio sezione
 | 
							// salto pagina se cambio sezione
 | 
				
			||||||
 | 
				
			|||||||
@ -233,18 +233,13 @@ bool TStampaNonDon::preprocess_page(int file, int counter)
 | 
				
			|||||||
		nome << recsog.get(SOG_NOME);
 | 
							nome << recsog.get(SOG_NOME);
 | 
				
			||||||
		_cognome_nome = nome;
 | 
							_cognome_nome = nome;
 | 
				
			||||||
		TString256 localita = "";     
 | 
							TString256 localita = "";     
 | 
				
			||||||
		localita << current_cursor()->curr(-ALIAS_LCP).get("S6");
 | 
							localita = recsog.get(SOG_DOM_CAP);			
 | 
				
			||||||
		if (localita.not_empty() && localita.ok())
 | 
							localita << ' ';
 | 
				
			||||||
 | 
							if (recsog.get(SOG_DOM_CODLOC).not_empty())
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			localita << " ";
 | 
					 | 
				
			||||||
			localita << current_cursor()->curr(-ALIAS_LCP).get("S0");
 | 
								localita << current_cursor()->curr(-ALIAS_LCP).get("S0");
 | 
				
			||||||
			localita << " - ";		
 | 
								localita << " - ";		
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		else
 | 
					 | 
				
			||||||
		{
 | 
					 | 
				
			||||||
			localita = current_cursor()->curr(LF_COMUNI).get(COM_CAPCOM);
 | 
					 | 
				
			||||||
			localita << " ";
 | 
					 | 
				
			||||||
		}			
 | 
					 | 
				
			||||||
		localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM);
 | 
							localita << current_cursor()->curr(LF_COMUNI).get(COM_DENCOM);
 | 
				
			||||||
		localita.trim();
 | 
							localita.trim();
 | 
				
			||||||
		_dencom = localita;
 | 
							_dencom = localita;
 | 
				
			||||||
@ -255,7 +250,6 @@ bool TStampaNonDon::preprocess_page(int file, int counter)
 | 
				
			|||||||
		if ((_codsez!=codsez)||(_codsot!=codsot))
 | 
							if ((_codsez!=codsez)||(_codsot!=codsot))
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			if (_codsez != "**")
 | 
								if (_codsez != "**")
 | 
				
			||||||
				//printer().formfeed();
 | 
					 | 
				
			||||||
				footer_sezione();
 | 
									footer_sezione();
 | 
				
			||||||
			_codsez = codsez;
 | 
								_codsez = codsez;
 | 
				
			||||||
			_codsot = codsot;
 | 
								_codsot = codsot;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user