Corretti errori MI4058 MI4059
git-svn-id: svn://10.65.10.50/trunk@638 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
984c88c8d1
commit
407b35bdeb
104
cg/cg3100.cpp
104
cg/cg3100.cpp
@ -69,7 +69,7 @@ HIDDEN const char* err_msg[] = {"La data operazione non appartiene a nessun eser
|
|||||||
"Codice cliente/fornitore non presente in anagrafica"};
|
"Codice cliente/fornitore non presente in anagrafica"};
|
||||||
|
|
||||||
|
|
||||||
class CG3100_application : public TPrintapp
|
class TListaMov_application : public TPrintapp
|
||||||
{
|
{
|
||||||
friend bool filter_func (const TRelation *);
|
friend bool filter_func (const TRelation *);
|
||||||
friend bool filter_func_fatture (const TRelation *);
|
friend bool filter_func_fatture (const TRelation *);
|
||||||
@ -124,23 +124,23 @@ public:
|
|||||||
bool segnala_errori_primariga();
|
bool segnala_errori_primariga();
|
||||||
bool segnala_errori_ogniriga();
|
bool segnala_errori_ogniriga();
|
||||||
bool segnala_errori_iva();
|
bool segnala_errori_iva();
|
||||||
bool contropartita(int);
|
bool contropartita();
|
||||||
void stampa_errori_rmov();
|
void stampa_errori_rmov();
|
||||||
void stampa_errori_mov();
|
void stampa_errori_mov();
|
||||||
void stampa_errori_iva(int*,const char*,const int,const int);
|
void stampa_errori_iva(int*,const char*,const int,const int);
|
||||||
void stampa_errori_contropartita(int);
|
void stampa_errori_contropartita();
|
||||||
void stampa_intestazione();
|
void stampa_intestazione();
|
||||||
void incrementa_totali();
|
void incrementa_totali();
|
||||||
void compila_clifo();
|
void compila_clifo();
|
||||||
void compila_comuni();
|
void compila_comuni();
|
||||||
bool RicercaDoc(const char*);
|
bool RicercaDoc(const char*);
|
||||||
|
|
||||||
CG3100_application(): _err(80) {}
|
TListaMov_application(): _err(80) {}
|
||||||
virtual ~CG3100_application() {}
|
virtual ~TListaMov_application() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
HIDDEN inline CG3100_application & app()
|
HIDDEN inline TListaMov_application & app()
|
||||||
{ return (CG3100_application&)main_app();}
|
{ return (TListaMov_application&)main_app();}
|
||||||
|
|
||||||
HIDDEN int date2esc(const TDate& d, int* prevesc)
|
HIDDEN int date2esc(const TDate& d, int* prevesc)
|
||||||
{
|
{
|
||||||
@ -272,7 +272,7 @@ else
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3100_application::RicercaDoc(const char * tipo)
|
bool TListaMov_application::RicercaDoc(const char * tipo)
|
||||||
{
|
{
|
||||||
TTable tab_tpd(TAB_TPD);
|
TTable tab_tpd(TAB_TPD);
|
||||||
TString codtab = format ("%-2s", tipo);
|
TString codtab = format ("%-2s", tipo);
|
||||||
@ -287,7 +287,7 @@ bool CG3100_application::RicercaDoc(const char * tipo)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::compila_clifo()
|
void TListaMov_application::compila_clifo()
|
||||||
{
|
{
|
||||||
_clifo->setkey(1);
|
_clifo->setkey(1);
|
||||||
_clifo->zero();
|
_clifo->zero();
|
||||||
@ -321,7 +321,7 @@ void CG3100_application::compila_clifo()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::compila_comuni()
|
void TListaMov_application::compila_comuni()
|
||||||
{
|
{
|
||||||
_comuni->setkey(1);
|
_comuni->setkey(1);
|
||||||
_comuni->zero();
|
_comuni->zero();
|
||||||
@ -596,14 +596,13 @@ bool filter_func (const TRelation * rel)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::stampa_errori_rmov()
|
void TListaMov_application::stampa_errori_rmov()
|
||||||
{
|
{
|
||||||
TRectype rec (current_cursor()->file(LF_RMOV).curr());
|
TRectype rec (current_cursor()->file(LF_RMOV).curr());
|
||||||
int gruppo = rec.get_int(RMV_GRUPPO);
|
int gruppo = rec.get_int(RMV_GRUPPO);
|
||||||
int conto = rec.get_int(RMV_CONTO);
|
int conto = rec.get_int(RMV_CONTO);
|
||||||
long sottoconto = rec.get_long(RMV_SOTTOCONTO);
|
long sottoconto = rec.get_long(RMV_SOTTOCONTO);
|
||||||
int anno = rec.get_int(RMV_ANNOES);
|
int anno = rec.get_int(RMV_ANNOES);
|
||||||
int rcontr = rec.get_int(RMV_RCONTR);
|
|
||||||
TDate datareg = rec.get_date(RMV_DATAREG);
|
TDate datareg = rec.get_date(RMV_DATAREG);
|
||||||
char sez = rec.get_char(RMV_SEZIONE);
|
char sez = rec.get_char(RMV_SEZIONE);
|
||||||
char tipo = rec.get_char(RMV_TIPOC);
|
char tipo = rec.get_char(RMV_TIPOC);
|
||||||
@ -686,22 +685,17 @@ void CG3100_application::stampa_errori_rmov()
|
|||||||
set_row(_nr++, "@11gCodice gruppo/conto/sottoconto non presente in Saldi p.d.c.");
|
set_row(_nr++, "@11gCodice gruppo/conto/sottoconto non presente in Saldi p.d.c.");
|
||||||
|
|
||||||
TRecnotype numrec = current_cursor()->file(LF_RMOV).recno();
|
TRecnotype numrec = current_cursor()->file(LF_RMOV).recno();
|
||||||
stampa_errori_contropartita(rcontr);
|
stampa_errori_contropartita();
|
||||||
current_cursor()->file(LF_RMOV).readat(numrec);
|
current_cursor()->file(LF_RMOV).readat(numrec);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::stampa_errori_contropartita(int riga)
|
void TListaMov_application::stampa_errori_contropartita()
|
||||||
{
|
{
|
||||||
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
||||||
char t;
|
char t;
|
||||||
rmov.zero();
|
int gruppo = rmov.get_int (RMV_GRUPPOC);
|
||||||
rmov.put(RMV_NUMREG, _numero);
|
int conto = rmov.get_int (RMV_CONTOC);
|
||||||
rmov.put(RMV_NUMRIG, riga);
|
long sottoconto = rmov.get_long(RMV_SOTTOCONTOC);
|
||||||
if (rmov.read(_isequal) == NOERR) // se esiste la contropartita
|
|
||||||
{
|
|
||||||
int gruppo = rmov.get_int (RMV_GRUPPO);
|
|
||||||
int conto = rmov.get_int (RMV_CONTO);
|
|
||||||
long sottoconto = rmov.get_long(RMV_SOTTOCONTO);
|
|
||||||
|
|
||||||
bool g = FALSE;
|
bool g = FALSE;
|
||||||
TConto tc;
|
TConto tc;
|
||||||
@ -744,9 +738,8 @@ void CG3100_application::stampa_errori_contropartita(int riga)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
void CG3100_application::stampa_errori_iva(int* nr, const char* cod, const int tipodet, const int tipocr)
|
void TListaMov_application::stampa_errori_iva(int* nr, const char* cod, const int tipodet, const int tipocr)
|
||||||
{
|
{
|
||||||
TTable tab_iva ("%IVA");
|
TTable tab_iva ("%IVA");
|
||||||
tab_iva.zero();
|
tab_iva.zero();
|
||||||
@ -778,7 +771,7 @@ void CG3100_application::stampa_errori_iva(int* nr, const char* cod, const int t
|
|||||||
set_row(++(*nr), "@11gTipo costo/ricavo non valido");
|
set_row(++(*nr), "@11gTipo costo/ricavo non valido");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::stampa_errori_mov()
|
void TListaMov_application::stampa_errori_mov()
|
||||||
{
|
{
|
||||||
long i = _err.first_one();
|
long i = _err.first_one();
|
||||||
if (i != -1)
|
if (i != -1)
|
||||||
@ -789,7 +782,7 @@ void CG3100_application::stampa_errori_mov()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::set_page(int file, int count)
|
void TListaMov_application::set_page(int file, int count)
|
||||||
{
|
{
|
||||||
switch (_tipo_lista)
|
switch (_tipo_lista)
|
||||||
{
|
{
|
||||||
@ -866,7 +859,7 @@ void CG3100_application::set_page(int file, int count)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::stampa_intestazione()
|
void TListaMov_application::stampa_intestazione()
|
||||||
{
|
{
|
||||||
TString sep;
|
TString sep;
|
||||||
sep = "";
|
sep = "";
|
||||||
@ -891,7 +884,7 @@ void CG3100_application::stampa_intestazione()
|
|||||||
set_row (3, "@b@120gRifer@126g#6d", &_codalleg);
|
set_row (3, "@b@120gRifer@126g#6d", &_codalleg);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3100_application::preprocess_page(int file,int counter)
|
bool TListaMov_application::preprocess_page(int file,int counter)
|
||||||
{
|
{
|
||||||
|
|
||||||
TCursor * cur = current_cursor();
|
TCursor * cur = current_cursor();
|
||||||
@ -1254,7 +1247,7 @@ bool CG3100_application::preprocess_page(int file,int counter)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_action CG3100_application::postprocess_page(int file,int count)
|
print_action TListaMov_application::postprocess_page(int file,int count)
|
||||||
{
|
{
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
@ -1436,7 +1429,7 @@ return NEXT_PAGE;
|
|||||||
}
|
}
|
||||||
|
|
||||||
/************
|
/************
|
||||||
int CG3100_application::my_next(TLocalisamfile & mov)
|
int TListaMov_application::my_next(TLocalisamfile & mov)
|
||||||
{
|
{
|
||||||
int esito;
|
int esito;
|
||||||
TString cod_reg, causale;
|
TString cod_reg, causale;
|
||||||
@ -1477,7 +1470,7 @@ return NEXT_PAGE;
|
|||||||
}
|
}
|
||||||
********/
|
********/
|
||||||
|
|
||||||
print_action CG3100_application::postprocess_print(int file,int count)
|
print_action TListaMov_application::postprocess_print(int file,int count)
|
||||||
{
|
{
|
||||||
if (count)
|
if (count)
|
||||||
{
|
{
|
||||||
@ -1503,7 +1496,7 @@ print_action CG3100_application::postprocess_print(int file,int count)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//cerca errori sulla testata (MOV)
|
//cerca errori sulla testata (MOV)
|
||||||
bool CG3100_application::segnala_errori_primariga()
|
bool TListaMov_application::segnala_errori_primariga()
|
||||||
{
|
{
|
||||||
const int ae = date2esc(_datacomp);
|
const int ae = date2esc(_datacomp);
|
||||||
|
|
||||||
@ -1641,19 +1634,13 @@ else _err.set(3);
|
|||||||
}
|
}
|
||||||
|
|
||||||
//controlli sulla contropartita
|
//controlli sulla contropartita
|
||||||
bool CG3100_application::contropartita(int riga)
|
bool TListaMov_application::contropartita()
|
||||||
{
|
{
|
||||||
char t;
|
char t;
|
||||||
TLocalisamfile rmov(LF_RMOV,FALSE);
|
TLocalisamfile rmov(LF_RMOV,FALSE);
|
||||||
rmov.setkey(1);
|
int gruppo = rmov.get_int (RMV_GRUPPOC);
|
||||||
rmov.zero();
|
int conto = rmov.get_int (RMV_CONTOC);
|
||||||
rmov.put(RMV_NUMREG, _numero);
|
long sottoconto = rmov.get_long(RMV_SOTTOCONTOC);
|
||||||
rmov.put(RMV_NUMRIG, riga);
|
|
||||||
if (rmov.read(_isequal) == NOERR) // se esiste la contropartita
|
|
||||||
{
|
|
||||||
int gruppo = rmov.get_int (RMV_GRUPPO);
|
|
||||||
int conto = rmov.get_int (RMV_CONTO);
|
|
||||||
long sottoconto = rmov.get_long(RMV_SOTTOCONTO);
|
|
||||||
|
|
||||||
TConto tc;
|
TConto tc;
|
||||||
TRectype pc (_pcon->curr());
|
TRectype pc (_pcon->curr());
|
||||||
@ -1692,15 +1679,14 @@ bool CG3100_application::contropartita(int riga)
|
|||||||
else
|
else
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
//guarda se c'e' almeno un errore su almeno una riga (rmov)
|
//guarda se c'e' almeno un errore su almeno una riga (rmov)
|
||||||
bool CG3100_application::segnala_errori_ogniriga()
|
bool TListaMov_application::segnala_errori_ogniriga()
|
||||||
{
|
{
|
||||||
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
||||||
int gruppo, conto, anno, rcontr;
|
int gruppo, conto, anno;
|
||||||
long sottoconto;
|
long sottoconto;
|
||||||
TDate datareg;
|
TDate datareg;
|
||||||
char sez, tipo, t;
|
char sez, tipo, t;
|
||||||
@ -1723,12 +1709,11 @@ bool CG3100_application::segnala_errori_ogniriga()
|
|||||||
datareg = rec.get_date(RMV_DATAREG);
|
datareg = rec.get_date(RMV_DATAREG);
|
||||||
sez = rec.get_char(RMV_SEZIONE);
|
sez = rec.get_char(RMV_SEZIONE);
|
||||||
tipo = rec.get_char(RMV_TIPOC);
|
tipo = rec.get_char(RMV_TIPOC);
|
||||||
rcontr = rec.get_int(RMV_RCONTR);
|
|
||||||
|
|
||||||
TConto tc (gruppo,conto,sottoconto);
|
TConto tc (gruppo,conto,sottoconto);
|
||||||
|
|
||||||
TRecnotype numerorec = rmov.recno();
|
TRecnotype numerorec = rmov.recno();
|
||||||
if (contropartita(rcontr))
|
if (contropartita())
|
||||||
{
|
{
|
||||||
rmov.readat(nrec);
|
rmov.readat(nrec);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
@ -1838,22 +1823,13 @@ bool CG3100_application::segnala_errori_ogniriga()
|
|||||||
rmov.readat(nrec);
|
rmov.readat(nrec);
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
/*
|
|
||||||
TRecnotype numerorec = rmov.recno();
|
|
||||||
if (contropartita(rmov,rcontr))
|
|
||||||
{
|
|
||||||
rmov.readat(nrec);
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
rmov.readat(numerorec);
|
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
rmov.readat(nrec);
|
rmov.readat(nrec);
|
||||||
}
|
}
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3100_application::segnala_errori_iva()
|
bool TListaMov_application::segnala_errori_iva()
|
||||||
{
|
{
|
||||||
TLocalisamfile& rmoviva = current_cursor()->file(LF_RMOVIVA);
|
TLocalisamfile& rmoviva = current_cursor()->file(LF_RMOVIVA);
|
||||||
TTable tab_iva("%IVA");
|
TTable tab_iva("%IVA");
|
||||||
@ -1933,7 +1909,7 @@ bool CG3100_application::segnala_errori_iva()
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::incrementa_totali()
|
void TListaMov_application::incrementa_totali()
|
||||||
{
|
{
|
||||||
TString dep1;
|
TString dep1;
|
||||||
real imponibile, imposta;
|
real imponibile, imposta;
|
||||||
@ -1974,7 +1950,7 @@ void CG3100_application::incrementa_totali()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3100_application::set_print(int m)
|
bool TListaMov_application::set_print(int m)
|
||||||
{
|
{
|
||||||
_masc = "";
|
_masc = "";
|
||||||
switch(m)
|
switch(m)
|
||||||
@ -2134,7 +2110,7 @@ return TRUE;
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool CG3100_application::user_create()
|
bool TListaMov_application::user_create()
|
||||||
{
|
{
|
||||||
_relmov1 = new TRelation (LF_MOV);
|
_relmov1 = new TRelation (LF_MOV);
|
||||||
_relmov2 = new TRelation (LF_MOV);
|
_relmov2 = new TRelation (LF_MOV);
|
||||||
@ -2172,7 +2148,7 @@ bool CG3100_application::user_create()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3100_application::user_destroy() // releasev e arrmask
|
bool TListaMov_application::user_destroy() // releasev e arrmask
|
||||||
{
|
{
|
||||||
//delete _msk;
|
//delete _msk;
|
||||||
delete _relmov;
|
delete _relmov;
|
||||||
@ -2189,7 +2165,7 @@ bool CG3100_application::user_destroy() // releasev e arrmask
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::init_print(const TMask& msk)
|
void TListaMov_application::init_print(const TMask& msk)
|
||||||
{
|
{
|
||||||
set_real_picture("###.###.###.###");
|
set_real_picture("###.###.###.###");
|
||||||
|
|
||||||
@ -2329,7 +2305,7 @@ break;
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3100_application::preprocess_header()
|
void TListaMov_application::preprocess_header()
|
||||||
{
|
{
|
||||||
int soh; // riga d'inizio dell'intestazione
|
int soh; // riga d'inizio dell'intestazione
|
||||||
TString sep(132);
|
TString sep(132);
|
||||||
@ -2523,7 +2499,7 @@ void CG3100_application::preprocess_header()
|
|||||||
|
|
||||||
int cg3100(int argc, char* argv[])
|
int cg3100(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
CG3100_application a;
|
TListaMov_application a;
|
||||||
a.run(argc, argv, "Lista movimenti");
|
a.run(argc, argv, "Lista movimenti");
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
101
cg/cg3200.cpp
101
cg/cg3200.cpp
@ -29,7 +29,7 @@ int date2esc(const TDate& d, int* prevesc = NULL);
|
|||||||
bool sottoc_handler_ini (TMask_field& f, KEY k);
|
bool sottoc_handler_ini (TMask_field& f, KEY k);
|
||||||
bool sottoc_handler_fine (TMask_field& f, KEY k);
|
bool sottoc_handler_fine (TMask_field& f, KEY k);
|
||||||
|
|
||||||
class CG3200_application : public TPrintapp
|
class TMastrini_application : public TPrintapp
|
||||||
{
|
{
|
||||||
static bool data_inizio (TMask_field& f, KEY k);
|
static bool data_inizio (TMask_field& f, KEY k);
|
||||||
static bool data_fine (TMask_field& f, KEY k);
|
static bool data_fine (TMask_field& f, KEY k);
|
||||||
@ -119,12 +119,12 @@ public:
|
|||||||
void ricerca_dati_ditta();
|
void ricerca_dati_ditta();
|
||||||
void conto(int,int,bool);
|
void conto(int,int,bool);
|
||||||
|
|
||||||
CG3200_application() {}
|
TMastrini_application() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
HIDDEN CG3200_application& app() { return (CG3200_application&) main_app(); }
|
HIDDEN TMastrini_application& app() { return (TMastrini_application&) main_app(); }
|
||||||
|
|
||||||
void CG3200_application::process_link(int id, const char* txt)
|
void TMastrini_application::process_link(int id, const char* txt)
|
||||||
{
|
{
|
||||||
const char* const app = "cg2 -0";
|
const char* const app = "cg2 -0";
|
||||||
TToken_string ss(10);
|
TToken_string ss(10);
|
||||||
@ -358,7 +358,7 @@ int date2esc(const TDate& d, int* prevesc)
|
|||||||
//Viene successivamente utilizzata per stampare l'intestazione (e i totali)
|
//Viene successivamente utilizzata per stampare l'intestazione (e i totali)
|
||||||
//oppure no
|
//oppure no
|
||||||
|
|
||||||
bool CG3200_application::almeno_un_record()
|
bool TMastrini_application::almeno_un_record()
|
||||||
{
|
{
|
||||||
bool trovato=FALSE;
|
bool trovato=FALSE;
|
||||||
long record,sottoc;
|
long record,sottoc;
|
||||||
@ -409,7 +409,7 @@ bool CG3200_application::almeno_un_record()
|
|||||||
return trovato;
|
return trovato;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3200_application::data_inizio(TMask_field& f, KEY k)
|
bool TMastrini_application::data_inizio(TMask_field& f, KEY k)
|
||||||
{
|
{
|
||||||
int anno;
|
int anno;
|
||||||
TDate data;
|
TDate data;
|
||||||
@ -450,7 +450,7 @@ bool CG3200_application::data_inizio(TMask_field& f, KEY k)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3200_application::data_fine(TMask_field& f, KEY k)
|
bool TMastrini_application::data_fine(TMask_field& f, KEY k)
|
||||||
{
|
{
|
||||||
int annoes;
|
int annoes;
|
||||||
TDate data, data_ini;
|
TDate data, data_ini;
|
||||||
@ -510,7 +510,7 @@ bool CG3200_application::data_fine(TMask_field& f, KEY k)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::saldi_zero()
|
void TMastrini_application::saldi_zero()
|
||||||
{
|
{
|
||||||
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
TLocalisamfile& rmov = current_cursor()->file(LF_RMOV);
|
||||||
real saldo_dare, saldo_avere;
|
real saldo_dare, saldo_avere;
|
||||||
@ -546,7 +546,7 @@ void CG3200_application::saldi_zero()
|
|||||||
_totale_saldo = saldo_dare - saldo_avere;
|
_totale_saldo = saldo_dare - saldo_avere;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::fai_stampa132()
|
void TMastrini_application::fai_stampa132()
|
||||||
{
|
{
|
||||||
set_row (1,"@0g#t", &_dataregs);
|
set_row (1,"@0g#t", &_dataregs);
|
||||||
if (_stampanum == 1)
|
if (_stampanum == 1)
|
||||||
@ -565,7 +565,7 @@ void CG3200_application::fai_stampa132()
|
|||||||
set_row (1,"@123g#6t", &_s_contr);
|
set_row (1,"@123g#6t", &_s_contr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::fai_stampa198()
|
void TMastrini_application::fai_stampa198()
|
||||||
{
|
{
|
||||||
set_row (1,"@0g#t", &_dataregs);
|
set_row (1,"@0g#t", &_dataregs);
|
||||||
if (_stampanum == 1)
|
if (_stampanum == 1)
|
||||||
@ -585,7 +585,7 @@ void CG3200_application::fai_stampa198()
|
|||||||
set_row (1,"@175g#6t", &_s_contr);
|
set_row (1,"@175g#6t", &_s_contr);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::stampa_totali132()
|
void TMastrini_application::stampa_totali132()
|
||||||
{
|
{
|
||||||
TString sep(132);
|
TString sep(132);
|
||||||
|
|
||||||
@ -612,7 +612,7 @@ void CG3200_application::stampa_totali132()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::stampa_totali198()
|
void TMastrini_application::stampa_totali198()
|
||||||
{
|
{
|
||||||
TString sep(198);
|
TString sep(198);
|
||||||
|
|
||||||
@ -636,7 +636,7 @@ void CG3200_application::stampa_totali198()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3200_application::preprocess_page(int file, int counter)
|
bool TMastrini_application::preprocess_page(int file, int counter)
|
||||||
{
|
{
|
||||||
TLocalisamfile & rmov = current_cursor()->file(LF_RMOV);
|
TLocalisamfile & rmov = current_cursor()->file(LF_RMOV);
|
||||||
long rec;
|
long rec;
|
||||||
@ -734,23 +734,12 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
|
|
||||||
_numreg = atol (current_cursor()->curr(LF_RMOV).get(RMV_NUMREG));
|
_numreg = atol (current_cursor()->curr(LF_RMOV).get(RMV_NUMREG));
|
||||||
|
|
||||||
int rcontr = atoi(current_cursor()->curr(LF_RMOV).get(RMV_RCONTR));
|
_gruppocontr = rmov.get_int (RMV_GRUPPOC);
|
||||||
record = rmov.recno();
|
_contocontr = rmov.get_int (RMV_CONTOC);
|
||||||
rmov.setkey(1);
|
_sottocontocontr = rmov.get_long(RMV_SOTTOCONTOC);
|
||||||
rmov.curr().zero();
|
_g_contr = rmov.get(RMV_GRUPPOC);
|
||||||
rmov.curr().put(RMV_NUMREG,_numreg);
|
_c_contr = rmov.get(RMV_CONTOC);
|
||||||
rmov.curr().put(RMV_NUMRIG,rcontr);
|
_s_contr = rmov.get(RMV_SOTTOCONTOC);
|
||||||
rmov.read();
|
|
||||||
if (rmov.bad())
|
|
||||||
rmov.curr().zero();
|
|
||||||
_gruppocontr = rmov.curr().get_int (RMV_GRUPPO);
|
|
||||||
_contocontr = rmov.curr().get_int (RMV_CONTO);
|
|
||||||
_sottocontocontr = rmov.curr().get_long(RMV_SOTTOCONTO);
|
|
||||||
_g_contr = rmov.get(RMV_GRUPPO);
|
|
||||||
_c_contr = rmov.get(RMV_CONTO);
|
|
||||||
_s_contr = rmov.get(RMV_SOTTOCONTO);
|
|
||||||
rmov.setkey(2);
|
|
||||||
rmov.readat(record);
|
|
||||||
|
|
||||||
// Stampa solo quelli che hanno anno esercizio uguale a quello specificato
|
// Stampa solo quelli che hanno anno esercizio uguale a quello specificato
|
||||||
// nella maschera. Se non viene specificato li stampa tutti
|
// nella maschera. Se non viene specificato li stampa tutti
|
||||||
@ -963,7 +952,7 @@ bool CG3200_application::preprocess_page(int file, int counter)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::set_page(int file, int counter)
|
void TMastrini_application::set_page(int file, int counter)
|
||||||
{
|
{
|
||||||
switch (file)
|
switch (file)
|
||||||
{
|
{
|
||||||
@ -983,7 +972,7 @@ void CG3200_application::set_page(int file, int counter)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
print_action CG3200_application::postprocess_page(int file, int counter)
|
print_action TMastrini_application::postprocess_page(int file, int counter)
|
||||||
{
|
{
|
||||||
if (counter)
|
if (counter)
|
||||||
{
|
{
|
||||||
@ -1043,7 +1032,7 @@ print_action CG3200_application::postprocess_page(int file, int counter)
|
|||||||
|
|
||||||
// Stampa dei totali documenti iva se richiesta
|
// Stampa dei totali documenti iva se richiesta
|
||||||
|
|
||||||
void CG3200_application::stampa_totaliiva()
|
void TMastrini_application::stampa_totaliiva()
|
||||||
{
|
{
|
||||||
|
|
||||||
if (_stampatotiva)
|
if (_stampatotiva)
|
||||||
@ -1059,7 +1048,7 @@ void CG3200_application::stampa_totaliiva()
|
|||||||
// Ricerca della descrizione relativa al codice causale di MOV.dta
|
// Ricerca della descrizione relativa al codice causale di MOV.dta
|
||||||
// sull'archivio CAUS.dta
|
// sull'archivio CAUS.dta
|
||||||
|
|
||||||
void CG3200_application::descrizione_causale()
|
void TMastrini_application::descrizione_causale()
|
||||||
{
|
{
|
||||||
_caus->setkey(1);
|
_caus->setkey(1);
|
||||||
_caus->curr().zero();
|
_caus->curr().zero();
|
||||||
@ -1073,7 +1062,7 @@ void CG3200_application::descrizione_causale()
|
|||||||
// Ricerca sulla tabella dei tipi documento, la descrizione e la natura del
|
// Ricerca sulla tabella dei tipi documento, la descrizione e la natura del
|
||||||
// documento, accedendovi tramite il tipo documento trovato su MOV.dta
|
// documento, accedendovi tramite il tipo documento trovato su MOV.dta
|
||||||
|
|
||||||
void CG3200_application::documenti_iva()
|
void TMastrini_application::documenti_iva()
|
||||||
{
|
{
|
||||||
TString dep;
|
TString dep;
|
||||||
|
|
||||||
@ -1085,7 +1074,7 @@ void CG3200_application::documenti_iva()
|
|||||||
_natdoc = atoi(_tabtpd->curr().get("I0"));
|
_natdoc = atoi(_tabtpd->curr().get("I0"));
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::ricerca_regiva()
|
void TMastrini_application::ricerca_regiva()
|
||||||
{
|
{
|
||||||
TString16 dep;
|
TString16 dep;
|
||||||
|
|
||||||
@ -1097,7 +1086,7 @@ void CG3200_application::ricerca_regiva()
|
|||||||
_tipo = _tabreg->get_int("I0");
|
_tipo = _tabreg->get_int("I0");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3200_application::preprocess_print(int file, int counter)
|
bool TMastrini_application::preprocess_print(int file, int counter)
|
||||||
{
|
{
|
||||||
if (file == LF_SALDI)
|
if (file == LF_SALDI)
|
||||||
{
|
{
|
||||||
@ -1131,7 +1120,7 @@ bool CG3200_application::preprocess_print(int file, int counter)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3200_application::set_print(int)
|
bool TMastrini_application::set_print(int)
|
||||||
{
|
{
|
||||||
KEY tasto;
|
KEY tasto;
|
||||||
int crt;
|
int crt;
|
||||||
@ -1233,7 +1222,7 @@ bool CG3200_application::set_print(int)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::data_fine_esercizio(int anno)
|
void TMastrini_application::data_fine_esercizio(int anno)
|
||||||
{
|
{
|
||||||
TString16 dep;
|
TString16 dep;
|
||||||
|
|
||||||
@ -1245,7 +1234,7 @@ void CG3200_application::data_fine_esercizio(int anno)
|
|||||||
_data_inizioese = _tabesc->curr().get("D0");
|
_data_inizioese = _tabesc->curr().get("D0");
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::preprocess_header()
|
void TMastrini_application::preprocess_header()
|
||||||
{
|
{
|
||||||
if (_tipostampa == 3)
|
if (_tipostampa == 3)
|
||||||
crea_intestazione();
|
crea_intestazione();
|
||||||
@ -1260,7 +1249,7 @@ void CG3200_application::preprocess_header()
|
|||||||
crea_intestazione();
|
crea_intestazione();
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::conto(int gruppo, int conto, bool no_contropartita)
|
void TMastrini_application::conto(int gruppo, int conto, bool no_contropartita)
|
||||||
{
|
{
|
||||||
TLocalisamfile pconti(LF_PCON);
|
TLocalisamfile pconti(LF_PCON);
|
||||||
|
|
||||||
@ -1281,7 +1270,7 @@ void CG3200_application::conto(int gruppo, int conto, bool no_contropartita)
|
|||||||
_tipo_contr = pconti.get_char(PCN_TMCF);
|
_tipo_contr = pconti.get_char(PCN_TMCF);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::ricerca_dati_ditta()
|
void TMastrini_application::ricerca_dati_ditta()
|
||||||
{
|
{
|
||||||
long app;
|
long app;
|
||||||
|
|
||||||
@ -1312,7 +1301,7 @@ void CG3200_application::ricerca_dati_ditta()
|
|||||||
|
|
||||||
// Crea l'intestazione per la stampa a 132 e a 198 caratteri
|
// Crea l'intestazione per la stampa a 132 e a 198 caratteri
|
||||||
|
|
||||||
void CG3200_application::crea_intestazione()
|
void TMastrini_application::crea_intestazione()
|
||||||
{
|
{
|
||||||
TString sep(132),sep1(198);
|
TString sep(132),sep1(198);
|
||||||
|
|
||||||
@ -1390,7 +1379,7 @@ void CG3200_application::crea_intestazione()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::stampa_progre_riporto()
|
void TMastrini_application::stampa_progre_riporto()
|
||||||
{
|
{
|
||||||
TString sep(132),sep1(198);
|
TString sep(132),sep1(198);
|
||||||
|
|
||||||
@ -1434,7 +1423,7 @@ void CG3200_application::stampa_progre_riporto()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::calcola_progressivi_al()
|
void TMastrini_application::calcola_progressivi_al()
|
||||||
{
|
{
|
||||||
long record,sottoc,annoes;
|
long record,sottoc,annoes;
|
||||||
int gruppo,conto;
|
int gruppo,conto;
|
||||||
@ -1492,7 +1481,7 @@ void CG3200_application::calcola_progressivi_al()
|
|||||||
rmov.readat(record);
|
rmov.readat(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::calcola_progressivi()
|
void TMastrini_application::calcola_progressivi()
|
||||||
{
|
{
|
||||||
TLocalisamfile saldi(LF_SALDI, FALSE);
|
TLocalisamfile saldi(LF_SALDI, FALSE);
|
||||||
real pdaresca,paveresca,pdarescap,paverescap;
|
real pdaresca,paveresca,pdarescap,paverescap;
|
||||||
@ -1634,7 +1623,7 @@ void CG3200_application::calcola_progressivi()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::stampa_progressivi()
|
void TMastrini_application::stampa_progressivi()
|
||||||
{
|
{
|
||||||
if (_numcarat == 1)
|
if (_numcarat == 1)
|
||||||
{
|
{
|
||||||
@ -1659,7 +1648,7 @@ void CG3200_application::stampa_progressivi()
|
|||||||
|
|
||||||
// Se la ricerca selezionata nella maschera e' per clienti, oppure fornitori, // allora ricerco su CLIFO i relativi dati, e su PCON il relativo gruppo,conto,// sottoconto e IV direttiva CEE
|
// Se la ricerca selezionata nella maschera e' per clienti, oppure fornitori, // allora ricerco su CLIFO i relativi dati, e su PCON il relativo gruppo,conto,// sottoconto e IV direttiva CEE
|
||||||
|
|
||||||
void CG3200_application::ricerca_clifo()
|
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,dep;
|
||||||
TLocalisamfile clifo(LF_CLIFO);
|
TLocalisamfile clifo(LF_CLIFO);
|
||||||
@ -1767,7 +1756,7 @@ void CG3200_application::ricerca_clifo()
|
|||||||
// Se la ricerca selezionata sulla maschera e' per gruppo, conto, sottoconto
|
// Se la ricerca selezionata sulla maschera e' per gruppo, conto, sottoconto
|
||||||
// ricerca i corrispondenti su PCON, con relativa IV direttiva CEE
|
// ricerca i corrispondenti su PCON, con relativa IV direttiva CEE
|
||||||
|
|
||||||
void CG3200_application::ricerca_classe_IV(bool scelta)
|
void TMastrini_application::ricerca_classe_IV(bool scelta)
|
||||||
{
|
{
|
||||||
TLocalisamfile pconti(LF_PCON);
|
TLocalisamfile pconti(LF_PCON);
|
||||||
|
|
||||||
@ -1786,7 +1775,7 @@ void CG3200_application::ricerca_classe_IV(bool scelta)
|
|||||||
_descr = pconti.get (PCN_DESCR);
|
_descr = pconti.get (PCN_DESCR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CG3200_application::ricerca_gruppo()
|
void TMastrini_application::ricerca_gruppo()
|
||||||
{
|
{
|
||||||
TString80 descr,descriz,descriz2,dep;
|
TString80 descr,descriz,descriz2,dep;
|
||||||
TString dataini,datafine;
|
TString dataini,datafine;
|
||||||
@ -1841,7 +1830,7 @@ void CG3200_application::ricerca_gruppo()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* CG3200_application::descrizione_classe(char sezione, char lettera, int numr, int numero)
|
const char* TMastrini_application::descrizione_classe(char sezione, char lettera, int numr, int numero)
|
||||||
{
|
{
|
||||||
TTable tabivd(TAB_IVD);
|
TTable tabivd(TAB_IVD);
|
||||||
TString dep,dep2;
|
TString dep,dep2;
|
||||||
@ -1877,7 +1866,7 @@ const char* CG3200_application::descrizione_classe(char sezione, char lettera, i
|
|||||||
|
|
||||||
//Ricerca la descrizione relativa al gruppo da stampare
|
//Ricerca la descrizione relativa al gruppo da stampare
|
||||||
|
|
||||||
const char* CG3200_application::descrizione_gruppo()
|
const char* TMastrini_application::descrizione_gruppo()
|
||||||
{
|
{
|
||||||
TLocalisamfile pconti(LF_PCON);
|
TLocalisamfile pconti(LF_PCON);
|
||||||
|
|
||||||
@ -1890,7 +1879,7 @@ const char* CG3200_application::descrizione_gruppo()
|
|||||||
|
|
||||||
// Ricerca la descrizione relativa al conto da stampare
|
// Ricerca la descrizione relativa al conto da stampare
|
||||||
|
|
||||||
const char* CG3200_application::descrizione_conto()
|
const char* TMastrini_application::descrizione_conto()
|
||||||
{
|
{
|
||||||
TLocalisamfile pconti(LF_PCON);
|
TLocalisamfile pconti(LF_PCON);
|
||||||
|
|
||||||
@ -1902,7 +1891,7 @@ const char* CG3200_application::descrizione_conto()
|
|||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3200_application::user_create()
|
bool TMastrini_application::user_create()
|
||||||
{
|
{
|
||||||
TToken_string exp;
|
TToken_string exp;
|
||||||
|
|
||||||
@ -1938,7 +1927,7 @@ bool CG3200_application::user_create()
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CG3200_application::user_destroy()
|
bool TMastrini_application::user_destroy()
|
||||||
{
|
{
|
||||||
delete _msk;
|
delete _msk;
|
||||||
delete _rel;
|
delete _rel;
|
||||||
@ -1959,7 +1948,7 @@ bool CG3200_application::user_destroy()
|
|||||||
int cg3200(int argc, char* argv[])
|
int cg3200(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
|
|
||||||
CG3200_application a;
|
TMastrini_application a;
|
||||||
|
|
||||||
a.run(argc, argv, "Stampa Mastrini");
|
a.run(argc, argv, "Stampa Mastrini");
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user