Patch level :10.0

Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
sistemata mancata considerazione dei fondi ammortamento privato nella stampa registro sintetico cespiti (segnalazione straccia)


git-svn-id: svn://10.65.10.50/branches/R_10_00@22137 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca 2011-05-19 10:28:59 +00:00
parent 2be0561718
commit 57c35af729
3 changed files with 47 additions and 221 deletions

View File

@ -94,12 +94,6 @@ bool TStampa_sintetica_mask::on_field_event(TOperable_field& o, TField_event e,
TStampa_sintetica_mask::TStampa_sintetica_mask() : TAutomask("ce3900"), _preview(false)
{
/*const bool has_ca = dongle().active(CAAUT);
//se la chiave ha CA mostra i campi gruppo 2 (analitica)..
if (has_ca)
show(-2);
else
hide(-2);*/
}
///////////////////////////////////////////////////////////////
@ -108,7 +102,6 @@ TStampa_sintetica_mask::TStampa_sintetica_mask() : TAutomask("ce3900"), _preview
class TStampa_sintetica_recordset : public TISAM_recordset
{
protected:
virtual void set_custom_filter(TCursor& cursor) const;
public:
void set_filter(const TStampa_sintetica_mask& msk);
@ -117,43 +110,6 @@ public:
static const TStampa_sintetica_recordset* myself = NULL;
static bool percutil_func(const TRelation* rel)
{
const long dacat = myself->get_var("#DACAT").as_int();
const long acat = myself->get_var("#ACAT").as_int();
if (dacat > 0L || acat > 0L)
{
const long cespi_cat = rel->curr().get_long(CESPI_CODCAT);
if (cespi_cat < dacat || (acat > 0L && cespi_cat > acat))
return false;
}
const TString16 idcespite = rel->curr().get(CESPI_IDCESPITE);
const int codes = myself->get_var("#CODES").as_int();
const TString& codcdc = myself->get_var("#CODCDC").as_string();
const TString& codcms = myself->get_var("#CODCMS").as_string();
const TString& codfase = myself->get_var("#CODFASE").as_string();
const real percutil = ceca_percutil(idcespite, codes, codcdc, codcms, codfase);
return percutil > ZERO;
}
void TStampa_sintetica_recordset::set_custom_filter(TCursor& cursor) const
{
const TString& codcdc = get_var("#CODCDC").as_string();
const TString& codcms = get_var("#CODCMS").as_string();
const TString& codfase = get_var("#CODFASE").as_string();
if (codcdc.full() || codcms.full() || codfase.full())
{
myself = this;
cursor.set_filterfunction(percutil_func);
}
else
{
myself = NULL;
cursor.set_filterfunction(NULL);
}
}
//metodo per caricare i valori nel recordset dalla maschera...fighissimo!!
void TStampa_sintetica_recordset::set_filter(const TStampa_sintetica_mask& msk)
{
@ -190,18 +146,6 @@ void TStampa_sintetica_recordset::set_filter(const TStampa_sintetica_mask& msk)
set_var("#CODES", long(codes), true);
set_var("#DACAT", dacat, true);
set_var("#ACAT", acat, true);
//parte analitica
/*const TString& codcdc = msk.get(F_CODCDC);
const TString& codcms = msk.get(F_CODCMS);
const TString& codfase = msk.get(F_CODFASE);
if (codcdc.full())
set_var("#CODCDC", codcdc, true);
if (codcms.full())
set_var("#CODCMS", codcms, true);
if (codfase.full())
set_var("#CODFASE", codfase, true);*/
}
////////////////////////////////////////////////////////
@ -212,33 +156,16 @@ class TStampa_sintetica_rep : public TReport
int _anno;
int _tpamm;
int _group_codimp, _group_codloc;
//TString _codcdc, _codcms, _codfase;
TCespite _cespite;
//real _percutil;
//TString16 _cespi_percutil;
protected:
real val_amm(const TRectype& rec_saldi) const;
virtual bool get_usr_val(const TString& name, TVariant& var) const;
//real perc_util() const;
public:
void set_filter(const TStampa_sintetica_mask& msk);
};
//metodo per avere, solo al cambio cespite, la % di utilizzo per la chiave cespite/anno/cdc/cms/fase
//serve nel caso si utilizzi il cespite in analitica (selezioni su cdc/cms/fase)
/*real TStampa_sintetica_rep::perc_util() const
{
const TString& curr_cespite = _cespite.get(CESPI_IDCESPITE);
if (curr_cespite != _cespi_percutil)
{
(TString&)_cespi_percutil = curr_cespite;
(real&)_percutil = ceca_percutil(_cespi_percutil, _anno, _codcdc, _codcms, _codfase);
}
return _percutil;
}*/
void TStampa_sintetica_rep::set_filter(const TStampa_sintetica_mask& msk)
{
_anno = msk.get_int(F_ESERCIZIO);
@ -247,10 +174,6 @@ void TStampa_sintetica_rep::set_filter(const TStampa_sintetica_mask& msk)
_group_codimp = msk.get_bool(F_GROUP_CODIMP);
_group_codloc = msk.get_bool(F_GROUP_CODLOC);
/*_codcdc = msk.get(F_CODCDC);
_codcms = msk.get(F_CODCMS);
_codfase = msk.get(F_CODFASE);*/
TStampa_sintetica_recordset* rs = new TStampa_sintetica_recordset(EMPTY_STRING);
set_recordset(rs);
rs->set_filter(msk);
@ -345,7 +268,6 @@ bool TStampa_sintetica_rep::get_usr_val(const TString& name, TVariant& var) cons
rec_ammmv.get_real(AMMMV_QANT) + rec_ammmv.get_real(AMMMV_QPERSE) +
rec_ammmv.get_real(AMMMV_QPPRIVATE) + rec_ammmv.get_real(AMMMV_FPRIVATO);
}
//quote_ammmv *= perc_util();
var = quote_ammmv;
return true;
}
@ -355,7 +277,6 @@ bool TStampa_sintetica_rep::get_usr_val(const TString& name, TVariant& var) cons
real quote_amm = real(rec_ammce.get_real(AMMCE_QNOR) + rec_ammce.get_real(AMMCE_QACC) +
rec_ammce.get_real(AMMCE_QANT) + rec_ammce.get_real(AMMCE_QPERSE) +
rec_ammce.get_real(AMMCE_QPPRIVATE) + rec_ammce.get_real(AMMCE_FPRIVATO));
//quote_amm *= perc_util();
var = quote_amm;
return true;
}
@ -363,7 +284,6 @@ bool TStampa_sintetica_rep::get_usr_val(const TString& name, TVariant& var) cons
{
const TRectype& rec_ammce = _cespite.amm_pro();
real famm = rec_ammce.get_real(AMMCE_FPRIVATO);
//famm *= perc_util();
var = famm;
return true;
}
@ -376,9 +296,7 @@ bool TStampa_sintetica_rep::get_usr_val(const TString& name, TVariant& var) cons
{
const int anno_acq = _cespite.get_date(CESPI_DTCOMP).year();
if (anno_acq == _anno)
{
valamm = val_amm(_cespite.sal_pro());
}
}
if (!valamm.is_zero())
{
@ -402,7 +320,7 @@ bool TStampa_sintetica_rep::get_usr_val(const TString& name, TVariant& var) cons
var = fondo;
return true;
}
if (name == "#FAMM_FPRIVATO") //fondo ammortamento alla fine dell'esercizio precedente
if (name == "#FAMM_FPRIVATO") //fondo ammortamento privato alla fine dell'esercizio precedente
{
const TRectype& rec_ammce = _cespite.amm_ini();
var = rec_ammce.get_real(AMMCE_FPRIVATO);
@ -421,7 +339,6 @@ bool TStampa_sintetica_rep::get_usr_val(const TString& name, TVariant& var) cons
rec_movam.get_real(MOVAM_QANT) + rec_movam.get_real(MOVAM_QPERSE) +
rec_movam.get_real(MOVAM_QPPRIVATE) + rec_movam.get_real(MOVAM_FPRIVATO);
}
//cesselim *= perc_util();
var = cesselim;
return true;
}
@ -442,21 +359,6 @@ bool TStampa_sintetica_rep::get_usr_val(const TString& name, TVariant& var) cons
var.set(_anno);
return true;
}
/*if (name == "#CODCDC")
{
var.set(_codcdc);
return true;
}
if (name == "#CODCMS")
{
var.set(_codcms);
return true;
}
if (name == "#CODFASE")
{
var.set(_codfase);
return true;
}*/
return TReport::get_usr_val(name, var);
}

