Patch level :4.0 808

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :stampa sintetica cespiti: aggiunti raggruppamenti per impianto e localita'


git-svn-id: svn://10.65.10.50/trunk@15752 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2007-10-31 14:20:06 +00:00
parent 8b4f266789
commit a3d9558f8e
4 changed files with 215 additions and 37 deletions

View File

@ -115,7 +115,8 @@ void TStampa_sintetica_recordset::set_filter(const TStampa_sintetica_mask& msk)
query << "&&(CODCAT<=" << acat << ")";
}
}
query << "\nBY CODCAT|IDCESPITE";
query << "\nBY CODCAT|CODIMP|CODLOC|IDCESPITE"; //query standard senza raggruppamenti
set(query); //setta la nuova query nel report (che avrebbe solo USE CESPI)
}
@ -126,6 +127,7 @@ class TStampa_sintetica_rep : public TReport
{
int _anno;
int _tpamm;
int _group_codimp, _group_codloc;
TCespite _cespite;
protected:
@ -139,6 +141,10 @@ void TStampa_sintetica_rep::set_filter(const TStampa_sintetica_mask& msk)
{
_anno = msk.get_int(F_ESERCIZIO);
_tpamm = msk.get_int(F_SITUAZIONE);
_group_codimp = msk.get_bool(F_GROUP_CODIMP);
_group_codloc = msk.get_bool(F_GROUP_CODLOC);
((TStampa_sintetica_recordset*) recordset())->set_filter(msk);
}
@ -171,7 +177,8 @@ bool TStampa_sintetica_rep::get_usr_val(const TString& name, TVariant& var) cons
{
TCespite& c = (TCespite&)_cespite;
c.read(idcespite);
c.load_saldi(_tpamm, _anno); }
c.load_saldi(_tpamm, _anno);
}
if (name == "#DESCAT") //categoria (descrizione della categoria corrente)
{
@ -182,21 +189,39 @@ bool TStampa_sintetica_rep::get_usr_val(const TString& name, TVariant& var) cons
var = rec_cac.get("S0");
return true;
}
if (name.starts_with("#COSTO")) //costo storico dell'anno
if (name.starts_with("#COSTO")) //valore dell'anno (iniziale e finale, comprese rivalutazioni e non ammortizz.)
{
if (name.ends_with("FIN")) //tiposaldo finale
{
var = val_amm(_cespite.sal_pro());
}
else //tiposaldo iniziale
{
var = val_amm(_cespite.sal_ini());
}
return true;
}
if (name == "#GROUP_CODIMP")
{
var.set(_group_codimp);
return true;
}
if (name == "#GROUP_CODLOC")
{
var.set(_group_codloc);
return true;
}
if (name == "#PERCAMM") //percentuale ammortamento
{
const TRectype& rec_ammce = _cespite.amm_pro();
var = real(rec_ammce.get_real(AMMCE_PNOR) + rec_ammce.get_real(AMMCE_PACC) + rec_ammce.get_real(AMMCE_PANT));
return true;
}
if (name == "#QAMM") //fondo ammortamento esercizio corrente
if (name == "#QAMM") //quote ammortamento esercizio corrente
{
const TRectype& rec_ammce = _cespite.amm_pro();
var = real(rec_ammce.get_real(AMMCE_QNOR) + rec_ammce.get_real(AMMCE_QACC) + rec_ammce.get_real(AMMCE_QANT));
@ -204,8 +229,9 @@ bool TStampa_sintetica_rep::get_usr_val(const TString& name, TVariant& var) cons
}
if (name == "#FAMM") //fondo ammortamento alla fine dell'esercizio precedente
{
//ragionamento fatto il 31/10/2007;non siamo sicuri che funzioni!
const TRectype& rec_ammce = _cespite.amm_pro();
var = rec_ammce.get_real(AMMCE_PNOR) + rec_ammce.get_real(AMMCE_PACC) + rec_ammce.get_real(AMMCE_PANT);
var = real(rec_ammce.get_real(AMMCE_QNORP) + rec_ammce.get_real(AMMCE_QACCP) + rec_ammce.get_real(AMMCE_QANTP));
return true;
}
if (name == "#RESAMM") //residuo da ammortizzare
@ -218,6 +244,7 @@ bool TStampa_sintetica_rep::get_usr_val(const TString& name, TVariant& var) cons
var.set(_tpamm);
return true;
}
return TReport::get_usr_val(name, var);
}

