Patch level :10.0 698

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
stampa stima ricavi di competenza con modifiche richieste nelle prime 2 sezioni


git-svn-id: svn://10.65.10.50/trunk@20291 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2010-03-30 08:59:10 +00:00
parent f63c0ea944
commit aad063f809
2 changed files with 32 additions and 25 deletions

View File

@ -1617,18 +1617,39 @@ const TVariant& TPrint_saldana_recordset::get(const char* column_name) const
if (strncmp(column_name, "RECORD.", 7) == 0)
column_name += 7;
if (_forza_maturato && strcmp(column_name, "COS_MAT") == 0)
if (strcmp(column_name, "COS_PERC") == 0)
{
const int indice = get("LEVEL").as_int();
if (indice <= 1)
column_name = "COS_BDG";
if (_forza_maturato && indice <= 1)
var.set(CENTO);
else
{
const TString* val_bdg = (TString*)riga.objptr("COS_BDG");
if (val_bdg == NULL || real::is_null(*val_bdg))
var.set(CENTO);
else
{
const TString* val_mat = (TString*)riga.objptr("COS_MAT");
if (val_mat == NULL || real::is_null(*val_mat))
var.set(ZERO);
else
{
const real bdg(*val_bdg);
const real mat(*val_mat);
const real perc = mat * CENTO / bdg;
var.set(perc);
}
}
}
}
else
{
const TString* val = (TString*)riga.objptr(column_name);
if (val)
var.set(*val);
else
var.set_null();
}
const TString* val = (TString*)riga.objptr(column_name);
if (val)
var.set(*val);
else
var.set_null();
}
return var;
}

View File

@ -130,21 +130,7 @@ MESSAGE RESET,F3.108</prescript>
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,F3.102</postscript>
</field>
<field x="77" type="Numero" align="right" width="6" id="103" pattern="1" text="##@,@@">
<prescript description="B1.103 PRESCRIPT">#101 @ \ legge il budget
0 = IF \ se 0 per evitare la divisione per 0 mette 100 nella %
100
ELSE
#102 @
100 *
#101 @ &#2F;
2 ROUND
DUP
100 &#3E; IF
DROP
100
THEN
THEN
#THIS !</prescript>
<source>#COS_PERC</source>
</field>
<field x="86" type="Valuta" align="right" width="14" id="104" pattern="1" text="###.###.###,@@">
<source>#RIC_BDG</source>
@ -178,7 +164,7 @@ THEN
</prescript>
<postscript description="B1.108 POSTSCRIPT">MESSAGE ADD,F3.108</postscript>
</field>
<field x="159" type="Numero" align="right" width="5" id="109" pattern="1">
<field x="159" type="Numero" align="right" width="5" id="109" pattern="1" text="##@,@@">
<font italic="1" face="Arial Narrow" size="8" />
<prescript description="B1.109 PRESCRIPT">#105 @
0