Patch level : 2.2
Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunta stampa date limite nelle stampe di bilancio, git-svn-id: svn://10.65.10.50/trunk@13779 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7423255928
commit
10509cff01
@ -22,8 +22,8 @@ THEN
|
||||
</field>
|
||||
<field border="2" x="1" y="2.5" type="Linea" width="161" height="0" pattern="1" />
|
||||
<field x="13" y="3" type="Testo" align="center" width="7" pattern="1" text="N.Reg." />
|
||||
<field x="33.5" y="3" type="Testo" align="center" width="10" pattern="1" text="Data Doc." />
|
||||
<field x="45.5" y="3" type="Testo" align="center" width="8" pattern="1" text="N.Reg.CG" />
|
||||
<field x="33" y="3" type="Testo" align="center" width="10" pattern="1" text="Data Doc." />
|
||||
<field x="45" y="3" type="Testo" align="center" width="8" pattern="1" text="N.Reg.CG" />
|
||||
<field x="55" y="3" type="Testo" align="center" width="6" pattern="1" text="N.Doc." />
|
||||
<field x="62" y="3" type="Testo" align="center" width="7" pattern="1" text="Tp.Doc." />
|
||||
<field x="69" y="3" type="Testo" align="center" width="11" pattern="1" text="Descrizione" />
|
||||
@ -103,9 +103,6 @@ THEN
|
||||
<field x="131.18" y="3" type="Testo" align="center" width="15" pattern="1" text="Dare" />
|
||||
<field x="146.18" y="3" type="Testo" align="center" width="15" pattern="1" text="Avere" />
|
||||
<field border="1" x="8.18" y="4" type="Linea" width="154" height="0" pattern="1" />
|
||||
<field x="-9.88" y="1" type="Data" width="10" id="121" pattern="1">
|
||||
<source>DATAREG</source>
|
||||
</field>
|
||||
<field x="1" y="1" type="Data" width="10" id="121" pattern="1">
|
||||
<source>MOVANA.DATAREG</source>
|
||||
</field>
|
||||
|
@ -85,8 +85,32 @@ bool TPrint_bilancio_ca_mask::on_field_event(TOperable_field& o, TField_event e,
|
||||
{
|
||||
case F_BILANCIO:
|
||||
case F_TIPOSTAMPA:
|
||||
case F_STAMPA:
|
||||
if (e == fe_init || e == fe_modify)
|
||||
{
|
||||
test_compatible_report();
|
||||
|
||||
bool enable_from = false, enable_to = false;
|
||||
if (get_int(F_STAMPA) == 1) // Stampa per data limite
|
||||
{
|
||||
enable_from = get(F_BILANCIO) == "V"; // Bilancio di verifica
|
||||
enable_to = true;
|
||||
}
|
||||
if (!enable_from || !enable_to) // Cerco di proporre le date giuste se possibile
|
||||
{
|
||||
const int anno = get_int(F_ANNO);
|
||||
if (anno > 0)
|
||||
{
|
||||
TEsercizi_contabili esc;
|
||||
TDate dal, al;
|
||||
esc.code2range(anno, dal, al);
|
||||
if (!enable_from) set(F_DATADA, dal);
|
||||
if (!enable_to) set(F_DATAA, al);
|
||||
}
|
||||
}
|
||||
enable(F_DATADA, enable_from);
|
||||
enable(F_DATAA, enable_to);
|
||||
}
|
||||
break;
|
||||
case F_REPORT:
|
||||
if (e == fe_button)
|
||||
@ -364,8 +388,7 @@ void TReport_bilancio_verifica::set_filter(const TMask& m, int row)
|
||||
if (anno > 0)
|
||||
{
|
||||
TEsercizi_contabili esc;
|
||||
dal = esc[anno].inizio();
|
||||
al = esc[anno].fine();
|
||||
esc.code2range(anno, dal, al);
|
||||
}
|
||||
|
||||
// 1 = per data limite; 2 = all'ultima immissione
|
||||
@ -747,7 +770,7 @@ const TVariant& TRecordset_sezioni_contrapposte::get_fld(const TArray& a, int r,
|
||||
if (fld == "SEZIONEC")
|
||||
{
|
||||
get_section(sc._consuntivo, var);
|
||||
}
|
||||
} else
|
||||
if (fld == "SEZIONEP" || fld == "SEZIONEV")
|
||||
{
|
||||
get_section(sc._preventivo, var);
|
||||
@ -779,6 +802,10 @@ const TVariant& TRecordset_sezioni_contrapposte::get(const char* field) const
|
||||
return get_tmp_var() = _filter.commessa();
|
||||
if (fld == "#FASE")
|
||||
return get_tmp_var() = _filter.fase();
|
||||
if (fld == "#DATA_INIZIALE")
|
||||
return get_tmp_var() = _da_data;
|
||||
if (fld == "#DATA_FINALE")
|
||||
return get_tmp_var() = _a_data;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -859,8 +886,7 @@ void TReport_bilancio_sezioni_contrapposte::set_filter(const TMask& m, int row)
|
||||
if (anno > 0)
|
||||
{
|
||||
TEsercizi_contabili esc;
|
||||
dal = esc[anno].inizio();
|
||||
al = esc[anno].fine();
|
||||
esc.code2range(anno, dal, al);
|
||||
}
|
||||
tipimov |= _saldanal_ultima_imm;
|
||||
}
|
||||
|
@ -102,13 +102,11 @@ END
|
||||
DATE F_DATADA
|
||||
BEGIN
|
||||
PROMPT 59 5 "Dal "
|
||||
GROUP 4 5
|
||||
END
|
||||
|
||||
DATE F_DATAA
|
||||
BEGIN
|
||||
PROMPT 59 6 "Al "
|
||||
GROUP 5
|
||||
END
|
||||
|
||||
LIST F_STAMPAV 20
|
||||
|
@ -13,6 +13,16 @@
|
||||
<field x="164" type="Numero" align="right" width="4" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field x="-0.19" y="1" type="Testo" width="20" pattern="1" text="Movimenti dal:">
|
||||
<prescript>MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field x="19.81" y="1" type="Data" width="12" pattern="1">
|
||||
<source>#DATA_INIZIALE</source>
|
||||
</field>
|
||||
<field x="35.81" y="1" type="Testo" width="4" pattern="1" text="al" />
|
||||
<field x="39.81" y="1" type="Data" width="12" pattern="1">
|
||||
<source>#DATA_FINALE</source>
|
||||
</field>
|
||||
<field y="2" type="Testo" width="20" pattern="1" text="Centro di costo:" />
|
||||
<field x="20" y="2" type="Stringa" width="24" pattern="1">
|
||||
<source>#COSTO</source>
|
||||
|
@ -7,12 +7,23 @@
|
||||
<field type="Stringa" width="60" pattern="1">
|
||||
<source>#SYSTEM.RAGSOC</source>
|
||||
</field>
|
||||
<field x="73" type="Testo" width="16" pattern="1" text="Data di stampa:" />
|
||||
<field x="90" type="Data" width="12" pattern="1">
|
||||
<source>#SYSTEM.DATE</source>
|
||||
</field>
|
||||
<field x="164" type="Numero" align="right" width="4" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field y="1" type="Testo" width="20" pattern="1" text="Movimenti dal:">
|
||||
<prescript description="H0.0 PRESCRIPT">MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field x="20" y="1" type="Data" width="12" pattern="1">
|
||||
<source>#DATA_INIZIALE</source>
|
||||
</field>
|
||||
<field x="36" y="1" type="Testo" width="4" pattern="1" text="al" />
|
||||
<field x="40" y="1" type="Data" width="12" pattern="1">
|
||||
<source>#DATA_FINALE</source>
|
||||
</field>
|
||||
<field y="2" type="Testo" width="20" pattern="1" text="Centro di costo:" />
|
||||
<field x="20" y="2" type="Stringa" width="24" pattern="1">
|
||||
<source>#COSTO</source>
|
||||
@ -49,6 +60,7 @@
|
||||
<field border="1" x="-1" y="8" type="Linea" width="168" height="0" pattern="1" />
|
||||
</section>
|
||||
<section type="Head" level="1" height="3">
|
||||
<prescript description="H1 PRESCRIPT">"F1" AZZERA_TOTALI</prescript>
|
||||
<field border="1" radius="100" x="1" type="Testo" valign="center" align="center" shade_offset="25" width="166" height="2.5" text="BILANCIO DI VERIFICA">
|
||||
<font face="Courier New" bold="1" size="16" />
|
||||
</field>
|
||||
|
@ -12,6 +12,16 @@
|
||||
<field x="165" type="Numero" align="right" width="4" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field x="0.75" y="1" type="Testo" width="20" pattern="1" text="Movimenti dal:">
|
||||
<prescript>MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field x="20.75" y="1" type="Data" width="12" pattern="1">
|
||||
<source>#DATA_INIZIALE</source>
|
||||
</field>
|
||||
<field x="36.75" y="1" type="Testo" width="4" pattern="1" text="al" />
|
||||
<field x="40.75" y="1" type="Data" width="12" pattern="1">
|
||||
<source>#DATA_FINALE</source>
|
||||
</field>
|
||||
<field x="1" y="2" type="Testo" width="20" pattern="1" text="Centro di costo:" />
|
||||
<field x="21" y="2" type="Stringa" width="24" pattern="1">
|
||||
<source>#COSTO</source>
|
||||
|
@ -12,6 +12,16 @@
|
||||
<field x="165" type="Numero" align="right" width="4" pattern="1">
|
||||
<source>#REPORT.PAGE</source>
|
||||
</field>
|
||||
<field x="1.09" y="1.08" type="Testo" width="20" pattern="1" text="Movimenti dal:">
|
||||
<prescript>MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ</prescript>
|
||||
</field>
|
||||
<field x="21.09" y="1.08" type="Data" width="12" pattern="1">
|
||||
<source>#DATA_INIZIALE</source>
|
||||
</field>
|
||||
<field x="37.09" y="1.08" type="Testo" width="4" pattern="1" text="al" />
|
||||
<field x="41.09" y="1.08" type="Data" width="12" pattern="1">
|
||||
<source>#DATA_FINALE</source>
|
||||
</field>
|
||||
<field x="1" y="2" type="Testo" width="20" pattern="1" text="Centro di costo:" />
|
||||
<field x="21" y="2" type="Stringa" width="24" pattern="1">
|
||||
<source>#COSTO</source>
|
||||
|
@ -50,6 +50,10 @@ const TVariant& TPconana_recordset::get(const char* field) const
|
||||
return get_tmp_var() = _bill.commessa();
|
||||
if (column_name == "#FASE")
|
||||
return get_tmp_var() = _bill.fase();
|
||||
if (column_name == "#DATA_INIZIALE")
|
||||
return get_tmp_var() = _dal;
|
||||
if (column_name == "#DATA_FINALE")
|
||||
return get_tmp_var() = _al;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -230,13 +234,13 @@ void TPconana_recordset::set_custom_filter(TCursor& cursor) const
|
||||
TRectype darec(logic), arec(logic);
|
||||
if (logic == LF_PCON)
|
||||
{
|
||||
if (_da_conto.not_empty())
|
||||
if (_da_conto.full())
|
||||
{
|
||||
darec.put(PCN_GRUPPO, _da_conto.mid(0,3));
|
||||
darec.put(PCN_CONTO, _da_conto.mid(3,3));
|
||||
darec.put(PCN_SOTTOCONTO, _da_conto.mid(6,6));
|
||||
}
|
||||
if (_a_conto.not_empty())
|
||||
if (_a_conto.full())
|
||||
{
|
||||
arec.put(PCN_GRUPPO, _a_conto.mid(0,3));
|
||||
arec.put(PCN_CONTO, _a_conto.mid(3,3));
|
||||
@ -421,13 +425,13 @@ int TAnal_bill::compare(const TSortable& s) const
|
||||
|
||||
bool TAnal_bill::match(const TAnal_bill& b) const
|
||||
{
|
||||
if (b._conto.not_empty() && _conto != b._conto)
|
||||
if (b._conto.full() && _conto != b._conto)
|
||||
return false;
|
||||
if (b._costo.not_empty() && _costo != b._costo)
|
||||
if (b._costo.full() && _costo != b._costo)
|
||||
return false;
|
||||
if (b._commessa.not_empty() && _commessa != b._commessa)
|
||||
if (b._commessa.full() && _commessa != b._commessa)
|
||||
return false;
|
||||
if (b._fase.not_empty() && _fase != b._fase)
|
||||
if (b._fase.full() && _fase != b._fase)
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
@ -635,34 +639,34 @@ bool TSaldi_cache::int_saldo_annuale(const TAnal_bill& b, int da_anno, int ad_an
|
||||
bool movim = false;
|
||||
TString query, select;
|
||||
|
||||
if (b.costo().not_empty())
|
||||
if (b.costo().full())
|
||||
select << "(COSTO=='" << b.costo() << "')";
|
||||
if (b.commessa().not_empty())
|
||||
if (b.commessa().full())
|
||||
{
|
||||
if (select.not_empty()) select << "&&";
|
||||
if (select.full()) select << "&&";
|
||||
select << "(COMMESSA=='" << b.commessa() << "')";
|
||||
}
|
||||
if (b.fase().not_empty())
|
||||
if (b.fase().full())
|
||||
{
|
||||
if (select.not_empty()) select << "&&";
|
||||
if (select.full()) select << "&&";
|
||||
select << "(FASE=='" << b.fase() << "')";
|
||||
}
|
||||
if (da_anno > 0)
|
||||
{
|
||||
if (select.not_empty()) select << "&&";
|
||||
if (select.full()) select << "&&";
|
||||
select << "(ANNO>=" << da_anno << ")";
|
||||
}
|
||||
if (ad_anno > 0)
|
||||
{
|
||||
if (select.not_empty()) select << "&&";
|
||||
if (select.full()) select << "&&";
|
||||
select << "(ANNO<=" << ad_anno << ")";
|
||||
}
|
||||
|
||||
query << "USE SALDANA KEY 2";
|
||||
if (select.not_empty())
|
||||
if (select.full())
|
||||
query << " SELECT " << select;
|
||||
|
||||
if (b.conto().not_empty())
|
||||
if (b.conto().full())
|
||||
{
|
||||
query << "\nFROM CONTO=" << b.conto();
|
||||
if (da_anno > 0)
|
||||
@ -747,27 +751,27 @@ bool TSaldi_cache::int_saldo_movimenti(const TAnal_bill& b,
|
||||
|
||||
TString query, select;
|
||||
|
||||
if (b.costo().not_empty())
|
||||
if (b.costo().full())
|
||||
{
|
||||
if (select.not_empty())
|
||||
if (select.full())
|
||||
select << "&&";
|
||||
select << "(CODCOSTO==\"" << b.costo() << "\")";
|
||||
}
|
||||
if (b.commessa().not_empty())
|
||||
if (b.commessa().full())
|
||||
{
|
||||
if (select.not_empty())
|
||||
if (select.full())
|
||||
select << "&&";
|
||||
select << "(CODCMS==\"" << b.commessa() << "\")";
|
||||
}
|
||||
if (b.fase().not_empty())
|
||||
if (b.fase().full())
|
||||
{
|
||||
if (select.not_empty())
|
||||
if (select.full())
|
||||
select << "&&";
|
||||
select << "(CODFASE==\"" << b.fase() << "\")";
|
||||
}
|
||||
|
||||
query << "USE RMOVANA KEY 2\n";
|
||||
if (select.not_empty())
|
||||
if (select.full())
|
||||
query << "SELECT " << select << "\n";
|
||||
|
||||
// Faccio la join solo se mi serve il tipo movimento in testata
|
||||
|
Loading…
x
Reference in New Issue
Block a user