Patch level :4.0 608

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :aggiunto il totale per commessa se esplode le fasi!


git-svn-id: svn://10.65.10.50/trunk@14865 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2007-02-08 14:11:25 +00:00
parent 3b5e911df8
commit ffcdde17a6
3 changed files with 45 additions and 6 deletions

View File

@ -529,6 +529,11 @@ const TVariant& TPrint_bilancio_cms_recordset::get(const char* column_name) cons
var.set(_vitaintera == true ? "SI" : "NO");
}
else
if (strcmp(column_name, "STAMPAFASI") == 0)
{
var.set(_use_fasi == true ? "X" : "");
}
else
if (strcmp(column_name, "AVANZAMENTO") == 0)
{
//Calcola lo stato di avanzamento della commessa

View File

@ -105,8 +105,26 @@
<postscript description="H3.101 POSTSCRIPT">MESSAGE COPY,F3.101</postscript>
</field>
</section>
<section type="Head" level="4" hidden="1">
<condition>STAMPAFASI != ""</condition>
<groupby>CODCMS</groupby>
<font italic="1" face="Arial Narrow" bold="1" size="8" />
<prescript description="H4 PRESCRIPT">0 #CONTATORE !</prescript>
<field type="Stringa" hidden="1" width="1" id="1" pattern="1">
<source>STAMPAFASI</source>
</field>
<field x="2" type="Stringa" hidden="1" bg_color="#C0C0C0" width="20" id="2" pattern="1">
<source>CODCMS</source>
</field>
<field x="23" type="Numero" hidden="1" align="right" width="2" id="3" pattern="1">
<source>0</source>
</field>
</section>
<section type="Body" />
<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="20" pattern="1">
<source>CODCMS</source>
</field>
@ -122,11 +140,13 @@
</field>
<field x="91" type="Testo" align="center" width="2" pattern="1" text="%" />
<field x="59" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@">
<postscript description="B1.69 POSTSCRIPT">MESSAGE ADD,F3.69</postscript>
<postscript description="B1.69 POSTSCRIPT">MESSAGE ADD,F4.69
MESSAGE ADD,F3.69</postscript>
</field>
<field x="73" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@">
<source>#RICAVI-#COSTI</source>
<postscript description="B1.169 POSTSCRIPT">MESSAGE ADD,F3.169</postscript>
<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">
<font italic="1" face="Arial Narrow" size="8" />
@ -205,5 +225,16 @@ THEN
<postscript description="F3.169 POSTSCRIPT">MESSAGE ADD,F2.169</postscript>
</field>
</section>
<section type="Foot" level="4" height="1.25">
<condition>(STAMPAFASI != "")&#26;&#26;(#H4.3 &#3E; 1)</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="2" type="Stringa" bg_color="#C0C0C0" width="20" id="2" pattern="1">
<source>H4.2</source>
</field>
<field x="59" type="Valuta" align="right" width="13" id="69" pattern="1" text="###.###.###,@@" />
<field x="73" type="Valuta" align="right" width="13" id="169" pattern="1" text="###.###.###,@@" />
</section>
<sql>USE SALDANA</sql>
</report>

View File

@ -213,11 +213,14 @@ void TCRPA_report::offset_and_fill_columns(TReport_section& rep_sect,
new_field->set_field(str_arr.row(i));
TString ps = "MESSAGE ADD,F3.";
ps << new_field->id();
ps << "|ADD,F4.";
ps << new_field->id();
new_field->set_postscript(ps);
}
break;
case 'F': //i footer devono calcolarsi i totali!
if (rep_sect.level() > 1)
case 'F': //i footer devono calcolarsi i totali;ma i footer di totale fasi (4) non devono..
//..fare assolutamente nulla!
if (rep_sect.level() > 1 && rep_sect.level() < 4)
{
new_field->set_field("");
TString ps = "MESSAGE ADD,F";
@ -266,7 +269,7 @@ bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testa
offset_and_fill_columns(h0, testate, model_id);
//le testate di sezione devono resettare i campi totale dei corrispondenti footers
for (int j = 3; j > 0; j--)
for (int j = 4; j > 0; j--)
{
TReport_section& head = section('H', j);
if (head.items() > 0)
@ -286,7 +289,7 @@ bool TCRPA_report::generate_columns (TString_array& codici, TString_array& testa
}
//footers
for (int i = 3; i > 0; i--)
for (int i = 4; i > 0; i--)
{
TReport_section& foot = section('F', i);