Patch level :10.0 382
Files correlati : Ricompilazione Demo : [ ] Commento : Cambiato il modo di calcolare l'avanzamento per Tempo nel bilancio di commessa: adesso si tiene conto della data indicata sulla maschera come data fine calcolo e non più della data fine esercizio (è un caso particolare) Eliminata assurda riga finale sotto i totali generali nel bilancio di commessa 0001417: ca3-2 - manca la parte finale della descrizione commessa, nell'intestazione Descrizione ca3-2 - manca la parte finale della descrizione commessa, nell'intestazione git-svn-id: svn://10.65.10.50/trunk@19129 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
		
							parent
							
								
									85220d735f
								
							
						
					
					
						commit
						f708d71e3c
					
				@ -1,4 +1,4 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8" ?>
 | 
				
			||||||
<report name="ca3300a" orientation="2" lpi="8" command="ca3 -2" class="ca3300b">
 | 
					<report name="ca3300a" orientation="2" lpi="8" command="ca3 -2" class="ca3300b">
 | 
				
			||||||
 <description>Bilancio normale di verifica (raffronto)</description>
 | 
					 <description>Bilancio normale di verifica (raffronto)</description>
 | 
				
			||||||
 <font face="Courier New" size="8" />
 | 
					 <font face="Courier New" size="8" />
 | 
				
			||||||
@ -28,21 +28,21 @@
 | 
				
			|||||||
  <field x="20" y="2" type="Stringa" width="24" pattern="1">
 | 
					  <field x="20" y="2" type="Stringa" width="24" pattern="1">
 | 
				
			||||||
   <source>#COSTO</source>
 | 
					   <source>#COSTO</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="45" y="2" type="Stringa" width="50" pattern="1">
 | 
					  <field x="45" y="2" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#COSTO,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#COSTO,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field y="3" type="Testo" width="20" pattern="1" text="Commessa:" />
 | 
					  <field y="3" type="Testo" width="20" pattern="1" text="Commessa:" />
 | 
				
			||||||
  <field x="20" y="3" type="Stringa" width="24" pattern="1">
 | 
					  <field x="20" y="3" type="Stringa" width="24" pattern="1">
 | 
				
			||||||
   <source>#COMMESSA</source>
 | 
					   <source>#COMMESSA</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="45" y="3" type="Stringa" width="50" pattern="1">
 | 
					  <field x="45" y="3" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field y="4" type="Testo" width="20" pattern="1" text="Fase:" />
 | 
					  <field y="4" type="Testo" width="20" pattern="1" text="Fase:" />
 | 
				
			||||||
  <field x="20" y="4" type="Stringa" width="13" pattern="1">
 | 
					  <field x="20" y="4" type="Stringa" width="13" pattern="1">
 | 
				
			||||||
   <source>#FASE</source>
 | 
					   <source>#FASE</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="45" y="4" type="Stringa" width="50" pattern="1">
 | 
					  <field x="45" y="4" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,FASI,CODCMSFAS=#CMSCDC!CODFASE=#FASE,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,FASI,CODCMSFAS=#CMSCDC!CODFASE=#FASE,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field border="1" y="6" type="Linea" width="168" height="0" pattern="1" />
 | 
					  <field border="1" y="6" type="Linea" width="168" height="0" pattern="1" />
 | 
				
			||||||
 | 
				
			|||||||
@ -28,21 +28,21 @@
 | 
				
			|||||||
  <field x="20" y="2" type="Stringa" width="24" pattern="1">
 | 
					  <field x="20" y="2" type="Stringa" width="24" pattern="1">
 | 
				
			||||||
   <source>#COSTO</source>
 | 
					   <source>#COSTO</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="45" y="2" type="Stringa" width="50" pattern="1">
 | 
					  <field x="45" y="2" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#COSTO,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#COSTO,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field y="3" type="Testo" width="20" pattern="1" text="Commessa:" />
 | 
					  <field y="3" type="Testo" width="20" pattern="1" text="Commessa:" />
 | 
				
			||||||
  <field x="20" y="3" type="Stringa" width="24" pattern="1">
 | 
					  <field x="20" y="3" type="Stringa" width="24" pattern="1">
 | 
				
			||||||
   <source>#COMMESSA</source>
 | 
					   <source>#COMMESSA</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="45" y="3" type="Stringa" width="50" pattern="1">
 | 
					  <field x="45" y="3" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field y="4" type="Testo" width="20" pattern="1" text="Fase:" />
 | 
					  <field y="4" type="Testo" width="20" pattern="1" text="Fase:" />
 | 
				
			||||||
  <field x="20" y="4" type="Stringa" width="13" pattern="1">
 | 
					  <field x="20" y="4" type="Stringa" width="13" pattern="1">
 | 
				
			||||||
   <source>#FASE</source>
 | 
					   <source>#FASE</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="45" y="4" type="Stringa" width="50" pattern="1">
 | 
					  <field x="45" y="4" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,FASI,CODCMSFAS=#CMSCDC!CODFASE=#FASE,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,FASI,CODCMSFAS=#CMSCDC!CODFASE=#FASE,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field border="1" y="6" type="Linea" width="168" height="0" pattern="1" />
 | 
					  <field border="1" y="6" type="Linea" width="168" height="0" pattern="1" />
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8" ?>
 | 
				
			||||||
