Patch level :2.2 176
Files correlati :ca3.exe ca3700a.rep Ricompilazione Demo : [ ] Commento :aggiunte fantastiche features alla stampa rendiconto! Del tipo: totali per indbil di conto, budget senza righe movimento ed altre amenità! Il tutto per la felicità dello zio adolfo.. git-svn-id: svn://10.65.10.50/trunk@13340 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									2aaf0db4cf
								
							
						
					
					
						commit
						c62c3fd8d4
					
				
							
								
								
									
										126
									
								
								ca/ca3700.cpp
									
									
									
									
									
								
							
							
						
						
									
										126
									
								
								ca/ca3700.cpp
									
									
									
									
									
								
							@ -264,7 +264,7 @@ protected:
 | 
				
			|||||||
	void crea_righe_da_rdoc(const TPrint_rendiconto_ca_mask& msk);
 | 
						void crea_righe_da_rdoc(const TPrint_rendiconto_ca_mask& msk);
 | 
				
			||||||
	void crea_trr(const TFilename& trr) const;
 | 
						void crea_trr(const TFilename& trr) const;
 | 
				
			||||||
	void scrive_riga(const TRectype& rmovana, const TRectype& movana, const TDocumento* doc);
 | 
						void scrive_riga(const TRectype& rmovana, const TRectype& movana, const TDocumento* doc);
 | 
				
			||||||
	real somma_budget(const TString& codconto, const char* tipomovana);
 | 
						real get_budget(const TString& conto, char tipo) const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
public:
 | 
					public:
 | 
				
			||||||
@ -320,53 +320,42 @@ void TPrint_rendiconto_ca_recordset::set_custom_filter(TCursor& cur) const
 | 
				
			|||||||
  myself = (TPrint_rendiconto_ca_recordset*)this;
 | 
					  myself = (TPrint_rendiconto_ca_recordset*)this;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//metodo per il calcolo del budget PREVENTIVO o VARIAZIONE (sezione di raggruppamento sul report)
 | 
					//sconvolgente metodo per la normalizzazione dei conti
 | 
				
			||||||
