Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : corretta stampa pharmatex git-svn-id: svn://10.65.10.50/trunk@19553 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
88cc0c65ff
commit
b8ab31b9e2
@ -336,7 +336,7 @@ void TProspettoScadenze::compute_all(TPartita& p, TBill& bill)
|
||||
{
|
||||
if (_nsinfasce)
|
||||
{
|
||||
for (int i = _nsfasce + 1; i >= 0; i--)
|
||||
for (int i = _nsfasce - 1; i >= 0; i--)
|
||||
{
|
||||
const TDate & limdate = (TDate&)_ns_date[i];
|
||||
if (limdate.ok() && d > limdate)
|
||||
@ -353,7 +353,8 @@ void TProspettoScadenze::compute_all(TPartita& p, TBill& bill)
|
||||
{
|
||||
if (_sinfasce)
|
||||
{
|
||||
for (int i = _sfasce + 1; i >= 0; i--)
|
||||
|
||||
for (int i = _sfasce - 1; i >= 0; i--)
|
||||
{
|
||||
const TDate & limdate = (TDate&)_s_date[i];
|
||||
if (limdate.ok() && d <= limdate)
|
||||
@ -782,15 +783,15 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what)
|
||||
rw = "";
|
||||
if (_sinfasce)
|
||||
{
|
||||
for (int i = _sfasce; i > 0; i--)
|
||||
for (int i = _sfasce - 1; i >= 0; i--)
|
||||
{
|
||||
if (v._s[i] != ZERO)
|
||||
{
|
||||
print_real(value, v._s[i]);
|
||||
rw << format("@%dg%12s", pos, (const char*) value);
|
||||
rw << format("@%dg%13s", pos, (const char*) value);
|
||||
tot += v._s[i];
|
||||
}
|
||||
pos += 12;
|
||||
pos += 13;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -798,23 +799,23 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what)
|
||||
if (v._s[0] != ZERO)
|
||||
{
|
||||
print_real(value, v._s[0]);
|
||||
rw << format("@%dg%12s", pos, (const char*) value);
|
||||
rw << format("@%dg%13s", pos, (const char*) value);
|
||||
tot += v._s[0];
|
||||
}
|
||||
pos += 12;
|
||||
pos += 13;
|
||||
}
|
||||
|
||||
if (_nsinfasce)
|
||||
{
|
||||
for (int i = 0; i <= _nsfasce; i++)
|
||||
for (int i = 0; i < _nsfasce; i++)
|
||||
{
|
||||
if (v._ns[i] != ZERO)
|
||||
{
|
||||
print_real(value, v._ns[i]);
|
||||
rw << format("@%dg%12s", pos, (const char*) value);
|
||||
rw << format("@%dg%13s", pos, (const char*) value);
|
||||
tot += v._ns[i];
|
||||
}
|
||||
pos += 12;
|
||||
pos += 13;
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -822,36 +823,36 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what)
|
||||
if (v._ns[0] != ZERO)
|
||||
{
|
||||
print_real(value, v._ns[0]);
|
||||
rw << format("@%dg%12s", pos, (const char*) value);
|
||||
rw << format("@%dg%13s", pos, (const char*) value);
|
||||
tot += v._ns[0];
|
||||
}
|
||||
pos += 12;
|
||||
pos += 13;
|
||||
}
|
||||
|
||||
if (tot != ZERO)
|
||||
{
|
||||
print_real(value, tot);
|
||||
rw << format("@%dg%12s", pos, (const char*) value);
|
||||
rw << format("@%dg%13s", pos, (const char*) value);
|
||||
}
|
||||
pos += 12;
|
||||
pos += 13;
|
||||
if (v._es != ZERO)
|
||||
{
|
||||
print_real(value, v._es);
|
||||
rw << format("@%dg%12s", pos, (const char*) value);
|
||||
rw << format("@%dg%13s", pos, (const char*) value);
|
||||
}
|
||||
pos += 12;
|
||||
pos += 13;
|
||||
if (v._sl != ZERO)
|
||||
{
|
||||
print_real(value, v._sl);
|
||||
rw << format("@%dg%12s", pos, (const char*) value);
|
||||
rw << format("@%dg%13s", pos, (const char*) value);
|
||||
}
|
||||
pos += 12;
|
||||
pos += 13;
|
||||
|
||||
const real diff = v._sl - (tot - v._es);
|
||||
if (diff != ZERO)
|
||||
{
|
||||
print_real(value, diff);
|
||||
rw << format("@%dg%12s", pos, (const char*) value);
|
||||
rw << format("@%dg%13s", pos, (const char*) value);
|
||||
}
|
||||
|
||||
if (rw.not_empty())
|
||||
@ -914,7 +915,7 @@ void TProspettoScadenze::export_totali_rows()
|
||||
|
||||
if (_sinfasce)
|
||||
{
|
||||
for (int i = _sfasce - 1; i > 0; i--)
|
||||
for (int i = _sfasce; i > 0; i--)
|
||||
{
|
||||
_recset->set(_colnames.row(col++), v._s[i]);
|
||||
tot += v._s[i];
|
||||
@ -1010,18 +1011,18 @@ void TProspettoScadenze::print_header()
|
||||
if (_sinfasce)
|
||||
{
|
||||
rw << format("@%dg >%3d gg", pos, _slimiti[_sfasce - 1] * 30);
|
||||
pos += 12;
|
||||
pos += 13;
|
||||
for (int i = _sfasce -1 ; i > 0; i--)
|
||||
{
|
||||
rw << format("@%dg <= %3d gg", pos, _slimiti[i] * 30);
|
||||
pos += 12;
|
||||
pos += 13;
|
||||
}
|
||||
set_header(soh, format("@%dg%s", 40+((pos-40)/2), "SCADUTO"));
|
||||
set_header(soh, format("@%dg%s",40+((pos-40)/2), "SCADUTO"));
|
||||
}
|
||||
else
|
||||
{
|
||||
set_header(soh, format("@%dg%12s", pos, "SCADUTO"));
|
||||
pos += 12;
|
||||
set_header(soh, format("@%dg%13s", pos, "SCADUTO"));
|
||||
pos += 13;
|
||||
}
|
||||
|
||||
const int pos_ascad = pos;
|
||||
@ -1030,24 +1031,24 @@ void TProspettoScadenze::print_header()
|
||||
for (int i = 0; i < _nsfasce; i++)
|
||||
{
|
||||
rw << format("@%dg <= %3d gg", pos, _nslimiti[i] * 30);
|
||||
pos = pos + 12;
|
||||
pos = pos + 13;
|
||||
}
|
||||
rw << format("@%dg >%3d gg", pos, _nslimiti[_nsfasce - 1] * 30);
|
||||
pos = pos + 12;
|
||||
pos = pos + 13;
|
||||
set_header(soh, format("@%dg%s", pos_ascad+((pos-pos_ascad)/2)-5, "A SCADERE"));
|
||||
}
|
||||
else
|
||||
{
|
||||
set_header(soh, format("@%dg%12s", pos, "A SCADERE"));
|
||||
pos += 12;
|
||||
set_header(soh, format("@%dg%13s", pos, "A SCADERE"));
|
||||
pos += 13;
|
||||
}
|
||||
set_header(soh, format("@%dg%12s", pos, "TOTALE"));
|
||||
pos += 12;
|
||||
set_header(soh, format("@%dg%12s", pos, "ESPOSTO"));
|
||||
pos += 12;
|
||||
set_header(soh, format("@%dg%12s", pos, "SALDO"));
|
||||
pos += 12;
|
||||
set_header(soh, format("@%dg%12s", pos, " DIFFERENZA"));
|
||||
set_header(soh, format("@%dg%13s", pos, "TOTALE"));
|
||||
pos += 13;
|
||||
set_header(soh, format("@%dg%13s", pos, "ESPOSTO"));
|
||||
pos += 13;
|
||||
set_header(soh, format("@%dg%13s", pos, "SALDO"));
|
||||
pos += 13;
|
||||
set_header(soh, format("@%dg%13s", pos, " DIFFERENZA"));
|
||||
set_header(++soh,(const char *)rw);
|
||||
break;
|
||||
}
|
||||
@ -1067,13 +1068,13 @@ int TProspettoScadenze::calc_last_column()
|
||||
int pos = 112;
|
||||
|
||||
if (_sinfasce)
|
||||
pos += _sfasce * 12;
|
||||
pos += _sfasce * 13;
|
||||
else
|
||||
pos += 12;
|
||||
pos += 13;
|
||||
if (_nsinfasce)
|
||||
pos = pos + _nsfasce * 12;
|
||||
pos = pos + _nsfasce * 13;
|
||||
else
|
||||
pos += 12;
|
||||
pos += 13;
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user