Correzione errori
git-svn-id: svn://10.65.10.50/trunk@1657 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
5be42f00f4
commit
5ec94653a6
@ -667,8 +667,11 @@ void CG1100_application::set_senza_IV()
|
|||||||
}
|
}
|
||||||
if (sottoc != 0l)
|
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, "@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, "@115g@1s", FLD(LF_PCON, PCN_SEZSALDI) );
|
||||||
set_row (i, "@129g@f", FLD(LF_PCON, PCN_STSOTTAB) );
|
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()
|
void CG1100_application::set_senza_ana()
|
||||||
{
|
{
|
||||||
|
|
||||||
reset_row (1);
|
reset_row (1);
|
||||||
|
|
||||||
set_row (1, "$[r]@pn$[n] $[r]@pn$[n] $[r]@pn$[n]",
|
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, "@92g@1s", FLD(LF_PCON, PCN_TMCF) );
|
||||||
set_row (1, "@99g@f", FLD(LF_PCON, PCN_STSOTTBIL) );
|
set_row (1, "@99g@f", FLD(LF_PCON, PCN_STSOTTBIL) );
|
||||||
set_row (1, "@107g@f", FLD(LF_PCON, PCN_COMPENS) );
|
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) );
|
set_row (1, "@120g@1s", FLD(LF_PCON, PCN_SEZSALDI) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CG1100_application::set_completa()
|
void CG1100_application::set_completa()
|
||||||
{
|
{
|
||||||
TRectype & rec = current_cursor()->curr();
|
TRectype& rec = current_cursor()->curr();
|
||||||
char sezione;
|
char sezione;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
@ -790,8 +792,11 @@ void CG1100_application::set_completa()
|
|||||||
}
|
}
|
||||||
if (sottoc != 0l)
|
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, "@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, "@115g@1s", FLD(LF_PCON, PCN_SEZSALDI) );
|
||||||
set_row (i, "@129g@f", FLD(LF_PCON, PCN_STSOTTAB) );
|
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
|
// se e' un sottoconto stampo sotttab in 127
|
||||||
if (sottoc != 0)
|
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, "@127g@f", FLD(LF_PCON, PCN_STSOTTAB));
|
||||||
set_row (1, "@117g ");
|
set_row (1, "@117g ");
|
||||||
}
|
}
|
||||||
@ -908,7 +916,7 @@ bool CG1100_application::preprocess_page(int file,int counter)
|
|||||||
{
|
{
|
||||||
if (file == LF_PCON)
|
if (file == LF_PCON)
|
||||||
{
|
{
|
||||||
TRectype & rec = current_cursor()->curr();
|
TRectype& rec = current_cursor()->curr();
|
||||||
int gruppo = rec.get_int (PCN_GRUPPO);
|
int gruppo = rec.get_int (PCN_GRUPPO);
|
||||||
int conto = rec.get_int (PCN_CONTO);
|
int conto = rec.get_int (PCN_CONTO);
|
||||||
long sottoc = rec.get_long(PCN_SOTTOCONTO);
|
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)
|
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_int(PCN_CONTO) == 0) return FALSE;
|
||||||
if (rec.get_long(PCN_SOTTOCONTO) == 0L)
|
if (rec.get_long(PCN_SOTTOCONTO) == 0L)
|
||||||
a1 = rec.get(PCN_CODCBL);
|
a1 = rec.get(PCN_CODCBL);
|
||||||
@ -1165,7 +1173,7 @@ bool CG1100_application::user_create()
|
|||||||
|
|
||||||
add_file(LF_PCON);
|
add_file(LF_PCON);
|
||||||
|
|
||||||
set_print_zero();
|
//set_print_zero();
|
||||||
|
|
||||||
_tipo_stampa = completa;
|
_tipo_stampa = completa;
|
||||||
_salto_pag = FALSE;
|
_salto_pag = FALSE;
|
||||||
|
@ -31,11 +31,11 @@ bool TAgg_codatt::menu(MENU_TAG m)
|
|||||||
TMask msk("cg1300c");
|
TMask msk("cg1300c");
|
||||||
|
|
||||||
/*
|
/*
|
||||||
TConfig conf(CONFIG_DITTA);
|
TConfig conf(CONFIG_DITTA);
|
||||||
int annoiva = conf.get_int("AnLiIv");
|
int annoiva = conf.get_int("AnLiIv");
|
||||||
|
|
||||||
msk.set(F_ANNO, annoiva);
|
msk.set(F_ANNO, annoiva);
|
||||||
*/
|
*/
|
||||||
while (msk.run() == K_ENTER)
|
while (msk.run() == K_ENTER)
|
||||||
{
|
{
|
||||||
pri = new TProgind(2,"Aggiornamento in corso...",FALSE,TRUE,50);
|
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);
|
_anno = msk.get_int(F_ANNO);
|
||||||
_da = msk.get(F_DA); //se c'e' _da c'e' anche _a e viceversa
|
_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 = msk.get(F_A); //_da e' la vecchia attivita'
|
||||||
//_a e' la nuova attivita'
|
//_a e' la nuova attivita'
|
||||||
pri->addstatus(1);
|
pri->addstatus(1);
|
||||||
aggiorna_att("PIM");
|
aggiorna_att("PIM");
|
||||||
aggiorna_att("PUM");
|
aggiorna_att("PUM");
|
||||||
@ -75,62 +75,62 @@ void TAgg_codatt::cancella_rec()
|
|||||||
{
|
{
|
||||||
TTable plm("PLM");
|
TTable plm("PLM");
|
||||||
for (plm.first(); !plm.eof(); plm.next())
|
for (plm.first(); !plm.eof(); plm.next())
|
||||||
plm.remove();
|
plm.remove();
|
||||||
|
|
||||||
TTable pum("PUM");
|
TTable pum("PUM");
|
||||||
for (pum.first(); !pum.eof(); pum.next())
|
for (pum.first(); !pum.eof(); pum.next())
|
||||||
pum.remove();
|
pum.remove();
|
||||||
|
|
||||||
TTable pom("POM");
|
TTable pom("POM");
|
||||||
for (pom.first(); !pom.eof(); pom.next())
|
for (pom.first(); !pom.eof(); pom.next())
|
||||||
pom.remove();
|
pom.remove();
|
||||||
|
|
||||||
TTable pam("PAM");
|
TTable pam("PAM");
|
||||||
for (pam.first(); !pam.eof(); pam.next())
|
for (pam.first(); !pam.eof(); pam.next())
|
||||||
pam.remove();
|
pam.remove();
|
||||||
|
|
||||||
TTable ppa("PPA");
|
TTable ppa("PPA");
|
||||||
for (ppa.first(); !ppa.eof(); ppa.next())
|
for (ppa.first(); !ppa.eof(); ppa.next())
|
||||||
ppa.remove();
|
ppa.remove();
|
||||||
|
|
||||||
//non e' indicata la vecchia attivita' => :
|
//non e' indicata la vecchia attivita' => :
|
||||||
TTable pim("PIM");
|
TTable pim("PIM");
|
||||||
for (pim.first(); !pim.eof(); pim.next())
|
for (pim.first(); !pim.eof(); pim.next())
|
||||||
{
|
{
|
||||||
const TString80 codtab = pim.get("CODTAB");
|
const TString80 codtab = pim.get("CODTAB");
|
||||||
int anno = atoi(codtab.mid(0,4));
|
int anno = atoi(codtab.mid(0,4));
|
||||||
const TString16 codatt = codtab.mid(4,5);
|
const TString16 codatt = codtab.mid(4,5);
|
||||||
const TString16 codreg = codtab.mid(10,3);
|
const TString16 codreg = codtab.mid(10,3);
|
||||||
if (codreg.not_empty())
|
if (codreg.not_empty())
|
||||||
{
|
{
|
||||||
TRegistro reg(codreg,anno);
|
TRegistro reg(codreg,anno);
|
||||||
if (!reg.name().empty()) //se esiste quel registro (ma perche' non dovrebbe?)
|
if (!reg.name().empty()) //se esiste quel registro (ma perche' non dovrebbe?)
|
||||||
{
|
{
|
||||||
const TString16 cda = reg.attivita();
|
const TString16 cda = reg.attivita();
|
||||||
if (codatt != cda)
|
if (codatt != cda)
|
||||||
{
|
{
|
||||||
TRectype vecchio (pim.curr());
|
TRectype vecchio (pim.curr());
|
||||||
TRectype nuovo (pim.curr());
|
TRectype nuovo (pim.curr());
|
||||||
const TString80 cc = codtab.sub(9);
|
const TString80 cc = codtab.sub(9);
|
||||||
TString80 cod;
|
TString80 cod;
|
||||||
cod << anno << cda << cc;
|
cod << anno << cda << cc;
|
||||||
nuovo.put("CODTAB", cod);
|
nuovo.put("CODTAB", cod);
|
||||||
pim.write(nuovo);
|
pim.write(nuovo);
|
||||||
pim.read(vecchio);
|
pim.read(vecchio);
|
||||||
pim.remove();
|
pim.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
TTable pla("PLA");
|
TTable pla("PLA");
|
||||||
for (pla.first(); !pla.eof(); pla.next())
|
for (pla.first(); !pla.eof(); pla.next())
|
||||||
pla.remove();
|
pla.remove();
|
||||||
/***
|
/***
|
||||||
TTable rmb("RMB");
|
TTable rmb("RMB");
|
||||||
for (rmb.first(); !rmb.eof(); rmb.next())
|
for (rmb.first(); !rmb.eof(); rmb.next())
|
||||||
rmb.remove();
|
rmb.remove();
|
||||||
***/
|
***/
|
||||||
}
|
}
|
||||||
|
|
||||||
void TAgg_codatt::aggiorna_att(const char* nome)
|
void TAgg_codatt::aggiorna_att(const char* nome)
|
||||||
|
@ -184,7 +184,7 @@ public:
|
|||||||
virtual print_action postprocess_page(int, int);
|
virtual print_action postprocess_page(int, int);
|
||||||
virtual bool preprocess_print(int, int);
|
virtual bool preprocess_print(int, int);
|
||||||
virtual void postclose_print();
|
virtual void postclose_print();
|
||||||
// virtual bool cancel_hook();
|
// virtual bool cancel_hook();
|
||||||
virtual bool set_print(int);
|
virtual bool set_print(int);
|
||||||
|
|
||||||
virtual bool user_create();
|
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 ultima_fatta = printer().getcurrentpage() - 1;
|
||||||
// int stampate = ultima_fatta - _pagina_da + 1;
|
// int stampate = ultima_fatta - _pagina_da + 1;
|
||||||
|
|
||||||
if (yesno_box ("Interrompo la stampa ?"))
|
if (yesno_box ("Interrompo la stampa ?"))
|
||||||
{
|
{
|
||||||
if (_stampa_definitiva)
|
if (_stampa_definitiva)
|
||||||
aggiorna_tabreg (ultima_fatta, ultima_fatta);
|
aggiorna_tabreg (ultima_fatta, ultima_fatta);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
***/
|
***/
|
||||||
|
|
||||||
void CG3400_application::fill_page(int riga)
|
void CG3400_application::fill_page(int riga)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user