real TPrint_rendiconto_ca_recordset::somma_budget(const TString& codconto, const char* tipomovana)
 | 
					real TPrint_rendiconto_ca_recordset::get_budget(const TString& conto, char tipo) const
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	real budget = ZERO;
 | 
						//data del cazzo che però serve per costruire il conto analitico
 | 
				
			||||||
 | 
						const TDate null_date;
 | 
				
			||||||
	TRelation rel_rmovana(LF_RMOVANA);
 | 
						//ecco il conto analitico...
 | 
				
			||||||
	rel_rmovana.add(LF_MOVANA, "NUMREG==NUMREG");
 | 
						TAnal_bill zio(conto, _codcosto, _codcms, _codfas);
 | 
				
			||||||
 | 
						//..adesso si necessita del saldo del conto analitico appena creato..
 | 
				
			||||||
	//..crea un cursore su rmovana per avere solo i conti di tipo tipomovana, con il codice conto
 | 
						word tipo_movimento = 0;
 | 
				
			||||||
	//selezionato e la datacomp compresa nell'intervallo date
 | 
						switch (tipo)
 | 
				
			||||||
	TRectype da_rmovana(LF_RMOVANA);
 | 
					 | 
				
			||||||
	TRectype a_rmovana(LF_RMOVANA);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	da_rmovana.put(RMOVANA_CODCONTO, codconto);
 | 
					 | 
				
			||||||
	a_rmovana.put(RMOVANA_CODCONTO, codconto);
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	TString filtro;
 | 
					 | 
				
			||||||
	if (_dadata.ok())
 | 
					 | 
				
			||||||
		filtro << "(ANSI(DATACOMP)>=" << _dadata << ")";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (_adata.ok())
 | 
					 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		if (filtro.not_empty())
 | 
							case 'P': tipo_movimento |= _saldanal_preventivo; break;
 | 
				
			||||||
			filtro << "&&";
 | 
							case 'V': tipo_movimento |= _saldanal_variazione; break;
 | 
				
			||||||
		filtro << "(ANSI(DATACOMP)<=" << _adata << ")";
 | 
							default: tipo_movimento |= _saldanal_consuntivo;	break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		if (filtro.not_empty())
 | 
						if (_riclassificato)
 | 
				
			||||||
			filtro << "&&";
 | 
							tipo_movimento |= _saldanal_riclassify;
 | 
				
			||||||
		filtro << "(107->TIPOMOV==\"" << tipomovana << "\")";
 | 
						//..ecco quindi il saldo..
 | 
				
			||||||
 | 
						const TSaldanal& saldo = ca_saldo(zio, null_date, null_date, tipo_movimento);
 | 
				
			||||||
	TCursor cur_rmovana(&rel_rmovana, filtro, 2, &da_rmovana, &a_rmovana);
 | 
						//..che deve essere normalizzato in base alla sua sezione ed all'indicatore di bilancio del conto
 | 
				
			||||||
	const long rmovana_items = cur_rmovana.items();
 | 
						TImporto imp = saldo._fin;
 | 
				
			||||||
	cur_rmovana.freeze();
 | 
						switch (zio.indicatore_bilancio())
 | 
				
			||||||
 | 
					 | 
				
			||||||
	if (rmovana_items > 0)
 | 
					 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		const TRectype& movana = rel_rmovana.curr(LF_MOVANA);
 | 
							case 1:
 | 
				
			||||||
		for (cur_rmovana = 0; cur_rmovana.pos() < rmovana_items; ++cur_rmovana)
 | 
							case 3:
 | 
				
			||||||
		{
 | 
								imp.normalize('D');
 | 
				
			||||||
			if (movana.get_char(MOVANA_SEZIONE) == 'D')
 | 
								break;
 | 
				
			||||||
				budget -= movana.get_real(MOVANA_TOTDOC);
 | 
							case 2:
 | 
				
			||||||
			if (movana.get_char(MOVANA_SEZIONE) == 'A')
 | 
							case 4:
 | 
				
			||||||
				budget += movana.get_real(MOVANA_TOTDOC);
 | 
								imp.normalize('A');
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
 | 
							default:
 | 
				
			||||||
 | 
								break;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	}
 | 
						return imp.valore();
 | 
				
			||||||
	return budget;
 | 
					 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const TVariant& TPrint_rendiconto_ca_recordset::get(const char* column_name) const
 | 
					const TVariant& TPrint_rendiconto_ca_recordset::get(const char* column_name) const
 | 
				
			||||||
