Compare commits

..

No commits in common. "60703e234112a205094e16238aaebc629f8105f3" and "f1b281a38e07b246b946b0a01fe0a8fd838b1c9c" have entirely different histories.

2 changed files with 11 additions and 27 deletions

View File

@ -638,7 +638,6 @@ public:
bool significativo() const { return _significativo; }
bool esiste_saldo() const { return _rec_presente_ec || _rec_presente_ep; }
bool esiste_saldo_ep() const { return _rec_presente_ep; }
bool is_zero() const { return _saldo == ZERO; }
int annoes() const { return _annoes; }
void set_annoes(int anno) { _annoes = anno; }

View File

@ -154,7 +154,7 @@ void TProspettoScadenze::print_real(TString& dest, const real& num)
if(!_m->get_bool(F_DECIMALI))
elaCur = elaCur.sub(0, elaCur.find(","));
dest = elaCur;
dest.right_just(12);
dest.right_just(10);
}
bool fil_function(const TRelation *r)
@ -407,13 +407,10 @@ void TProspettoScadenze::calcola_saldo(TAssoc_array * l)
saldo.set_annoes(codes);
const TDate dataini(e.esercizio(codes).inizio());
saldo.data_limite_bilancio(Competenza, g, c, s, dataini, _limop, indbil_conto);
if (!saldo.is_zero())
{
if (_tipost == fornitori)
ll->_sl -= saldo.saldo();
else
ll->_sl += saldo.saldo();
}
if (_tipost == fornitori)
ll->_sl -= saldo.saldo();
else
ll->_sl += saldo.saldo();
}
// aggiorno il totale generale
TAssoc_array& at = (TAssoc_array&) _t[1];
@ -810,10 +807,7 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what, TAssoc_array *
// If what is 0 prints single total... else prints also general total
{
reset_print();
TAssoc_array& xassoc = l == nullptr ? (TAssoc_array&) _t[what] : *l;
const int dec = _m->get_bool(F_DECIMALI) ? 2 : 0;
TAssoc_array& xassoc = l == nullptr ? (TAssoc_array&) _t[what] : *l;
if (_cod_pre.blank())
{
xassoc.destroy();
@ -824,8 +818,6 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what, TAssoc_array *
xassoc.get_keys(as);
as.sort();
if (!what && !_excel)
calcola_saldo(l);
for (int i=0; i < items; i++)
{
TString k(as.row(i)); // Chiave di ordinamento(valuta)
@ -835,12 +827,13 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what, TAssoc_array *
int pos = 49;
TString rw(255);
if (!what && !_excel)
calcola_saldo(l);
rw = "";
if (_sinfasce)
{
for (int i = _sfasce; i >= 0; i--)
{
v._s[i].round(dec);
if (v._s[i] != ZERO)
{
print_real(value, v._s[i]);
@ -852,7 +845,6 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what, TAssoc_array *
}
else
{
v._s[0].round(dec);
if (v._s[0] != ZERO)
{
print_real(value, v._s[0]);
@ -866,7 +858,6 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what, TAssoc_array *
{
for (int i = 0; i <= _nsfasce; i++)
{
v._ns[i].round(dec);
if (v._ns[i] != ZERO)
{
print_real(value, v._ns[i]);
@ -878,7 +869,6 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what, TAssoc_array *
}
else
{
v._s[0].round(dec);
if (v._ns[0] != ZERO)
{
print_real(value, v._ns[0]);
@ -888,32 +878,27 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what, TAssoc_array *
pos += 12;
}
tot.round(dec);
if (tot != ZERO)
{
print_real(value, tot);
rw << format("@%dg%12s", pos, (const char*) value);
}
pos += 12;
v._es.round(dec);
if (v._es != ZERO)
{
print_real(value, v._es);
rw << format("@%dg%12s", pos, (const char*) value);
}
pos += 12;
v._sl.round(dec);
if (v._sl != ZERO)
if (v._sl != ZERO)
{
print_real(value, v._sl);
rw << format("@%dg%12s", pos, (const char*) value);
}
pos += 12;
real diff = v._sl - (tot - v._es);
diff.round(dec);
if (!diff.is_zero())
const real diff = v._sl - (tot - v._es);
if (!diff.is_zero())
{
print_real(value, diff);
rw << format("@%dg%12s", pos, (const char*) value);