<report name="ca3300c" orientation="2" lpi="8" command="ca3 -2" class="ca3300d">
 | 
					<report name="ca3300c" orientation="2" lpi="8" command="ca3 -2" class="ca3300d">
 | 
				
			||||||
 <description>Bilancio a sezioni contrapposte (raffronto)</description>
 | 
					 <description>Bilancio a sezioni contrapposte (raffronto)</description>
 | 
				
			||||||
 <font face="Courier New" size="8" />
 | 
					 <font face="Courier New" size="8" />
 | 
				
			||||||
@ -28,22 +28,22 @@
 | 
				
			|||||||
  <field x="21" y="2" type="Stringa" width="24" pattern="1">
 | 
					  <field x="21" y="2" type="Stringa" width="24" pattern="1">
 | 
				
			||||||
   <source>#COSTO</source>
 | 
					   <source>#COSTO</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="46" y="2" type="Stringa" width="50" pattern="1">
 | 
					  <field x="46" y="2" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript>MESSAGE ISAMREAD,CDC,CODCOSTO=#COSTO,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#COSTO,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="1" y="3" type="Testo" width="20" pattern="1" text="Commessa:" />
 | 
					  <field x="1" y="3" type="Testo" width="20" pattern="1" text="Commessa:" />
 | 
				
			||||||
  <field x="21" y="3" type="Stringa" width="24" pattern="1">
 | 
					  <field x="21" y="3" type="Stringa" width="24" pattern="1">
 | 
				
			||||||
   <source>#COMMESSA</source>
 | 
					   <source>#COMMESSA</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="46" y="3" type="Stringa" width="50" pattern="1">
 | 
					  <field x="46" y="3" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript>MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="1" y="4" type="Testo" width="20" pattern="1" text="Fase:" />
 | 
					  <field x="1" y="4" type="Testo" width="20" pattern="1" text="Fase:" />
 | 
				
			||||||
  <field x="21" y="4" type="Stringa" width="13" pattern="1">
 | 
					  <field x="21" y="4" type="Stringa" width="13" pattern="1">
 | 
				
			||||||
   <source>#FASE</source>
 | 
					   <source>#FASE</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="46" y="4" type="Stringa" width="50" pattern="1">
 | 
					  <field x="46" y="4" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript>MESSAGE ISAMREAD,FASI,CODCMSFAS=#CMSCDC!CODFASE=#FASE,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,FASI,CODCMSFAS=#CMSCDC!CODFASE=#FASE,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field border="1" x="1" y="6" type="Linea" width="168" height="0" pattern="1" />
 | 
					  <field border="1" x="1" y="6" type="Linea" width="168" height="0" pattern="1" />
 | 
				
			||||||
 </section>
 | 
					 </section>
 | 
				
			||||||
 | 
				
			|||||||
@ -1,4 +1,4 @@
 | 
				
			|||||||
 | 
					<?xml version="1.0" encoding="UTF-8" ?>
 | 
				
			||||||
<report name="ca3300d" orientation="2" lpi="8" command="ca3 -2" class="ca3300d">
 | 
					<report name="ca3300d" orientation="2" lpi="8" command="ca3 -2" class="ca3300d">
 | 
				
			||||||
 <description>Bilancio a sezioni contrapposte</description>
 | 
					 <description>Bilancio a sezioni contrapposte</description>
 | 
				
			||||||
 <font face="Courier New" size="8" />
 | 
					 <font face="Courier New" size="8" />
 | 
				
			||||||
