Merge branch 'R12.00' of http://10.65.20.33/sirio/CAMPO/campo into R12.00

This commit is contained in:
smen 2022-03-15 16:42:16 +01:00
commit a3fdceb081
6 changed files with 18 additions and 20 deletions

View File

@ -11,3 +11,4 @@ ca3700.msk
Ripristinata l'esportazione sintetica del rendiconto
corretta la selezione dei report era possibile selezionare un report non compatibile
Corretti i filtri sui dalsi di analitica nelle stampe considerava anch il saldi con contabilità sepatrata non vuota ma questi sono già compresi nei saldi complessivi (contabilità seprata vuota

View File

@ -16,7 +16,7 @@ Patch = 1122
Versione = 21511200
[ca]
Data = 14-12-2021
Data = 14-03-2022
Descrizione = Contabilita' Analitica
Dischi = 1
Moduli = ba,cg

Binary file not shown.

View File

@ -554,8 +554,8 @@ void TRecordset_sezioni_contrapposte::add_conto(int indbil, const TString& b) //
}
select << (select.full() ? "&&" : "") << "(TRIM(" << SALDANA_FASE << "[1," << len << "])==\"" << _filter.fase() << "\") ";
}
if (_contsep.full())
select << (select.full() ? "&&" : "") << "(" << SALDANA_CONTSEP << _contsep << "\") ";
// if (_contsep.full())
select << (select.full() ? "&&" : "") << "(" << SALDANA_CONTSEP << "==\"" << _contsep << "\")";
if (select.full())
query << "SELECT " << select;

View File

@ -194,6 +194,7 @@ int TPrint_saldana_recordset::estrai_saldi(const TRectype& saldana, const int in
const TImporto imp_saldo(saldana.get_char(SALDANA_SEZIONE), saldana.get_real(SALDANA_SALDO));
const TImporto imp_saldop(saldana.get_char(SALDANA_SEZIONEP), saldana.get_real(SALDANA_SALDOP));
const TImporto imp_saldov(saldana.get_char(SALDANA_SEZIONEV), saldana.get_real(SALDANA_SALDOV));
if (!imp_saldo.is_zero() || !imp_saldop.is_zero() || !imp_saldov.is_zero())
{
if (indbil == 3) //indbil=3 costi
@ -361,8 +362,8 @@ void TPrint_saldana_recordset::aggiorna_importo(TAssoc_array& riga_array, const
//ci sono tutti i tipi di saldo, ma solo quelli che rientrano nei parametri iniziali..
//..verranno considerati (_tipostima,indbil)
TImporto imp_saldo, imp_saldop;
estrai_saldi(saldana, indbil, imp_saldo, imp_saldop, is_detrazione, is_totale);
estrai_saldi(saldana, indbil, imp_saldo, imp_saldop, is_detrazione, is_totale);
if (is_detrazione) // Se è una detrazione deve sottrarre l'importo = scambia la sezione
{
imp_saldo.swap_section();
@ -609,13 +610,12 @@ const TString& TPrint_saldana_recordset::crea_select(const int logicnum)
}
break;
}
if (_contsep.full())
{
TString clause = SALDANA_CONTSEP;
clause << "=\"" << _contsep << "\"";
ca_append_and(select, clause);
}
TString clause = SALDANA_CONTSEP;
clause << "=\"" << _contsep << "\"";
ca_append_and(select, clause);
return get_tmp_string() = select;
}

View File

@ -796,32 +796,29 @@ bool TSaldi_cache::int_saldo_annuale(const TAnal_bill& b, const TString & contse
TString query, select;
if (b.costo().full())
select << "(COSTO=='" << (b.costo() == "~" ? "" : b.costo()) << "')";
select << "(" << SALDANA_COSTO << "=='" << (b.costo() == "~" ? "" : b.costo()) << "')";
if (b.commessa().full())
{
if (select.full()) select << "&&";
select << "(COMMESSA=='" << (b.commessa() == "~" ? "" : b.commessa()) << "')";
select << "(" << SALDANA_COMMESSA << "=='" << (b.commessa() == "~" ? "" : b.commessa()) << "')";
}
if (b.fase().full())
{
if (select.full()) select << "&&";
select << "(FASE=='" << (b.fase() == "~" ? "" : b.fase()) << "')";
select << "(" << SALDANA_FASE << "=='" << (b.fase() == "~" ? "" : b.fase()) << "')";
}
if (da_anno > 0)
{
if (select.full()) select << "&&";
select << "(ANNO>=" << da_anno << ")";
select << "(" << SALDANA_ANNO << ">=" << da_anno << ")";
}
if (ad_anno > 0)
{
if (select.full()) select << "&&";
select << "(ANNO<=" << ad_anno << ")";
select << "(" << SALDANA_ANNO << "<=" << ad_anno << ")";
}
if (contsep.full())
{
if (select.full()) select << "&&";
select << "(CONTSEP=='" << contsep << "')";
}
if (select.full()) select << "&&";
select << "(" << SALDANA_CONTSEP << "=='" << contsep << "')";
query << "USE SALDANA KEY 2";
if (select.full())
query << " SELECT " << select;