View File

@ -156,82 +156,6 @@ BEGIN
PROMPT 42 14 "Escludere i cespiti alienati"
END
/*GROUPBOX DLG_NULL 78 5
BEGIN
PROMPT 1 16 "@bAnalitica"
GROUP 2
END
STRING F_CODCMS 20
BEGIN
PROMPT 2 17 "Commessa "
USE LF_COMMESSE
INPUT CODCMS F_CODCMS
DISPLAY "Codice@20" CODCMS
DISPLAY "Descrizione@50" DESCRIZ
OUTPUT F_CODCMS CODCMS
OUTPUT F_DESCMS DESCRIZ
CHECKTYPE NORMAL
GROUP 2
END
STRING F_DESCMS 50 39
BEGIN
PROMPT 36 17 ""
USE LF_COMMESSE KEY 2
INPUT DESCRIZ F_DESCMS
DISPLAY "Descrizione@50" DESCRIZ
DISPLAY "Codice@20" CODCMS
COPY OUTPUT F_CODCMS
CHECKTYPE NORMAL
GROUP 2
END
STRING F_CODFASE 10
BEGIN
PROMPT 2 18 "Fase "
USE LF_FASI
INPUT CODCMSFAS F_CODCMS SELECT
INPUT CODFASE F_CODFASE
DISPLAY "Fase@10" CODFASE
DISPLAY "Descrizione@50" DESCRIZ
OUTPUT F_CODFASE CODFASE
OUTPUT F_DESFASE DESCRIZ
CHECKTYPE NORMAL
GROUP 2
END
STRING F_DESFASE 50 39
BEGIN
PROMPT 36 18 ""
FLAGS "D"
GROUP 2
END
STRING F_CODCDC 20
BEGIN
PROMPT 2 19 "C. costo "
USE LF_CDC
INPUT CODCOSTO F_CODCDC
DISPLAY "Codice@20" CODCOSTO
DISPLAY "Descrizione@50" DESCRIZ
OUTPUT F_CODCDC CODCOSTO
OUTPUT F_DESCDC DESCRIZ
CHECKTYPE NORMAL
GROUP 2
END
STRING F_DESCDC 50 39
BEGIN
PROMPT 36 19 ""
USE LF_CDC KEY 2
INPUT DESCRIZ F_DESCDC
DISPLAY "Descrizione@50" DESCRIZ
DISPLAY "Codice@20" CODCOSTO
COPY OUTPUT F_CODCDC
GROUP 2
END*/
ENDPAGE
ENDMASK

