Patch level :4.0
Files correlati : Ricompilazione Demo : [ ] Commento :aggiunta la percentuale di avanzamento della commessa git-svn-id: svn://10.65.10.50/trunk@14185 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5e45e786ac
commit
450707883d
@ -304,7 +304,7 @@ void TPrint_bilancio_cms_recordset::aggiorna_importo(TAssoc_array* riga_array,
|
||||
const char sezione = indbil == 3 ? 'D' : 'A';
|
||||
TImporto imp(sezione, real(*str_imp));
|
||||
|
||||
/*
|
||||
/****questo e' il pezzo corretto
|
||||
const TImporto imp_saldop(saldana.get(SALDANA_SEZIONEP).as_string()[0],
|
||||
saldana.get(SALDANA_SALDOP).as_real());
|
||||
const TImporto imp_saldov(saldana.get(SALDANA_SEZIONEV).as_string()[0],
|
||||
@ -313,6 +313,7 @@ void TPrint_bilancio_cms_recordset::aggiorna_importo(TAssoc_array* riga_array,
|
||||
imp += imp_saldop;
|
||||
imp += imp_saldov;
|
||||
*/
|
||||
//***questo serve per stampare qualcosa quando non ci sono saldop e saldov
|
||||
const TImporto imp_saldo(saldana.get(SALDANA_SEZIONE).as_string()[0],
|
||||
saldana.get(SALDANA_SALDO).as_real());
|
||||
imp += imp_saldo;
|
||||
@ -369,6 +370,23 @@ void TPrint_bilancio_cms_recordset::requery()
|
||||
if (dataini >= datainiesc)
|
||||
indice++;
|
||||
|
||||
//Calcola lo stato di avanzamento della commessa
|
||||
real avanzamento;
|
||||
//Si prende SOLO la Fine Esercizio come riferimento di avanzamento (in realta' si..
|
||||
//..potrebbe usare today al posto di datafinesc se si volesse la situazione ad oggi,..
|
||||
//..ma i calcoli degli importi sarebbero da rivedere). Quindi:
|
||||
//se la commessa finisce prima della fine dell'esercizio
|
||||
if (datafine < datafinesc)
|
||||
avanzamento = CENTO;
|
||||
//se invece prosegue anche dopo la fine dell'esercizio...
|
||||
else
|
||||
{
|
||||
const long time_gone = datafinesc - dataini;
|
||||
const long durata_cms = datafine - dataini;
|
||||
avanzamento = ((real)(time_gone * CENTO) / durata_cms);
|
||||
avanzamento.round(0);
|
||||
}
|
||||
|
||||
TString80 chiave = codcms;
|
||||
if (_use_fasi)
|
||||
chiave << '|' << fase;
|
||||
@ -387,6 +405,8 @@ void TPrint_bilancio_cms_recordset::requery()
|
||||
riga_array->add("CODCMS", codcms);
|
||||
riga_array->add("FASE", fase);
|
||||
riga_array->add("DESCRIZ", rec_commesse.get(COMMESSE_DESCRIZ));
|
||||
const TString str_avanz = avanzamento.string();
|
||||
riga_array->add("AVANZAMENTO", str_avanz);
|
||||
|
||||
//aggiunge la riga all'array-ino
|
||||
cms[indice].add(chiave, riga_array);
|
||||
|
@ -20,29 +20,29 @@
|
||||
<field x="130" y="1.75" type="Testo" width="28" pattern="1" text="Stima avanzamento TEMPO" />
|
||||
<field x="160" y="2.25" type="Testo" width="10" pattern="1" text="Margine" />
|
||||
<field x="80" y="2.75" type="Testo" align="center" width="60" pattern="1" text="Costi" />
|
||||
<field x="160" y="3.25" type="Testo" width="10" pattern="1" text=" Contribuz.
|
||||
" />
|
||||
<field x="160" y="3.25" type="Testo" width="10" pattern="1" text=" Contribuz. " />
|
||||
<field x="54.5" y="3.75" type="Testo" width="6" pattern="1" text="% Av." />
|
||||
<field x="70" y="3.75" type="Testo" width="8" pattern="1" text="Ricavi" />
|
||||
<field border="1" x="1" y="4.75" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="1" y="3.5" type="Testo" width="15" id="121" pattern="1" text="Commessa" />
|
||||
</section>
|
||||
<section type="Head" level="1" height="6">
|
||||
<section type="Head" level="1" height="5">
|
||||
<field border="1" radius="100" x="1" type="Testo" valign="center" align="center" shade_offset="25" width="167" height="2.5" text="BILANCIO DI COMMESSA PER ESERCIZIO">
|
||||
<font face="Courier New" bold="1" size="16" />
|
||||
</field>
|
||||
<field x="1" y="3.25" type="Testo" width="12" pattern="1" text="Esercizio">
|
||||
<field x="1" y="3" type="Testo" width="12" pattern="1" text="Esercizio">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
</field>
|
||||
<field x="13" y="3.25" type="Numero" align="right" width="5" pattern="1">
|
||||
<field x="13" y="3" type="Numero" align="right" width="5" pattern="1">
|
||||
<font face="Courier New" bold="1" size="10" />
|
||||
<source>ANNO</source>
|
||||
</field>
|
||||
<field border="2" x="1" y="5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field border="2" x="1" y="4.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
</section>
|
||||
<section type="Head" level="2" height="2" page_break="1">
|
||||
<section type="Head" level="2" height="1.5" page_break="1">
|
||||
<groupby>LEVEL C; 2</groupby>
|
||||
<font italic="1" face="Courier New" size="9" />
|
||||
<field x="1" y="0.25" type="Array" bg_color="#C0C0C0" width="35">
|
||||
<field x="1" type="Array" bg_color="#C0C0C0" width="35">
|
||||
<font italic="1" face="Courier New" bold="1" size="9" />
|
||||
<source>LEVEL</source>
|
||||
<list>
|
||||
@ -52,24 +52,23 @@
|
||||
<li Value="Commesse in corso entro fine" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="36" y="0.25" type="Numero" align="right" bg_color="#C0C0C0" width="6">
|
||||
<field x="36" type="Numero" align="right" bg_color="#C0C0C0" width="6">
|
||||
<font face="Courier New" bold="1" size="9" />
|
||||
<source>ANNO</source>
|
||||
</field>
|
||||
<field border="1" x="1" y="1.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field y="0.25" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1">
|
||||
<field border="1" x="1" y="1.25" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field type="Numero" hidden="1" align="right" width="1" id="101" pattern="1">
|
||||
<source>LEVEL</source>
|
||||
<postscript description="H2.101 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||
</field>
|
||||
<field x="42" y="0.25" type="Numero" hidden="1" align="right" width="4" id="102" pattern="1">
|
||||
<field x="42" type="Numero" hidden="1" align="right" width="4" id="102" pattern="1">
|
||||
<source>ANNO</source>
|
||||
<postscript description="H2.102 POSTSCRIPT">MESSAGE COPY,F2.102</postscript>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="3" height="2">
|
||||
<section type="Head" level="3" height="1.5">
|
||||
<groupby>LEVEL</groupby>
|
||||
<font face="Courier New" size="8" />
|
||||
<field x="3" y="0.25" type="Array" bg_color="#C0C0C0" width="45" pattern="1">
|
||||
<field x="3" type="Array" bg_color="#C0C0C0" width="45" pattern="1">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<source>LEVEL</source>
|
||||
<list>
|
||||
@ -79,8 +78,8 @@
|
||||
<li Value="Commesse avviate nell'esercizio selezionato" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field border="1" x="2" y="1.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field y="0.25" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1">
|
||||
<field border="1" x="2" y="1.25" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field type="Numero" hidden="1" align="right" width="1" id="101" pattern="1">
|
||||
<source>LEVEL</source>
|
||||
<postscript description="H3.101 POSTSCRIPT">MESSAGE COPY,F3.101</postscript>
|
||||
</field>
|
||||
@ -97,7 +96,7 @@
|
||||
<source>FASE</source>
|
||||
</field>
|
||||
<field x="57" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>100</source>
|
||||
<source>AVANZAMENTO</source>
|
||||
</field>
|
||||
<field x="61" type="Valuta" align="right" width="12" pattern="1" text="###.###.###,@@">
|
||||
<source>#RIC</source>
|
||||
@ -123,7 +122,9 @@
|
||||
<field x="145" type="Valuta" align="right" width="12" pattern="1" text="###.###.###,@@">
|
||||
<source>#COS</source>
|
||||
</field>
|
||||
<field x="157" type="Valuta" align="right" width="12" pattern="1" text="###.###.###,@@" />
|
||||
<field x="157" type="Valuta" align="right" width="12" pattern="1" text="###.###.###,@@">
|
||||
<source>#RIC-#COS</source>
|
||||
</field>
|
||||
<field x="170" type="Numero" align="right" width="3" pattern="1" />
|
||||
</section>
|
||||
<section type="Foot" />
|
||||
|
Loading…
x
Reference in New Issue
Block a user