Patch level : 12.00 1256

Files correlati     : cg1.exe  cg1500a1.rep cg1500a2.rep
Commento:
stampa bilanci avanzata
This commit is contained in:
Alessandro Bonazzi 2023-04-18 00:39:21 +02:00
parent 82b55f259c
commit 4b95782d3d
4 changed files with 45 additions and 14 deletions

View File

@ -93,7 +93,7 @@ GET_FIRM_DATA</prescript>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="1" hidden="" page_break="" can_break="" pattern="1">
<field border="1" x="65" deactivated="" type="Linea" hidden="" link="" dynamic_height="1" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
<field border="1" x="65" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
<field deactivated="" type="Numero" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="3" codval="" id="101" pattern="1" hide_zero="1" text="">
<source>GRUPPO1</source>
</field>
@ -151,7 +151,7 @@ THEN</postscript>
</section>
<section repeat="" y="48" keep_with_next="" deactivated="" hidden_if_needed="1" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1" />
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" page_break="" can_break="" pattern="1">
<field border="1" x="65" deactivated="" type="Linea" hidden="" link="" dynamic_height="1" shade_offset="" codval="" height="5" id="" pattern="1" hide_zero="" text="" />
<field border="1" x="65" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="5" id="" pattern="1" hide_zero="" text="" />
<field x="15" y="1" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="29" codval="" id="" pattern="1" hide_zero="" text="TOTALE " />
<field x="81" y="1" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="29" codval="" id="" pattern="1" hide_zero="" text="TOTALE" />
<field x="15" y="4" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="29" codval="" id="" pattern="1" hide_zero="" text="TOTALE A PAREGGIO" />
@ -220,7 +220,7 @@ THEN
THEN</prescript>
</field>
<field x="14" y="2" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="30" codval="" id="353" pattern="1" hide_zero="" text="PERDITA DELL'ESERCIZIO IN CORSO" />
<field x="9" y="3" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="35" codval="" id="354" pattern="1" hide_zero="" text="SBILANCIO DELL'ESERCIZIO PRECEDENTE" />
<field x="9" y="3" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="35" codval="" id="354" pattern="1" hide_zero="" text="PERDITA DELL'ESERCIZIO PRECEDENTE" />
<field x="45" y="2" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="356" pattern="1" hide_zero="1" text="###.###.###,@@" />
<field x="45" y="3" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="357" pattern="1" hide_zero="1" text="###.###.###,@@" />
<field x="45" y="4" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="358" pattern="1" hide_zero="1" text="###.###.###,@@">
@ -232,7 +232,7 @@ THEN</prescript>
#THIS !</prescript>
</field>
<field x="81" y="2" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="29" codval="" id="453" pattern="1" hide_zero="" text="UTILE DELL'ESERCIZIO IN CORSO" />
<field x="75.5" y="3" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="35" codval="" id="454" pattern="1" hide_zero="" text="SBILANCIO DELL'ESERCIZIO PRECEDENTE" />
<field x="75.5" y="3" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="35" codval="" id="454" pattern="1" hide_zero="" text="UTILE DELL'ESERCIZIO PRECEDENTE" />
<field x="111" y="2" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="456" pattern="1" hide_zero="1" text="###.###.###,@@" />
<field x="111" y="3" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="457" pattern="1" hide_zero="1" text="###.###.###,@@" />
<field x="111" y="4" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="458" pattern="1" hide_zero="1" text="###.###.###,@@">

View File

@ -93,7 +93,7 @@ GET_FIRM_DATA</prescript>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="1" hidden="" page_break="" can_break="" pattern="1">
<field border="1" x="65" deactivated="" type="Linea" hidden="" link="" dynamic_height="1" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
<field border="1" x="65" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" id="" pattern="1" hide_zero="" text="" />
<field deactivated="" type="Numero" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="3" codval="" id="101" pattern="1" hide_zero="1" text="">
<source>GRUPPO1</source>
</field>
@ -151,7 +151,7 @@ THEN</postscript>
</section>
<section repeat="" y="48" keep_with_next="" deactivated="" hidden_if_needed="1" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1" />
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" page_break="" can_break="" pattern="1">
<field border="1" x="65" deactivated="" type="Linea" hidden="" link="" dynamic_height="1" shade_offset="" codval="" height="5" id="" pattern="1" hide_zero="" text="" />
<field border="1" x="65" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" codval="" height="5" id="" pattern="1" hide_zero="" text="" />
<field x="15" y="1" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="29" codval="" id="" pattern="1" hide_zero="" text="TOTALE " />
<field x="81" y="1" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="29" codval="" id="" pattern="1" hide_zero="" text="TOTALE" />
<field x="15" y="4" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="29" codval="" id="" pattern="1" hide_zero="" text="TOTALE A PAREGGIO" />
@ -189,8 +189,8 @@ THEN
THEN</prescript>
</field>
<field x="45" deactivated="" type="Valuta" valign="center" hidden="1" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="309" pattern="1" hide_zero="" text="###.###.###,@@">
<source>#307-#308</source>
<prescript description="">#THIS @
<source>#307+#308</source>
<prescript description="F1.309 PRESCRIPT">#THIS @
0
&#3E;
IF
@ -220,7 +220,7 @@ THEN
THEN</prescript>
</field>
<field x="14" y="2" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="30" codval="" id="353" pattern="1" hide_zero="" text="UTILE DELL'ESERCIZIO IN CORSO" />
<field x="9" y="3" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="35" codval="" id="354" pattern="1" hide_zero="" text="SBILANCIO DELL'ESERCIZIO PRECEDENTE" />
<field x="9" y="3" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="35" codval="" id="354" pattern="1" hide_zero="" text="UTILE DELL'ESERCIZIO PRECEDENTE" />
<field x="45" y="2" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="356" pattern="1" hide_zero="1" text="###.###.###,@@" />
<field x="45" y="3" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="357" pattern="1" hide_zero="1" text="###.###.###,@@" />
<field x="45" y="4" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="358" pattern="1" hide_zero="1" text="###.###.###,@@">
@ -232,7 +232,7 @@ THEN</prescript>
#THIS !</prescript>
</field>
<field x="80" y="2" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="30" codval="" id="453" pattern="1" hide_zero="" text="PERDITA DELL'ESERCIZIO IN CORSO" />
<field x="75.5" y="3" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="35" codval="" id="454" pattern="1" hide_zero="" text="SBILANCIO DELL'ESERCIZIO PRECEDENTE" />
<field x="75.5" y="3" deactivated="" type="Testo" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="35" codval="" id="454" pattern="1" hide_zero="" text="PERDITA DELL'ESERCIZIO PRECEDENTE" />
<field x="111" y="2" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="456" pattern="1" hide_zero="1" text="###.###.###,@@" />
<field x="111" y="3" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="457" pattern="1" hide_zero="1" text="###.###.###,@@" />
<field x="111" y="4" deactivated="" type="Valuta" valign="center" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="19" codval="" id="458" pattern="1" hide_zero="1" text="###.###.###,@@">

