Patch level :4.0 740

Files correlati     :ca3 & co.
Ricompilazione Demo : [ ]
Commento            :stampa bilancio di commessa con prima implementazione richieste adolfiche!


git-svn-id: svn://10.65.10.50/trunk@15467 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2007-07-02 14:41:30 +00:00
parent c3066e7e38
commit fc694bc745
3 changed files with 69 additions and 32 deletions

View File

@ -81,12 +81,12 @@ BEGIN
PROMPT 2 7 "Includere esercizi successivi (vita intera)"
END
RADIOBUTTON F_TIPOSTIMA 1 24
RADIOBUTTON F_TIPOSTIMA 1 35
BEGIN
PROMPT 45 7 "Tipo di stima"
FLAGS "Z"
PROMPT 35 7 "Tipo di stima"
ITEM "T|Tempo"
ITEM "C|Costi"
ITEM "C|Costi consuntivi\Ricavi preventivi"
ITEM "R|Costi consuntivi\Ricavi consuntivi"
END
BOOLEAN F_FASI
@ -98,7 +98,7 @@ END
STRING F_FASE 10
BEGIN
PROMPT 25 8 "Fase "
PROMPT 2 9 "Fase "
END
GROUPBOX F_PRE0 76 5

View File

@ -24,22 +24,23 @@
<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="10" y="3" type="Testo" width="35" pattern="1" text="Costi e ricavi di Commessa maturati nell'esercizio">
<field x="2" y="3" type="Testo" width="35" pattern="1" text="Costi e ricavi di Commessa maturati nell'esercizio">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="50" y="3" type="Stringa" width="4" pattern="1">
<field x="40" y="3" type="Stringa" width="4" pattern="1">
<font face="Arial Narrow" bold="1" size="9" />
<source>ANNO</source>
</field>
<field x="67" y="3" type="Testo" width="15" pattern="1" text="Stima avanzamento ">
<field x="49" y="3" type="Testo" width="15" pattern="1" text="Stima avanzamento ">
<font italic="1" face="Arial Narrow" size="9" />
</field>
<field x="83" y="3" type="Array" width="10" pattern="1">
<field x="64" y="3" type="Array" width="30" pattern="1">
<font face="Arial Narrow" bold="1" size="9" />
<source>TIPOSTIMA</source>
<list>
<li Value="TEMPO" Code="T" />
<li Value="COSTI" Code="C" />
<li Value="COSTI Consuntivi \ RICAVI Preventivi" Code="C" />
<li Value="COSTI Consuntivi \ RICAVI Consuntivi" Code="R" />
</list>
</field>
<field x="99" y="3" type="Testo" width="25" pattern="1" text="Profondita' della struttura in esame">

View File

@ -398,28 +398,51 @@ int TPrint_saldana_recordset::estrai_saldi(const TRecordset& saldana, const int
//stampa bilancio di commessa (_tipo=8)
if (_tipo == 8)
{
if (_tipostima == 'C' && indbil == 3)
{
const TImporto imp_saldo(saldana.get(SALDANA_SEZIONE).as_string()[0],
saldana.get(SALDANA_SALDO).as_real());
saldo = imp_saldo;
flag |= saldo.is_zero() ? 0 : 1;
}
else
saldo.reset();
if (_tipostima == 'R') //stampa adolfica nuova con ricavi consuntivi (spezzabili per fase)
{
const TImporto imp_saldo(saldana.get(SALDANA_SEZIONE).as_string()[0],
saldana.get(SALDANA_SALDO).as_real());
saldo.reset();
saldop.reset();
if (!imp_saldo.is_zero())
{
if (indbil == 3) //colonna costi
{
saldo = imp_saldo;
flag = 1;
}
else //indbil == 4; colonna ricavi
{
saldop = imp_saldo;
flag = 2;
}
}
}
else //programma originale con ricavi di budget totalizzati ad inizio commessa
{
if (_tipostima == 'C' && indbil == 3)
{
const TImporto imp_saldo(saldana.get(SALDANA_SEZIONE).as_string()[0],
saldana.get(SALDANA_SALDO).as_real());
saldo = imp_saldo;
flag |= saldo.is_zero() ? 0 : 1;
}
else
saldo.reset();
if (_tipostima == 'T' || (_tipostima == 'C' && indbil == 4)) //stima Tempo o (Costi e indbil=ricavo)
{
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],
saldana.get(SALDANA_SALDOV).as_real());
saldop = imp_saldop;
saldop += imp_saldov;
flag |= saldop.is_zero() ? 0 : 2;
}
else
saldop.reset();
if (_tipostima == 'T' || (_tipostima == 'C' && indbil == 4)) //stima Tempo o (Costi e indbil=ricavo)
{
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],
saldana.get(SALDANA_SALDOV).as_real());
saldop = imp_saldop;
saldop += imp_saldov;
flag |= saldop.is_zero() ? 0 : 2;
}
else
saldop.reset();
}
}
// stampa stima ricavi (_tipo=9)
else
@ -781,7 +804,20 @@ const TVariant& TPrint_saldana_recordset::get(const char* column_name) const
else
if (strcmp(column_name, "TIPOSTIMA") == 0)
{
var.set(_tipostima == 'T' ? "T" : "C");
switch (_tipostima)
{
case 'T':
var.set("T");
break;
case 'C':
var.set("C");
break;
case 'R':
var.set("R");
break;
default:
break;
}
}
else
if (strcmp(column_name, "DEPTH") == 0)