Correzione errori

git-svn-id: svn://10.65.10.50/trunk@1657 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
nik 1995-07-31 09:49:11 +00:00
parent 5be42f00f4
commit 5ec94653a6
8 changed files with 5914 additions and 5906 deletions

View File

@ -667,8 +667,11 @@ void CG1100_application::set_senza_IV()
}
if (sottoc != 0l)
{
char tipospric = rec.get_char(PCN_TIPOSPRIC);
if (tipospric == '\0') tipospric = '0';
set_row (i, "@104g@1n", FLD(LF_PCON, PCN_RICSER) );
set_row (i, "@109g@1n", FLD(LF_PCON, PCN_TIPOSPRIC) );
//set_row (i, "@109g@1n", FLD(LF_PCON, PCN_TIPOSPRIC) );
set_row (i, "@109g%c", tipospric);
set_row (i, "@115g@1s", FLD(LF_PCON, PCN_SEZSALDI) );
set_row (i, "@129g@f", FLD(LF_PCON, PCN_STSOTTAB) );
}
@ -712,7 +715,6 @@ void CG1100_application::set_con_ana()
void CG1100_application::set_senza_ana()
{
reset_row (1);
set_row (1, "$[r]@pn$[n] $[r]@pn$[n] $[r]@pn$[n]",
@ -731,14 +733,14 @@ void CG1100_application::set_senza_ana()
set_row (1, "@92g@1s", FLD(LF_PCON, PCN_TMCF) );
set_row (1, "@99g@f", FLD(LF_PCON, PCN_STSOTTBIL) );
set_row (1, "@107g@f", FLD(LF_PCON, PCN_COMPENS) );
set_row (1, "@114g@1n", FLD(LF_PCON, PCN_TIPOSPRIC) );
//set_row (1, "@114g@1n", FLD(LF_PCON, PCN_TIPOSPRIC) );
set_row (1, "@120g@1s", FLD(LF_PCON, PCN_SEZSALDI) );
}
void CG1100_application::set_completa()
{
TRectype & rec = current_cursor()->curr();
TRectype& rec = current_cursor()->curr();
char sezione;
int i;
@ -790,8 +792,11 @@ void CG1100_application::set_completa()
}
if (sottoc != 0l)
{
char tipospric = rec.get_char(PCN_TIPOSPRIC);
if (tipospric == '\0') tipospric = '0';
set_row (i, "@104g@1n", FLD(LF_PCON, PCN_RICSER) );
set_row (i, "@109g@1n", FLD(LF_PCON, PCN_TIPOSPRIC) );
//set_row (i, "@109g@1n", FLD(LF_PCON, PCN_TIPOSPRIC) );
set_row (i, "@109g%c", tipospric);
set_row (i, "@115g@1s", FLD(LF_PCON, PCN_SEZSALDI) );
set_row (i, "@129g@f", FLD(LF_PCON, PCN_STSOTTAB) );
}
@ -818,6 +823,9 @@ bool CG1100_application::elabora_riga()
// se e' un sottoconto stampo sotttab in 127
if (sottoc != 0)
{
char tipospric = curr_rec.get_char(PCN_TIPOSPRIC);
if (tipospric == '\0') tipospric = '0';
set_row (1, "@114g%c", tipospric);
set_row (1, "@127g@f", FLD(LF_PCON, PCN_STSOTTAB));
set_row (1, "@117g ");
}
@ -908,7 +916,7 @@ bool CG1100_application::preprocess_page(int file,int counter)
{
if (file == LF_PCON)
{
TRectype & rec = current_cursor()->curr();
TRectype& rec = current_cursor()->curr();
int gruppo = rec.get_int (PCN_GRUPPO);
int conto = rec.get_int (PCN_CONTO);
long sottoc = rec.get_long(PCN_SOTTOCONTO);
@ -963,8 +971,8 @@ bool CG1100_application::preprocess_page(int file,int counter)
}
if (_tipo_stampa == senza_ana_bil)
{
TRectype & rec = current_cursor()->curr();
TRectype& rec = current_cursor()->curr();
force_setpage();
if (rec.get_int(PCN_CONTO) == 0) return FALSE;
if (rec.get_long(PCN_SOTTOCONTO) == 0L)
a1 = rec.get(PCN_CODCBL);
@ -1165,7 +1173,7 @@ bool CG1100_application::user_create()
add_file(LF_PCON);
set_print_zero();
//set_print_zero();
_tipo_stampa = completa;
_salto_pag = FALSE;

View File

@ -31,11 +31,11 @@ bool TAgg_codatt::menu(MENU_TAG m)
TMask msk("cg1300c");
/*
TConfig conf(CONFIG_DITTA);
int annoiva = conf.get_int("AnLiIv");
TConfig conf(CONFIG_DITTA);
int annoiva = conf.get_int("AnLiIv");
msk.set(F_ANNO, annoiva);
*/
msk.set(F_ANNO, annoiva);
*/
while (msk.run() == K_ENTER)
{
pri = new TProgind(2,"Aggiornamento in corso...",FALSE,TRUE,50);
@ -45,7 +45,7 @@ bool TAgg_codatt::menu(MENU_TAG m)
_anno = msk.get_int(F_ANNO);
_da = msk.get(F_DA); //se c'e' _da c'e' anche _a e viceversa
_a = msk.get(F_A); //_da e' la vecchia attivita'
//_a e' la nuova attivita'
//_a e' la nuova attivita'
pri->addstatus(1);
aggiorna_att("PIM");
aggiorna_att("PUM");
@ -75,62 +75,62 @@ void TAgg_codatt::cancella_rec()
{
TTable plm("PLM");
for (plm.first(); !plm.eof(); plm.next())
plm.remove();
plm.remove();
TTable pum("PUM");
for (pum.first(); !pum.eof(); pum.next())
pum.remove();
pum.remove();
TTable pom("POM");
for (pom.first(); !pom.eof(); pom.next())
pom.remove();
pom.remove();
TTable pam("PAM");
for (pam.first(); !pam.eof(); pam.next())
pam.remove();
pam.remove();
TTable ppa("PPA");
for (ppa.first(); !ppa.eof(); ppa.next())
ppa.remove();
ppa.remove();
//non e' indicata la vecchia attivita' => :
TTable pim("PIM");
for (pim.first(); !pim.eof(); pim.next())
{
const TString80 codtab = pim.get("CODTAB");
int anno = atoi(codtab.mid(0,4));
const TString16 codatt = codtab.mid(4,5);
const TString16 codreg = codtab.mid(10,3);
if (codreg.not_empty())
{
TRegistro reg(codreg,anno);
if (!reg.name().empty()) //se esiste quel registro (ma perche' non dovrebbe?)
{
const TString16 cda = reg.attivita();
if (codatt != cda)
{
TRectype vecchio (pim.curr());
TRectype nuovo (pim.curr());
const TString80 cc = codtab.sub(9);
TString80 cod;
cod << anno << cda << cc;
nuovo.put("CODTAB", cod);
pim.write(nuovo);
pim.read(vecchio);
pim.remove();
}
}
}
const TString80 codtab = pim.get("CODTAB");
int anno = atoi(codtab.mid(0,4));
const TString16 codatt = codtab.mid(4,5);
const TString16 codreg = codtab.mid(10,3);
if (codreg.not_empty())
{
TRegistro reg(codreg,anno);
if (!reg.name().empty()) //se esiste quel registro (ma perche' non dovrebbe?)
{
const TString16 cda = reg.attivita();
if (codatt != cda)
{
TRectype vecchio (pim.curr());
TRectype nuovo (pim.curr());
const TString80 cc = codtab.sub(9);
TString80 cod;
cod << anno << cda << cc;
nuovo.put("CODTAB", cod);
pim.write(nuovo);
pim.read(vecchio);
pim.remove();
}
}
}
}
TTable pla("PLA");
for (pla.first(); !pla.eof(); pla.next())
pla.remove();
pla.remove();
/***
TTable rmb("RMB");
for (rmb.first(); !rmb.eof(); rmb.next())
rmb.remove();
***/
TTable rmb("RMB");
for (rmb.first(); !rmb.eof(); rmb.next())
rmb.remove();
***/
}
void TAgg_codatt::aggiorna_att(const char* nome)

View File

@ -184,7 +184,7 @@ public:
virtual print_action postprocess_page(int, int);
virtual bool preprocess_print(int, int);
virtual void postclose_print();
// virtual bool cancel_hook();
// virtual bool cancel_hook();
virtual bool set_print(int);
virtual bool user_create();
@ -854,21 +854,21 @@ bool CG3400_application::preprocess_print(int file, int counter)
}
/***
bool CG3400_application::cancel_hook()
{
bool CG3400_application::cancel_hook()
{
int ultima_fatta = printer().getcurrentpage() - 1;
// int stampate = ultima_fatta - _pagina_da + 1;
if (yesno_box ("Interrompo la stampa ?"))
{
if (_stampa_definitiva)
aggiorna_tabreg (ultima_fatta, ultima_fatta);
return TRUE;
if (_stampa_definitiva)
aggiorna_tabreg (ultima_fatta, ultima_fatta);
return TRUE;
}
else
return FALSE;
}
***/
return FALSE;
}
***/
void CG3400_application::fill_page(int riga)
{