Patch level : 10.0
Files correlati : sc2.exe sc21600a.msk Ricompilazione Demo : [ ] Commento : Corretta stampa previsione incassi per ragioni sociali contenenti @ git-svn-id: svn://10.65.10.50/branches/R_10_00@21879 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a355f6bb04
commit
ba04455ae6
@ -134,7 +134,7 @@ public:
|
|||||||
int calc_last_column();
|
int calc_last_column();
|
||||||
void update_totals(bool what, real& esp, real s[NUMERO_FASCE], real ns[NUMERO_FASCE]);
|
void update_totals(bool what, real& esp, real s[NUMERO_FASCE], real ns[NUMERO_FASCE]);
|
||||||
void compute_unassigned(TPartita& p, const TDate & datalim);
|
void compute_unassigned(TPartita& p, const TDate & datalim);
|
||||||
void compute_all(TPartita& p, TBill& bill);
|
void compute_all(TPartita& p);
|
||||||
void print_real(TString& dest, const real& num);
|
void print_real(TString& dest, const real& num);
|
||||||
void riempi_conti_mastro(const char cf);
|
void riempi_conti_mastro(const char cf);
|
||||||
void calcola_saldo();
|
void calcola_saldo();
|
||||||
@ -218,7 +218,7 @@ void TProspettoScadenze::compute_unassigned(TPartita& p, const TDate & datalim)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void TProspettoScadenze::compute_all(TPartita& p, TBill& bill)
|
void TProspettoScadenze::compute_all(TPartita& p)
|
||||||
{
|
{
|
||||||
real residuo;
|
real residuo;
|
||||||
real s[NUMERO_FASCE];
|
real s[NUMERO_FASCE];
|
||||||
@ -419,7 +419,7 @@ bool TProspettoScadenze::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
const TRectype& curr = current_cursor()->curr(file);
|
const TRectype& curr = current_cursor()->curr(file);
|
||||||
|
|
||||||
TBill bill(curr);
|
const TBill bill(curr);
|
||||||
const bool checked = _m->selected(bill);
|
const bool checked = _m->selected(bill);
|
||||||
|
|
||||||
if (!checked && !_end_printed) // Se non e' stato selezionato salta al prossimo record
|
if (!checked && !_end_printed) // Se non e' stato selezionato salta al prossimo record
|
||||||
@ -469,7 +469,7 @@ bool TProspettoScadenze::preprocess_page(int file, int counter)
|
|||||||
_codval = (_stvaluta ? rp.get(PART_CODVAL): "");
|
_codval = (_stvaluta ? rp.get(PART_CODVAL): "");
|
||||||
if (_codval.empty()) _codval = " ";
|
if (_codval.empty()) _codval = " ";
|
||||||
// Now performing fulkrum...
|
// Now performing fulkrum...
|
||||||
compute_all(p, bill);
|
compute_all(p);
|
||||||
}
|
}
|
||||||
current_cursor()->repos(); // Very, very necessary...
|
current_cursor()->repos(); // Very, very necessary...
|
||||||
}
|
}
|
||||||
@ -531,7 +531,7 @@ bool TProspettoScadenze::open_print()
|
|||||||
_codval.cut(0);_cod.cut(0); _des.cut(0); _cod_pre.cut(0);
|
_codval.cut(0);_cod.cut(0); _des.cut(0); _cod_pre.cut(0);
|
||||||
for (int it=0; it < _t.items(); it++)
|
for (int it=0; it < _t.items(); it++)
|
||||||
{
|
{
|
||||||
TAssoc_array& aa = (TAssoc_array&) _t[it];
|
TAssoc_array& aa = (TAssoc_array&)_t[it];
|
||||||
aa.destroy(); // Totali lineari (singolo e generale)
|
aa.destroy(); // Totali lineari (singolo e generale)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -548,10 +548,22 @@ bool TProspettoScadenze::open_print()
|
|||||||
case clienti:
|
case clienti:
|
||||||
case fornitori:
|
case fornitori:
|
||||||
{
|
{
|
||||||
TString filter;
|
filter_from.put(PART_TIPOCF, _tipost == clienti ? 'C' : 'F');
|
||||||
|
|
||||||
filter_from.put("TIPOC", _tipost == clienti ? "C" : "F");
|
|
||||||
filter_to = filter_from;
|
filter_to = filter_from;
|
||||||
|
|
||||||
|
if (_ordcod)
|
||||||
|
{
|
||||||
|
long cli_first = 0, cli_last = 0;
|
||||||
|
_m->get_clifo_range(cli_first, cli_last);
|
||||||
|
|
||||||
|
if (cli_first > 0)
|
||||||
|
filter_from.put(PART_SOTTOCONTO, cli_first);
|
||||||
|
|
||||||
|
if (cli_last >= cli_first)
|
||||||
|
filter_to.put(PART_SOTTOCONTO, cli_last);
|
||||||
|
}
|
||||||
|
|
||||||
|
TString filter;
|
||||||
if (_stvaluta)
|
if (_stvaluta)
|
||||||
{
|
{
|
||||||
if (is_firm_value(_codvalsel))
|
if (is_firm_value(_codvalsel))
|
||||||
@ -826,7 +838,7 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what)
|
|||||||
pos += 12;
|
pos += 12;
|
||||||
|
|
||||||
const real diff = v._sl - (tot - v._es);
|
const real diff = v._sl - (tot - v._es);
|
||||||
if (diff != ZERO)
|
if (!diff.is_zero())
|
||||||
{
|
{
|
||||||
print_real(value, diff);
|
print_real(value, diff);
|
||||||
rw << format("@%dg%12s", pos, (const char*) value);
|
rw << format("@%dg%12s", pos, (const char*) value);
|
||||||
@ -834,21 +846,25 @@ void TProspettoScadenze::print_totali_rows(int nriga, bool what)
|
|||||||
|
|
||||||
if (rw.not_empty())
|
if (rw.not_empty())
|
||||||
{
|
{
|
||||||
|
TString80 s;
|
||||||
if (!what)
|
if (!what)
|
||||||
{
|
{
|
||||||
TString s = _des_pre.left(25);
|
// Raddoppia le @ in RAGSOC: morte alle TPrintapp
|
||||||
rw.insert(format("%6s@8g%-25s", (const char*) _cod_pre, (const char*) s));
|
s = _des_pre.left(25);
|
||||||
|
for (int at = s.find('@'); at >= 0; at = s.find('@', at+2))
|
||||||
|
s.insert("@", at);
|
||||||
|
|
||||||
|
rw.insert(format("%6s", (const char*)_cod_pre));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TString meno;
|
|
||||||
const int last_column = calc_last_column();
|
const int last_column = calc_last_column();
|
||||||
|
const TString meno(last_column, '-');
|
||||||
meno.fill('-', last_column);
|
|
||||||
set_row(nriga++, meno);
|
set_row(nriga++, meno);
|
||||||
rw.insert("@8gTOTALE GENERALE");
|
s = TR("TOTALE GENERALE");
|
||||||
}
|
}
|
||||||
set_row(nriga, rw);
|
rw << "@8g%-25s";
|
||||||
|
set_row(nriga, rw, (const char*)s);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
xassoc.destroy(); // Distrugge il totale appena stampato
|
xassoc.destroy(); // Distrugge il totale appena stampato
|
||||||
@ -947,13 +963,11 @@ void TProspettoScadenze::print_header()
|
|||||||
|
|
||||||
reset_header ();
|
reset_header ();
|
||||||
TLocalisamfile ditte(LF_NDITTE);
|
TLocalisamfile ditte(LF_NDITTE);
|
||||||
ditte.zero();
|
|
||||||
ditte.put(NDT_CODDITTA, firm);
|
ditte.put(NDT_CODDITTA, firm);
|
||||||
ditte.read();
|
if (ditte.read() != NOERR)
|
||||||
if (ditte.bad()) ditte.zero();
|
ditte.zero();
|
||||||
|
|
||||||
TString s;
|
TString s = ditte.get(NDT_RAGSOC);
|
||||||
s = ditte.get(NDT_RAGSOC);
|
|
||||||
TString datas = _datas.string();
|
TString datas = _datas.string();
|
||||||
TString limop = _limop.string();
|
TString limop = _limop.string();
|
||||||
TString limscad = _limscad.string();
|
TString limscad = _limscad.string();
|
||||||
@ -1068,6 +1082,6 @@ TProspettoScadenze::TProspettoScadenze()
|
|||||||
int sc2600(int argc, char** argv)
|
int sc2600(int argc, char** argv)
|
||||||
{
|
{
|
||||||
TProspettoScadenze app;
|
TProspettoScadenze app;
|
||||||
app.run(argc, argv, "Stampa Previsione Incassi/Pagamenti");
|
app.run(argc, argv, "Previsione Incassi/Pagamenti");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,7 @@ END
|
|||||||
|
|
||||||
ENDPAGE
|
ENDPAGE
|
||||||
|
|
||||||
PAGE "Stampa Previsione Incassi/PagamentI" 0 0 0 0
|
PAGE "Previsione Incassi/Pagamenti" 0 0 0 0
|
||||||
|
|
||||||
NUMBER F_CODDITTA 5
|
NUMBER F_CODDITTA 5
|
||||||
BEGIN
|
BEGIN
|
||||||
|
@ -488,7 +488,7 @@ bool TSelection_mask::rsortcf_handler(TMask_field& f, KEY k)
|
|||||||
void TSelection_mask::update_assoc()
|
void TSelection_mask::update_assoc()
|
||||||
{
|
{
|
||||||
_assoc.destroy();
|
_assoc.destroy();
|
||||||
_all_selected = FALSE;
|
_all_selected = false;
|
||||||
|
|
||||||
TCursor_sheet& cs = cur_sheet(); // Sheet di selezione (CLI/FO/PCON)
|
TCursor_sheet& cs = cur_sheet(); // Sheet di selezione (CLI/FO/PCON)
|
||||||
const long checked = cs.checked();
|
const long checked = cs.checked();
|
||||||
@ -542,3 +542,37 @@ bool TSelection_mask::selected(int g, int c, long s) const
|
|||||||
}
|
}
|
||||||
return ok;
|
return ok;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TRecnotype TSelection_mask::get_clifo_range(long& first, long& last) const
|
||||||
|
{
|
||||||
|
first = last = 0L;
|
||||||
|
TRecnotype items = 0;
|
||||||
|
if (get_who() >= 'C')
|
||||||
|
{
|
||||||
|
if (_all_selected)
|
||||||
|
{
|
||||||
|
TCursor& c = *cur_sheet().cursor(); // Sheet di selezione (CLI/FO/PCON)
|
||||||
|
items = c.items();
|
||||||
|
if (items > 0)
|
||||||
|
{
|
||||||
|
c = 0L; first = c.curr().get_long(CLI_CODCF);
|
||||||
|
c = c.items()-1L; last = c.curr().get_long(CLI_CODCF);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TAssoc_array& ass = (TAssoc_array&)_assoc; // Trick the compiler
|
||||||
|
FOR_EACH_ASSOC_OBJECT(ass, obj, key, item)
|
||||||
|
{
|
||||||
|
const TFixed_string gcs(key);
|
||||||
|
const long codcf = atol(gcs.right(6));
|
||||||
|
if (first == 0 || codcf < first)
|
||||||
|
first = codcf;
|
||||||
|
if (last == 0 || codcf > last)
|
||||||
|
last = codcf;
|
||||||
|
items++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return items;
|
||||||
|
}
|
||||||
|
@ -85,6 +85,7 @@ public:
|
|||||||
|
|
||||||
bool selected(const TBill& c) const;
|
bool selected(const TBill& c) const;
|
||||||
bool selected(int g, int c, long s) const;
|
bool selected(int g, int c, long s) const;
|
||||||
|
TRecnotype get_clifo_range(long& first, long& last) const;
|
||||||
|
|
||||||
TSelection_mask(const char* name);
|
TSelection_mask(const char* name);
|
||||||
virtual ~TSelection_mask();
|
virtual ~TSelection_mask();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user