@ -410,29 +399,23 @@ const TVariant& TPrint_rendiconto_ca_recordset::get(const char* column_name) con
 | 
				
			|||||||
				var = _a_conto_riclas;
 | 
									var = _a_conto_riclas;
 | 
				
			||||||
			return var;
 | 
								return var;
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
 | 
							if (strcmp(column_name, "#INDBIL") == 0)
 | 
				
			||||||
 | 
							{
 | 
				
			||||||
 | 
								const TString& conto = TISAM_recordset::get("CONTO").as_string();
 | 
				
			||||||
 | 
								TAnal_bill zio(conto);
 | 
				
			||||||
 | 
								return get_tmp_var() = (long)zio.indicatore_bilancio();
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
		if (strcmp(column_name, "#PREVENTIVO") == 0)
 | 
							if (strcmp(column_name, "#PREVENTIVO") == 0)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			TVariant& var = get_tmp_var();
 | 
								//prende il conto
 | 
				
			||||||
			TString80 conto;
 | 
								const TString& conto = TISAM_recordset::get("CONTO").as_string();
 | 
				
			||||||
			if (_riclassificato)
 | 
								return get_tmp_var() = get_budget(conto, 'P');
 | 
				
			||||||
				conto = TISAM_recordset::get("CONTOCG").as_string();
 | 
					 | 
				
			||||||
			else
 | 
					 | 
				
			||||||
				conto = TISAM_recordset::get("CONTO").as_string();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			var = myself->somma_budget(conto, "P");
 | 
					 | 
				
			||||||
			return var;
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if (strcmp(column_name, "#VARIAZIONE") == 0)
 | 
							if (strcmp(column_name, "#VARIAZIONE") == 0)
 | 
				
			||||||
		{
 | 
							{
 | 
				
			||||||
			TVariant& var = get_tmp_var();
 | 
								//prende il conto
 | 
				
			||||||
			TString80 conto;
 | 
								const TString& conto = TISAM_recordset::get("CONTO").as_string();
 | 
				
			||||||
			if (_riclassificato)
 | 
								return get_tmp_var() = get_budget(conto, 'V');
 | 
				
			||||||
				conto = TISAM_recordset::get("CONTOCG").as_string();
 | 
					 | 
				
			||||||
			else
 | 
					 | 
				
			||||||
				conto = TISAM_recordset::get("CONTO").as_string();
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
			var = myself->somma_budget(conto, "V");
 | 
					 | 
				
			||||||
			return var;
 | 
					 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
  return TISAM_recordset::get(column_name);
 | 
					  return TISAM_recordset::get(column_name);
 | 
				
			||||||
@ -441,10 +424,7 @@ const TVariant& TPrint_rendiconto_ca_recordset::get(const char* column_name) con
 | 
				
			|||||||
//compila i campi da stampare
 | 
					//compila i campi da stampare
 | 
				
			||||||
void TPrint_rendiconto_ca_recordset::scrive_riga(const TRectype& rmovana, const TRectype& movana, const TDocumento* doc)
 | 
					void TPrint_rendiconto_ca_recordset::scrive_riga(const TRectype& rmovana, const TRectype& movana, const TDocumento* doc)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
	//tipo movimento CONSUNTIVO
 | 
					
 | 
				
			||||||
	const char tipomov = movana.get_char(MOVANA_TIPOMOV);
 | 
					 | 
				
			||||||
	if (tipomov <= ' ' || tipomov == 'T')
 | 
					 | 
				
			||||||
	{
 | 
					 | 
				
			||||||
	TRectype& tmpcurr = _tmp->curr();
 | 
						TRectype& tmpcurr = _tmp->curr();
 | 
				
			||||||
	tmpcurr.zero();
 | 
						tmpcurr.zero();
 | 
				
			||||||
	TString8 codnum_desc;	//codnum da usare sia per compilare il campo "CODNUM"
 | 
						TString8 codnum_desc;	//codnum da usare sia per compilare il campo "CODNUM"
 | 
				
			||||||
@ -519,6 +499,11 @@ void TPrint_rendiconto_ca_recordset::scrive_riga(const TRectype& rmovana, const
 | 
				
			|||||||
	//in ogni caso riempio il campo conto_cg
 | 
						//in ogni caso riempio il campo conto_cg
 | 
				
			||||||
	tmpcurr.put("CONTOCG", rmovana.get(RMOVANA_CODCONTO));	//conto_cg
 | 
						tmpcurr.put("CONTOCG", rmovana.get(RMOVANA_CODCONTO));	//conto_cg
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								//tipo movimento CONSUNTIVO
 | 
				
			||||||
 | 
						const char tipomov = movana.get_char(MOVANA_TIPOMOV);
 | 
				
			||||||
 | 
						if (tipomov <= ' ' || tipomov == 'T')
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		//serve un documento da cui ricavare i parametri di stampa
 | 
							//serve un documento da cui ricavare i parametri di stampa
 | 
				
			||||||
		TDocumento* newdoc = (TDocumento*)doc;
 | 
							TDocumento* newdoc = (TDocumento*)doc;
 | 
				
			||||||
		bool should_delete = false;
 | 
							bool should_delete = false;
 | 
				
			||||||
@ -680,11 +665,17 @@ F=IMF*/
 | 
				
			|||||||
			error_box (msg);
 | 
								error_box (msg);
 | 
				
			||||||
		}*/
 | 
							}*/
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		_tmp->write();
 | 
					 | 
				
			||||||
  	
 | 
					 | 
				
			||||||
		if (should_delete)
 | 
							if (should_delete)
 | 
				
			||||||
	  	delete newdoc;
 | 
						  	delete newdoc;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	} //if (tipomov == ..)
 | 
						} //if (tipomov == ..)
 | 
				
			||||||
 | 
						else
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							tmpcurr.put("HIDDEN", "X");
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						_tmp->write();
 | 
				
			||||||
 | 
					  		
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
//scanning delle righe dei movimenti di analitica
 | 
					//scanning delle righe dei movimenti di analitica
 | 
				
			||||||
@ -908,7 +899,7 @@ void TPrint_rendiconto_ca_recordset::crea_trr(const TFilename& trr) const
 | 
				
			|||||||
{
 | 
					{
 | 
				
			||||||
	ofstream of(trr);
 | 
						ofstream of(trr);
 | 
				
			||||||
	of << 1000 << endl;
 | 
						of << 1000 << endl;
 | 
				
			||||||
	of << 16 << endl;
 | 
						of << 17 << endl;
 | 
				
			||||||
	of << "CONTO|1|20|0|Conto analitico" << endl;
 | 
						of << "CONTO|1|20|0|Conto analitico" << endl;
 | 
				
			||||||
	of << "CODNUM|1|4|0|Numerazione documento" << endl;
 | 
						of << "CODNUM|1|4|0|Numerazione documento" << endl;
 | 
				
			||||||
	of << "DATA|5|8|0|Data movimento o documento" << endl;
 | 
						of << "DATA|5|8|0|Data movimento o documento" << endl;
 | 
				
			||||||
@ -925,6 +916,7 @@ void TPrint_rendiconto_ca_recordset::crea_trr(const TFilename& trr) const
 | 
				
			|||||||
	of << "MATURATO|4|18|5|Maturato" << endl;
 | 
						of << "MATURATO|4|18|5|Maturato" << endl;
 | 
				
			||||||
	of << "IMPEGNATO|4|18|5|Impegnato" << endl;
 | 
						of << "IMPEGNATO|4|18|5|Impegnato" << endl;
 | 
				
			||||||
	of << "CONTOCG|1|12|0|Conto contabile" << endl;
 | 
						of << "CONTOCG|1|12|0|Conto contabile" << endl;
 | 
				
			||||||
 | 
						of << "HIDDEN|8|1|0|Record nascosto" << endl;
 | 
				
			||||||
	of << 1 << endl;
 | 
						of << 1 << endl;
 | 
				
			||||||
	of << "CONTO+CODNUM+DATA+NUMRD+NRIGA" << endl;
 | 
						of << "CONTO+CODNUM+DATA+NUMRD+NRIGA" << endl;
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
@ -146,19 +146,32 @@ MESSAGE RESET,F2.103</prescript>
 | 
				
			|||||||
   <font italic="1" face="Courier New" bold="1" size="8" />
 | 
					   <font italic="1" face="Courier New" bold="1" size="8" />
 | 
				
			||||||
   <prescript description="H2.0 PRESCRIPT">MESSAGE ISAMREAD,PCONANA,CODCONTO=CONTO,DESCR</prescript>
 | 
					   <prescript description="H2.0 PRESCRIPT">MESSAGE ISAMREAD,PCONANA,CODCONTO=CONTO,DESCR</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="74" y="0.5" type="Testo" align="right" bg_color="#C0C0C0" width="51" text="Budget E;E;E;">
 | 
					  <field x="74" y="0.5" type="Testo" align="right" bg_color="#C0C0C0" width="66" text="Budget E;E;E;">
 | 
				
			||||||
   <font face="Courier New" bold="1" size="8" />
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="125" y="0.5" type="Valuta" align="right" bg_color="#C0C0C0" width="15" id="101" hide_zero="1" text="###.###.###,@@">
 | 
					 | 
				
			||||||
   <font italic="1" face="Courier New" bold="1" size="8" />
 | 
					 | 
				
			||||||
  </field>
 | 
					 | 
				
			||||||
  <field x="140" y="0.5" type="Valuta" align="right" bg_color="#C0C0C0" width="15" id="102" hide_zero="1" text="###.###.###,@@">
 | 
					  <field x="140" y="0.5" type="Valuta" align="right" bg_color="#C0C0C0" width="15" id="102" hide_zero="1" text="###.###.###,@@">
 | 
				
			||||||
   <font italic="1" face="Courier New" bold="1" size="8" />
 | 
					   <font italic="1" face="Courier New" bold="1" size="8" />
 | 
				
			||||||
   <source>#VARIAZIONE</source>
 | 
					   <source>#VARIAZIONE</source>
 | 
				
			||||||
 | 
					   <postscript description="H2.102 POSTSCRIPT">#THIS @  \ prende il proprio valore
 | 
				
			||||||
 | 
					"F1."  \ decide il campo destinazione in base al valore di INDBIL,che gli viene passato dal programma..
 | 
				
			||||||
 | 
					300  \ ..i campi della somma vanno da 301 a 304 in base a valore INDBIL (che varia da 1 a 4)
 | 
				
			||||||
 | 
					#INDBIL @
 | 
				
			||||||
 | 
					+  \ somma valore INDBIL a 300
 | 
				
			||||||
 | 
					+  \ somma F1. a valore INDBIL
 | 
				
			||||||
 | 
					+!  \ esegue la ADD sul campo di destinazione
 | 
				
			||||||
 | 
					</postscript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="155" y="0.5" type="Valuta" align="right" bg_color="#C0C0C0" width="15" id="103" hide_zero="1" text="###.###.###,@@">
 | 
					  <field x="155" y="0.5" type="Valuta" align="right" bg_color="#C0C0C0" width="15" id="103" hide_zero="1" text="###.###.###,@@">
 | 
				
			||||||
   <font italic="1" face="Courier New" bold="1" size="8" />
 | 
					   <font italic="1" face="Courier New" bold="1" size="8" />
 | 
				
			||||||
   <source>#PREVENTIVO</source>
 | 
					   <source>#PREVENTIVO</source>
 | 
				
			||||||
 | 
					   <postscript description="H2.103 POSTSCRIPT">#THIS @  \ prende il proprio valore
 | 
				
			||||||
 | 
					"F1."  \ decide il campo destinazione in base al valore di INDBIL,che gli viene passato dal programma..
 | 
				
			||||||
 | 
					300  \ ..i campi della somma vanno da 301 a 304 in base a valore INDBIL (che varia da 1 a 4)
 | 
				
			||||||
 | 
					#INDBIL @
 | 
				
			||||||
 | 
					+  \ somma valore INDBIL a 300
 | 
				
			||||||
 | 
					+  \ somma F1. a valore INDBIL
 | 
				
			||||||
 | 
					+!  \ esegue la ADD sul campo di destinazione
 | 
				
			||||||
 | 
					</postscript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
 </section>
 | 
					 </section>
 | 
				
			||||||
 <section type="Head" level="3">
 | 
					 <section type="Head" level="3">
 | 
				
			||||||
@ -175,6 +188,7 @@ MESSAGE RESET,F2.103</prescript>
 | 
				
			|||||||
 </section>
 | 
					 </section>
 | 
				
			||||||
 <section type="Body" />
 | 
					 <section type="Body" />
 | 
				
			||||||
 <section type="Body" level="1">
 | 
					 <section type="Body" level="1">
 | 
				
			||||||
 | 
					  <condition>HIDDEN!='X'</condition>
 | 
				
			||||||
  <field x="19" type="Numero" align="right" width="7" pattern="1" hide_zero="1">
 | 
					  <field x="19" type="Numero" align="right" width="7" pattern="1" hide_zero="1">
 | 
				
			||||||
   <source>NUMREG</source>
 | 
					   <source>NUMREG</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
@ -244,7 +258,60 @@ MESSAGE RESET,F2.103</prescript>
 | 
				
			|||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
 </section>
 | 
					 </section>
 | 
				
			||||||
 <section type="Foot" />
 | 
					 <section type="Foot" />
 | 
				
			||||||
 <section type="Foot" level="1" />
 | 
					 <section type="Foot" level="1">
 | 
				
			||||||
 | 
					  <field border="2" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
 | 
				
			||||||
 | 
					  <field x="133" y="1" type="Testo" width="25" pattern="1" text="BUDGET DI ATTIVITA' E;E;E;">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="133" y="2.5" type="Testo" width="25" pattern="1" text="BUDGET DI PASSIVITA' E;E;E;">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="133" y="4" type="Testo" width="25" pattern="1" text="BUDGET DI SPESA E;E;E;">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="133" y="5.5" type="Testo" width="25" pattern="1" text="BUDGET DI RICAVO E;E;E;">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="90" y="7" type="Testo" width="42" pattern="1" text="TOTALE FATTURATO, MATURATO, IMPEGNATO E;E;E;">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="90" y="8.5" type="Testo" width="42" pattern="1" text="TOTALE DA FATTURARE, MATURARE, IMPEGNARE E;E;E;">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="132" y="7" type="Valuta" align="right" width="12" id="101" pattern="1" text="###.###.###,@@">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="145" y="7" type="Valuta" align="right" width="12" id="102" pattern="1" text="###.###.###,@@">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="158" y="7" type="Valuta" align="right" width="12" id="103" pattern="1" text="###.###.###,@@">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="132" y="8.5" type="Valuta" align="right" width="12" id="201" pattern="1" text="###.###.###,@@">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					   <source>#103-#101</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="145" y="8.5" type="Valuta" align="right" width="12" id="202" pattern="1" text="###.###.###,@@">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					   <source>#103-#102</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="158" y="8.5" type="Valuta" align="right" width="12" id="203" pattern="1" text="###.###.###,@@">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					   <source>#F1.111-#103</source>
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="158" y="1" type="Valuta" align="right" width="12" id="301" pattern="1" hide_zero="1" text="###.###.###,@@">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="158" y="2.5" type="Valuta" align="right" width="12" id="302" pattern="1" hide_zero="1" text="###.###.###,@@">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="158" y="4" type="Valuta" align="right" width="12" id="303" pattern="1" hide_zero="1" text="###.###.###,@@">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					  <field x="158" y="5.5" type="Valuta" align="right" width="12" id="304" pattern="1" hide_zero="1" text="###.###.###,@@">
 | 
				
			||||||
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					  </field>
 | 
				
			||||||
 | 
					 </section>
 | 
				
			||||||
 <section type="Foot" level="2" height="4">
 | 
					 <section type="Foot" level="2" height="4">
 | 
				
			||||||
  <field border="1" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
 | 
					  <field border="1" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
 | 
				
			||||||
  <field x="90" y="1" type="Testo" width="42" pattern="1" text="Totale fatturato, maturato, impegnato E;E;E;">
 | 
					  <field x="90" y="1" type="Testo" width="42" pattern="1" text="Totale fatturato, maturato, impegnato E;E;E;">
 | 
				
			||||||
@ -255,12 +322,15 @@ MESSAGE RESET,F2.103</prescript>
 | 
				
			|||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="132" y="1" type="Valuta" align="right" width="12" id="101" pattern="1" text="###.###.###,@@">
 | 
					  <field x="132" y="1" type="Valuta" align="right" width="12" id="101" pattern="1" text="###.###.###,@@">
 | 
				
			||||||
   <font face="Courier New" bold="1" size="8" />
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					   <postscript description="F2.101 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="145" y="1" type="Valuta" align="right" width="12" id="102" pattern="1" text="###.###.###,@@">
 | 
					  <field x="145" y="1" type="Valuta" align="right" width="12" id="102" pattern="1" text="###.###.###,@@">
 | 
				
			||||||
   <font face="Courier New" bold="1" size="8" />
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					   <postscript description="F2.102 POSTSCRIPT">MESSAGE ADD,F1.102</postscript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="158" y="1" type="Valuta" align="right" width="12" id="103" pattern="1" text="###.###.###,@@">
 | 
					  <field x="158" y="1" type="Valuta" align="right" width="12" id="103" pattern="1" text="###.###.###,@@">
 | 
				
			||||||
   <font face="Courier New" bold="1" size="8" />
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
					   <postscript description="F2.103 POSTSCRIPT">MESSAGE ADD,F1.103</postscript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="132" y="2.5" type="Valuta" align="right" width="12" id="201" pattern="1" text="###.###.###,@@">
 | 
					  <field x="132" y="2.5" type="Valuta" align="right" width="12" id="201" pattern="1" text="###.###.###,@@">
 | 
				
			||||||
   <font face="Courier New" bold="1" size="8" />
 | 
					   <font face="Courier New" bold="1" size="8" />
 | 
				
			||||||
 | 
				
			|||||||
@ -459,6 +459,22 @@ void TAnal_bill::reset()
 | 
				
			|||||||
  _conto = _costo = _commessa = _fase = "";
 | 
					  _conto = _costo = _commessa = _fase = "";
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					int TAnal_bill::indicatore_bilancio() const
 | 
				
			||||||
 | 
					{
 | 
				
			||||||
 | 
						int indbil = 0;
 | 
				
			||||||
 | 
						const TMultilevel_code_info& info = ca_multilevel_code_info(LF_PCONANA);
 | 
				
			||||||
 | 
						TString80 conto = _conto;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						for (int i = info.levels() - 1; i >= 0 && indbil <= 0; i--)
 | 
				
			||||||
 | 
						{
 | 
				
			||||||
 | 
							const int len = info.total_len(i);
 | 
				
			||||||
 | 
							conto.cut(len);
 | 
				
			||||||
 | 
							indbil = atoi(cache().get(LF_PCONANA, conto, PCONANA_INDBIL));
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						return indbil;
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
bool TAnal_bill::get(const TRectype& rec)
 | 
					bool TAnal_bill::get(const TRectype& rec)
 | 
				
			||||||
{
 | 
					{
 | 
				
			||||||
  bool ok = true;
 | 
					  bool ok = true;
 | 
				
			||||||
 | 
				
			|||||||
@ -32,6 +32,7 @@ public:
 | 
				
			|||||||
  const TString& commessa() const;
 | 
					  const TString& commessa() const;
 | 
				
			||||||
  const TString& fase() const;
 | 
					  const TString& fase() const;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						int indicatore_bilancio() const; 
 | 
				
			||||||
  bool get(const TRectype& rec);
 | 
					  bool get(const TRectype& rec);
 | 
				
			||||||
  void reset();
 | 
					  void reset();
 | 
				
			||||||
 | 
					
 | 
				
			||||||
@ -39,7 +40,7 @@ public:
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
  TAnal_bill();
 | 
					  TAnal_bill();
 | 
				
			||||||
  TAnal_bill(const TAnal_bill& bill);
 | 
					  TAnal_bill(const TAnal_bill& bill);
 | 
				
			||||||
  TAnal_bill(const char* conto, const char* costo, const char* commessa, const char* fase);
 | 
					  TAnal_bill(const char* conto, const char* costo = "", const char* commessa = "", const char* fase = "");
 | 
				
			||||||
  TAnal_bill(const TRectype& rec);
 | 
					  TAnal_bill(const TRectype& rec);
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user