Corretta stampa descrizioni
git-svn-id: svn://10.65.10.50/trunk@759 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6c2eed63ee
commit
2fc59ad363
107
cg/cg3200.cpp
107
cg/cg3200.cpp
@ -635,7 +635,6 @@ void TMastrini_application::stampa_totali198()
|
||||
|
||||
bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
{
|
||||
TLocalisamfile & rmov = current_cursor()->file(LF_RMOV);
|
||||
long rec;
|
||||
TDate datasucc;
|
||||
TString datasuccstring,dataregrmovstring;
|
||||
@ -804,73 +803,34 @@ bool TMastrini_application::preprocess_page(int file, int counter)
|
||||
descrizione_causale();
|
||||
_descrizionemov = _mov->curr().get(MOV_DESCR);
|
||||
_numgio = atol(_mov->curr().get(MOV_NUMGIO));
|
||||
|
||||
_descrizione = current_cursor()->curr(LF_RMOV).get(RMV_DESCR);
|
||||
|
||||
if (_numcarat == 1) // Stampa 132 caratteri
|
||||
{
|
||||
if (_descrizione != "")
|
||||
{
|
||||
if (_descrizionemov != "")
|
||||
{
|
||||
set_row (1,"@42g%.18s", (const char*) _descrizionemov);
|
||||
set_row (1,"@61g%.23s", (const char*) _descrizione);
|
||||
}
|
||||
else if (_descrizionemov == "")
|
||||
{
|
||||
set_row (1,"@42g%.18s", (const char*) _descrcaus);
|
||||
set_row (1,"@61g%.23s", (const char*) _descrizione);
|
||||
}
|
||||
}
|
||||
else if (_descrizione == "")
|
||||
if (_descrizionemov != "")
|
||||
{
|
||||
set_row (1,"@42g%.18s", (const char*) _descrcaus);
|
||||
set_row (1,"@61g%.23s", (const char*) _descrizionemov);
|
||||
}
|
||||
else
|
||||
if (_descrizionemov == "")
|
||||
{
|
||||
conto(_gruppocontr,_contocontr,FALSE);
|
||||
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||
TString descr_contr = tc.descrizione();
|
||||
set_row (1,"@42g%.18s", (const char*) _descrcaus);
|
||||
set_row (1,"@61g%.23s", (const char*) descr_contr);
|
||||
}
|
||||
const bool st132 = _numcarat == 1;
|
||||
const TString16 f0(st132 ? "@42g%.18s" : "@42g%.25s"),
|
||||
f1(st132 ? "@61g%.23s" : "@68g%.32s");
|
||||
if (_descrizione != "")
|
||||
{
|
||||
if (_descrizionemov != "")
|
||||
set_row (1,(const char *) f0, (const char*) _descrizionemov);
|
||||
else if (_descrizionemov == "")
|
||||
set_row (1,(const char *) f0, (const char*) _descrcaus);
|
||||
set_row (1,(const char *) f1, (const char*) _descrizione);
|
||||
}
|
||||
else
|
||||
if (_descrizione == "")
|
||||
{
|
||||
set_row (1,(const char *) f0, (const char*) _descrcaus);
|
||||
if (_descrizionemov != "")
|
||||
set_row (1,(const char *) f1, (const char*) _descrizionemov);
|
||||
else
|
||||
if (_descrizionemov == "")
|
||||
{
|
||||
conto(_gruppocontr,_contocontr,FALSE);
|
||||
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||
TString descr_contr = tc.descrizione();
|
||||
set_row (1,(const char *) f1, (const char*) descr_contr);
|
||||
}
|
||||
}
|
||||
else
|
||||
if (_numcarat == 2) // Stampa 198 caratteri
|
||||
{
|
||||
if (_descrizione != "")
|
||||
{
|
||||
if (_descrizionemov != "")
|
||||
{
|
||||
set_row (1,"@42g%.25s", (const char*) _descrizionemov);
|
||||
set_row (1,"@68g%.32s", (const char*) _descrizione);
|
||||
}
|
||||
else if (_descrizionemov == "")
|
||||
{
|
||||
set_row (1,"@42g%.25s", (const char*) _descrcaus);
|
||||
set_row (1,"@68g%.32s", (const char*) _descrizione);
|
||||
}
|
||||
}
|
||||
else if (_descrizione == "")
|
||||
if (_descrizionemov != "")
|
||||
{
|
||||
set_row (1,"@42g%.25s", (const char*) _descrcaus);
|
||||
set_row (1,"@68g%.32s", (const char*) _descrizionemov);
|
||||
}
|
||||
else
|
||||
if (_descrizionemov == "")
|
||||
{
|
||||
conto(_gruppocontr,_contocontr,FALSE);
|
||||
TConto tc (_gruppocontr,_contocontr,_sottocontocontr,_tipo_contr);
|
||||
TString descr_contr = tc.descrizione();
|
||||
set_row (1,"@42g%.25s", (const char*) _descrcaus);
|
||||
set_row (1,"@68g%.32s", (const char*) descr_contr);
|
||||
}
|
||||
}
|
||||
|
||||
if (_sezione == "D")
|
||||
{
|
||||
_totale_periodo_dare += _importo;
|
||||
@ -1121,7 +1081,6 @@ bool TMastrini_application::set_print(int)
|
||||
KEY tasto;
|
||||
int crt;
|
||||
TLocalisamfile* fl;
|
||||
TString data1,data2;
|
||||
|
||||
_puoi_stampare = TRUE;
|
||||
|
||||
@ -1290,7 +1249,8 @@ void TMastrini_application::ricerca_dati_ditta()
|
||||
_comuni->setkey(1);
|
||||
_comuni->curr().zero();
|
||||
_comuni->curr().put(COM_COM,_comulc);
|
||||
_comuni->read();
|
||||
if (_comuni->read() != NOERR)
|
||||
_comuni.zero();
|
||||
_com=_comuni->curr().get(COM_DENCOM);
|
||||
_prov=_comuni->curr().get(COM_PROVCOM);
|
||||
}
|
||||
@ -1647,7 +1607,7 @@ void TMastrini_application::stampa_progressivi()
|
||||
|
||||
void TMastrini_application::ricerca_clifo()
|
||||
{
|
||||
TString ragsoc,paiv,cofi,indcf,capcf,ptel,tel,statocf,comcf,dencom,provcom,dep;
|
||||
TString ragsoc,paiv,cofi,indcf,capcf,ptel,tel,statocf,comcf,dencom,provcom;
|
||||
TLocalisamfile clifo(LF_CLIFO);
|
||||
TLocalisamfile pconti(LF_PCON);
|
||||
TString16 dataini,datafine;
|
||||
@ -1677,7 +1637,8 @@ void TMastrini_application::ricerca_clifo()
|
||||
_comuni->curr().zero();
|
||||
_comuni->curr().put(COM_STATO, statocf);
|
||||
_comuni->curr().put(COM_COM, comcf);
|
||||
_comuni->read();
|
||||
if (_comuni->read() != NOERR)
|
||||
_comuni.zero();
|
||||
dencom = _comuni->curr().get(COM_DENCOM);
|
||||
provcom = _comuni->curr().get(COM_PROVCOM);
|
||||
|
||||
@ -1685,7 +1646,8 @@ void TMastrini_application::ricerca_clifo()
|
||||
pconti.zero();
|
||||
pconti.put(PCN_GRUPPO, _gruppo);
|
||||
pconti.put(PCN_CONTO, _conto);
|
||||
pconti.read();
|
||||
if (pconti.read() == NOERR)
|
||||
_pconti.zero();
|
||||
_sezivd = pconti.get_char(PCN_SEZIVD);
|
||||
_lettivd = pconti.get_char(PCN_LETTIVD);
|
||||
numrivd = pconti.get_int(PCN_NUMRIVD);
|
||||
@ -1763,7 +1725,8 @@ void TMastrini_application::ricerca_classe_IV(bool scelta)
|
||||
pconti.put(PCN_CONTO, _conto);
|
||||
if (scelta)
|
||||
pconti.put(PCN_SOTTOCONTO, _sottoc);
|
||||
pconti.read();
|
||||
if (pconti.read() != NOERR)
|
||||
pconti.zero();
|
||||
_sezivd = pconti.get_char(PCN_SEZIVD);
|
||||
_lettivd = pconti.get_char(PCN_LETTIVD);
|
||||
_numrivd_int = pconti.get_int (PCN_NUMRIVD);
|
||||
@ -1774,7 +1737,7 @@ void TMastrini_application::ricerca_classe_IV(bool scelta)
|
||||
|
||||
void TMastrini_application::ricerca_gruppo()
|
||||
{
|
||||
TString80 descr,descriz,descriz2,dep;
|
||||
TString80 descriz,descriz2;
|
||||
TString dataini,datafine;
|
||||
|
||||
ricerca_classe_IV (TRUE); //Esiste a livello di sottoconto
|
||||
|
Loading…
x
Reference in New Issue
Block a user