Patch level :10.0 530
Files correlati : Ricompilazione Demo : [ ] Commento : 0001504: bilancio a sezioni contrapposte Descrizione sulla stampa del bilancio a sezioni contrapposte delle commesse: l'esposizione dovrà partire dal conto economico, la dicitura bilancio dovrà essere sostituita con conto economico o situazione conto economico; per quello che riguarda gli eventuali conti non patrimoniali la sezione dovrà chiamarsi riepilogo conti patrimoniali, dovrà contenere dei totali di sezione ed eventualmente un delta risultante dalla somma algebrica di attività e passività. git-svn-id: svn://10.65.10.50/trunk@19645 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2c6da54e05
commit
67df99e22f
@ -504,6 +504,7 @@ class TRecordset_sezioni_contrapposte : public TRecordset
|
|||||||
bool _movimentati, _nonnulli;
|
bool _movimentati, _nonnulli;
|
||||||
TString _daconto, _aconto;
|
TString _daconto, _aconto;
|
||||||
TString4 _tipostampa;
|
TString4 _tipostampa;
|
||||||
|
bool _print_ap;
|
||||||
|
|
||||||
TArray _attivita, _passivita, _costi, _ricavi; // Elenco di saldi contrapposti
|
TArray _attivita, _passivita, _costi, _ricavi; // Elenco di saldi contrapposti
|
||||||
TRecnotype _pos;
|
TRecnotype _pos;
|
||||||
@ -533,13 +534,13 @@ public:
|
|||||||
|
|
||||||
void set_filter(char piano, const char* costo, const char* commessa, const char* fase,
|
void set_filter(char piano, const char* costo, const char* commessa, const char* fase,
|
||||||
const TDate& dal, const TDate& al, word tipimov, bool movimentati, bool nonnulli,
|
const TDate& dal, const TDate& al, word tipimov, bool movimentati, bool nonnulli,
|
||||||
const TString& daconto, const TString& aconto);
|
bool print_ap, const TString& daconto, const TString& aconto);
|
||||||
char tipo_piano() const { return _tipo_piano; }
|
char tipo_piano() const { return _tipo_piano; }
|
||||||
TRecordset_sezioni_contrapposte(char tipo_piano) : _tipo_piano(tipo_piano) { }
|
TRecordset_sezioni_contrapposte(char tipo_piano) : _tipo_piano(tipo_piano) { }
|
||||||
};
|
};
|
||||||
|
|
||||||
TRecnotype TRecordset_sezioni_contrapposte::items_ap() const
|
TRecnotype TRecordset_sezioni_contrapposte::items_ap() const
|
||||||
{ return max(_attivita.items(), _passivita.items()); }
|
{ return _print_ap ? max(_attivita.items(), _passivita.items()) : 0; }
|
||||||
|
|
||||||
TRecnotype TRecordset_sezioni_contrapposte::items_cr() const
|
TRecnotype TRecordset_sezioni_contrapposte::items_cr() const
|
||||||
{ return max(_costi.items(), _ricavi.items()); }
|
{ return max(_costi.items(), _ricavi.items()); }
|
||||||
@ -557,7 +558,7 @@ bool TRecordset_sezioni_contrapposte::move_to(TRecnotype pos)
|
|||||||
|
|
||||||
void TRecordset_sezioni_contrapposte::set_filter(char piano, const char* costo, const char* commessa, const char* fase,
|
void TRecordset_sezioni_contrapposte::set_filter(char piano, const char* costo, const char* commessa, const char* fase,
|
||||||
const TDate& dal, const TDate& al, word tipimov, bool movimentati,
|
const TDate& dal, const TDate& al, word tipimov, bool movimentati,
|
||||||
bool nonnulli, const TString& daconto, const TString& aconto)
|
bool nonnulli, bool print_ap, const TString& daconto, const TString& aconto)
|
||||||
{
|
{
|
||||||
_tipo_piano = piano;
|
_tipo_piano = piano;
|
||||||
|
|
||||||
@ -578,6 +579,7 @@ void TRecordset_sezioni_contrapposte::set_filter(char piano, const char* costo,
|
|||||||
|
|
||||||
_movimentati = movimentati;
|
_movimentati = movimentati;
|
||||||
_nonnulli = nonnulli;
|
_nonnulli = nonnulli;
|
||||||
|
_print_ap = print_ap;
|
||||||
|
|
||||||
_filter.reset();
|
_filter.reset();
|
||||||
_filter.set_costo(costo);
|
_filter.set_costo(costo);
|
||||||
@ -879,25 +881,28 @@ const TVariant& TRecordset_sezioni_contrapposte::get(const char* field) const
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (fld == "SEZIONE")
|
if (fld == "SEZIONE")
|
||||||
return get_tmp_var() = _pos < items_ap() ? "AP" : "CR";
|
{
|
||||||
|
return get_tmp_var() = _pos < items_cr() ? "CR" : "AP";
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
const bool left = fld.starts_with("LEFT:");
|
const bool left = fld.starts_with("LEFT:");
|
||||||
if (_pos < items_ap())
|
if (_pos < items_cr())
|
||||||
{
|
{
|
||||||
if (left)
|
if (left)
|
||||||
return get_fld(_attivita, _pos, field+5);
|
return get_fld(_costi, _pos, field+5);
|
||||||
else
|
else
|
||||||
return get_fld(_passivita, _pos, field+6);
|
return get_fld(_ricavi, _pos, field+6);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
const TRecnotype pos = _pos - items_ap();
|
const TRecnotype pos = _pos - items_cr();
|
||||||
if (pos < items_cr())
|
if (pos < items_ap())
|
||||||
{
|
{
|
||||||
if (left)
|
if (left)
|
||||||
return get_fld(_costi, pos, field+5);
|
return get_fld(_attivita, pos, field+5);
|
||||||
else
|
else
|
||||||
return get_fld(_ricavi, pos, field+6);
|
return get_fld(_passivita, pos, field+6);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return get_tmp_var() = EMPTY_STRING;
|
return get_tmp_var() = EMPTY_STRING;
|
||||||
@ -968,6 +973,7 @@ void TReport_bilancio_sezioni_contrapposte::set_filter(const TMask& m, int row)
|
|||||||
|
|
||||||
const bool movimentati = m.get_int(F_STAMPAV) == 1;
|
const bool movimentati = m.get_int(F_STAMPAV) == 1;
|
||||||
const bool nonnulli = m.get_int(F_STAMPAV) == 2;
|
const bool nonnulli = m.get_int(F_STAMPAV) == 2;
|
||||||
|
const bool print_ap = m.get_bool(F_PRINT_CONTO_ECON);
|
||||||
|
|
||||||
TSheet_field& sf = m.sfield(F_RIGHE);
|
TSheet_field& sf = m.sfield(F_RIGHE);
|
||||||
TMask& sm = sf.sheet_mask();
|
TMask& sm = sf.sheet_mask();
|
||||||
@ -990,7 +996,7 @@ void TReport_bilancio_sezioni_contrapposte::set_filter(const TMask& m, int row)
|
|||||||
}
|
}
|
||||||
|
|
||||||
TRecordset_sezioni_contrapposte* recset = new TRecordset_sezioni_contrapposte(tipo);
|
TRecordset_sezioni_contrapposte* recset = new TRecordset_sezioni_contrapposte(tipo);
|
||||||
recset->set_filter(tipo, costo, commessa, fase, dal, al, tipimov, movimentati, nonnulli, daconto, aconto);
|
recset->set_filter(tipo, costo, commessa, fase, dal, al, tipimov, movimentati, nonnulli, print_ap, daconto, aconto);
|
||||||
TAnal_report::set_recordset(recset);
|
TAnal_report::set_recordset(recset);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
#define F_DATADA 312
|
#define F_DATADA 312
|
||||||
#define F_DATAA 313
|
#define F_DATAA 313
|
||||||
#define F_TIPOSTAMPA 314
|
#define F_TIPOSTAMPA 314
|
||||||
|
#define F_PRINT_CONTO_ECON 315
|
||||||
|
|
||||||
//campi generati dai piani dei conti
|
//campi generati dai piani dei conti
|
||||||
#define F_PIANO 319
|
#define F_PIANO 319
|
||||||
|
@ -115,6 +115,11 @@ BEGIN
|
|||||||
GROUP 4
|
GROUP 4
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_PRINT_CONTO_ECON
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 9 "Stampa situazione conto economico"
|
||||||
|
END
|
||||||
|
|
||||||
SPREADSHEET F_RIGHE -1 -1
|
SPREADSHEET F_RIGHE -1 -1
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 0 11 ""
|
PROMPT 0 11 ""
|
||||||
|
@ -7,6 +7,8 @@
|
|||||||
<field x="41" type="Testo" align="right" width="12" pattern="1" text="Preventivo" />
|
<field x="41" type="Testo" align="right" width="12" pattern="1" text="Preventivo" />
|
||||||
<field x="55" type="Testo" align="right" width="12" pattern="1" text="Consuntivo" />
|
<field x="55" type="Testo" align="right" width="12" pattern="1" text="Consuntivo" />
|
||||||
<field x="69" type="Testo" align="right" width="12" pattern="1" text="Differenza" />
|
<field x="69" type="Testo" align="right" width="12" pattern="1" text="Differenza" />
|
||||||
|
<field x="86" type="Testo" width="6" pattern="1" text="Conto" />
|
||||||
|
<field x="100" type="Testo" width="12" pattern="1" text="Descrizione" />
|
||||||
<field x="125" type="Testo" align="right" width="12" pattern="1" text="Preventivo" />
|
<field x="125" type="Testo" align="right" width="12" pattern="1" text="Preventivo" />
|
||||||
<field x="139" type="Testo" align="right" width="12" pattern="1" text="Consuntivo" />
|
<field x="139" type="Testo" align="right" width="12" pattern="1" text="Consuntivo" />
|
||||||
<field x="153" type="Testo" align="right" width="12" pattern="1" text="Differenza" />
|
<field x="153" type="Testo" align="right" width="12" pattern="1" text="Differenza" />
|
||||||
@ -16,10 +18,10 @@
|
|||||||
</section>
|
</section>
|
||||||
<section type="Head" level="1">
|
<section type="Head" level="1">
|
||||||
<field border="1" radius="100" x="8.21" y="0.91" type="Rettangolo" shade_offset="25" width="150" height="3.5" />
|
<field border="1" radius="100" x="8.21" y="0.91" type="Rettangolo" shade_offset="25" width="150" height="3.5" />
|
||||||
<field x="37.71" y="1.66" type="Testo" valign="center" width="55" height="2" pattern="1" text="BILANCIO A SEZIONI CONTRAPPOSTE">
|
<field x="35" y="1.5" type="Testo" valign="center" width="70" height="2" pattern="1" text="SITUAZIONE CONTI A SEZIONI CONTRAPPOSTE:">
|
||||||
<font face="Arial" bold="1" size="14" />
|
<font face="Arial" bold="1" size="14" />
|
||||||
</field>
|
</field>
|
||||||
<field x="95.71" y="1.66" type="Array" valign="center" width="20" height="2" pattern="1">
|
<field x="108" y="1.5" type="Array" valign="center" width="20" height="2" pattern="1">
|
||||||
<font face="Arial" bold="1" size="14" />
|
<font face="Arial" bold="1" size="14" />
|
||||||
<source>#TIPOSTAMPA</source>
|
<source>#TIPOSTAMPA</source>
|
||||||
<list>
|
<list>
|
||||||
@ -92,13 +94,16 @@
|
|||||||
<section repeat="1" type="Head" level="2" page_break="1">
|
<section repeat="1" type="Head" level="2" page_break="1">
|
||||||
<groupby>SEZIONE</groupby>
|
<groupby>SEZIONE</groupby>
|
||||||
<font face="Arial" bold="1" size="9" />
|
<font face="Arial" bold="1" size="9" />
|
||||||
<field x="26" y="0.5" type="Stringa" width="12" pattern="1">
|
<field x="67" y="0.5" type="Stringa" align="center" width="35" height="1.25" pattern="1">
|
||||||
|
<source>IF(SEZIONE=="AP","SITUAZIONE CONTO ECONOMICO","SITUAZIONE CONTI PATRIMONIALI")</source>
|
||||||
|
</field>
|
||||||
|
<field x="26" y="1.75" type="Stringa" width="12" pattern="1">
|
||||||
<source>IF(SEZIONE=="AP","ATTIVITA'","COSTI")</source>
|
<source>IF(SEZIONE=="AP","ATTIVITA'","COSTI")</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="109" y="0.5" type="Stringa" width="12" pattern="1">
|
<field x="122" y="1.75" type="Stringa" width="12" pattern="1">
|
||||||
<source>IF(SEZIONE=="AP","PASSIVITA'","RICAVI")</source>
|
<source>IF(SEZIONE=="AP","PASSIVITA'","RICAVI")</source>
|
||||||
</field>
|
</field>
|
||||||
<field border="1" x="1" y="1.75" type="Linea" width="164" height="0" pattern="1" />
|
<field border="1" x="1" y="3.25" type="Linea" width="164" height="0" pattern="1" />
|
||||||
</section>
|
</section>
|
||||||
<section type="Body" />
|
<section type="Body" />
|
||||||
<section type="Body" level="1">
|
<section type="Body" level="1">
|
||||||
|
@ -15,10 +15,10 @@
|
|||||||
<section type="Head" level="1">
|
<section type="Head" level="1">
|
||||||
<font face="Arial" size="9" />
|
<font face="Arial" size="9" />
|
||||||
<field border="1" radius="100" x="7.5" y="1" type="Rettangolo" shade_offset="25" width="150" height="3.5" />
|
<field border="1" radius="100" x="7.5" y="1" type="Rettangolo" shade_offset="25" width="150" height="3.5" />
|
||||||
<field x="37" y="1.75" type="Testo" valign="center" width="55" height="2" pattern="1" text="BILANCIO A SEZIONI CONTRAPPOSTE">
|
<field x="28" y="1.75" type="Testo" valign="center" width="75" height="2" pattern="1" text="SITUAZIONE CONTI A SEZIONI CONTRAPPOSTE:">
|
||||||
<font face="Arial" bold="1" size="14" />
|
<font face="Arial" bold="1" size="14" />
|
||||||
</field>
|
</field>
|
||||||
<field x="95" y="1.75" type="Array" valign="center" width="20" height="2" pattern="1">
|
<field x="103" y="1.75" type="Array" valign="center" width="20" height="2" pattern="1">
|
||||||
<font face="Arial" bold="1" size="14" />
|
<font face="Arial" bold="1" size="14" />
|
||||||
<source>#TIPOSTAMPA</source>
|
<source>#TIPOSTAMPA</source>
|
||||||
<list>
|
<list>
|
||||||
@ -81,25 +81,20 @@
|
|||||||
<groupby>SEZIONE</groupby>
|
<groupby>SEZIONE</groupby>
|
||||||
<font face="Arial" bold="1" size="9" />
|
<font face="Arial" bold="1" size="9" />
|
||||||
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2</prescript>
|
<prescript description="H2 PRESCRIPT">MESSAGE RESET,F2</prescript>
|
||||||
<field x="26" y="0.25" type="Stringa" width="12" pattern="1">
|
<field x="62" y="0.75" type="Stringa" align="center" width="35" height="1.25" pattern="1">
|
||||||
|
<source>IF(SEZIONE=="AP","SITUAZIONE CONTO ECONOMICO","SITUAZIONE CONTI PATRIMONIALI")</source>
|
||||||
|
</field>
|
||||||
|
<field x="1" y="1" type="Stringa" hidden="1" width="2" pattern="1">
|
||||||
|
<source>SEZIONE</source>
|
||||||
|
<prescript description="H2.0 PRESCRIPT">MESSAGE COPY,F2.101</prescript>
|
||||||
|
</field>
|
||||||
|
<field x="26" y="1.75" type="Stringa" width="12" pattern="1">
|
||||||
<source>IF(SEZIONE=="AP","ATTIVITA'","COSTI")</source>
|
<source>IF(SEZIONE=="AP","ATTIVITA'","COSTI")</source>
|
||||||
<postscript description="H2.0 POSTSCRIPT">"SEZIONE" @
|
|
||||||
"AP" = IF
|
|
||||||
"PERDITA" "F2.405" !
|
|
||||||
ELSE
|
|
||||||
"UTILE" "F2.405" !
|
|
||||||
THEN</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="109" y="0.25" type="Stringa" width="12" pattern="1">
|
<field x="122" y="1.75" type="Stringa" width="12" pattern="1">
|
||||||
<source>IF(SEZIONE=="AP","PASSIVITA'","RICAVI")</source>
|
<source>IF(SEZIONE=="AP","PASSIVITA'","RICAVI")</source>
|
||||||
<postscript description="H2.0 POSTSCRIPT">"SEZIONE" @
|
|
||||||
"AP" = IF
|
|
||||||
"UTILE" "F2.408" !
|
|
||||||
ELSE
|
|
||||||
"PERDITA" "F2.408" !
|
|
||||||
THEN</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field border="1" x="1" y="1.5" type="Linea" width="164" height="0" pattern="1" />
|
<field border="1" x="1" y="3.25" type="Linea" width="164" height="0" pattern="1" />
|
||||||
</section>
|
</section>
|
||||||
<section type="Body" />
|
<section type="Body" />
|
||||||
<section type="Body" level="1">
|
<section type="Body" level="1">
|
||||||
@ -218,27 +213,34 @@ THEN</postscript>
|
|||||||
<field border="1" x="1" y="1" type="Linea" width="164" height="0" pattern="1" />
|
<field border="1" x="1" y="1" type="Linea" width="164" height="0" pattern="1" />
|
||||||
<field x="46" y="2" type="Testo" width="10" pattern="1" text="TOTALE" />
|
<field x="46" y="2" type="Testo" width="10" pattern="1" text="TOTALE" />
|
||||||
<field x="127" y="2" type="Testo" width="10" pattern="1" text="TOTALE" />
|
<field x="127" y="2" type="Testo" width="10" pattern="1" text="TOTALE" />
|
||||||
|
<field x="8" y="3" type="Stringa" hidden="1" width="2" id="101" pattern="1" />
|
||||||
<field x="63" y="2" type="Valuta" align="right" width="16" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="63" y="2" type="Valuta" align="right" width="16" id="104" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="79" y="2" type="Stringa" align="center" width="2.5" id="105" pattern="1" />
|
<field x="79" y="2" type="Stringa" align="center" width="2.5" id="105" pattern="1" />
|
||||||
<field x="144" y="2" type="Valuta" align="right" width="16" id="204" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
<field x="144" y="2" type="Valuta" align="right" width="16" id="204" pattern="1" hide_zero="1" text="###.###.###,@@" />
|
||||||
<field x="160" y="2" type="Stringa" align="center" width="2.5" id="205" pattern="1" />
|
<field x="160" y="2" type="Stringa" align="center" width="2.5" id="205" pattern="1" />
|
||||||
<field x="14" y="3" type="Valuta" hidden="1" align="right" width="16" id="304" text="###.###.###,@@">
|
<field x="14" y="3" type="Valuta" hidden="1" align="right" width="16" id="304" text="###.###.###,@@">
|
||||||
<source>IF(#105==#205,#104-#204,#104+#204)</source>
|
<source>IF(#105==#205,#104-#204,#104+#204)</source>
|
||||||
<prescript description="F2.304 PRESCRIPT">#THIS @
|
<prescript description="F2.304 PRESCRIPT">#101 @
|
||||||
0 C; IF
|
"AP" = IF
|
||||||
"2@" HIDE
|
|
||||||
"1@" SHOW
|
|
||||||
#THIS @
|
|
||||||
-1 *
|
|
||||||
406 !
|
|
||||||
ELSE
|
|
||||||
"1@" HIDE
|
"1@" HIDE
|
||||||
"2@" SHOW
|
"2@" HIDE
|
||||||
|
ELSE
|
||||||
#THIS @
|
#THIS @
|
||||||
409 !
|
0 C; IF
|
||||||
|
"2@" HIDE
|
||||||
|
"1@" SHOW
|
||||||
|
#THIS @
|
||||||
|
-1 *
|
||||||
|
406 !
|
||||||
|
ELSE
|
||||||
|
"1@" HIDE
|
||||||
|
"2@" SHOW
|
||||||
|
#THIS @
|
||||||
|
409 !
|
||||||
|
THEN
|
||||||
THEN</prescript>
|
THEN</prescript>
|
||||||
</field>
|
</field>
|
||||||
<field x="46" y="3" type="Stringa" width="10" id="405" pattern="1">
|
<field x="46" y="3" type="Testo" width="10" id="405" pattern="1" text="SBILANCIO">
|
||||||
<groups>1</groups>
|
<groups>1</groups>
|
||||||
</field>
|
</field>
|
||||||
<field x="63" y="3" type="Valuta" align="right" width="16" id="406" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="63" y="3" type="Valuta" align="right" width="16" id="406" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
@ -248,7 +250,7 @@ THEN</prescript>
|
|||||||
<groups>1</groups>
|
<groups>1</groups>
|
||||||
<source>#105</source>
|
<source>#105</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="127" y="3" type="Stringa" width="10" id="408" pattern="1">
|
<field x="127" y="3" type="Testo" width="10" id="408" pattern="1" text="SBILANCIO">
|
||||||
<groups>2</groups>
|
<groups>2</groups>
|
||||||
</field>
|
</field>
|
||||||
<field x="144" y="3" type="Valuta" align="right" width="16" id="409" pattern="1" hide_zero="1" text="###.###.###,@@">
|
<field x="144" y="3" type="Valuta" align="right" width="16" id="409" pattern="1" hide_zero="1" text="###.###.###,@@">
|
||||||
|
Loading…
x
Reference in New Issue
Block a user