Patch level : 2.0 682
Files correlati : cg3.exe Ricompilazione Demo : [ ] Commento : GF200129 La stampa mastrini clienti o fornitori, (senza specificare nessun mastrino iniziale o finale): si blocca errore cg3 quando in anagrafica ci sono almeno 500 clienti o fornitori. git-svn-id: svn://10.65.10.50/trunk@11754 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0b3cad8984
commit
2e469e51ac
@ -415,12 +415,13 @@ bool TMastrini_application::gruppo_hnd (TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_ENTER)
|
||||
{
|
||||
int gruppof = f.mask().get_int(F_GRUPPOFINE);
|
||||
const TMask& m = f.mask();
|
||||
int gruppof = m.get_int(F_GRUPPOFINE);
|
||||
|
||||
if (gruppof == 0)
|
||||
return TRUE;
|
||||
|
||||
int gruppoi = f.mask().get_int(F_GRUPPOINI);
|
||||
int gruppoi = m.get_int(F_GRUPPOINI);
|
||||
|
||||
if (gruppoi > gruppof)
|
||||
return f.error_box(TR("Il gruppo di partenza deve essere inferiore o uguale al gruppo di arrivo"));
|
||||
@ -441,17 +442,15 @@ bool TMastrini_application::contoi_hnd (TMask_field& f, KEY k)
|
||||
if (k == K_TAB && f.focusdirty() && f.mask().is_running())
|
||||
{
|
||||
TMask& m = f.mask();
|
||||
const short id = f.dlg();
|
||||
const int gruppo = m.get_int(F_GRUPPOINI);
|
||||
const int conto = m.get_int(id);
|
||||
|
||||
const short id = f.dlg();
|
||||
const int gruppo = m.get_int(F_GRUPPOINI);
|
||||
const int conto = m.get_int(id);
|
||||
|
||||
if (gruppo != 0 && conto != 0)
|
||||
{
|
||||
const char tipomsk = m.get(F_TIPOCF_INI)[0];
|
||||
|
||||
TString key(20);
|
||||
|
||||
TString16 key;
|
||||
key.format("%d|%d|", gruppo, conto);
|
||||
|
||||
const TRectype & pconti = cache().get(LF_PCON, key);
|
||||
@ -463,18 +462,16 @@ bool TMastrini_application::contoi_hnd (TMask_field& f, KEY k)
|
||||
return f.warning_box(TR("Conto inesistente"));
|
||||
}
|
||||
|
||||
const TString & ds = pconti.get(PCN_DESCR);
|
||||
|
||||
const TString& ds = pconti.get(PCN_DESCR);
|
||||
m.set(F_DESCRINI_CLIENTE, ds);
|
||||
m.set(F_DESCRINI_FORN, ds);
|
||||
m.set(F_DESCRINI_CONTO, ds);
|
||||
|
||||
m.set(F_DESCRINI_CONTO, ds);
|
||||
}
|
||||
else
|
||||
{
|
||||
m.set(F_DESCRINI_CLIENTE, "");
|
||||
m.set(F_DESCRINI_FORN, "");
|
||||
m.set(F_DESCRINI_CONTO, "");
|
||||
m.reset(F_DESCRINI_CLIENTE);
|
||||
m.reset(F_DESCRINI_FORN);
|
||||
m.reset(F_DESCRINI_CONTO);
|
||||
}
|
||||
}
|
||||
|
||||
@ -507,7 +504,7 @@ bool TMastrini_application::contof_hnd (TMask_field& f, KEY k)
|
||||
return f.error_box(TR("Il conto di partenza deve essere inferiore o uguale al conto di arrivo"));
|
||||
}
|
||||
|
||||
if (k == K_TAB && f.focusdirty() && f.mask().is_running())
|
||||
if (k == K_TAB && f.focusdirty() && m.is_running())
|
||||
{
|
||||
TString ds;
|
||||
int gruppo = m.get_int(F_GRUPPOFINE);
|
||||
@ -515,7 +512,7 @@ bool TMastrini_application::contof_hnd (TMask_field& f, KEY k)
|
||||
|
||||
if (gruppo != 0 && conto != 0 && m.field(F_DESCRFINE_CONTO).empty())
|
||||
{
|
||||
char tipomsk = f.mask().get(F_TIPOCF_FINE)[0];
|
||||
char tipomsk = m.get(F_TIPOCF_FINE)[0];
|
||||
|
||||
TString16 key;
|
||||
key.format("%d|%d|", gruppo, conto);
|
||||
@ -538,9 +535,9 @@ bool TMastrini_application::contof_hnd (TMask_field& f, KEY k)
|
||||
}
|
||||
else
|
||||
{
|
||||
f.mask().set(F_DESCRFINE_CLIENTE, "");
|
||||
f.mask().set(F_DESCRFINE_FORN, "");
|
||||
f.mask().set(F_DESCRFINE_CONTO, "");
|
||||
f.mask().reset(F_DESCRFINE_CLIENTE);
|
||||
f.mask().reset(F_DESCRFINE_FORN);
|
||||
f.mask().reset(F_DESCRFINE_CONTO);
|
||||
}
|
||||
}
|
||||
|
||||
@ -549,24 +546,25 @@ bool TMastrini_application::contof_hnd (TMask_field& f, KEY k)
|
||||
|
||||
bool TMastrini_application::check_ordine(TMask_field& f, KEY k)
|
||||
{
|
||||
const int gruppof = f.mask().get_int(F_GRUPPOFINE);
|
||||
const TMask& m = f.mask();
|
||||
const int gruppof = m.get_int(F_GRUPPOFINE);
|
||||
|
||||
if (gruppof == 0)
|
||||
return TRUE;
|
||||
|
||||
const int gruppoi = f.mask().get_int(F_GRUPPOINI);
|
||||
const int gruppoi = m.get_int(F_GRUPPOINI);
|
||||
|
||||
if (gruppoi < gruppof)
|
||||
return TRUE;
|
||||
|
||||
int contof = f.mask().get_int(F_CONTOFINE_CONTO);
|
||||
int contoi = f.mask().get_int(F_CONTOINI_CONTO);
|
||||
int contof = m.get_int(F_CONTOFINE_CONTO);
|
||||
int contoi = m.get_int(F_CONTOINI_CONTO);
|
||||
|
||||
if (contoi < contof)
|
||||
return TRUE;
|
||||
|
||||
long sottocf = f.mask().get_long(F_SOTTOCFINE_CONTO);
|
||||
long sottoci = f.mask().get_long(F_SOTTOCINI_CONTO);
|
||||
long sottocf = m.get_long(F_SOTTOCFINE_CONTO);
|
||||
long sottoci = m.get_long(F_SOTTOCINI_CONTO);
|
||||
|
||||
if (sottoci > sottocf)
|
||||
return f.error_box(TR("Il sottoconto di partenza deve essere inferiore o uguale al sottoconto di arrivo"));
|
||||
@ -709,12 +707,10 @@ bool TMastrini_application::data_inizio(TMask_field& f, KEY k)
|
||||
|
||||
bool TMastrini_application::data_fine(TMask_field& f, KEY k)
|
||||
{
|
||||
int annoes;
|
||||
TDate data, data_ini;
|
||||
|
||||
annoes = f.mask().get_int(F_ANNO);
|
||||
data = f.mask().get (F_DATAFINE);
|
||||
data_ini = f.mask().get (F_DATAINI);
|
||||
const TMask& m = f.mask();
|
||||
int annoes = m.get_int(F_ANNO);
|
||||
TDate data = m.get (F_DATAFINE);
|
||||
TDate data_ini = m.get (F_DATAINI);
|
||||
app()._annomsk = annoes;
|
||||
|
||||
if (k == K_ENTER)
|
||||
@ -1646,7 +1642,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
if (_descrizionemov == "")
|
||||
{
|
||||
conto(_gruppocontr,_contocontr,FALSE);
|
||||
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||
TBill tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||
_descrcontr = tc.descrizione();
|
||||
*_d18 = (const char*) _descrcaus;
|
||||
set_row (_rw,"@42g#a", _d18);
|
||||
@ -1687,7 +1683,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
else
|
||||
{
|
||||
conto(_gruppocontr,_contocontr,FALSE);
|
||||
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||
TBill tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||
_descrcontr = tc.descrizione();
|
||||
*_d22 = (const char*) _descrcaus;
|
||||
set_row (_rw,"@46g#a", _d22);
|
||||
@ -1724,7 +1720,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
else
|
||||
{
|
||||
conto(_gruppocontr,_contocontr,FALSE);
|
||||
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||
TBill tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||
_descrcontr = tc.descrizione();
|
||||
d18 = _descrcaus;
|
||||
if (_descrcontr != "Sconosciuto")
|
||||
@ -1773,7 +1769,7 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
else
|
||||
{
|
||||
conto(_gruppocontr,_contocontr,FALSE);
|
||||
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||
TBill tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||
_descrcontr = tc.descrizione();
|
||||
d23 = _descrcaus;
|
||||
if (_descrcontr != "Sconosciuto")
|
||||
@ -3339,7 +3335,7 @@ int TMastrini_application::stampa_progressivi(int start_riga)
|
||||
}
|
||||
else
|
||||
{
|
||||
set_row (r,FR("@70gPROGRESSIVI PRECEDENTI@100g%r"), &_progredare);
|
||||
set_row (r,FR("@70g%s@100g%r"), TR("PROGRESSIVI PRECEDENTI"), &_progredare);
|
||||
set_row (r,"@117g%r", &_progreavere);
|
||||
if (_stampa_saldo_des < 3)
|
||||
set_row (r++,"@135g%r", &_saldo_progre_prec);
|
||||
@ -3352,32 +3348,27 @@ int TMastrini_application::stampa_progressivi(int start_riga)
|
||||
|
||||
void TMastrini_application::ricerca_clifo()
|
||||
{
|
||||
TString ragsoc,paiv,cofi,indcf,capcf,ptel,tel,statocf,comcf,dencom,provcom,dep;
|
||||
TString16 dataini,datafine;
|
||||
TString ragsoc,indcf,capcf,ptel,tel,dencom,dep;
|
||||
TString4 provcom;
|
||||
TString16 dataini,datafine,paiv,cofi;
|
||||
TString descriz,descriz2;
|
||||
int numrivd;
|
||||
|
||||
indcf = "";
|
||||
|
||||
TString16 key;
|
||||
|
||||
key.format("%c|%ld", _tmcf, _sottoc);
|
||||
|
||||
const TRectype & clifo = cache().get(LF_CLIFO, key);
|
||||
TConto tc (_gruppo,_conto,_sottoc,_tmcf);
|
||||
|
||||
ragsoc = tc.descrizione();
|
||||
ragsoc = clifo.get(CLI_RAGSOC); ragsoc.strip_d_spaces();
|
||||
paiv = clifo.get(CLI_PAIV);
|
||||
cofi = clifo.get(CLI_COFI);
|
||||
indcf = clifo.get(CLI_INDCF);
|
||||
indcf.trim();
|
||||
indcf << " " << clifo.get(CLI_CIVCF);
|
||||
indcf << ' ' << clifo.get(CLI_CIVCF);
|
||||
capcf = clifo.get(CLI_CAPCF);
|
||||
ptel = clifo.get(CLI_PTEL);
|
||||
tel = clifo.get(CLI_TEL);
|
||||
statocf = clifo.get(CLI_STATOCF);
|
||||
comcf = clifo.get(CLI_COMCF);
|
||||
|
||||
const TString4 statocf = clifo.get(CLI_STATOCF);
|
||||
const TString4 comcf = clifo.get(CLI_COMCF);
|
||||
key.format("%s|%s", (const char *) statocf, (const char *) comcf);
|
||||
const TRectype & comuni = cache().get(LF_COMUNI, key);
|
||||
|
||||
@ -3494,9 +3485,8 @@ int TMastrini_application::ricerca_clifo(int start)
|
||||
key.format("%c|%ld", _tmcf, _sottoc);
|
||||
|
||||
const TRectype & clifo = cache().get(LF_CLIFO, key);
|
||||
TConto tc (_gruppo,_conto,_sottoc,_tmcf);
|
||||
|
||||
ragsoc = tc.descrizione();
|
||||
ragsoc = clifo.get(CLI_RAGSOC); ragsoc.strip_d_spaces();
|
||||
paiv = clifo.get(CLI_PAIV);
|
||||
cofi = clifo.get(CLI_COFI);
|
||||
indcf = clifo.get(CLI_INDCF);
|
||||
|
Loading…
x
Reference in New Issue
Block a user