Patch level :10.0
Files correlati : Ricompilazione Demo : [ ] Commento :riportate modifiche dalla 5.0 git-svn-id: svn://10.65.10.50/trunk@16560 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0379617a17
commit
7313a0f4e8
@ -172,7 +172,8 @@ protected:
|
||||
|
||||
public:
|
||||
void set_filter(const TPrint_bilancio_cms_mask& msk, const TString& curr_fase);
|
||||
TPrint_bilancio_cms_rep(const char* rep_name, const TString& prefix, const int depth);
|
||||
TPrint_bilancio_cms_rep(const char* rep_name, const TString& prefix, const int depth,
|
||||
const bool show_fasi, const bool show_cdc);
|
||||
};
|
||||
|
||||
bool TPrint_bilancio_cms_rep::get_usr_val(const TString& name, TVariant& var) const
|
||||
@ -196,8 +197,9 @@ void TPrint_bilancio_cms_rep::set_filter(const TPrint_bilancio_cms_mask& msk, co
|
||||
TReport::set_recordset(recset);
|
||||
}
|
||||
|
||||
TPrint_bilancio_cms_rep::TPrint_bilancio_cms_rep(const char* rep_name, const TString& prefix, const int depth)
|
||||
:TCRPA_report(rep_name, prefix, depth)
|
||||
TPrint_bilancio_cms_rep::TPrint_bilancio_cms_rep(const char* rep_name, const TString& prefix,
|
||||
const int depth, const bool show_fasi, const bool show_cdc)
|
||||
:TCRPA_report(rep_name, prefix, depth, show_fasi, show_cdc)
|
||||
{
|
||||
}
|
||||
|
||||
@ -226,11 +228,13 @@ void TPrint_bilancio_cms::main_loop()
|
||||
const bool use_fasi = (tipostampa == 1) || (tipostampa == 3);
|
||||
const TString& fase = mask.get(F_FASE);
|
||||
const bool group_fasi = tipostampa == 4;
|
||||
const bool show_fasi = use_fasi && fase.empty();
|
||||
|
||||
//cdc
|
||||
const bool use_cdc = (tipostampa == 2) || (tipostampa == 3);
|
||||
const TString& cdc = mask.get(F_CDC);
|
||||
const bool group_cdc = tipostampa == 8;
|
||||
const bool show_cdc = use_cdc && cdc.empty();
|
||||
|
||||
if (path.empty())
|
||||
{
|
||||
@ -238,7 +242,7 @@ void TPrint_bilancio_cms::main_loop()
|
||||
}
|
||||
|
||||
//crea il report in base ai parametri (tipo report,struttura,profondita' di stampa)
|
||||
TPrint_bilancio_cms_rep rep(path, prefix, depth);
|
||||
TPrint_bilancio_cms_rep rep(path, prefix, depth, show_fasi, show_cdc);
|
||||
|
||||
//se e' una stampa di tipo fasi riassunte (crpa special edition) deve fare lo scanning di tutte le fasi..
|
||||
//..singolarmente e stampare un report per ogni fase.Senno' stampa un solo report
|
||||
|
@ -7,26 +7,27 @@
|
||||
<field x="1" type="Stringa" width="50" pattern="1">
|
||||
<source>#SYSTEM.RAGSOC</source>
|
||||
</field>
|
||||
<field x="54" type="Testo" width="10" pattern="1" text="Data stampa">
|
||||
<field x="60" type="Testo" width="10" pattern="1" text="Data stampa">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
</field>
|
||||
<field x="64" type="Data" width="12" pattern="1">
|
||||
<field x="70" type="Data" width="12" pattern="1">
|
||||
<source>#SYSTEM.DATE</source>
|
||||
</field>
|
||||
<field x="81" type="Testo" width="4" pattern="1" text="Pag.">
|
||||
<field x="120" type="Testo" width="4" pattern="1" text="Pag.">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
</field>
|
||||
<field x="85" type="Numero" align="right" width="3" pattern="1">
|
||||
<field x="124" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field x="80" y="1.25" type="Testo" align="center" width="13" pattern="1" text="Margine" />
|
||||
<field x="43" y="2" type="Testo" align="center" width="6" pattern="1" text="Fase" />
|
||||
<field x="50.5" y="2" type="Testo" align="center" width="6" pattern="1" text="CdC" />
|
||||
<field x="56" y="2" type="Testo" align="center" width="6" pattern="1" text="% Av." />
|
||||
<field x="80" y="2" type="Testo" align="center" width="13" pattern="1" text=" Contribuz. " />
|
||||
<field border="1" x="1" y="3" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="43" y="2" type="Testo" align="center" width="6" id="3" pattern="1" text="Fase" />
|
||||
<field x="50.5" y="2" type="Testo" align="center" width="6" id="4" pattern="1" text="CdC" />
|
||||
<field x="56" y="2" type="Testo" align="center" width="6" id="5" pattern="1" text="% Av." />
|
||||
<field x="61" y="2" type="Testo" align="right" width="13" id="69" pattern="1" text="Testata" />
|
||||
<field x="1" y="2" type="Testo" width="15" id="121" pattern="1" text="Commessa" />
|
||||
<field x="75" y="1" type="Stringa" valign="bottom" align="right" width="13" height="2" id="169" pattern="1">
|
||||
<source>"MARGINE CONTRIBUZIONE"</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="1">
|
||||
<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">
|
||||
@ -146,16 +147,16 @@
|
||||
<section type="Body" level="1">
|
||||
<prescript description="B1 PRESCRIPT">1 #H4.3 \ incrementa il contatore per il numero di righe di fase
|
||||
+!</prescript>
|
||||
<field x="1" type="Stringa" width="17" pattern="1">
|
||||
<field x="1" type="Stringa" width="17" id="1" pattern="1">
|
||||
<source>CODCMS</source>
|
||||
</field>
|
||||
<field x="18" type="Stringa" width="25" pattern="1">
|
||||
<field x="18" type="Stringa" width="25" id="2" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>IF(#H4.3=0;DESCRIZ;"")</source>
|
||||
</field>
|
||||
<field x="43" type="Stringa" width="9" pattern="1">
|
||||
<field x="43.5" type="Stringa" width="9" id="3" pattern="1">
|
||||
<source>FASE</source>
|
||||
<prescript description="B1.0 PRESCRIPT">#STAMPAFASI @
|
||||
<prescript description="B1.3 PRESCRIPT">#STAMPAFASI @
|
||||
EMPTY= IF
|
||||
#THIS HIDE
|
||||
ELSE
|
||||
@ -163,9 +164,9 @@ ELSE
|
||||
THEN
|
||||
</prescript>
|
||||
</field>
|
||||
<field x="52" type="Stringa" width="5" pattern="1">
|
||||
<field x="52.5" type="Stringa" width="5" id="4" pattern="1">
|
||||
<source>CDC</source>
|
||||
<prescript description="B1.0 PRESCRIPT">#STAMPACDC @
|
||||
<prescript description="B1.4 PRESCRIPT">#STAMPACDC @
|
||||
EMPTY= IF
|
||||
#THIS HIDE
|
||||
ELSE
|
||||
@ -173,21 +174,20 @@ ELSE
|
||||
THEN
|
||||
</prescript>
|
||||
</field>
|
||||
<field x="57" type="Numero" align="right" width="3" pattern="1">
|
||||
<field x="57.5" type="Numero" align="right" width="3.5" id="5" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<source>ROUND(AVANZAMENTO;0)</source>
|
||||
</field>
|
||||
<field x="91" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="60.5" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<field x="61" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="B1.69 POSTSCRIPT">MESSAGE ADD,F4.69
|
||||
MESSAGE ADD,F3.69</postscript>
|
||||
</field>
|
||||
<field x="74" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<field x="74.5" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<source>#RICAVI-#COSTI</source>
|
||||
<postscript description="B1.169 POSTSCRIPT">MESSAGE ADD,F4.169
|
||||
MESSAGE ADD,F3.169</postscript>
|
||||
</field>
|
||||
<field x="87" type="Numero" align="right" width="4" id="170" pattern="1">
|
||||
<field x="87.5" type="Numero" align="right" width="4" id="170" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<prescript description="B1.170 PRESCRIPT">#RICAVI @
|
||||
EMPTY= IF
|
||||
@ -205,6 +205,7 @@ ROUND
|
||||
THEN
|
||||
#THIS !</prescript>
|
||||
</field>
|
||||
<field x="91.5" type="Testo" align="center" width="2" id="171" pattern="1" text="%" />
|
||||
</section>
|
||||
<section type="Foot">
|
||||
<field border="1" x="1" y="0.25" type="Linea" width="169" height="0" pattern="1" />
|
||||
@ -226,7 +227,7 @@ THEN
|
||||
<section type="Foot" level="2" height="2.5">
|
||||
<font italic="1" face="Courier New" bold="1" size="8" />
|
||||
<field border="1" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="1" y="1" type="Array" bg_color="#C0C0C0" width="28">
|
||||
<field x="1" y="1" type="Array" bg_color="#C0C0C0" width="27">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<source>H2.101</source>
|
||||
<list>
|
||||
@ -236,7 +237,7 @@ THEN
|
||||
<li Value="TOTALI Commesse in corso entro fine" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="29" y="1" type="Numero" align="right" bg_color="#C0C0C0" width="6">
|
||||
<field x="28" y="1" type="Numero" align="right" bg_color="#C0C0C0" width="6">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<source>H2.102</source>
|
||||
</field>
|
||||
@ -245,7 +246,7 @@ THEN
|
||||
<postscript description="F2.69 POSTSCRIPT">MESSAGE ADD,F1.69</postscript>
|
||||
</field>
|
||||
<field y="1" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1" />
|
||||
<field x="35" y="1" type="Numero" hidden="1" align="right" width="4" id="102" pattern="1">
|
||||
<field x="34" y="1" type="Numero" hidden="1" align="right" width="4" id="102" pattern="1">
|
||||
<postscript description="F2.102 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||
</field>
|
||||
<field x="74" y="1" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
@ -257,7 +258,7 @@ MESSAGE RESET,169</postscript>
|
||||
<section type="Foot" level="3" height="2">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<field border="1" x="2" y="0.25" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="2" y="0.5" type="Array" bg_color="#C0C0C0" width="40" pattern="1">
|
||||
<field x="1" y="0.5" type="Array" bg_color="#C0C0C0" width="33">
|
||||
<source>H3.101</source>
|
||||
<list>
|
||||
<li Value="TOTALI Commesse avviate in esercizi precedenti" Code="0" />
|
||||
@ -279,7 +280,7 @@ MESSAGE RESET,169</postscript>
|
||||
<condition>((STAMPAFASI !="")||(STAMPACDC !=""))(#H4.3 E; 0)(TIPOSTIMA!='T')(FASESPEC=="")</condition>
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<field border="1" x="2" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="22" type="Testo" width="20" pattern="1" text="Totali commessa" />
|
||||
<field x="22" type="Testo" width="15" pattern="1" text="Totali commessa" />
|
||||
<field x="2" type="Stringa" bg_color="#C0C0C0" width="20" id="2" pattern="1">
|
||||
<source>H4.2</source>
|
||||
</field>
|
||||
|
@ -7,28 +7,28 @@
|
||||
<field x="1" type="Stringa" width="50" pattern="1">
|
||||
<source>#SYSTEM.RAGSOC</source>
|
||||
</field>
|
||||
<field x="53" type="Testo" width="10" pattern="1" text="Data stampa">
|
||||
<field x="60" type="Testo" width="10" pattern="1" text="Data stampa">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
</field>
|
||||
<field x="63" type="Data" width="12" pattern="1">
|
||||
<field x="70" type="Data" width="12" pattern="1">
|
||||
<source>#SYSTEM.DATE</source>
|
||||
</field>
|
||||
<field x="76" type="Testo" width="4" pattern="1" text="Pag.">
|
||||
<field x="120" type="Testo" width="4" pattern="1" text="Pag.">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
</field>
|
||||
<field x="80" type="Numero" align="right" width="3" pattern="1">
|
||||
<field x="124" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field x="76.5" y="1.25" type="Testo" align="center" width="13" pattern="1" text="Margine" />
|
||||
<field x="10" y="2" type="Stringa" width="12" pattern="1">
|
||||
<font face="Arial" bold="1" size="10" />
|
||||
<source>FASESPEC</source>
|
||||
</field>
|
||||
<field x="52" y="2" type="Testo" align="center" width="6" pattern="1" text="% Av." />
|
||||
<field x="76.5" y="2" type="Testo" align="center" width="13" pattern="1" text=" Contribuz. " />
|
||||
<field border="1" x="1" y="3" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="55.5" y="1" type="Testo" valign="bottom" align="right" width="13" height="2" id="69" pattern="1" text="Testata" />
|
||||
<field x="35" y="1" type="Testo" valign="bottom" align="right" width="13" height="2" id="69" pattern="1" text="Testata" />
|
||||
<field x="1" y="2" type="Testo" width="8" id="121" pattern="1" text="Fase" />
|
||||
<field x="50" y="1" type="Stringa" align="center" width="13" height="2" id="169" pattern="1">
|
||||
<source>"MARGINE CONTRIBUZIONE"</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="1">
|
||||
<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 RAGGRUPPATO PER FASI">
|
||||
@ -74,7 +74,7 @@
|
||||
<field x="75" y="4.25" type="Stringa" width="10" id="1" pattern="1">
|
||||
<font face="Arial Narrow" bold="1" size="9" />
|
||||
<source>FASESPEC</source>
|
||||
<postscript description="H1.1 POSTSCRIPT">MESSAGE COPY,F1.1</postscript>
|
||||
<postscript description="H1.1 POSTSCRIPT">MESSAGE COPY,F1.2</postscript>
|
||||
</field>
|
||||
<field x="45" y="3" type="Stringa" width="4" id="2" pattern="1">
|
||||
<font face="Arial Narrow" bold="1" size="9" />
|
||||
@ -127,30 +127,19 @@
|
||||
<section type="Body" level="1" hidden="1">
|
||||
<prescript description="B1 PRESCRIPT">1 #H4.3 \ incrementa il contatore per il numero di righe di fase
|
||||
+!</prescript>
|
||||
<field x="1" type="Stringa" width="17" pattern="1">
|
||||
<field x="65.5" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="1" type="Stringa" width="20" id="1" pattern="1">
|
||||
<source>CODCMS</source>
|
||||
</field>
|
||||
<field x="18" type="Stringa" width="25" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>IF(#H4.3=0;DESCRIZ;"")</source>
|
||||
</field>
|
||||
<field x="43" type="Stringa" width="9" pattern="1">
|
||||
<source>FASE</source>
|
||||
</field>
|
||||
<field x="52" type="Numero" align="right" width="3" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<source>ROUND(AVANZAMENTO;0)</source>
|
||||
</field>
|
||||
<field x="86" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="55.5" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<field x="35" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="B1.69 POSTSCRIPT">MESSAGE ADD,F3.69</postscript>
|
||||
</field>
|
||||
<field x="69" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<field x="48.5" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<source>#RICAVI-#COSTI</source>
|
||||
<postscript description="B1.169 POSTSCRIPT">MESSAGE ADD,F4.169
|
||||
MESSAGE ADD,F3.169</postscript>
|
||||
</field>
|
||||
<field x="82" type="Numero" align="right" width="4" id="170" pattern="1">
|
||||
<field x="61.5" type="Numero" align="right" width="4" id="170" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<prescript description="B1.170 PRESCRIPT">#RICAVI @
|
||||
EMPTY= IF
|
||||
@ -182,12 +171,12 @@ THEN
|
||||
<section type="Foot" level="1" height="3">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<field border="2" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="1" y="1" type="Testo" valign="center" fg_color="#FFFFFF" bg_color="#000000" width="20" height="1.5" text="TOTALI GENERALI " />
|
||||
<field x="21" y="1" type="Stringa" valign="center" fg_color="#FFFFFF" bg_color="#400040" width="15" height="1.5" id="1">
|
||||
<field x="1" y="1" type="Testo" valign="center" fg_color="#FFFFFF" bg_color="#000000" width="20" height="1.5" id="1" text="TOTALI GENERALI " />
|
||||
<field x="21" y="1" type="Stringa" valign="center" fg_color="#FFFFFF" bg_color="#400040" width="15" height="1.5" id="2">
|
||||
<font italic="1" face="Arial" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="55.5" y="1.25" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@" />
|
||||
<field x="69" y="1.25" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<field x="36" y="1.25" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@" />
|
||||
<field x="49.5" y="1.25" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F1.169 POSTSCRIPT">MESSAGE RESET,169</postscript>
|
||||
</field>
|
||||
</section>
|
||||
@ -208,7 +197,7 @@ THEN
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<source>H2.102</source>
|
||||
</field>
|
||||
<field x="55.5" y="1" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<field x="39" y="1" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<postscript description="F2.69 POSTSCRIPT">MESSAGE ADD,F1.69</postscript>
|
||||
</field>
|
||||
@ -216,7 +205,7 @@ THEN
|
||||
<field x="35" y="1" type="Numero" hidden="1" align="right" width="4" id="102" pattern="1">
|
||||
<postscript description="F2.102 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||
</field>
|
||||
<field x="69" y="1" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<field x="52.5" y="1" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<postscript description="F2.169 POSTSCRIPT">MESSAGE ADD,F1.169
|
||||
MESSAGE RESET,169</postscript>
|
||||
@ -233,11 +222,11 @@ MESSAGE RESET,169</postscript>
|
||||
<li Value="Commesse avviate nell'esercizio selezionato" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="55.5" y="0.5" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<field x="42" y="0.5" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F3.69 POSTSCRIPT">MESSAGE ADD,F2.69</postscript>
|
||||
</field>
|
||||
<field y="0.5" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1" />
|
||||
<field x="69" y="0.5" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<field x="55.5" y="0.5" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F3.169 POSTSCRIPT">MESSAGE ADD,F2.169
|
||||
MESSAGE RESET,169</postscript>
|
||||
</field>
|
||||
|
@ -7,28 +7,28 @@
|
||||
<field x="1" type="Stringa" width="50" pattern="1">
|
||||
<source>#SYSTEM.RAGSOC</source>
|
||||
</field>
|
||||
<field x="53" type="Testo" width="10" pattern="1" text="Data stampa">
|
||||
<field x="60" type="Testo" width="10" pattern="1" text="Data stampa">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
</field>
|
||||
<field x="63" type="Data" width="12" pattern="1">
|
||||
<field x="70" type="Data" width="12" pattern="1">
|
||||
<source>#SYSTEM.DATE</source>
|
||||
</field>
|
||||
<field x="76" type="Testo" width="4" pattern="1" text="Pag.">
|
||||
<field x="120" type="Testo" width="4" pattern="1" text="Pag.">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
</field>
|
||||
<field x="80" type="Numero" align="right" width="3" pattern="1">
|
||||
<field x="123" type="Numero" align="right" width="3" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field x="76.5" y="1.25" type="Testo" align="center" width="13" pattern="1" text="Margine" />
|
||||
<field x="17.5" y="2" type="Stringa" width="12" pattern="1">
|
||||
<font face="Arial" bold="1" size="10" />
|
||||
<source>CDCSPEC</source>
|
||||
</field>
|
||||
<field x="52" y="2" type="Testo" align="center" width="6" pattern="1" text="% Av." />
|
||||
<field x="76.5" y="2" type="Testo" align="center" width="13" pattern="1" text=" Contribuz. " />
|
||||
<field border="1" x="1" y="3" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="55.5" y="1" type="Testo" valign="bottom" align="right" width="13" height="2" id="69" pattern="1" text="Testata" />
|
||||
<field x="35" y="1" type="Testo" valign="bottom" align="right" width="13" height="2" id="69" pattern="1" text="Testata" />
|
||||
<field x="1" y="2" type="Testo" width="14" id="121" pattern="1" text="Centro di costo" />
|
||||
<field x="51" y="1" type="Stringa" valign="bottom" align="right" width="13" height="2" id="169" pattern="1">
|
||||
<source>"MARGINE CONTRIBUZIONE"</source>
|
||||
</field>
|
||||
</section>
|
||||
<section type="Head" level="1">
|
||||
<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 RAGGRUPPATO PER CENTRI DI COSTO">
|
||||
@ -74,7 +74,7 @@
|
||||
<field x="80" y="4.25" type="Stringa" width="10" id="1" pattern="1">
|
||||
<font face="Arial Narrow" bold="1" size="9" />
|
||||
<source>CDCSPEC</source>
|
||||
<postscript description="H1.1 POSTSCRIPT">MESSAGE COPY,F1.1</postscript>
|
||||
<postscript description="H1.1 POSTSCRIPT">MESSAGE COPY,F1.2</postscript>
|
||||
</field>
|
||||
<field x="45" y="3" type="Stringa" width="4" id="2" pattern="1">
|
||||
<font face="Arial Narrow" bold="1" size="9" />
|
||||
@ -127,30 +127,18 @@
|
||||
<section type="Body" level="1" hidden="1">
|
||||
<prescript description="B1 PRESCRIPT">1 #H4.3 \ incrementa il contatore per il numero di righe di cdc
|
||||
+!</prescript>
|
||||
<field x="1" type="Stringa" width="17" pattern="1">
|
||||
<field x="1" type="Stringa" width="20" id="1" pattern="1">
|
||||
<source>CODCMS</source>
|
||||
</field>
|
||||
<field x="18" type="Stringa" width="25" pattern="1">
|
||||
<font face="Arial Narrow" size="7" />
|
||||
<source>IF(#H4.3=0;DESCRIZ;"")</source>
|
||||
</field>
|
||||
<field x="43" type="Stringa" width="9" pattern="1">
|
||||
<source>CDC</source>
|
||||
</field>
|
||||
<field x="52" type="Numero" align="right" width="3" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<source>ROUND(AVANZAMENTO;0)</source>
|
||||
</field>
|
||||
<field x="86" type="Testo" align="center" width="2" pattern="1" text="%" />
|
||||
<field x="55.5" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<field x="35" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="B1.69 POSTSCRIPT">MESSAGE ADD,F3.69</postscript>
|
||||
</field>
|
||||
<field x="69" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<field x="48.5" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<source>#RICAVI-#COSTI</source>
|
||||
<postscript description="B1.169 POSTSCRIPT">MESSAGE ADD,F4.169
|
||||
MESSAGE ADD,F3.169</postscript>
|
||||
</field>
|
||||
<field x="82" type="Numero" align="right" width="4" id="170" pattern="1">
|
||||
<field x="61.5" type="Numero" align="right" width="4" id="170" pattern="1">
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<prescript description="B1.170 PRESCRIPT">#RICAVI @
|
||||
EMPTY= IF
|
||||
@ -163,11 +151,14 @@ ELSE
|
||||
-
|
||||
100
|
||||
*
|
||||
0
|
||||
ROUND
|
||||
DUP \ duplica la % non arrotondata
|
||||
#F3.170 \ e incrementa il campo nel footer3
|
||||
+!
|
||||
0 ROUND \ e alla fine arrotonda quello sul body
|
||||
THEN
|
||||
#THIS !</prescript>
|
||||
</field>
|
||||
<field x="65.5" type="Testo" align="center" width="2" id="171" pattern="1" text="%" />
|
||||
</section>
|
||||
<section type="Foot">
|
||||
<field border="1" x="1" y="0.25" type="Linea" width="169" height="0" pattern="1" />
|
||||
@ -182,12 +173,12 @@ THEN
|
||||
<section type="Foot" level="1" height="3">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<field border="2" x="1" y="0.5" type="Linea" width="169" height="0" pattern="1" />
|
||||
<field x="1" y="1" type="Testo" valign="center" fg_color="#FFFFFF" bg_color="#000000" width="20" height="1.5" text="TOTALI GENERALI " />
|
||||
<field x="21" y="1" type="Stringa" valign="center" fg_color="#FFFFFF" bg_color="#400040" width="15" height="1.5" id="1">
|
||||
<field x="1" y="1" type="Testo" valign="center" fg_color="#FFFFFF" bg_color="#000000" width="20" height="1.5" id="1" text="TOTALI GENERALI " />
|
||||
<field x="21" y="1" type="Stringa" valign="center" fg_color="#FFFFFF" bg_color="#400040" width="15" height="1.5" id="2">
|
||||
<font italic="1" face="Arial" bold="1" size="8" />
|
||||
</field>
|
||||
<field x="55.5" y="1.25" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@" />
|
||||
<field x="69" y="1.25" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<field x="46.5" y="1.25" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@" />
|
||||
<field x="60" y="1.25" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F1.169 POSTSCRIPT">MESSAGE RESET,169</postscript>
|
||||
</field>
|
||||
</section>
|
||||
@ -208,7 +199,7 @@ THEN
|
||||
<font italic="1" face="Arial Narrow" size="8" />
|
||||
<source>H2.102</source>
|
||||
</field>
|
||||
<field x="55.5" y="1" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<field x="46.5" y="1" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<postscript description="F2.69 POSTSCRIPT">MESSAGE ADD,F1.69</postscript>
|
||||
</field>
|
||||
@ -216,7 +207,7 @@ THEN
|
||||
<field x="35" y="1" type="Numero" hidden="1" align="right" width="4" id="102" pattern="1">
|
||||
<postscript description="F2.102 POSTSCRIPT">MESSAGE COPY,F2.101</postscript>
|
||||
</field>
|
||||
<field x="69" y="1" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<field x="60" y="1" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<font italic="1" face="Arial Narrow" bold="1" size="8" />
|
||||
<postscript description="F2.169 POSTSCRIPT">MESSAGE ADD,F1.169
|
||||
MESSAGE RESET,169</postscript>
|
||||
@ -233,11 +224,11 @@ MESSAGE RESET,169</postscript>
|
||||
<li Value="Commesse avviate nell'esercizio selezionato" Code="3" />
|
||||
</list>
|
||||
</field>
|
||||
<field x="55.5" y="0.5" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<field x="46.5" y="0.5" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F3.69 POSTSCRIPT">MESSAGE ADD,F2.69</postscript>
|
||||
</field>
|
||||
<field y="0.5" type="Numero" hidden="1" align="right" width="1" id="101" pattern="1" />
|
||||
<field x="69" y="0.5" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<field x="60" y="0.5" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
|
||||
<postscript description="F3.169 POSTSCRIPT">MESSAGE ADD,F2.169
|
||||
MESSAGE RESET,169</postscript>
|
||||
</field>
|
||||
|
154
ca/ca3883.cpp
154
ca/ca3883.cpp
@ -175,25 +175,128 @@ void TCRPA_report::analize_pconana_structure (const TString& prefix, const int d
|
||||
merge_array(codici_c, testate_c, codici, testate);
|
||||
}
|
||||
|
||||
|
||||
void TCRPA_report::offset_and_fill_columns(TReport_section& rep_sect,
|
||||
const TString_array& str_arr, const int model_id)
|
||||
//metodo per il riempimento e lo spostamento dei campi della sola sezione F4 (totali di commessa)
|
||||
void TCRPA_report::offset_and_fill_sectionf4(TReport_section& rep_sect, const int model_id)
|
||||
{
|
||||
//campo modello
|
||||
TReport_field& rep_field = *rep_sect.find_field(model_id);
|
||||
//nuovo campo
|
||||
TReport_field* new_field = (TReport_field*)rep_field.dup();
|
||||
//lo aggiunge alla sezione
|
||||
rep_sect.add(new_field);
|
||||
//gli da' l'id (e' il terzultimo campo)
|
||||
TReport_section& b1 = section('B', 1);
|
||||
const int body_fields_number = b1.items();
|
||||
TReport_field& fld_costi = b1.field(body_fields_number - 3);
|
||||
new_field->set_id(fld_costi.id());
|
||||
|
||||
//posiziona tutti i campi della sezione
|
||||
for (int i = 0; i < rep_sect.items(); i++)
|
||||
{
|
||||
//c'e' il campo con il mio numero (id) in questa sezione?
|
||||
TReport_field& brock = rep_sect.field(i);
|
||||
if (brock.id() >= model_id)
|
||||
{
|
||||
//se c'e' cerco nel body il mio omonumero; se lo trovo mi allineo come lui
|
||||
//Es.: campi testata di pagina compaiono e si allineano in base ai campi body (fase,cdc ecc.)
|
||||
TReport_field* champ = b1.find_field(brock.id());
|
||||
if (champ != NULL)
|
||||
brock.set_column(champ->get_rect().left());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
//metodo per il riempimento e lo spostamento dei campi dinamici
|
||||
void TCRPA_report::offset_and_fill_columns(TReport_section& rep_sect, const TString_array& str_arr,
|
||||
const int model_id, const bool show_fasi, const bool show_cdc)
|
||||
{
|
||||
//solo nel caso sia richiesta la sparizione di un campo...
|
||||
if (!show_fasi || !show_cdc)
|
||||
{
|
||||
if (rep_sect.type() == 'B') //campi del body
|
||||
{
|
||||
//gestione campi a sinistra del campo modello
|
||||
//la gestione dei campi a sinistra e' guidata dalle scelte utente sulla maschera
|
||||
TReport_field* fld_fase = rep_sect.find_field(3);
|
||||
if (fld_fase != NULL) //in caso non esista il campo non deve fare nulla (report riassuntivi x fase/cdc)
|
||||
{
|
||||
TReport_field* fld_cdc = rep_sect.find_field(4);
|
||||
TReport_field* fld_perc = rep_sect.find_field(5);
|
||||
|
||||
int x0 = fld_fase->get_rect().left();
|
||||
//mostra le fasi
|
||||
if (show_fasi)
|
||||
x0 = fld_fase->get_rect().right();
|
||||
else
|
||||
fld_fase->deactivate(); //era meglio hide() che deactivate() ma non bastava!
|
||||
|
||||
if (fld_cdc != NULL)
|
||||
{
|
||||
if (show_cdc)
|
||||
{
|
||||
fld_cdc->set_column(x0);
|
||||
x0 = fld_cdc->get_rect().right();
|
||||
}
|
||||
else
|
||||
fld_cdc->deactivate();
|
||||
}
|
||||
|
||||
if (fld_perc != NULL)
|
||||
{
|
||||
//campo percentuale
|
||||
fld_perc->set_column(x0);
|
||||
x0 = fld_perc->get_rect().right();
|
||||
}
|
||||
|
||||
//campo modello
|
||||
rep_sect.find_field(model_id)->set_column(x0);
|
||||
}
|
||||
}
|
||||
else //campi non del body
|
||||
{
|
||||
TReport_section& b1 = section('B', 1);
|
||||
//sistema i campi tipo testata
|
||||
for (int i = 0; i < rep_sect.items(); i++)
|
||||
{
|
||||
//c'e' il campo con il mio numero (id) in questa sezione?
|
||||
TReport_field& brock = rep_sect.field(i);
|
||||
const int id = brock.id();
|
||||
if (id > 0)
|
||||
{
|
||||
//se c'e' cerco nel body il mio omonumero; se lo trovo mi mostro e allineo come lui
|
||||
//Es.: campi testata di pagina compaiono e si allineano in base ai campi body (fase,cdc ecc.)
|
||||
TReport_field* champ = b1.find_field(id);
|
||||
if (champ != NULL)
|
||||
{
|
||||
brock.activate(champ->active());
|
||||
brock.set_column(champ->get_rect().left());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
TReport_field& rep_field = *rep_sect.find_field(model_id);
|
||||
|
||||
//deve spostare i campi a destra della colonna modello
|
||||
//prende il rettangolo del campo..
|
||||
//prende il rettangolo del campo modello..
|
||||
const TRectangle& rep_field_rect = rep_field.get_rect();
|
||||
|
||||
//deve spostare i campi a destra della colonna modello
|
||||
//si memorizza i campi a destra del campo modello per poterli mettere a destra di tutti..
|
||||
//..i campi che saranno generati
|
||||
TPointer_array campi_a_destra;
|
||||
for (int j = 0; j < rep_sect.items(); j++)
|
||||
{
|
||||
const TReport_field& campo = rep_sect.field(j);
|
||||
const TRectangle& rct = campo.get_rect();
|
||||
//se il campo e' a destra del modello lo aggiunge all'array dei campi_a_destra
|
||||
if (rct.left() >= rep_field_rect.right())
|
||||
campi_a_destra.add(campo);
|
||||
//solo i campi con un identificatore vanno spostati; gli altri sono parte dello sfondo
|
||||
if (campo.id() > model_id)
|
||||
{
|
||||
const TRectangle& rct = campo.get_rect();
|
||||
//se il campo e' a destra del modello lo aggiunge all'array dei campi_a_destra
|
||||
if (rct.left() >= rep_field_rect.right())
|
||||
campi_a_destra.add(campo);
|
||||
}
|
||||
}
|
||||
|
||||
//duplica il campo modello e riempie i duplicati con i valori degli array
|
||||
@ -244,21 +347,23 @@ void TCRPA_report::offset_and_fill_columns(TReport_section& rep_sect,
|
||||
}
|
||||
}
|
||||
|
||||
//sposta a destra gli ultimi campi non generati
|
||||
//sposta a destra gli ultimi campi non generati (169 e 170)
|
||||
const TReport_field& ultimo_campo = rep_sect.field(rep_sect.last());
|
||||
const TPoint offset(ultimo_campo.get_rect().right() - rep_field.get_rect().right(), 0);
|
||||
|
||||
int x0 = ultimo_campo.get_rect().right();
|
||||
for (int k = 0; k < campi_a_destra.items(); k++)
|
||||
{
|
||||
TReport_field& campo = (TReport_field&)campi_a_destra[k];
|
||||
campo.offset(offset);
|
||||
campo.set_column(x0);
|
||||
x0 = campo.get_rect().right();
|
||||
}
|
||||
|
||||
//ordina i campi davvero sul report per id
|
||||
rep_sect.sort();
|
||||
}
|
||||
|
||||
|
||||
bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testate, const int model_id)
|
||||
bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testate, const int model_id,
|
||||
const bool show_fasi, const bool show_cdc)
|
||||
{
|
||||
//sezioni del report da modificare
|
||||
TReport_section& b1 = section('B', 1);
|
||||
@ -267,7 +372,7 @@ bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testa
|
||||
TReport_field* b1_model = b1.find_field(model_id);
|
||||
if (b1_model == NULL)
|
||||
return false;
|
||||
offset_and_fill_columns(b1, codici, model_id);
|
||||
offset_and_fill_columns(b1, codici, model_id, show_fasi, show_cdc);
|
||||
|
||||
//testate
|
||||
//la testata di pagina deve invece riempire le intestazioni delle colonne generate
|
||||
@ -277,7 +382,7 @@ bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testa
|
||||
if (h0_model == NULL)
|
||||
warning_box(TR("Manca l'intestazione della colonna modello (H0.%d)"),model_id);
|
||||
else
|
||||
offset_and_fill_columns(h0, testate, model_id);
|
||||
offset_and_fill_columns(h0, testate, model_id, show_fasi, show_cdc);
|
||||
|
||||
//le testate di sezione devono resettare i campi totale dei corrispondenti footers
|
||||
for (int j = 4; j > 0; j--)
|
||||
@ -308,16 +413,23 @@ bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testa
|
||||
if (foot_model == NULL)
|
||||
warning_box(TR("Manca la colonna modello (F%d.%d)"), i, model_id);
|
||||
else
|
||||
offset_and_fill_columns(foot, codici, model_id);
|
||||
offset_and_fill_columns(foot, codici, model_id, show_fasi, show_cdc);
|
||||
}
|
||||
/*#ifdef DBG
|
||||
|
||||
//gestione della sezione con i totali di commessa (solo se esiste, visto che non c'e' in tutti i report)
|
||||
TReport_section* f4 = find_section('F', 4);
|
||||
if (f4 != NULL)
|
||||
offset_and_fill_sectionf4(*f4, model_id);
|
||||
|
||||
#ifdef DBG
|
||||
save("cazzone.rep");
|
||||
#endif*/
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
TCRPA_report::TCRPA_report (const char* rep_name, const TString& prefix, const int depth)
|
||||
TCRPA_report::TCRPA_report (const char* rep_name, const TString& prefix, const int depth,
|
||||
const bool show_fasi, const bool show_cdc)
|
||||
{
|
||||
//che report usare?
|
||||
load (rep_name);
|
||||
@ -328,7 +440,7 @@ TCRPA_report::TCRPA_report (const char* rep_name, const TString& prefix, const i
|
||||
//..da stampare fino al livello richiesto!
|
||||
analize_pconana_structure (prefix, depth, codici, testate);
|
||||
//poi vanno generate le colonne del report corrispondenti alla struttura analizzata
|
||||
generate_columns (codici, testate, 69);
|
||||
generate_columns (codici, testate, 69, show_fasi, show_cdc);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////
|
||||
|
@ -41,11 +41,14 @@ protected:
|
||||
TString_array& codici, TString_array& testate) const;
|
||||
void analize_pconana_structure (const TString& prefix, const int depth,
|
||||
TString_array& codici, TString_array& testate) const;
|
||||
bool generate_columns (TString_array& codici, TString_array& testate, const int model_id);
|
||||
bool generate_columns (TString_array& codici, TString_array& testate, const int model_id,
|
||||
const bool show_fasi, const bool show_cdc);
|
||||
void offset_and_fill_columns(TReport_section& rep_sect, const TString_array& str_arr,
|
||||
const int model_id);
|
||||
const int model_id, const bool show_fasi, const bool show_cdc);
|
||||
void offset_and_fill_sectionf4(TReport_section& rep_sect, const int model_id);
|
||||
public:
|
||||
TCRPA_report (const char* rep_name, const TString& prefix, const int depth);
|
||||
TCRPA_report (const char* rep_name, const TString& prefix, const int depth,
|
||||
const bool show_fasi, const bool show_cdc);
|
||||
};
|
||||
|
||||
|
||||
|
@ -486,7 +486,7 @@ void ca_create_browse1(TEdit_field& kfld, int level, int logic, short key_id, sh
|
||||
while (scan.pop() != "EN")
|
||||
kfld.parse_item(scan);
|
||||
|
||||
xvt_fsys_removefile(tmp);
|
||||
xvt_fsys_remove_file(tmp);
|
||||
}
|
||||
|
||||
void ca_create_browse2(TEdit_field& kfld, int level, int logic, short key_id)
|
||||
@ -556,7 +556,7 @@ void ca_create_browse2(TEdit_field& kfld, int level, int logic, short key_id)
|
||||
while (scan.pop() != "EN")
|
||||
kfld.parse_item(scan);
|
||||
|
||||
xvt_fsys_removefile(tmp);
|
||||
xvt_fsys_remove_file(tmp);
|
||||
}
|
||||
|
||||
int ca_create_fields(TMask& msk, int page, int logicnum, int x, int y,
|
||||
@ -813,7 +813,7 @@ void TSimple_anal_msk::read(const char* name)
|
||||
out.close();
|
||||
|
||||
read_mask(outname, 0, 0);
|
||||
xvt_fsys_removefile(outname);
|
||||
xvt_fsys_remove_file(outname);
|
||||
set_source_file(name);
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user