@ -28,22 +28,22 @@
 | 
				
			|||||||
  <field x="21" y="2" type="Stringa" width="24" pattern="1">
 | 
					  <field x="21" y="2" type="Stringa" width="24" pattern="1">
 | 
				
			||||||
   <source>#COSTO</source>
 | 
					   <source>#COSTO</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="46" y="2" type="Stringa" width="50" pattern="1">
 | 
					  <field x="46" y="2" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript>MESSAGE ISAMREAD,CDC,CODCOSTO=#COSTO,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,CDC,CODCOSTO=#COSTO,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="1" y="3" type="Testo" width="20" pattern="1" text="Commessa:" />
 | 
					  <field x="1" y="3" type="Testo" width="20" pattern="1" text="Commessa:" />
 | 
				
			||||||
  <field x="21" y="3" type="Stringa" width="24" pattern="1">
 | 
					  <field x="21" y="3" type="Stringa" width="24" pattern="1">
 | 
				
			||||||
   <source>#COMMESSA</source>
 | 
					   <source>#COMMESSA</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="46" y="3" type="Stringa" width="50" pattern="1">
 | 
					  <field x="46" y="3" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript>MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="1" y="4" type="Testo" width="20" pattern="1" text="Fase:" />
 | 
					  <field x="1" y="4" type="Testo" width="20" pattern="1" text="Fase:" />
 | 
				
			||||||
  <field x="21" y="4" type="Stringa" width="13" pattern="1">
 | 
					  <field x="21" y="4" type="Stringa" width="13" pattern="1">
 | 
				
			||||||
   <source>#FASE</source>
 | 
					   <source>#FASE</source>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field x="46" y="4" type="Stringa" width="50" pattern="1">
 | 
					  <field x="46" y="4" type="Stringa" width="70" pattern="1">
 | 
				
			||||||
   <prescript>MESSAGE ISAMREAD,FASI,CODCMSFAS=#CMSCDC!CODFASE=#FASE,DESCRIZ</prescript>
 | 
					   <prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,FASI,CODCMSFAS=#CMSCDC!CODFASE=#FASE,DESCRIZ</prescript>
 | 
				
			||||||
  </field>
 | 
					  </field>
 | 
				
			||||||
  <field border="1" x="1" y="6" type="Linea" width="168" height="0" pattern="1" />
 | 
					  <field border="1" x="1" y="6" type="Linea" width="168" height="0" pattern="1" />
 | 
				
			||||||
 </section>
 | 
					 </section>
 | 
				
			||||||
 | 
				
			|||||||
@ -278,12 +278,12 @@ void TCRPA_report::offset_and_fill_columns(TReport_section& rep_sect, const TStr
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
          //sub_new_field e' il campo SOTTO il new_field che appare solo nei totali di sezione 1 (F1)
 | 
					          //sub_new_field e' il campo SOTTO il new_field che appare solo nei totali di sezione 1 (F1)
 | 
				
			||||||
          //e' il campo che va nella riga delle Differenze
 | 
					          //e' il campo che va nella riga delle Differenze
 | 
				
			||||||
          TReport_field* sub_new_field = (TReport_field*)new_field->dup();
 | 
					          /*TReport_field* sub_new_field = (TReport_field*)new_field->dup();
 | 
				
			||||||
 			    rep_sect.add(sub_new_field);
 | 
					 			    rep_sect.add(sub_new_field);
 | 
				
			||||||
          sub_new_field->offset(TPoint(0, 250));
 | 
					          sub_new_field->offset(TPoint(0, 250));
 | 
				
			||||||
          sub_new_field->set_id(new_field->id() + 200);
 | 
					          sub_new_field->set_id(new_field->id() + 200);
 | 
				
			||||||
          sub_new_field->set_groups("90");
 | 
					          sub_new_field->set_groups("90");
 | 
				
			||||||
          sub_new_field->set_prescript("");
 | 
					          sub_new_field->set_prescript("");*/
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
          break;
 | 
					          break;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
@ -376,16 +376,14 @@ real TPrint_saldana_recordset::calcola_avanzamento_tempo() const
 | 
				
			|||||||
    ca_durata_commessa(rec_commesse, dataini, datafine);
 | 
					    ca_durata_commessa(rec_commesse, dataini, datafine);
 | 
				
			||||||
  }
 | 
					  }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	//Si prende SOLO la Fine Esercizio come riferimento di avanzamento (in realta' si..
 | 
						//Si prende la data fine (detta _datacalcolo) perchè si vuole la situazione alla data (eventualmente tale data è..
 | 
				
			||||||
	//..potrebbe usare today al posto di datafinesc se si volesse la situazione ad oggi,..
 | 
						//..la fine dell'esercizio)
 | 
				
			||||||
	//..ma i calcoli degli importi sarebbero da rivedere). Quindi:
 | 
						if (datafine < _datacalcolo)
 | 
				
			||||||
	//se la commessa finisce prima della fine dell'esercizio 
 | 
					 | 
				
			||||||
	if (datafine < datafinesc)
 | 
					 | 
				
			||||||
		avanzamento = CENTO;
 | 
							avanzamento = CENTO;
 | 
				
			||||||
	//se invece prosegue anche dopo la fine dell'esercizio...
 | 
						//se invece prosegue anche dopo la data di fine...
 | 
				
			||||||
	else
 | 
						else
 | 
				
			||||||
	{
 | 
						{
 | 
				
			||||||
		const long time_gone = datafinesc - dataini;
 | 
							const long time_gone = _datacalcolo - dataini;
 | 
				
			||||||
		const long durata = datafine - dataini;
 | 
							const long durata = datafine - dataini;
 | 
				
			||||||
		avanzamento = ((real)(time_gone * CENTO) / durata);
 | 
							avanzamento = ((real)(time_gone * CENTO) / durata);
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user