View File

@ -60,24 +60,24 @@
</list>
</field>
</section>
<section type="Head" level="2" bg_color="#000000" height="1.5" page_break="1" pattern="10" sh_angle="270">
<section type="Head" level="2" bg_color="#000000" page_break="1" pattern="10" sh_angle="270">
<groupby>CODCAT</groupby>
<font face="Arial" bold="1" size="9" />
<font face="Arial" bold="1" size="8" />
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2
</prescript>
<field x="1" y="0.25" type="Testo" txt_color="#FFFFFF" width="12" pattern="1" text="Categoria:" />
<field x="18" y="0.25" type="Stringa" txt_color="#FFFFFF" width="70" id="98" pattern="1">
<field x="1" type="Testo" bg_color="#000000" txt_color="#FFFFFF" width="12" pattern="1" text="Categoria:" />
<field x="18" type="Stringa" txt_color="#FFFFFF" width="70" id="98" pattern="1">
<source>#DESCAT</source>
<postscript description="H2.98 POSTSCRIPT">MESSAGE COPY,F2.98</postscript>
</field>
<field x="14" y="0.25" type="Numero" align="right" txt_color="#FFFFFF" width="2" id="101" pattern="1">
<field x="14" type="Numero" align="right" txt_color="#FFFFFF" width="2" id="101" pattern="1">
<source>CODCAT</source>
<postscript description="H2.101 POSTSCRIPT">MESSAGE COPY,F2.97</postscript>
</field>
</section>
<section type="Head" level="3" hidden="1" bg_color="#808080" sh_color="#C0C0C0" pattern="10" sh_angle="270">
<groupby>CODIMP</groupby>
<font face="Arial" size="9" />
<font face="Arial" size="8" />
<prescript description="H3 PRESCRIPT">#GROUP_CODIMP @
IF
"H3" SHOW
@ -166,7 +166,7 @@ MESSAGE ADD,F3.103
MESSAGE ADD,F4.103</postscript>
</field>
<field x="109" type="Valuta" align="right" width="12" id="104" pattern="1" text="#########,@@">
<source>#QAMM+#QAMMMV</source>
<source>#QAMM+#QAMMMV-#QAMM_FPRIVATO</source>
<postscript description="B1.104 POSTSCRIPT">MESSAGE ADD,F2.104
MESSAGE ADD,F3.104
MESSAGE ADD,F4.104</postscript>
@ -206,67 +206,67 @@ MESSAGE ADD,F4.108</postscript>
<source>#REPORT.PAGE</source>
</field>
</section>
<section type="Foot" level="1" bg_color="#000000" height="1.5" pattern="2">
<font italic="1" face="Arial" bold="1" size="9" />
<field border="2" x="1" y="0.25" type="Linea" fg_color="#FFFFFF" width="168" height="0" pattern="1" />
<field x="1" y="0.5" type="Testo" txt_color="#FFFFFF" width="25" pattern="1" text="Totali generali" />
<field x="66" y="0.5" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="101" pattern="1" text="#########,@@" />
<field x="90" y="0.5" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="102" pattern="1" text="#########,@@" />
<field x="78" y="0.5" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="103" pattern="1" text="#########,@@" />
<field x="109" y="0.5" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="104" pattern="1" text="#########,@@" />
<field x="121" y="0.5" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="105" pattern="1" text="#########,@@" />
<field x="133" y="0.5" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="106" pattern="1" text="#########,@@" />
<field x="145" y="0.5" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="107" pattern="1" text="#########,@@" />
<field x="157" y="0.5" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="108" pattern="1" text="#########,@@" />
<section type="Foot" level="1" bg_color="#000000" pattern="2">
<font italic="1" face="Arial" bold="1" size="8" />
<field border="2" x="1" type="Linea" fg_color="#FFFFFF" width="168" height="0" pattern="1" />
<field x="1" type="Testo" txt_color="#FFFFFF" width="25" pattern="1" text="Totali generali" />
<field x="66" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="101" pattern="1" text="#########,@@" />
<field x="90" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="102" pattern="1" text="#########,@@" />
<field x="78" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="103" pattern="1" text="#########,@@" />
<field x="109" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="104" pattern="1" text="#########,@@" />
<field x="121" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="105" pattern="1" text="#########,@@" />
<field x="133" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="106" pattern="1" text="#########,@@" />
<field x="145" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="107" pattern="1" text="#########,@@" />
<field x="157" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="108" pattern="1" text="#########,@@" />
</section>
<section type="Foot" level="2" bg_color="#000000" height="1.5" pattern="10" sh_angle="90">
<font face="Arial" bold="1" size="9" />
<field x="1" y="0.25" type="Testo" txt_color="#FFFFFF" width="15" pattern="1" text="Totale Categoria" />
<field x="17" y="0.25" type="Stringa" txt_color="#FFFFFF" width="2" id="97" pattern="1" />
<field x="20" y="0.25" type="Stringa" txt_color="#FFFFFF" width="30" id="98" pattern="1">
<section type="Foot" level="2" bg_color="#000000" pattern="10" sh_angle="90">
<font face="Arial" bold="1" size="8" />
<field x="1" type="Testo" txt_color="#FFFFFF" width="15" pattern="1" text="Totale Categoria" />
<field x="17" type="Stringa" txt_color="#FFFFFF" width="2" id="97" pattern="1" />
<field x="20" type="Stringa" txt_color="#FFFFFF" width="30" id="98" pattern="1">
<font italic="1" face="Arial Narrow" bold="1" size="9" />
</field>
<field x="66" y="0.25" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="101" pattern="1" text="#########,@@">
<field x="66" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="101" pattern="1" text="#########,@@">
<postscript description="F2.101 POSTSCRIPT">MESSAGE ADD,F1.101</postscript>
</field>
<field x="90" y="0.25" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="102" pattern="1" text="#########,@@">
<field x="90" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="102" pattern="1" text="#########,@@">
<postscript description="F2.102 POSTSCRIPT">MESSAGE ADD,F1.102</postscript>
</field>
<field x="78" y="0.25" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="103" pattern="1" text="#########,@@">
<field x="78" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="103" pattern="1" text="#########,@@">
<postscript description="F2.103 POSTSCRIPT">MESSAGE ADD,F1.103</postscript>
</field>
<field x="109" y="0.25" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="104" pattern="1" text="#########,@@">
<field x="109" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="104" pattern="1" text="#########,@@">
<postscript description="F2.104 POSTSCRIPT">MESSAGE ADD,F1.104</postscript>
</field>
<field x="121" y="0.25" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="105" pattern="1" text="#########,@@">
<field x="121" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="105" pattern="1" text="#########,@@">
<postscript description="F2.105 POSTSCRIPT">MESSAGE ADD,F1.105</postscript>
</field>
<field x="133" y="0.25" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="106" pattern="1" text="#########,@@">
<field x="133" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="106" pattern="1" text="#########,@@">
<postscript description="F2.106 POSTSCRIPT">MESSAGE ADD,F1.106</postscript>
</field>
<field x="145" y="0.25" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="107" pattern="1" text="#########,@@">
<field x="145" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="107" pattern="1" text="#########,@@">
<postscript description="F2.107 POSTSCRIPT">MESSAGE ADD,F1.107</postscript>
</field>
<field x="157" y="0.25" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="108" pattern="1" text="#########,@@">
<field x="157" type="Valuta" align="right" txt_color="#FFFFFF" width="12" id="108" pattern="1" text="#########,@@">
<postscript description="F2.108 POSTSCRIPT">MESSAGE ADD,F1.108</postscript>
</field>
</section>
<section type="Foot" level="3" hidden="1" bg_color="#808080" sh_color="#C0C0C0" height="1.5" pattern="10" sh_angle="90">
<font italic="1" face="Arial" bold="1" size="9" />
<field x="4" y="0.25" type="Testo" width="15" pattern="1" text="Totale impianto" />
<field border="2" x="1" y="1.25" type="Linea" width="168" height="0" pattern="1" />
<field x="20" y="0.25" type="Stringa" width="12" id="97" pattern="1" />
<field x="32.5" y="0.25" type="Stringa" width="30" id="98" pattern="1">
<section type="Foot" level="3" hidden="1" bg_color="#808080" sh_color="#C0C0C0" pattern="10" sh_angle="90">
<font italic="1" face="Arial" bold="1" size="8" />
<field x="4" type="Testo" width="15" pattern="1" text="Totale impianto" />
<field border="2" x="1" y="1" type="Linea" width="168" height="0" pattern="1" />
<field x="20" type="Stringa" width="12" id="97" pattern="1" />
<field x="32.5" type="Stringa" width="30" id="98" pattern="1">
<font italic="1" face="Arial Narrow" bold="1" size="9" />
</field>
<field x="66" y="0.25" type="Valuta" align="right" width="12" id="101" pattern="1" text="#########,@@" />
<field x="90" y="0.25" type="Valuta" align="right" width="12" id="102" pattern="1" text="#########,@@" />
<field x="78" y="0.25" type="Valuta" align="right" width="12" id="103" pattern="1" text="#########,@@" />
<field x="109" y="0.25" type="Valuta" align="right" width="12" id="104" pattern="1" text="#########,@@" />
<field x="121" y="0.25" type="Valuta" align="right" width="12" id="105" pattern="1" text="#########,@@" />
<field x="133" y="0.25" type="Valuta" align="right" width="12" id="106" pattern="1" text="#########,@@" />
<field x="145" y="0.25" type="Valuta" align="right" width="12" id="107" pattern="1" text="#########,@@" />
<field x="157" y="0.25" type="Valuta" align="right" width="12" id="108" pattern="1" text="#########,@@" />
<field x="66" type="Valuta" align="right" width="12" id="101" pattern="1" text="#########,@@" />
<field x="90" type="Valuta" align="right" width="12" id="102" pattern="1" text="#########,@@" />
<field x="78" type="Valuta" align="right" width="12" id="103" pattern="1" text="#########,@@" />
<field x="109" type="Valuta" align="right" width="12" id="104" pattern="1" text="#########,@@" />
<field x="121" type="Valuta" align="right" width="12" id="105" pattern="1" text="#########,@@" />
<field x="133" type="Valuta" align="right" width="12" id="106" pattern="1" text="#########,@@" />
<field x="145" type="Valuta" align="right" width="12" id="107" pattern="1" text="#########,@@" />
<field x="157" type="Valuta" align="right" width="12" id="108" pattern="1" text="#########,@@" />
</section>
<section type="Foot" level="4" hidden="1" bg_color="#C0C0C0" sh_color="#FFFFFF" pattern="10" sh_angle="90">
<font italic="1" face="Arial" bold="1" size="8" />