View File

@ -214,6 +214,10 @@ bool TBilancio_mask::on_field_event(TOperable_field& o, TField_event e, long jol
show(F_QUADRATURA, bilancio == 2 && tipo_stampa == 1 && data == datalim);
}
break;
case F_NORMALI:
if (e == fe_init && o.mask().get(DLG_PROFILE).blank())
o.set("X");
break;
}
return true;
}
@ -249,6 +253,29 @@ void TSezioni_contrapposte_recset::calculate_saldo(const TRectype & rec)
else
_last_saldo.data_limite_bilancio(tipo_data, _last_conto.gruppo(), _last_conto.conto(), _last_conto.sottoconto(), _dataini, _datalim, _last_indbil, _tipi_mov);
}
if (_esercizio_prec > 0)
{
if (_last_indbil > 2 && _last_indbil < 5)
{
TSaldo prec;
if (_contsep.full())
prec.saldo_cont_sep(tipo_data, _last_conto.gruppo(), _last_conto.conto(), _last_conto.sottoconto(), _esercizio_prec, _datalim, _last_indbil, _contsep, _tipi_mov);
else
prec.ultima_immissione_bilancio(_esercizio_prec, _last_conto.gruppo(), _last_conto.conto(), _last_conto.sottoconto(), _last_indbil, _tipi_mov, false);
TImporto s('D', prec.saldo());
_sbilancio_prec += s;
}
else
{
TImporto s('D', _last_saldo.saldoini());
_sbilancio_prec += s;
}
}
}
void TSezioni_contrapposte_recset::update_record(const TRectype & rec) // da fare
@ -257,7 +284,6 @@ void TSezioni_contrapposte_recset::update_record(const TRectype & rec) // da far
TString key;
TImporto s('D', _last_saldo.saldoini());
_sbilancio_prec += s;
s += TImporto('D', _last_saldo.prgdare());
s += TImporto('A', _last_saldo.prgavere());
s.valore().round(TCurrency::get_firm_dec());
@ -544,6 +570,10 @@ void TSezioni_contrapposte_recset::update_index() // da fare
void TSezioni_contrapposte_recset::set_filter(const TMask& msk)
{
_esercizio = msk.get_int(F_ANNO);
if (_esercizio > 0)
_esercizio_prec = esercizi().pred(_esercizio);
else
_esercizio_prec = 0;
_tipo_data = msk.get_int(F_STAMPA);
_dataini = msk.get_date(F_DATAINI);
_datalim = msk.get_date(F_DATALIM);
@ -672,12 +702,12 @@ TRecordset* TSezioni_contrapposte::recordset() const
void TSezioni_contrapposte::init(const char * name, int sez)
{
TFilename repname(name);
const int sez_bil = (sez + 1) * 2 - 1;
const int sez_bil = sez * 2 - 1;
repname = repname.name_only();
if (atoi(repname.right(1)) > 0)
repname.rtrim(1);
repname << (sez + 1);
repname << sez;
load(repname);
_recset->set_sez(sez_bil);
_st_codici_conto = _mask.get_bool(F_CODICI);
@ -1273,7 +1303,7 @@ void TStampa_bilanci_avanzata::execute_print(TReport_book & book, TAutomask & ma
{
if (mask.get_int(F_BILANCIO) == SEZIONI_CONTRAPPOSTE)
{
for (int i = 0; i < 4; i++)
for (int i = 1; i < 4; i++)
{
((TSezioni_contrapposte &)rep).init(report_name(mask), i);
TReport_application::execute_print(book, mask, rep, type);

View File

@ -76,6 +76,7 @@ class TSezioni_contrapposte_recset : TRecordset
int _sez_bil;
int _esercizio;
int _esercizio_prec;
int _tipo_data;
TDate _dataini;
TDate _datalim;