FALSE -> false
TRUE -> true git-svn-id: svn://10.65.10.50/branches/R_10_00@22782 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
93fa360c85
commit
505d6ce4a8
120
sc/sc2200.cpp
120
sc/sc2200.cpp
@ -114,7 +114,7 @@ public:
|
|||||||
void print_header(); // Stampa l'header.
|
void print_header(); // Stampa l'header.
|
||||||
// Le seguenti funzioni valgono con ordinamento principale per data.
|
// Le seguenti funzioni valgono con ordinamento principale per data.
|
||||||
void print_rows_riepilogo(int& nriga, bool type, TAssoc_array& tot); // Stampa effettivamente lo specchietto
|
void print_rows_riepilogo(int& nriga, bool type, TAssoc_array& tot); // Stampa effettivamente lo specchietto
|
||||||
void print_riepilogo(int &nriga, bool type); // type == FALSE prints month totals, type == TRUE prints period totals.
|
void print_riepilogo(int &nriga, bool type); // type == false prints month totals, type == true prints period totals.
|
||||||
void print_rows_totali(int &nriga, tipo_pe p);
|
void print_rows_totali(int &nriga, tipo_pe p);
|
||||||
void print_totali(int &nriga, bool month_changed, bool ended); // month_changed indica se il mese e' cambiato.
|
void print_totali(int &nriga, bool month_changed, bool ended); // month_changed indica se il mese e' cambiato.
|
||||||
//ended indica il raggiungimento di fine periodo.
|
//ended indica il raggiungimento di fine periodo.
|
||||||
@ -126,9 +126,9 @@ public:
|
|||||||
// Funzioni per calcolo dei pagamenti e di aggiornamento totali
|
// Funzioni per calcolo dei pagamenti e di aggiornamento totali
|
||||||
void check_add_key_to_tp(int t, char u); // controlla e aggiunge i valori relativi alla chiave k ai totali del prospetto
|
void check_add_key_to_tp(int t, char u); // controlla e aggiunge i valori relativi alla chiave k ai totali del prospetto
|
||||||
void check_add_key_to_tl(tipo_pe p, int t); // controlla e aggiunge i valori elaborati all'assoc array indicato dal periodo (_tlxxx)
|
void check_add_key_to_tl(tipo_pe p, int t); // controlla e aggiunge i valori elaborati all'assoc array indicato dal periodo (_tlxxx)
|
||||||
// Ritorna TRUE se la partita corrente _p non e' piu' riferita alla scadenza corrente
|
// Ritorna true se la partita corrente _p non e' piu' riferita alla scadenza corrente
|
||||||
bool scad_changed(char tipo, int gruppo, int conto, long codcf, int anno, const TString& nump);
|
bool scad_changed(char tipo, int gruppo, int conto, long codcf, int anno, const TString& nump);
|
||||||
// Ritorna TRUE se la scadenza corrente ha una banca diversa dalla precedente
|
// Ritorna true se la scadenza corrente ha una banca diversa dalla precedente
|
||||||
// bool bank_will_change();
|
// bool bank_will_change();
|
||||||
// Totalizza i pagamenti non assegnati per la partita corrente (NB si spera che siano tutti nella stessa valuta)
|
// Totalizza i pagamenti non assegnati per la partita corrente (NB si spera che siano tutti nella stessa valuta)
|
||||||
bool in_cache(const TString& k); // ritorna vero se ci sono gia' non assegnati in _uns_cache;
|
bool in_cache(const TString& k); // ritorna vero se ci sono gia' non assegnati in _uns_cache;
|
||||||
@ -205,7 +205,7 @@ const TString& TScadenza_rec::get_str(const char* fieldname) const
|
|||||||
HIDDEN void print_real(TString& dest, const real& num, const char* val)
|
HIDDEN void print_real(TString& dest, const real& num, const char* val)
|
||||||
{
|
{
|
||||||
const TCurrency cur(num, val);
|
const TCurrency cur(num, val);
|
||||||
dest = cur.string(TRUE);
|
dest = cur.string(true);
|
||||||
dest.right_just(15);
|
dest.right_just(15);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -224,23 +224,23 @@ bool TStampaScadenzario::filter_func(const TRelation *r)
|
|||||||
if (fromabi > 0)
|
if (fromabi > 0)
|
||||||
{
|
{
|
||||||
if (abi < fromabi)
|
if (abi < fromabi)
|
||||||
return FALSE;
|
return false;
|
||||||
const long fromcab = m.get_long(F_FROMCAB);
|
const long fromcab = m.get_long(F_FROMCAB);
|
||||||
if (fromcab > 0 && abi == fromabi)
|
if (fromcab > 0 && abi == fromabi)
|
||||||
{
|
{
|
||||||
if (cab < fromcab)
|
if (cab < fromcab)
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (toabi > 0)
|
if (toabi > 0)
|
||||||
{
|
{
|
||||||
if (abi > toabi)
|
if (abi > toabi)
|
||||||
return FALSE;
|
return false;
|
||||||
const long tocab = m.get_long(F_TOCAB);
|
const long tocab = m.get_long(F_TOCAB);
|
||||||
if (tocab > 0 && abi == toabi)
|
if (tocab > 0 && abi == toabi)
|
||||||
{
|
{
|
||||||
if (cab > tocab)
|
if (cab > tocab)
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -250,16 +250,16 @@ bool TStampaScadenzario::filter_func(const TRelation *r)
|
|||||||
const TRectype& rec = r->curr();
|
const TRectype& rec = r->curr();
|
||||||
const TString16 codag = rec.get(SCAD_CODAG);
|
const TString16 codag = rec.get(SCAD_CODAG);
|
||||||
if (app()._codag != codag)
|
if (app()._codag != codag)
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
if (app()._tipopag != 0)
|
if (app()._tipopag != 0)
|
||||||
{
|
{
|
||||||
const TRectype& rec = r->curr();
|
const TRectype& rec = r->curr();
|
||||||
const int tipopag = rec.get_int(SCAD_TIPOPAG);
|
const int tipopag = rec.get_int(SCAD_TIPOPAG);
|
||||||
if (app()._tipopag != tipopag)
|
if (app()._tipopag != tipopag)
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TStampaScadenzario::check_add_key_to_tl(tipo_pe p, int t)
|
void TStampaScadenzario::check_add_key_to_tl(tipo_pe p, int t)
|
||||||
@ -322,7 +322,7 @@ void TStampaScadenzario::check_add_key_to_tp(int t, char u)
|
|||||||
{ // gli aggiunge il valore attuale
|
{ // gli aggiunge il valore attuale
|
||||||
real& r=(real&)_tm[k];
|
real& r=(real&)_tm[k];
|
||||||
r += _w_imp_res;
|
r += _w_imp_res;
|
||||||
_tm.add(k,r,TRUE);
|
_tm.add(k,r,true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_tm.add(k,_w_imp_res);
|
_tm.add(k,_w_imp_res);
|
||||||
@ -330,7 +330,7 @@ void TStampaScadenzario::check_add_key_to_tp(int t, char u)
|
|||||||
{ // gli aggiunge il valore attuale
|
{ // gli aggiunge il valore attuale
|
||||||
real& r=(real&)_tp[k];
|
real& r=(real&)_tp[k];
|
||||||
r += _w_imp_res;
|
r += _w_imp_res;
|
||||||
_tp.add(k,r,TRUE);
|
_tp.add(k,r,true);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
_tp.add(k,_w_imp_res);
|
_tp.add(k,_w_imp_res);
|
||||||
@ -339,19 +339,19 @@ void TStampaScadenzario::check_add_key_to_tp(int t, char u)
|
|||||||
bool TStampaScadenzario::scad_changed(char tipo, int gruppo, int conto, long codcf, int anno, const TString& nump)
|
bool TStampaScadenzario::scad_changed(char tipo, int gruppo, int conto, long codcf, int anno, const TString& nump)
|
||||||
{
|
{
|
||||||
if (_p == NULL)
|
if (_p == NULL)
|
||||||
return TRUE;
|
return true;
|
||||||
TRiga_partite& rp = _p->riga(_p->first());
|
TRiga_partite& rp = _p->riga(_p->first());
|
||||||
if (tipo != rp.get_char(PART_TIPOCF) || gruppo != rp.get_int(PART_GRUPPO) ||
|
if (tipo != rp.get_char(PART_TIPOCF) || gruppo != rp.get_int(PART_GRUPPO) ||
|
||||||
conto != rp.get_int(PART_CONTO) || codcf != rp.get_long(PART_SOTTOCONTO) ||
|
conto != rp.get_int(PART_CONTO) || codcf != rp.get_long(PART_SOTTOCONTO) ||
|
||||||
anno != rp.get_int(PART_ANNO) || nump != rp.get(PART_NUMPART))
|
anno != rp.get_int(PART_ANNO) || nump != rp.get(PART_NUMPART))
|
||||||
return TRUE;
|
return true;
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
bool TStampaScadenzario::bank_will_change()
|
bool TStampaScadenzario::bank_will_change()
|
||||||
{
|
{
|
||||||
bool yes = FALSE;
|
bool yes = false;
|
||||||
if (_group_ban)
|
if (_group_ban)
|
||||||
{
|
{
|
||||||
TCursor& cur = *current_cursor();
|
TCursor& cur = *current_cursor();
|
||||||
@ -367,7 +367,7 @@ bool TStampaScadenzario::bank_will_change()
|
|||||||
--cur;
|
--cur;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
yes = TRUE;
|
yes = true;
|
||||||
}
|
}
|
||||||
return yes;
|
return yes;
|
||||||
}
|
}
|
||||||
@ -412,11 +412,11 @@ void TStampaScadenzario::calcola_unassigned(const TString& k)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (a != ZERO) // Aggiungilo a TAssoc_array dei non assegnati
|
if (a != ZERO) // Aggiungilo a TAssoc_array dei non assegnati
|
||||||
uns.add(k,a,TRUE);
|
uns.add(k,a,true);
|
||||||
if (b != ZERO) // Aggiungilo a TAssoc_array delle note di credito
|
if (b != ZERO) // Aggiungilo a TAssoc_array delle note di credito
|
||||||
unsnc.add(k,b,TRUE);
|
unsnc.add(k,b,true);
|
||||||
if (c != ZERO) // Aggiungilo a TAssoc_array degli insoluti
|
if (c != ZERO) // Aggiungilo a TAssoc_array degli insoluti
|
||||||
unsins.add(k,c,TRUE);
|
unsins.add(k,c,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TStampaScadenzario::look_in_cache(real& a, real& b, real& c,
|
void TStampaScadenzario::look_in_cache(real& a, real& b, real& c,
|
||||||
@ -492,7 +492,7 @@ void TStampaScadenzario::calcola_pagamenti(real& imp_scad, int riga, int rata, T
|
|||||||
imp_scad -= gap;
|
imp_scad -= gap;
|
||||||
b -= gap;
|
b -= gap;
|
||||||
if (b > ZERO)
|
if (b > ZERO)
|
||||||
unsnc.add(k,b,TRUE);
|
unsnc.add(k,b,true);
|
||||||
else
|
else
|
||||||
unsnc.remove(k); // Free some space when 0 reached.
|
unsnc.remove(k); // Free some space when 0 reached.
|
||||||
}
|
}
|
||||||
@ -504,7 +504,7 @@ void TStampaScadenzario::calcola_pagamenti(real& imp_scad, int riga, int rata, T
|
|||||||
_w_imp_pag += gap;
|
_w_imp_pag += gap;
|
||||||
a -= gap;
|
a -= gap;
|
||||||
if (a > ZERO)
|
if (a > ZERO)
|
||||||
uns.add(k,a,TRUE);
|
uns.add(k,a,true);
|
||||||
else
|
else
|
||||||
uns.remove(k); // Free some space when 0 reached
|
uns.remove(k); // Free some space when 0 reached
|
||||||
}
|
}
|
||||||
@ -514,7 +514,7 @@ void TStampaScadenzario::calcola_pagamenti(real& imp_scad, int riga, int rata, T
|
|||||||
_w_imp_pag -= gap;
|
_w_imp_pag -= gap;
|
||||||
c -= gap;
|
c -= gap;
|
||||||
if (c > ZERO)
|
if (c > ZERO)
|
||||||
unsins.add(k,c,TRUE);
|
unsins.add(k,c,true);
|
||||||
else
|
else
|
||||||
unsins.remove(k); // Free some space when 0 reached
|
unsins.remove(k); // Free some space when 0 reached
|
||||||
}
|
}
|
||||||
@ -564,7 +564,7 @@ const char * TStampaScadenzario::tipi_tab(int tipo)
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool TStampaScadenzario::preprocess_page(int file, int counter)
|
bool TStampaScadenzario::preprocess_page(int file, int counter)
|
||||||
// Se ritorna FALSE salta questa scadenza e va alla prossima.
|
// Se ritorna false salta questa scadenza e va alla prossima.
|
||||||
{
|
{
|
||||||
const TRectype &rc = current_cursor()->curr(LF_SCADENZE);
|
const TRectype &rc = current_cursor()->curr(LF_SCADENZE);
|
||||||
const char tipoc = rc.get_char(SCAD_TIPOCF); // Tipo
|
const char tipoc = rc.get_char(SCAD_TIPOCF); // Tipo
|
||||||
@ -586,21 +586,21 @@ bool TStampaScadenzario::preprocess_page(int file, int counter)
|
|||||||
// stampa in valuta.
|
// stampa in valuta.
|
||||||
|
|
||||||
if (_end_printed && (file == LF_CLIFO || file == LF_PCON))
|
if (_end_printed && (file == LF_CLIFO || file == LF_PCON))
|
||||||
return FALSE; // Dopo aver stampato i totali finali non deve rientrare per stampare
|
return false; // Dopo aver stampato i totali finali non deve rientrare per stampare
|
||||||
// LF_CLIFO o LF_PCON
|
// LF_CLIFO o LF_PCON
|
||||||
|
|
||||||
if (_end_printed)
|
if (_end_printed)
|
||||||
{ // Qui controlla se ci sono totali da stampare
|
{ // Qui controlla se ci sono totali da stampare
|
||||||
TAssoc_array& tp = (TAssoc_array&)_tl[2];
|
TAssoc_array& tp = (TAssoc_array&)_tl[2];
|
||||||
if (tp.items() == 0)
|
if (tp.items() == 0)
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file == LF_SCADENZE && !_end_printed)
|
if (file == LF_SCADENZE && !_end_printed)
|
||||||
{
|
{
|
||||||
TBill bill(rc);
|
TBill bill(rc);
|
||||||
if (!_m->selected(bill))
|
if (!_m->selected(bill))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
_descrizione->restart();
|
_descrizione->restart();
|
||||||
if (scad_changed(tipoc,gruppo,conto,codcf,annop,nump))
|
if (scad_changed(tipoc,gruppo,conto,codcf,annop,nump))
|
||||||
@ -639,7 +639,7 @@ bool TStampaScadenzario::preprocess_page(int file, int counter)
|
|||||||
// oppure l'importo in scadenza e' 0 allora salta alla prossima scadenza
|
// oppure l'importo in scadenza e' 0 allora salta alla prossima scadenza
|
||||||
|
|
||||||
if (!_ratesald && _w_imp_res == 0.0)
|
if (!_ratesald && _w_imp_res == 0.0)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
_annopart.format("%d",annop);
|
_annopart.format("%d",annop);
|
||||||
_annopart.ltrim(2);
|
_annopart.ltrim(2);
|
||||||
@ -703,7 +703,7 @@ bool TStampaScadenzario::preprocess_page(int file, int counter)
|
|||||||
for (int i=1; i<MaxRowsForTotal; i++) reset_row(i);
|
for (int i=1; i<MaxRowsForTotal; i++) reset_row(i);
|
||||||
int n = 1;
|
int n = 1;
|
||||||
set_row(n++,"");
|
set_row(n++,"");
|
||||||
print_totali(n,month_changed,FALSE);
|
print_totali(n,month_changed,false);
|
||||||
switch (_tipost)
|
switch (_tipost)
|
||||||
{
|
{
|
||||||
case clienti:
|
case clienti:
|
||||||
@ -717,7 +717,7 @@ bool TStampaScadenzario::preprocess_page(int file, int counter)
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
_modified=TRUE;
|
_modified=true;
|
||||||
// Azzera i totali del giorno in ogni caso.
|
// Azzera i totali del giorno in ogni caso.
|
||||||
TAssoc_array& tlg = (TAssoc_array&) _tl[0];
|
TAssoc_array& tlg = (TAssoc_array&) _tl[0];
|
||||||
tlg.destroy();
|
tlg.destroy();
|
||||||
@ -732,7 +732,7 @@ bool TStampaScadenzario::preprocess_page(int file, int counter)
|
|||||||
{
|
{
|
||||||
TAssoc_array& tlb = (TAssoc_array&) _tl[3];
|
TAssoc_array& tlb = (TAssoc_array&) _tl[3];
|
||||||
tlb.destroy();
|
tlb.destroy();
|
||||||
_totbank_printed = FALSE;
|
_totbank_printed = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Tiene aggiornati tutti i totali mese/giorno/periodo (Totali lineari per valuta)
|
// Tiene aggiornati tutti i totali mese/giorno/periodo (Totali lineari per valuta)
|
||||||
@ -754,13 +754,13 @@ bool TStampaScadenzario::preprocess_page(int file, int counter)
|
|||||||
reset_print();
|
reset_print();
|
||||||
int n=1;
|
int n=1;
|
||||||
set_row(n++,"");
|
set_row(n++,"");
|
||||||
print_totali(n,TRUE,TRUE);
|
print_totali(n,true,true);
|
||||||
}
|
}
|
||||||
// Qui stampa il totale di ogni cli/fo o conto, nel caso che l'ordinamento
|
// Qui stampa il totale di ogni cli/fo o conto, nel caso che l'ordinamento
|
||||||
// primario non sia per data di scadenza
|
// primario non sia per data di scadenza
|
||||||
if (!_ordata && !_end_printed && file!=LF_SCADENZE)
|
if (!_ordata && !_end_printed && file!=LF_SCADENZE)
|
||||||
{
|
{
|
||||||
bool changed = TRUE;
|
bool changed = true;
|
||||||
// Vale anche con ordinamento primario per descrizione o ragione sociale: se essa cambia
|
// Vale anche con ordinamento primario per descrizione o ragione sociale: se essa cambia
|
||||||
// cambia anche il trio Gr/Co/So.
|
// cambia anche il trio Gr/Co/So.
|
||||||
if (_cur_gr != -1 && _cur_co != -1 && _cur_codcf != -1)
|
if (_cur_gr != -1 && _cur_co != -1 && _cur_codcf != -1)
|
||||||
@ -769,12 +769,12 @@ bool TStampaScadenzario::preprocess_page(int file, int counter)
|
|||||||
for (int i=1; i<MaxRowsForTotal; i++) reset_row(i);
|
for (int i=1; i<MaxRowsForTotal; i++) reset_row(i);
|
||||||
int n = 1;
|
int n = 1;
|
||||||
set_row(n++,"");
|
set_row(n++,"");
|
||||||
print_totali_c(n,FALSE);
|
print_totali_c(n,false);
|
||||||
if (_tipost == altri)
|
if (_tipost == altri)
|
||||||
set_page_pcon(n);
|
set_page_pcon(n);
|
||||||
else
|
else
|
||||||
set_page_clifo(n);
|
set_page_clifo(n);
|
||||||
_modified=TRUE;
|
_modified=true;
|
||||||
TAssoc_array& tlm = (TAssoc_array&) _tl[1];
|
TAssoc_array& tlm = (TAssoc_array&) _tl[1];
|
||||||
tlm.destroy();
|
tlm.destroy();
|
||||||
_tm.destroy(); // Cancella i valori del cli/fo/conto dopo averli stampati
|
_tm.destroy(); // Cancella i valori del cli/fo/conto dopo averli stampati
|
||||||
@ -786,14 +786,14 @@ bool TStampaScadenzario::preprocess_page(int file, int counter)
|
|||||||
_cur_gr_s = "";
|
_cur_gr_s = "";
|
||||||
_cur_co_s = "";
|
_cur_co_s = "";
|
||||||
_cur_codcf_s = "";
|
_cur_codcf_s = "";
|
||||||
changed = FALSE;
|
changed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_group_ban && _totbank_printed)
|
if (_group_ban && _totbank_printed)
|
||||||
{
|
{
|
||||||
TAssoc_array& tlb = (TAssoc_array&) _tl[3];
|
TAssoc_array& tlb = (TAssoc_array&) _tl[3];
|
||||||
tlb.destroy();
|
tlb.destroy();
|
||||||
_totbank_printed = FALSE;
|
_totbank_printed = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (changed)
|
if (changed)
|
||||||
@ -823,15 +823,15 @@ bool TStampaScadenzario::preprocess_page(int file, int counter)
|
|||||||
set_row(n++,"");
|
set_row(n++,"");
|
||||||
// Il confronto posso farlo solo su clienti/fornitori/altri, anche perche'
|
// Il confronto posso farlo solo su clienti/fornitori/altri, anche perche'
|
||||||
// per tutti e' obbligatorio l'ordinamento principale per data.
|
// per tutti e' obbligatorio l'ordinamento principale per data.
|
||||||
print_totali_c(n,TRUE);
|
print_totali_c(n,true);
|
||||||
}
|
}
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TStampaScadenzario::preprocess_print(int file, int counter)
|
bool TStampaScadenzario::preprocess_print(int file, int counter)
|
||||||
{
|
{
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_action TStampaScadenzario::postprocess_print(int file, int counter)
|
print_action TStampaScadenzario::postprocess_print(int file, int counter)
|
||||||
@ -850,7 +850,7 @@ print_action TStampaScadenzario::postprocess_print(int file, int counter)
|
|||||||
if (file == LF_SCADENZE) //&& _ordata) || (file !=LF_SCADENZE && !_ordata))
|
if (file == LF_SCADENZE) //&& _ordata) || (file !=LF_SCADENZE && !_ordata))
|
||||||
{
|
{
|
||||||
rt = REPEAT_PAGE;
|
rt = REPEAT_PAGE;
|
||||||
_end_printed = TRUE;
|
_end_printed = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return rt;
|
return rt;
|
||||||
@ -909,7 +909,7 @@ bool TStampaScadenzario::user_create()
|
|||||||
_m->enable(F_VALUTA,conf.get_bool("GesVal"));
|
_m->enable(F_VALUTA,conf.get_bool("GesVal"));
|
||||||
|
|
||||||
enable_print_menu();
|
enable_print_menu();
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TStampaScadenzario::user_destroy()
|
bool TStampaScadenzario::user_destroy()
|
||||||
@ -942,7 +942,7 @@ bool TStampaScadenzario::user_destroy()
|
|||||||
_tp.destroy();
|
_tp.destroy();
|
||||||
if (_m) delete _m;
|
if (_m) delete _m;
|
||||||
// la delete di _tl viene fatta nel distruttore dell'applicazione.
|
// la delete di _tl viene fatta nel distruttore dell'applicazione.
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TStampaScadenzario::add_filter_fatt(TCursor * cur, const char * filter)
|
void TStampaScadenzario::add_filter_fatt(TCursor * cur, const char * filter)
|
||||||
@ -966,8 +966,8 @@ bool TStampaScadenzario::set_print(int)
|
|||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
_last_bank_rec = 0;
|
_last_bank_rec = 0;
|
||||||
_end_printed = FALSE;
|
_end_printed = false;
|
||||||
_totbank_printed = FALSE;
|
_totbank_printed = false;
|
||||||
reset_files();
|
reset_files();
|
||||||
reset_print();
|
reset_print();
|
||||||
// Inizializza i membri necessari al calcolo totali nel caso sia stato scelto l'ordine
|
// Inizializza i membri necessari al calcolo totali nel caso sia stato scelto l'ordine
|
||||||
@ -1023,14 +1023,14 @@ bool TStampaScadenzario::set_print(int)
|
|||||||
// di record del file inerente alla selezione, e' necessario fare l'update ogni volta.
|
// di record del file inerente alla selezione, e' necessario fare l'update ogni volta.
|
||||||
// I cursori hanno tutti la stessa funzione di filtro, per la stampa della rate saldate.
|
// I cursori hanno tutti la stessa funzione di filtro, per la stampa della rate saldate.
|
||||||
// L'unico TCursor e' _cur7, poiche' e' utilizzato per stampare solo i record di LF_SCADENZE.
|
// L'unico TCursor e' _cur7, poiche' e' utilizzato per stampare solo i record di LF_SCADENZE.
|
||||||
get_cursor(_cur1)->set_filterfunction(filter_func,TRUE); // Cursore 1: Datascad + Clifo (codice)
|
get_cursor(_cur1)->set_filterfunction(filter_func,true); // Cursore 1: Datascad + Clifo (codice)
|
||||||
get_cursor(_cur11)->set_filterfunction(filter_func,TRUE);// Cursore 1.1: Datascad + Clifo (ragione sociale)
|
get_cursor(_cur11)->set_filterfunction(filter_func,true);// Cursore 1.1: Datascad + Clifo (ragione sociale)
|
||||||
get_cursor(_cur2)->set_filterfunction(filter_func,TRUE); // Cursore 2: Clifo(codice) + Datascad
|
get_cursor(_cur2)->set_filterfunction(filter_func,true); // Cursore 2: Clifo(codice) + Datascad
|
||||||
get_cursor(_cur3)->set_filterfunction(filter_func,TRUE); // Cursore 3: Clifo(ragione sociale) + Datascad
|
get_cursor(_cur3)->set_filterfunction(filter_func,true); // Cursore 3: Clifo(ragione sociale) + Datascad
|
||||||
get_cursor(_cur4)->set_filterfunction(filter_func,TRUE); // Cursore 4: Datascad + PCon (codice)
|
get_cursor(_cur4)->set_filterfunction(filter_func,true); // Cursore 4: Datascad + PCon (codice)
|
||||||
get_cursor(_cur41)->set_filterfunction(filter_func,TRUE);// Cursore 4.1: Datascad + PCon (descrizione)
|
get_cursor(_cur41)->set_filterfunction(filter_func,true);// Cursore 4.1: Datascad + PCon (descrizione)
|
||||||
get_cursor(_cur5)->set_filterfunction(filter_func,TRUE); // Cursore 5: PCon (Codice) + Datascad
|
get_cursor(_cur5)->set_filterfunction(filter_func,true); // Cursore 5: PCon (Codice) + Datascad
|
||||||
get_cursor(_cur6)->set_filterfunction(filter_func,TRUE); // Cursore 6: PCon (descrizione) + Datascad
|
get_cursor(_cur6)->set_filterfunction(filter_func,true); // Cursore 6: PCon (descrizione) + Datascad
|
||||||
get_cursor(_cur7)->set_filterfunction(filter_func); // Cursore 7: Datascad
|
get_cursor(_cur7)->set_filterfunction(filter_func); // Cursore 7: Datascad
|
||||||
|
|
||||||
// Setta l'intervallo di data. Si puo' fare per tutti i cursori, poiche'
|
// Setta l'intervallo di data. Si puo' fare per tutti i cursori, poiche'
|
||||||
@ -1393,7 +1393,7 @@ void TStampaScadenzario::print_rows_riepilogo(int& nriga, bool type, TAssoc_arra
|
|||||||
{
|
{
|
||||||
real& tv = (real&) tot[val];
|
real& tv = (real&) tot[val];
|
||||||
tv += v;
|
tv += v;
|
||||||
tot.add(val,tv,TRUE);
|
tot.add(val,tv,true);
|
||||||
}
|
}
|
||||||
else // Se non esiste aggiunge il valore
|
else // Se non esiste aggiunge il valore
|
||||||
tot.add(val,v);
|
tot.add(val,v);
|
||||||
@ -1541,11 +1541,11 @@ void TStampaScadenzario::print_totali(int &nriga, bool month_changed, bool ended
|
|||||||
set_row(nriga,FR("@36g** TOTALI DI @51g%s"),itom(_cur_data.month()));
|
set_row(nriga,FR("@36g** TOTALI DI @51g%s"),itom(_cur_data.month()));
|
||||||
print_rows_totali(nriga, monthly);
|
print_rows_totali(nriga, monthly);
|
||||||
if (_striepilogo > 0)
|
if (_striepilogo > 0)
|
||||||
print_riepilogo(nriga,FALSE);
|
print_riepilogo(nriga,false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if (_striepilogo == 1)
|
if (_striepilogo == 1)
|
||||||
print_riepilogo(nriga,FALSE);
|
print_riepilogo(nriga,false);
|
||||||
if (ended)
|
if (ended)
|
||||||
{
|
{
|
||||||
if (_group_ban)
|
if (_group_ban)
|
||||||
@ -1557,7 +1557,7 @@ void TStampaScadenzario::print_totali(int &nriga, bool month_changed, bool ended
|
|||||||
set_row(nriga,FR("@36g** TOTALI PERIODO"));
|
set_row(nriga,FR("@36g** TOTALI PERIODO"));
|
||||||
print_rows_totali(nriga, period);
|
print_rows_totali(nriga, period);
|
||||||
if (_striepilogo > 0)
|
if (_striepilogo > 0)
|
||||||
print_riepilogo(nriga,TRUE);
|
print_riepilogo(nriga,true);
|
||||||
set_row(nriga++,"");set_row(nriga++,"");
|
set_row(nriga++,"");set_row(nriga++,"");
|
||||||
set_row(nriga++,"");set_row(nriga++,"");
|
set_row(nriga++,"");set_row(nriga++,"");
|
||||||
}
|
}
|
||||||
@ -1581,7 +1581,7 @@ void TStampaScadenzario::print_totali_c(int &nriga, bool ended)
|
|||||||
|
|
||||||
print_rows_totali(nriga, single);
|
print_rows_totali(nriga, single);
|
||||||
if (_striepilogo > 0 )
|
if (_striepilogo > 0 )
|
||||||
print_riepilogo(nriga,FALSE);
|
print_riepilogo(nriga,false);
|
||||||
if (ended)
|
if (ended)
|
||||||
{
|
{
|
||||||
if (_group_ban)
|
if (_group_ban)
|
||||||
@ -1592,7 +1592,7 @@ void TStampaScadenzario::print_totali_c(int &nriga, bool ended)
|
|||||||
set_row(nriga,FR("@70g** TOTALE GENERALE"));
|
set_row(nriga,FR("@70g** TOTALE GENERALE"));
|
||||||
print_rows_totali(nriga, period);
|
print_rows_totali(nriga, period);
|
||||||
if (_striepilogo > 0 )
|
if (_striepilogo > 0 )
|
||||||
print_riepilogo(nriga,TRUE);
|
print_riepilogo(nriga,true);
|
||||||
set_row(nriga++,"");set_row(nriga++,"");
|
set_row(nriga++,"");set_row(nriga++,"");
|
||||||
set_row(nriga++,"");set_row(nriga++,"");
|
set_row(nriga++,"");set_row(nriga++,"");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user