View File

@ -17,4 +17,7 @@
#define F_D_TO_CAT 115
#define F_SITUAZIONE 116
#define F_REPORT 117
#define F_GROUP_CODIMP 117
#define F_GROUP_CODLOC 118
#define F_REPORT 119

View File

@ -157,4 +157,21 @@ BEGIN
FLAGS "Z"
END
GROUPBOX DLG_NULL 78 4
BEGIN
PROMPT 1 13 "@bRaggruppamenti"
END
BOOLEAN F_GROUP_CODIMP
BEGIN
PROMPT 2 14 "Raggruppa per impianto "
MESSAGE FALSE CLEAR,F_GROUP_CODLOC
MESSAGE TRUE ENABLE,F_GROUP_CODLOC
END
BOOLEAN F_GROUP_CODLOC
BEGIN
PROMPT 2 15 "Raggruppa per localita' "
END
ENDPAGE

View File

@ -7,7 +7,7 @@
<field x="24" y="0.5" type="Testo" align="center" width="10" pattern="1" text="Data" />
<field x="90" y="0.5" type="Testo" width="8" pattern="1" text="Valore" />
<field x="127" y="0.5" type="Testo" width="20" pattern="1" text="Fondo Ammortamento" />
<field x="158.5" y="0.75" type="Testo" align="right" width="15" pattern="1" text="Valore residuo" />
<field x="154.5" y="0.75" type="Testo" align="right" width="15" pattern="1" text="Valore residuo" />
<field x="1.5" y="1.5" type="Testo" width="10" pattern="1" text="Codice" />
<field x="11.5" y="1.5" type="Testo" width="11" pattern="1" text="Alienazione" />
<field x="24.5" y="1.5" type="Testo" width="10" pattern="1" text="Acquisto" />
@ -16,12 +16,12 @@
<field x="72.5" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Iniziale" />
<field x="85.5" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Variazione" />
<field x="98.5" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Finale" />
<field x="112.5" y="1.5" type="Testo" align="right" width="4" pattern="1" text="%Amm" />
<field x="118.5" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Es. corrente" />
<field x="131.5" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Fine es.prec" />
<field x="143.5" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Totale" />
<field x="158.5" y="1.5" type="Testo" align="right" width="15" pattern="1" text="da ammortizzare" />
<field border="1" x="1" y="2.5" type="Linea" width="172" height="0" pattern="1" />
<field x="111.5" y="1.5" type="Testo" align="right" width="4" pattern="1" text="%Amm" />
<field x="115.5" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Es. corr." />
<field x="128.5" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Fine es.prec" />
<field x="140.5" y="1.5" type="Testo" align="right" width="12" pattern="1" text="Totale" />
<field x="154.5" y="1.5" type="Testo" align="right" width="15" pattern="1" text="da ammortizzare" />
<field border="1" x="1" y="2.5" type="Linea" width="168" height="0" pattern="1" />
</section>
<section type="Head" level="1" height="6">
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1.103
@ -34,15 +34,26 @@ MESSAGE RESET,F1.107</prescript>
<field border="1" radius="100" x="18" y="0.5" type="Testo" valign="center" align="center" shade_offset="25" width="130" height="2.5" text="LISTA SINTETICA CESPITI">
<font face="Courier New" bold="1" size="16" />
</field>
<field border="2" y="4" type="Linea" width="176" height="0" pattern="1" />
<field border="2" y="4" type="Linea" width="168" height="0" pattern="1" />
<field x="1" y="4.5" type="Stringa" width="50" pattern="1">
<font italic="1" face="Courier New" bold="1" size="9" />
<source>#SYSTEM.RAGSOC</source>
</field>
<field x="79" y="4.5" type="Data" width="10" pattern="1">
<field x="70" y="4.5" type="Data" width="11" pattern="1">
<font italic="1" face="Courier New" bold="1" size="9" />
<source>#SYSTEM.DATE</source>
</field>
<field x="109" y="4.5" type="Array" width="25" pattern="1">
<font italic="1" face="Courier New" bold="1" size="9" />
<source>#SITUAZIONE</source>
<list>
<li Value="Situazione Fiscale" Code="1" />
<li Value="Situazione Civilistica" Code="2" />
<li Value="Situazione Gestionale" Code="3" />
</list>
</field>
<field x="157" y="4.5" type="Numero" align="right" width="3" pattern="1">
<font italic="1" face="Courier New" size="9" />
<source>#REPORT.PAGE</source>
</field>
</section>
@ -68,6 +79,66 @@ MESSAGE RESET,F2.107</prescript>
<source>CODCAT</source>
</field>
</section>
<section type="Head" level="3">
<groupby>CODIMP</groupby>
<prescript description="H3 PRESCRIPT">#GROUP_CODIMP @
IF
"H3" SHOW
"F3" SHOW
ELSE
"H3" HIDE
"F3" HIDE
THEN
</prescript>
<postscript description="H3 POSTSCRIPT">MESSAGE RESET,F3.103
MESSAGE RESET,F3.102
MESSAGE RESET,F3.101
MESSAGE RESET,F3.104
MESSAGE RESET,F3.105
MESSAGE RESET,F3.106
MESSAGE RESET,F3.107</postscript>
<field x="4" type="Testo" width="12" pattern="1" text="Impianto:">
<font face="Courier New" bold="1" size="9" />
</field>
<field x="16.5" type="Stringa" align="right" width="12" id="101" pattern="1">
<font face="Courier New" bold="1" size="9" />
<source>CODIMP</source>
</field>
<field x="30.5" type="Stringa" width="70" id="102" pattern="1">
<font face="Courier New" bold="1" size="9" />
<prescript description="H3.102 PRESCRIPT">MESSAGE TABLEREAD,CIM,CODIMP,S0</prescript>
</field>
</section>
<section type="Head" level="4">
<groupby>CODLOC</groupby>
<prescript description="H4 PRESCRIPT">#GROUP_CODLOC @
IF
"H4" SHOW
"F4" SHOW
ELSE
"H4" HIDE
"F4" HIDE
THEN
</prescript>
<postscript description="H4 POSTSCRIPT">MESSAGE RESET,F4.103
MESSAGE RESET,F4.102
MESSAGE RESET,F4.101
MESSAGE RESET,F4.104
MESSAGE RESET,F4.105
MESSAGE RESET,F4.106
MESSAGE RESET,F4.107</postscript>
<field x="7" type="Testo" width="12" pattern="1" text="Localita':">
<font face="Courier New" bold="1" size="9" />
</field>
<field x="20" type="Stringa" align="right" width="12" id="101" pattern="1">
<font face="Courier New" bold="1" size="9" />
<source>CODLOC</source>
</field>
<field x="34" type="Stringa" width="70" id="102" pattern="1">
<font face="Courier New" bold="1" size="9" />
<prescript description="H4.102 PRESCRIPT">MESSAGE TABLEREAD,LOC,CODLOC,S0</prescript>
</field>
</section>
<section type="Body" />
<section type="Body" level="1">
<field type="Stringa" width="10" pattern="1">
@ -85,54 +156,68 @@ MESSAGE RESET,F2.107</prescript>
<field x="46" type="Stringa" dynamic_height="1" width="25" height="2" pattern="1">
<source>DESC</source>
</field>
<field x="112" type="Numero" align="right" width="6" pattern="1" text="##@,@@">
<field x="112" type="Numero" align="right" width="3" pattern="1" text="##@">
<source>#PERCAMM</source>
</field>
<field x="72" type="Valuta" align="right" width="12" id="101" pattern="1" text="#########,@@">
<source>#COSTOINI</source>
<postscript description="B1.101 POSTSCRIPT">MESSAGE ADD,F2.101</postscript>
<postscript description="B1.101 POSTSCRIPT">MESSAGE ADD,F2.101
MESSAGE ADD,F3.101
MESSAGE ADD,F4.101</postscript>
</field>
<field x="98" type="Valuta" align="right" width="12" id="102" pattern="1" text="#########,@@">
<source>#COSTOFIN</source>
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,F2.102</postscript>
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,F2.102
MESSAGE ADD,F3.102
MESSAGE ADD,F4.102</postscript>
</field>
<field x="85" type="Valuta" align="right" width="12" id="103" pattern="1" text="#########,@@">
<source>#102-#101</source>
<postscript description="B1.103 POSTSCRIPT">MESSAGE ADD,F2.103</postscript>
<postscript description="B1.103 POSTSCRIPT">MESSAGE ADD,F2.103
MESSAGE ADD,F3.103
MESSAGE ADD,F4.103</postscript>
</field>
<field x="118" type="Valuta" align="right" width="12" id="104" pattern="1" text="#########,@@">
<field x="115" type="Valuta" align="right" width="12" id="104" pattern="1" text="#########,@@">
<source>#QAMM</source>
<postscript description="B1.104 POSTSCRIPT">MESSAGE ADD,F2.104</postscript>
<postscript description="B1.104 POSTSCRIPT">MESSAGE ADD,F2.104
MESSAGE ADD,F3.104
MESSAGE ADD,F4.104</postscript>
</field>
<field x="131" type="Valuta" align="right" width="12" id="105" pattern="1" text="#########,@@">
<field x="128" type="Valuta" align="right" width="12" id="105" pattern="1" text="#########,@@">
<source>#FAMM</source>
<postscript description="B1.105 POSTSCRIPT">MESSAGE ADD,F2.105</postscript>
<postscript description="B1.105 POSTSCRIPT">MESSAGE ADD,F2.105
MESSAGE ADD,F3.105
MESSAGE ADD,F4.105</postscript>
</field>
<field x="144" type="Valuta" align="right" width="12" id="106" pattern="1" text="#########,@@">
<field x="141" type="Valuta" align="right" width="12" id="106" pattern="1" text="#########,@@">
<source>#104+#105</source>
<postscript description="B1.106 POSTSCRIPT">MESSAGE ADD,F2.106</postscript>
<postscript description="B1.106 POSTSCRIPT">MESSAGE ADD,F2.106
MESSAGE ADD,F3.106
MESSAGE ADD,F4.106</postscript>
</field>
<field x="157" type="Valuta" align="right" width="12" id="107" pattern="1" text="#########,@@">
<field x="154" type="Valuta" align="right" width="12" id="107" pattern="1" text="#########,@@">
<source>#RESAMM-#QAMM</source>
<postscript description="B1.107 POSTSCRIPT">MESSAGE ADD,F2.107</postscript>
<postscript description="B1.107 POSTSCRIPT">MESSAGE ADD,F2.107
MESSAGE ADD,F3.107
MESSAGE ADD,F4.107</postscript>
</field>
</section>
<section type="Foot" />
<section type="Foot" level="1">
<font face="Courier New" bold="1" size="8" />
<field border="1" x="1" y="0.5" type="Linea" width="180" height="0" pattern="1" />
<field border="1" x="1" y="0.5" type="Linea" width="168" height="0" pattern="1" />
<field x="45" y="1" type="Testo" width="25" pattern="1" text="Totali generali" />
<field x="71" y="1" type="Valuta" align="right" width="13" id="101" pattern="1" text="#########,@@" />
<field x="97" y="1" type="Valuta" align="right" width="13" id="102" pattern="1" text="#########,@@" />
<field x="84" y="1" type="Valuta" align="right" width="13" id="103" pattern="1" text="#########,@@" />
<field x="117" y="1" type="Valuta" align="right" width="13" id="104" pattern="1" text="#########,@@" />
<field x="130" y="1" type="Valuta" align="right" width="13" id="105" pattern="1" text="#########,@@" />
<field x="143" y="1" type="Valuta" align="right" width="13" id="106" pattern="1" text="#########,@@" />
<field x="156" y="1" type="Valuta" align="right" width="13" id="107" pattern="1" text="#########,@@" />
<field x="114" y="1" type="Valuta" align="right" width="13" id="104" pattern="1" text="#########,@@" />
<field x="127" y="1" type="Valuta" align="right" width="13" id="105" pattern="1" text="#########,@@" />
<field x="140" y="1" type="Valuta" align="right" width="13" id="106" pattern="1" text="#########,@@" />
<field x="153" y="1" type="Valuta" align="right" width="13" id="107" pattern="1" text="#########,@@" />
</section>
<section type="Foot" level="2">
<font face="Courier New" bold="1" size="8" />
<field border="1" x="1" y="0.5" type="Linea" width="196" height="0" pattern="1" />
<field border="1" x="1" y="0.5" type="Linea" width="168" height="0" pattern="1" />
<field x="45" y="1" type="Testo" width="25" pattern="1" text="Totali per categoria" />
<field x="72" y="1" type="Valuta" align="right" width="12" id="101" pattern="1" text="#########,@@">
<postscript description="F2.101 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
@ -143,18 +228,64 @@ MESSAGE RESET,F2.107</prescript>
<field x="85" y="1" type="Valuta" align="right" width="12" id="103" pattern="1" text="#########,@@">
<postscript description="F2.103 POSTSCRIPT">MESSAGE ADD,F1.103</postscript>
</field>
<field x="118" y="1" type="Valuta" align="right" width="12" id="104" pattern="1" text="#########,@@">
<field x="115" y="1" type="Valuta" align="right" width="12" id="104" pattern="1" text="#########,@@">
<postscript description="F2.104 POSTSCRIPT">MESSAGE ADD,F1.104</postscript>
</field>
<field x="131" y="1" type="Valuta" align="right" width="12" id="105" pattern="1" text="#########,@@">
<field x="128" y="1" type="Valuta" align="right" width="12" id="105" pattern="1" text="#########,@@">
<postscript description="F2.105 POSTSCRIPT">MESSAGE ADD,F1.105</postscript>
</field>
<field x="144" y="1" type="Valuta" align="right" width="12" id="106" pattern="1" text="#########,@@">
<field x="141" y="1" type="Valuta" align="right" width="12" id="106" pattern="1" text="#########,@@">
<postscript description="F2.106 POSTSCRIPT">MESSAGE ADD,F1.106</postscript>
</field>
<field x="157" y="1" type="Valuta" align="right" width="12" id="107" pattern="1" text="#########,@@">
<field x="154" y="1" type="Valuta" align="right" width="12" id="107" pattern="1" text="#########,@@">
<postscript description="F2.107 POSTSCRIPT">MESSAGE ADD,F1.107</postscript>
</field>
</section>
<section type="Foot" level="3">
<font italic="1" face="Courier New" bold="1" size="8" />
<field x="45" y="0.5" type="Testo" width="25" pattern="1" text="Totali per impianto" />
<field x="72" y="0.5" type="Valuta" align="right" width="12" id="101" pattern="1" text="#########,@@" />
<field x="98" y="0.5" type="Valuta" align="right" width="12" id="102" pattern="1" text="#########,@@">
<source>#COSTOFIN</source>
</field>
<field x="85" y="0.5" type="Valuta" align="right" width="12" id="103" pattern="1" text="#########,@@">
<source>#102-#101</source>
</field>
<field x="115" y="0.5" type="Valuta" align="right" width="12" id="104" pattern="1" text="#########,@@">
<source>#QAMM</source>
</field>
<field x="128" y="0.5" type="Valuta" align="right" width="12" id="105" pattern="1" text="#########,@@">
<source>#FAMM</source>
</field>
<field x="141" y="0.5" type="Valuta" align="right" width="12" id="106" pattern="1" text="#########,@@">
<source>#104+#105</source>
</field>
<field x="154" y="0.5" type="Valuta" align="right" width="12" id="107" pattern="1" text="#########,@@">
<source>#RESAMM-#QAMM</source>
</field>
</section>
<section type="Foot" level="4">
<font italic="1" face="Courier New" bold="1" size="8" />
<field x="45" y="0.5" type="Testo" width="25" pattern="1" text="Totali per localita'" />
<field x="72" y="0.5" type="Valuta" align="right" width="12" id="101" pattern="1" text="#########,@@" />
<field x="98" y="0.5" type="Valuta" align="right" width="12" id="102" pattern="1" text="#########,@@">
<source>#COSTOFIN</source>
</field>
<field x="85" y="0.5" type="Valuta" align="right" width="12" id="103" pattern="1" text="#########,@@">
<source>#102-#101</source>
</field>
<field x="115" y="0.5" type="Valuta" align="right" width="12" id="104" pattern="1" text="#########,@@">
<source>#QAMM</source>
</field>
<field x="128" y="0.5" type="Valuta" align="right" width="12" id="105" pattern="1" text="#########,@@">
<source>#FAMM</source>
</field>
<field x="141" y="0.5" type="Valuta" align="right" width="12" id="106" pattern="1" text="#########,@@">
<source>#104+#105</source>
</field>
<field x="154" y="0.5" type="Valuta" align="right" width="12" id="107" pattern="1" text="#########,@@">
<source>#RESAMM-#QAMM</source>
</field>
</section>
<sql>USE CESPI KEY 2</sql>
</report>