Aggiornato il programma di ricalcolo sadli/rinumerazione movimenti
(cg4100.cpp). git-svn-id: svn://10.65.10.50/trunk@48 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
a5c5edb20a
commit
16f87d79e6
21
cg/cg4.cpp
21
cg/cg4.cpp
@ -11,14 +11,19 @@ int main(int argc,char** argv)
|
|||||||
|
|
||||||
switch (n)
|
switch (n)
|
||||||
{
|
{
|
||||||
case 0:cg4100(argc,argv); break;
|
case 0:
|
||||||
case 2:cg4300(argc,argv); break;
|
cg4100(argc,argv); break;
|
||||||
case 3:cg4400(argc,argv); break;
|
case 2:
|
||||||
case 4:cg4500(argc,argv); break;
|
cg4300(argc,argv); break;
|
||||||
case 5:cg4600(argc,argv); break;
|
case 3:
|
||||||
default: error_box(usage, argv[0]);
|
cg4400(argc,argv); break;
|
||||||
}
|
case 4:
|
||||||
|
cg4500(argc,argv); break;
|
||||||
|
case 5:
|
||||||
|
cg4600(argc,argv); break;
|
||||||
|
default:
|
||||||
|
error_box(usage, argv[0]);
|
||||||
|
}
|
||||||
return n < 0;
|
return n < 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5
cg/cg4.h
5
cg/cg4.h
@ -1,10 +1,11 @@
|
|||||||
#ifndef __CG4_H
|
#ifndef __CG4_H
|
||||||
#define __CG4_H
|
#define __CG4_H
|
||||||
|
|
||||||
//int cg4100(int argc, char* argv[]);
|
int cg4100(int argc, char* argv[]);
|
||||||
//int cg4300(int argc, char* argv[]);
|
int cg4300(int argc, char* argv[]);
|
||||||
int cg4400(int argc, char* argv[]);
|
int cg4400(int argc, char* argv[]);
|
||||||
int cg4500(int argc, char* argv[]);
|
int cg4500(int argc, char* argv[]);
|
||||||
int cg4600(int argc, char* argv[]);
|
int cg4600(int argc, char* argv[]);
|
||||||
|
|
||||||
#endif // __CG4_H
|
#endif // __CG4_H
|
||||||
|
|
||||||
|
939
cg/cg4100.cpp
939
cg/cg4100.cpp
@ -1,517 +1,422 @@
|
|||||||
// Rinumerazione movimenti e saldi
|
// Rinumerazione movimenti e saldi
|
||||||
// fv 12/12/93
|
// fv 12/12/93
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
// *TBI* Partenza dall'ultimo movimento stampato
|
// *TBI* Partenza dall'ultimo movimento stampato
|
||||||
// *TBI* Aggiornamento scadenziario
|
// *TBI* Aggiornamento scadenziario
|
||||||
// *TBI* Aggiornamento cespiti
|
// *TBI* Aggiornamento cespiti
|
||||||
// -------------------------------------------------------------------------
|
// -------------------------------------------------------------------------
|
||||||
|
|
||||||
#include <applicat.h>
|
#include <applicat.h>
|
||||||
#include <isam.h>
|
#include <isam.h>
|
||||||
#include <sort.h>
|
#include <sort.h>
|
||||||
#include <lffiles.h>
|
#include <lffiles.h>
|
||||||
#include <urldefid.h>
|
#include <urldefid.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
#include <mask.h>
|
#include <mask.h>
|
||||||
#include <progind.h>
|
#include <progind.h>
|
||||||
|
|
||||||
//#if XVT_OS == XVT_OS_SCOUNIX
|
//#if XVT_OS == XVT_OS_SCOUNIX
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
//#endif
|
//#endif
|
||||||
|
|
||||||
#define FLD_CG41_YEAR 100
|
#define FLD_CG41_YEAR 100
|
||||||
|
#define MAX_CNT 300
|
||||||
#include <mov.h>
|
|
||||||
#include <rmov.h>
|
#include <mov.h>
|
||||||
#include <rmoviva.h>
|
#include <rmov.h>
|
||||||
#include <saldi.h>
|
#include <rmoviva.h>
|
||||||
#include <causali.h>
|
#include <saldi.h>
|
||||||
|
#include <causali.h>
|
||||||
// for access()
|
#include "cglib.h"
|
||||||
#if XVT_OS == XVT_OS_DOS || XVT_OS == XVT_OS_WIN
|
|
||||||
#include <io.h>
|
// for access()
|
||||||
#else
|
#if XVT_OS == XVT_OS_DOS || XVT_OS == XVT_OS_WIN
|
||||||
#include <unistd.h>
|
#include <io.h>
|
||||||
#endif
|
#else
|
||||||
|
#include <unistd.h>
|
||||||
struct therec {
|
#endif
|
||||||
char DATAREG[7];
|
|
||||||
char REG[4];
|
struct therec {
|
||||||
char DATADOC[7];
|
char DATAREG[9];
|
||||||
char NUMDOC[7];
|
char REG[4];
|
||||||
char ANNOES[5];
|
char DATADOC[9];
|
||||||
char NUMREG[8];
|
char NUMDOC[7];
|
||||||
};
|
char ANNOES[5];
|
||||||
|
char NUMREG[8];
|
||||||
struct truc {
|
};
|
||||||
char GRUPPO[4];
|
|
||||||
char CONTO[4];
|
class CG4100_App : public TApplication
|
||||||
char SOTTOCONTO[7];
|
{
|
||||||
char SEZIONE[2];
|
TString _year;
|
||||||
char IMPORTO[19];
|
|
||||||
char NUMREG[8];
|
public:
|
||||||
};
|
|
||||||
|
virtual bool create();
|
||||||
|
virtual bool destroy();
|
||||||
class CG4100_App : public TApplication
|
|
||||||
{
|
bool set_parms(bool year);
|
||||||
TString _year;
|
virtual bool menu(MENU_TAG m);
|
||||||
|
|
||||||
public:
|
void restore_mov(TSystemisamfile& a, TSystemisamfile& b, TSystemisamfile& c);
|
||||||
|
void sort_all();
|
||||||
virtual bool create();
|
bool sort_mov();
|
||||||
virtual bool destroy();
|
bool sort_sal();
|
||||||
|
|
||||||
bool set_parms(bool year);
|
CG4100_App() : TApplication(), _year(4)
|
||||||
virtual bool menu(MENU_TAG m);
|
{ }
|
||||||
|
virtual ~CG4100_App() {}
|
||||||
void restore_mov(TSystemisamfile& a, TSystemisamfile& b, TSystemisamfile& c);
|
};
|
||||||
void sort_all();
|
|
||||||
bool sort_mov();
|
|
||||||
bool sort_sal();
|
bool CG4100_App::create()
|
||||||
|
{
|
||||||
CG4100_App() : TApplication(), _year(4)
|
TApplication::create();
|
||||||
{ }
|
|
||||||
virtual ~CG4100_App() {}
|
// UNIX: signal() per intercettare errori
|
||||||
};
|
#if XVT_OS == XVT_OS_SCOUNIX
|
||||||
|
signal(SIGINT,SIG_IGN);
|
||||||
|
#endif
|
||||||
bool CG4100_App::create()
|
|
||||||
{
|
if (fexist("__sal__.sav"))
|
||||||
TApplication::create();
|
warning_box("Un'operazione di riordino saldi si e' conclusa"
|
||||||
|
" impropriamente. Si raccomanda di rieseguirla");
|
||||||
// UNIX: signal() per intercettare errori
|
|
||||||
#if XVT_OS == XVT_OS_SCOUNIX
|
if (fexist("__mov__.sav"))
|
||||||
signal(SIGINT,SIG_IGN);
|
warning_box("Un'operazione di riordino movimenti si e' conclusa"
|
||||||
#endif
|
" impropriamente. Si raccomanda di rieseguirla");
|
||||||
|
|
||||||
if (fexist("__sal__.sav"))
|
return TRUE;
|
||||||
warning_box("Un'operazione di riordino saldi si e' conclusa"
|
}
|
||||||
" impropriamente. Si raccomanda di rieseguirla");
|
|
||||||
|
bool CG4100_App::destroy()
|
||||||
if (fexist("__mov__.sav"))
|
{
|
||||||
warning_box("Un'operazione di riordino movimenti si e' conclusa"
|
// UNIX: resettare i segnali
|
||||||
" impropriamente. Si raccomanda di rieseguirla");
|
#if XVT_OS == XVT_OS_SCOUNIX
|
||||||
|
signal(SIGINT,SIG_DFL);
|
||||||
return TRUE;
|
#endif
|
||||||
}
|
|
||||||
|
return TApplication::destroy();
|
||||||
bool CG4100_App::destroy()
|
}
|
||||||
{
|
|
||||||
// UNIX: resettare i segnali
|
bool CG4100_App::set_parms(bool year)
|
||||||
#if XVT_OS == XVT_OS_SCOUNIX
|
{
|
||||||
signal(SIGINT,SIG_DFL);
|
TMask m("cg4100a");
|
||||||
#endif
|
|
||||||
|
if (!year)
|
||||||
return TApplication::destroy();
|
m.hide(FLD_CG41_YEAR);
|
||||||
}
|
|
||||||
|
m.run();
|
||||||
bool CG4100_App::set_parms(bool year)
|
|
||||||
{
|
_year = m.get(FLD_CG41_YEAR);
|
||||||
TMask m("cg4100a");
|
|
||||||
|
return m.last_key() == K_ENTER;
|
||||||
if (!year)
|
}
|
||||||
m.hide(FLD_CG41_YEAR);
|
|
||||||
|
|
||||||
m.run();
|
bool CG4100_App::menu(MENU_TAG m)
|
||||||
|
{
|
||||||
_year = m.get(FLD_CG41_YEAR);
|
switch (m)
|
||||||
|
{
|
||||||
return m.last_key() == K_ENTER;
|
case BAR_ITEM(1):
|
||||||
}
|
sort_mov();
|
||||||
|
break;
|
||||||
|
case BAR_ITEM(2):
|
||||||
bool CG4100_App::menu(MENU_TAG m)
|
sort_sal();
|
||||||
{
|
break;
|
||||||
switch (m)
|
}
|
||||||
{
|
return TApplication::menu(m);
|
||||||
case BAR_ITEM(1):
|
}
|
||||||
sort_mov();
|
|
||||||
break;
|
|
||||||
case BAR_ITEM(2):
|
void CG4100_App::restore_mov(TSystemisamfile& mov, TSystemisamfile& rmov,
|
||||||
sort_sal();
|
TSystemisamfile& rmoviva)
|
||||||
break;
|
{
|
||||||
}
|
long rn, rec;
|
||||||
return TApplication::menu(m);
|
if (fexist("__mov__.ind"))
|
||||||
}
|
{
|
||||||
|
// rebuild all indexes
|
||||||
|
mov.close(); rmov.close(); rmoviva.close();
|
||||||
void CG4100_App::restore_mov(TSystemisamfile& mov, TSystemisamfile& rmov,
|
mov.packfile(); rmov.packfile(); rmoviva.packfile();
|
||||||
TSystemisamfile& rmoviva)
|
mov.packindex(); rmov.packindex(); rmoviva.packindex();
|
||||||
{
|
remove("__mov__.ind");
|
||||||
long rn, rec;
|
return;
|
||||||
if (fexist("__mov__.ind"))
|
}
|
||||||
{
|
|
||||||
// rebuild all indexes
|
FILE* fp = fopen("__mov__.sav","r");
|
||||||
mov.close(); rmov.close(); rmoviva.close();
|
if (feof(fp))
|
||||||
mov.packfile(); rmov.packfile(); rmoviva.packfile();
|
{
|
||||||
mov.packindex(); rmov.packindex(); rmoviva.packindex();
|
warning_box("File di ripristino vuoto; il ripristino non e' necessario");
|
||||||
remove("__mov__.ind");
|
remove("__mov__.sav");
|
||||||
return;
|
return;
|
||||||
}
|
};
|
||||||
|
|
||||||
FILE* fp = fopen("__mov__.sav","r");
|
for (;;)
|
||||||
if (feof(fp))
|
{
|
||||||
{
|
if (feof(fp)) break;
|
||||||
warning_box("File di ripristino vuoto; il ripristino non e' necessario");
|
fscanf(fp,"%ld %ld", &rn, &rec);
|
||||||
remove("__mov__.sav");
|
|
||||||
return;
|
mov.readat(rec);
|
||||||
};
|
mov.put(MOV_NUMREG,rn);
|
||||||
|
mov.rewrite();
|
||||||
for (;;)
|
|
||||||
{
|
for (;;)
|
||||||
if (feof(fp)) break;
|
{
|
||||||
fscanf(fp,"%ld %ld", &rn, &rec);
|
if (feof(fp)) break;
|
||||||
|
fscanf(fp,"%ld",&rec);
|
||||||
mov.readat(rec);
|
if (rec == -1l) break;
|
||||||
mov.curr().put(MOV_NUMREG,format("%ld",rn));
|
rmov.readat(rec);
|
||||||
mov.rewrite();
|
rmov.put(RMV_NUMREG,rn);
|
||||||
|
rmov.rewrite();
|
||||||
for (;;)
|
}
|
||||||
{
|
for (;;)
|
||||||
if (feof(fp)) break;
|
{
|
||||||
fscanf(fp,"%ld",&rec);
|
if (feof(fp)) break;
|
||||||
if (rec == -1l) break;
|
fscanf(fp,"%ld",&rec);
|
||||||
rmov.readat(rec);
|
if (rec == -1l) break;
|
||||||
rmov.curr().put(RMV_NUMREG,format("%ld",rn));
|
rmoviva.readat(rec);
|
||||||
rmov.rewrite();
|
rmoviva.put(RMI_NUMREG,rn);
|
||||||
}
|
rmoviva.rewrite();
|
||||||
for (;;)
|
}
|
||||||
{
|
}
|
||||||
if (feof(fp)) break;
|
|
||||||
fscanf(fp,"%ld",&rec);
|
fclose(fp);
|
||||||
if (rec == -1l) break;
|
remove("__mov__.sav");
|
||||||
rmoviva.readat(rec);
|
}
|
||||||
rmoviva.curr().put(RMI_NUMREG,format("%ld",rn));
|
|
||||||
rmoviva.rewrite();
|
|
||||||
}
|
bool CG4100_App::sort_mov()
|
||||||
}
|
{
|
||||||
|
if (!set_parms(FALSE))
|
||||||
fclose(fp);
|
return FALSE;
|
||||||
remove("__mov__.sav");
|
|
||||||
}
|
TSystemisamfile mov(LF_MOV);
|
||||||
|
TSystemisamfile rmov(LF_RMOV);
|
||||||
|
TSystemisamfile rmoviva(LF_RMOVIVA);
|
||||||
bool CG4100_App::sort_mov()
|
|
||||||
{
|
if (mov.open(_excllock) || rmov.open(_excllock) ||
|
||||||
if (!set_parms(FALSE))
|
rmoviva.open(_excllock))
|
||||||
return FALSE;
|
{
|
||||||
|
warning_box("Gli archivi sono in uso. Operazione interrotta");
|
||||||
TSystemisamfile mov(LF_MOV);
|
return FALSE;
|
||||||
TSystemisamfile rmov(LF_RMOV);
|
}
|
||||||
TSystemisamfile rmoviva(LF_RMOVIVA);
|
|
||||||
|
mov.indexoff(); rmov.indexoff(); rmoviva.indexoff();
|
||||||
if (mov.open(_excllock) || rmov.open(_excllock) ||
|
mov.first();
|
||||||
rmoviva.open(_excllock))
|
|
||||||
{
|
TSort sort(sizeof(struct therec));
|
||||||
warning_box("Gli archivi sono in uso. Operazione interrotta");
|
|
||||||
return FALSE;
|
if (fexist("__mov__.sav") || fexist("__mov__.ind"))
|
||||||
}
|
{
|
||||||
|
// previous operation failed
|
||||||
mov.first();
|
if (yesno_box("Un riordinamento precedente e' fallito.\n"
|
||||||
mov.indexoff(); rmov.indexoff(); rmoviva.indexoff();
|
" Ripristino la situazione iniziale ora?" ))
|
||||||
|
restore_mov(mov, rmov, rmoviva);
|
||||||
TSort sort(sizeof(struct therec));
|
else return FALSE;
|
||||||
|
}
|
||||||
if (fexist("__mov__.sav") || fexist("__mov__.ind"))
|
|
||||||
{
|
therec rbuf;
|
||||||
// previous operation failed
|
|
||||||
if (yesno_box("Un riordinamento precedente e' fallito.\n"
|
sort.addsortkey(rbuf.DATAREG - (char*)&rbuf, 8);
|
||||||
" Ripristino la situazione iniziale ora?" ))
|
sort.addsortkey(rbuf.REG - (char*)&rbuf, 3);
|
||||||
restore_mov(mov, rmov, rmoviva);
|
sort.addsortkey(rbuf.NUMDOC - (char*)&rbuf, 6);
|
||||||
else return FALSE;
|
sort.addsortkey(rbuf.DATADOC - (char*)&rbuf, 8);
|
||||||
}
|
|
||||||
|
sort.init();
|
||||||
therec rbuf;
|
|
||||||
|
TProgind prnd(mov.items(),
|
||||||
sort.addsortkey(rbuf.DATAREG - (char*)&rbuf, 6);
|
"Riordino archivio movimenti in corso\nOrdinamento file movimenti...",
|
||||||
sort.addsortkey(rbuf.REG - (char*)&rbuf, 3);
|
FALSE,TRUE,30);
|
||||||
sort.addsortkey(rbuf.NUMDOC - (char*)&rbuf, 6);
|
|
||||||
sort.addsortkey(rbuf.DATADOC - (char*)&rbuf, 6);
|
|
||||||
|
while (!mov.eof())
|
||||||
sort.init();
|
{
|
||||||
|
do_events();
|
||||||
TProgind prnd(mov.items(),
|
TDate d(mov.get(MOV_DATAREG));
|
||||||
"Riordino archivio movimenti in corso\nOrdinamento file movimenti...",
|
strcpy(rbuf.DATAREG, d.string(ANSI));
|
||||||
FALSE,TRUE,30);
|
strcpy(rbuf.REG, mov.get(MOV_REG));
|
||||||
|
d = mov.get(MOV_DATADOC);
|
||||||
|
strcpy(rbuf.NUMDOC, mov.get(MOV_NUMDOC));
|
||||||
while (!mov.eof())
|
strcpy(rbuf.DATADOC, d.string(ANSI));
|
||||||
{
|
strcpy(rbuf.ANNOES, mov.get(MOV_ANNOES));
|
||||||
do_events();
|
strcpy(rbuf.NUMREG, mov.get(MOV_NUMREG));
|
||||||
TDate d(mov.curr().get(MOV_DATAREG));
|
|
||||||
strcpy(rbuf.DATAREG, format("%ld",(long)d));
|
sort.sort((char*)&rbuf);
|
||||||
strcpy(rbuf.REG, mov.curr().get(MOV_REG));
|
mov.next();
|
||||||
d = mov.curr().get(MOV_DATADOC);
|
prnd.addstatus(1);
|
||||||
strcpy(rbuf.NUMDOC, mov.curr().get(MOV_NUMDOC));
|
}
|
||||||
strcpy(rbuf.DATADOC, format("%ld",(long)d));
|
sort.endsort();
|
||||||
strcpy(rbuf.ANNOES, mov.curr().get(MOV_ANNOES));
|
|
||||||
strcpy(rbuf.NUMREG, mov.curr().get(MOV_NUMREG));
|
prnd.setstatus(0);
|
||||||
|
prnd.set_text("Riordino archivio movimenti in corso\nRiscrittura file movimenti...");
|
||||||
sort.sort((char*)&rbuf);
|
|
||||||
mov.next();
|
therec* rr;
|
||||||
prnd.addstatus(1);
|
long num = 1;
|
||||||
}
|
TRecnotype recno;
|
||||||
sort.endsort();
|
|
||||||
|
while ((rr = (therec*)sort.retrieve()) != NULL)
|
||||||
prnd.setstatus(0);
|
{
|
||||||
prnd.set_text("Riordino archivio movimenti in corso\nRiscrittura file movimenti...");
|
do_events();
|
||||||
|
if (atol(rr->NUMREG) != num)
|
||||||
therec* rr;
|
{
|
||||||
long num = 1;
|
// find record
|
||||||
|
mov.curr().zero();
|
||||||
while ((rr = (therec*)sort.retrieve()) != NULL)
|
mov.put(MOV_NUMREG, rr->NUMREG);
|
||||||
{
|
|
||||||
do_events();
|
mov.read();
|
||||||
if (atol(rr->NUMREG) != num)
|
// should never happen
|
||||||
{
|
CHECK(mov.good(), "Archivio movimenti inconsistente. Questo si' che e' un casino.");
|
||||||
// find record
|
|
||||||
mov.curr().zero();
|
// retrieve and change NUMREG
|
||||||
mov.curr().put(MOV_NUMREG, rr->NUMREG);
|
recno = mov.recno();
|
||||||
mov.curr().put(MOV_ANNOES, rr->ANNOES);
|
TString rgn = rr->NUMREG;
|
||||||
|
FILE* fsav = fopen("__mov__.sav","a");
|
||||||
mov.read();
|
fprintf(fsav,"%s %d ", (const char*)rgn, recno);
|
||||||
// should never happen
|
fclose(fsav);
|
||||||
CHECK(!mov.bad(), "Archivio movimenti inconsistente. Questo si' che e' un casino.");
|
|
||||||
|
mov.put(MOV_NUMREG,num);
|
||||||
// retrieve and change NUMREG
|
mov.rewriteat(recno);
|
||||||
TString rgn = rr->NUMREG;
|
// update linked records
|
||||||
FILE* fsav = fopen("__mov__.sav","a");
|
|
||||||
fprintf(fsav,"%s %d ", (const char*)rgn, mov.recno());
|
rmov.curr().zero();
|
||||||
fclose(fsav);
|
rmov.put(RMV_NUMREG,rgn);
|
||||||
|
rmov.read(_isgteq);
|
||||||
mov.curr().put(MOV_NUMREG,num);
|
|
||||||
mov.rewrite();
|
|
||||||
// update linked records
|
while (!rmov.eof() && rgn == rmov.get(RMV_NUMREG))
|
||||||
|
{
|
||||||
rmov.curr().zero();
|
recno = rmov.recno();
|
||||||
rmov.curr().put(RMV_NUMREG,rgn);
|
fsav = fopen("__mov__.sav","a");
|
||||||
rmov.read(_isgteq);
|
fprintf(fsav,"%ld ", recno);
|
||||||
|
fclose(fsav);
|
||||||
|
rmov.put(RMV_NUMREG,num);
|
||||||
while (!rmov.eof())
|
rmov.rewriteat(recno);
|
||||||
{
|
rmov.next();
|
||||||
if (rgn != rmov.curr().get(RMV_NUMREG))
|
}
|
||||||
break;
|
fsav = fopen("__mov__.sav","a");
|
||||||
fsav = fopen("__mov__.sav","a");
|
fprintf(fsav,"-1"); fclose(fsav);
|
||||||
fprintf(fsav,"%ld ", (long)rmov.recno());
|
|
||||||
fclose(fsav);
|
rmoviva.zero();
|
||||||
rmov.curr().put(RMV_NUMREG,num);
|
rmoviva.put(RMI_NUMREG,rgn);
|
||||||
rmov.rewrite();
|
rmoviva.read(_isgteq);
|
||||||
rmov.next();
|
|
||||||
}
|
while (!rmoviva.eof() && rgn == rmoviva.get(RMV_NUMREG))
|
||||||
fsav = fopen("__mov__.sav","a");
|
{
|
||||||
fprintf(fsav,"-1"); fclose(fsav);
|
recno = rmoviva.recno();
|
||||||
|
fsav = fopen("__mov__.sav","a");
|
||||||
rmoviva.curr().zero();
|
fprintf(fsav,"%ld ", recno);
|
||||||
rmoviva.curr().put(RMI_NUMREG,rgn);
|
fclose(fsav);
|
||||||
rmoviva.read(_isgteq);
|
rmoviva.put(RMI_NUMREG,num);
|
||||||
|
rmoviva.rewriteat(recno);
|
||||||
while (!rmoviva.eof())
|
rmoviva.next();
|
||||||
{
|
}
|
||||||
if (rgn != rmoviva.curr().get(RMV_NUMREG))
|
fsav = fopen("__mov__.sav","a");
|
||||||
break;
|
fprintf(fsav,"-1"); fclose(fsav);
|
||||||
fsav = fopen("__mov__.sav","a");
|
}
|
||||||
fprintf(fsav,"%ld ", (long)rmov.recno());
|
num++;
|
||||||
fclose(fsav);
|
prnd.addstatus(1);
|
||||||
rmoviva.curr().put(RMI_NUMREG,num);
|
}
|
||||||
rmoviva.rewrite();
|
|
||||||
rmoviva.next();
|
remove("__mov__.sav");
|
||||||
}
|
|
||||||
fsav = fopen("__mov__.sav","a");
|
FILE* fsav = fopen("__mov__.ind","w"); fclose(fsav);
|
||||||
fprintf(fsav,"-1"); fclose(fsav);
|
|
||||||
}
|
prnd.set_text("Riordino archivio movimenti in corso\nRicostruzione files indice...");
|
||||||
num++;
|
|
||||||
prnd.addstatus(1);
|
// rebuild indexes
|
||||||
}
|
mov.close(); rmov.close(); rmoviva.close();
|
||||||
|
mov.indexon(); rmov.indexon(); rmoviva.indexon();
|
||||||
remove("__mov__.sav");
|
mov.packfile(); rmov.packfile(); rmoviva.packfile();
|
||||||
|
mov.packindex(); rmov.packindex(); rmoviva.packindex();
|
||||||
FILE* fsav = fopen("__mov__.ind","w"); fclose(fsav);
|
|
||||||
|
remove("__mov__.ind");
|
||||||
prnd.set_text("Riordino archivio movimenti in corso\nRicostruzione files indice...");
|
|
||||||
|
return TRUE;
|
||||||
// rebuild indexes
|
}
|
||||||
mov.close(); rmov.close(); rmoviva.close();
|
|
||||||
mov.packfile(); rmov.packfile(); rmoviva.packfile();
|
|
||||||
mov.packindex(); rmov.packindex(); rmoviva.packindex();
|
bool CG4100_App::sort_sal()
|
||||||
|
{
|
||||||
remove("__mov__.ind");
|
|
||||||
|
if (!set_parms(TRUE))
|
||||||
return TRUE;
|
return FALSE;
|
||||||
}
|
|
||||||
|
FILE* fp = fopen ("__sal__.sav","w");
|
||||||
|
fclose(fp);
|
||||||
bool CG4100_App::sort_sal()
|
|
||||||
{
|
TLocalisamfile rmov(LF_RMOV);
|
||||||
bool first;
|
TLocalisamfile mov(LF_MOV);
|
||||||
|
TLocalisamfile causali(LF_CAUSALI);
|
||||||
if (!set_parms(TRUE))
|
TSaldo_agg sal;
|
||||||
return FALSE;
|
int gruppo, conto;
|
||||||
|
const int year = atoi(_year);
|
||||||
FILE* fp = fopen ("__sal__.sav","w");
|
long oldnumreg = 0L, sottoconto;
|
||||||
fclose(fp);
|
TProgind prnd(rmov.items(),
|
||||||
|
"Riordino archivio saldi in corso\nLettura archivio movimenti...",
|
||||||
TLocalisamfile rmov(LF_RMOV);
|
FALSE,TRUE,30);
|
||||||
TLocalisamfile saldi(LF_SALDI);
|
|
||||||
TLocalisamfile mov(LF_MOV);
|
causali.zero();
|
||||||
TLocalisamfile causali(LF_CAUSALI);
|
mov.setkey(1);
|
||||||
|
rmov.first();
|
||||||
long jj = 0l;
|
sal.reset();
|
||||||
|
sal.set_anno_es(year);
|
||||||
rmov.first(); saldi.first(); mov.first(); causali.first();
|
sal.clear_saldi(year);
|
||||||
|
while (!rmov.eof())
|
||||||
TSort sort(sizeof(struct truc));
|
{
|
||||||
truc rbuf;
|
if (_year == rmov.get(RMV_ANNOES))
|
||||||
|
{
|
||||||
sort.addsortkey(rbuf.GRUPPO - (char*)&rbuf, 3);
|
const long numreg = rmov.get_long(RMV_NUMREG);
|
||||||
sort.addsortkey(rbuf.CONTO - (char*)&rbuf, 3);
|
|
||||||
sort.addsortkey(rbuf.SOTTOCONTO - (char*)&rbuf, 6);
|
gruppo = rmov.get_int(RMV_GRUPPO);
|
||||||
sort.addsortkey(rbuf.SEZIONE - (char*)&rbuf, 1);
|
conto = rmov.get_int(RMV_CONTO);
|
||||||
|
sottoconto = rmov.get_long(RMV_SOTTOCONTO);
|
||||||
sort.init();
|
if (numreg != oldnumreg)
|
||||||
|
{
|
||||||
TProgind prnd(rmov.items(),
|
oldnumreg = numreg;
|
||||||
"Riordino archivio saldi in corso\nOrdinamento archivio movimenti...",
|
mov.zero();
|
||||||
FALSE,TRUE,30);
|
mov.put(MOV_NUMREG, numreg);
|
||||||
|
mov.read();
|
||||||
while (!rmov.eof())
|
CHECK(mov.good(),"Archivi movimenti e righe inconsistenti");
|
||||||
{
|
|
||||||
if (_year == rmov.curr().get(RMV_ANNOES))
|
const char* codcaus = mov.get(MOV_CODCAUS);
|
||||||
{
|
|
||||||
strcpy(rbuf.GRUPPO, rmov.curr().get(RMV_GRUPPO));
|
// cerca causale
|
||||||
strcpy(rbuf.CONTO, rmov.curr().get(RMV_CONTO));
|
causali.zero();
|
||||||
strcpy(rbuf.SOTTOCONTO, rmov.curr().get(RMV_SOTTOCONTO));
|
if (*codcaus)
|
||||||
strcpy(rbuf.SEZIONE, rmov.curr().get(RMV_SEZIONE));
|
{
|
||||||
strcpy(rbuf.IMPORTO, rmov.curr().get(RMV_IMPORTO));
|
causali.put(CAU_CODCAUS, codcaus);
|
||||||
strcpy(rbuf.NUMREG, rmov.curr().get(RMV_NUMREG));
|
causali.read();
|
||||||
sort.sort((char*)&rbuf);
|
CHECK(causali.good(),"Archivi causali e movimenti inconsistenti");
|
||||||
jj++;
|
}
|
||||||
}
|
}
|
||||||
rmov.next();
|
const char sezione = rmov.get(RMV_SEZIONE)[0];
|
||||||
prnd.addstatus(1);
|
real importo(rmov.get(RMV_IMPORTO));
|
||||||
do_events();
|
|
||||||
}
|
sal.set_movap(causali.get(CAU_MOVAP) == "A");
|
||||||
|
sal.set_movprovv(mov.get(MOV_PROVVIS).not_empty());
|
||||||
prnd.setstatus(0);
|
sal.aggiorna(gruppo, conto, sottoconto, importo, sezione);
|
||||||
prnd.set_text("Riordino archivio saldi in corso\nRiscrittura file saldi...");
|
if (sal.items() > MAX_CNT)
|
||||||
prnd.setmax(jj);
|
{
|
||||||
|
sal.registra();
|
||||||
do_events();
|
sal.reset();
|
||||||
sort.endsort();
|
sal.set_anno_es(atoi(_year));
|
||||||
|
}
|
||||||
truc* rr = (truc*)sort.retrieve();
|
}
|
||||||
|
rmov.next();
|
||||||
while (rr != NULL)
|
prnd.addstatus(1);
|
||||||
{
|
do_events();
|
||||||
do_events();
|
}
|
||||||
|
if (sal.items() > 0)
|
||||||
real dare = 0.0, avere = 0.0, saldo = 0.0;
|
sal.registra();
|
||||||
TString conto, sottoconto, gruppo, h;
|
remove("__sal__.sav");
|
||||||
|
return TRUE;
|
||||||
saldi.curr().zero();
|
}
|
||||||
saldi.curr().put(SLD_CONTO, rr->CONTO);
|
|
||||||
saldi.curr().put(SLD_SOTTOCONTO, rr->SOTTOCONTO);
|
|
||||||
saldi.curr().put(SLD_GRUPPO, rr->GRUPPO);
|
int cg4100(int argc, char* argv[])
|
||||||
saldi.curr().put(SLD_ANNOES, _year);
|
{
|
||||||
saldi.read();
|
CG4100_App main_app;
|
||||||
|
main_app.run(argc, argv, "Riordinamento movimenti/Ricalcolo Saldi");
|
||||||
if (saldi.eof())
|
return TRUE;
|
||||||
{
|
}
|
||||||
saldi.curr().zero();
|
|
||||||
saldi.curr().put(SLD_CONTO, rr->CONTO);
|
|
||||||
saldi.curr().put(SLD_SOTTOCONTO, rr->SOTTOCONTO);
|
|
||||||
saldi.curr().put(SLD_GRUPPO, rr->GRUPPO);
|
|
||||||
saldi.curr().put(SLD_ANNOES, _year);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
saldi.curr().put(SLD_SALDO,"");
|
|
||||||
saldi.curr().put(SLD_PDARESCA,"");
|
|
||||||
saldi.curr().put(SLD_PAVERESCA,"");
|
|
||||||
saldi.curr().put(SLD_PDARE,"");
|
|
||||||
saldi.curr().put(SLD_PAVERE,"");
|
|
||||||
saldi.curr().put(SLD_DATAULMOV,"");
|
|
||||||
saldi.curr().put(SLD_NUMULTMOV,"");
|
|
||||||
saldi.rewrite();
|
|
||||||
}
|
|
||||||
|
|
||||||
first = TRUE;
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
bool apertura = FALSE;
|
|
||||||
|
|
||||||
conto = rr->CONTO;
|
|
||||||
sottoconto = rr->SOTTOCONTO;
|
|
||||||
gruppo = rr->GRUPPO;
|
|
||||||
h = rr->SEZIONE;
|
|
||||||
|
|
||||||
real imp = rr->IMPORTO;
|
|
||||||
|
|
||||||
// cerca causale
|
|
||||||
mov.curr().zero();
|
|
||||||
mov.curr().put(MOV_ANNOES,_year);
|
|
||||||
mov.curr().put(MOV_NUMREG, rr->NUMREG);
|
|
||||||
mov.read();
|
|
||||||
|
|
||||||
CHECK(!mov.bad(),"Archivi movimenti e righe inconsistenti");
|
|
||||||
causali.curr().zero();
|
|
||||||
causali.curr().put(CAU_CODCAUS,mov.curr().get(MOV_CODCAUS));
|
|
||||||
|
|
||||||
CHECK(!causali.bad(),"Archivi causali e movimenti inconsistenti");
|
|
||||||
|
|
||||||
if (first)
|
|
||||||
{ apertura = causali.curr().get_bool(CAU_MOVAP); first = FALSE; }
|
|
||||||
|
|
||||||
if (apertura)
|
|
||||||
{
|
|
||||||
saldo += imp;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (rr->SEZIONE[0] == 'D')
|
|
||||||
dare += imp;
|
|
||||||
else avere += imp;
|
|
||||||
}
|
|
||||||
prnd.addstatus(1);
|
|
||||||
rr = (truc*)sort.retrieve();
|
|
||||||
do_events();
|
|
||||||
}
|
|
||||||
while (rr && conto == rr->CONTO && sottoconto == rr->SOTTOCONTO &&
|
|
||||||
gruppo == rr->GRUPPO);
|
|
||||||
|
|
||||||
if (dare != 0.0)
|
|
||||||
{
|
|
||||||
saldi.curr().put(SLD_PDARE,dare);
|
|
||||||
saldi.curr().put(SLD_FLAGSALINI,"D");
|
|
||||||
}
|
|
||||||
else if (avere != 0.0)
|
|
||||||
{
|
|
||||||
saldi.curr().put(SLD_PAVERE,avere);
|
|
||||||
saldi.curr().put(SLD_FLAGSALINI,"A");
|
|
||||||
}
|
|
||||||
else if (saldo != 0.0)
|
|
||||||
{
|
|
||||||
saldi.curr().put(SLD_SALDO,saldo);
|
|
||||||
saldi.curr().put(SLD_FLAGSALINI,h);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (saldi.eof())
|
|
||||||
saldi.write();
|
|
||||||
else
|
|
||||||
saldi.rewrite();
|
|
||||||
}
|
|
||||||
remove("__sal__.sav");
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
int cg4100(int argc, char* argv[])
|
|
||||||
{
|
|
||||||
CG4100_App main_app;
|
|
||||||
main_app.run(argc, argv, "Riordinamento movimenti/Ricalcolo Saldi");
|
|
||||||
return TRUE;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
836
cg/cg4400.cpp
836
cg/cg4400.cpp
File diff suppressed because it is too large
Load Diff
@ -61,7 +61,7 @@ public:
|
|||||||
CG4600_application() {}
|
CG4600_application() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
CG4600_application* app() { return (CG4600_application *) MainApp(); }
|
HIDDEN CG4600_application* app() { return (CG4600_application *) MainApp(); }
|
||||||
|
|
||||||
bool mask_datac (TMask_field& f, KEY k)
|
bool mask_datac (TMask_field& f, KEY k)
|
||||||
{
|
{
|
||||||
|
27
cg/cglib.h
27
cg/cglib.h
@ -21,11 +21,11 @@
|
|||||||
TLocalisamfile * get_descr_cf(TLocalisamfile * pconti,
|
TLocalisamfile * get_descr_cf(TLocalisamfile * pconti,
|
||||||
TLocalisamfile * clifo , int g, int c, long s);
|
TLocalisamfile * clifo , int g, int c, long s);
|
||||||
|
|
||||||
class TClifo_list : public TArray
|
class TClifo_list : public TArray
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
TClifo_list(int g, int c, char tipocf);
|
TClifo_list(int g, int c, char tipocf);
|
||||||
TRectype& clifo(int i)const { return(TRectype&)this->operator[](i); }
|
TRectype& clifo(int i)const { return(TRectype&)this->operator[](i); }
|
||||||
};
|
};
|
||||||
|
|
||||||
class Saldo
|
class Saldo
|
||||||
@ -50,7 +50,7 @@ public:
|
|||||||
real prgdare() {return _prg_dare;}
|
real prgdare() {return _prg_dare;}
|
||||||
real prgavere() {return _prg_avere;}
|
real prgavere() {return _prg_avere;}
|
||||||
bool calcola(int,int,int,int,long,const TDate&,const TDate&,int,bool,
|
bool calcola(int,int,int,int,long,const TDate&,const TDate&,int,bool,
|
||||||
const TDate&,const TDate&,const TDate&,bool);
|
const TDate&,const TDate&,const TDate&,bool);
|
||||||
bool prg_attuali(int,TConto&,int,real&,real&);
|
bool prg_attuali(int,TConto&,int,real&,real&);
|
||||||
bool prg_mov_eliminati(int,TConto&,int,real&,real&);
|
bool prg_mov_eliminati(int,TConto&,int,real&,real&);
|
||||||
Saldo();
|
Saldo();
|
||||||
@ -59,15 +59,21 @@ public:
|
|||||||
|
|
||||||
class TTab_conti : public TAssoc_array
|
class TTab_conti : public TAssoc_array
|
||||||
{
|
{
|
||||||
|
void do_agg(TConto* tc, int anno_es, const real& importo, char sezione,
|
||||||
|
bool movap, bool provv, bool somma, const char* key);
|
||||||
public:
|
public:
|
||||||
void aggiorna_conto (const TConto& tc, const int anno_es, const real& importo, char sezione, bool movap, bool provv, bool somma);
|
void aggiorna_conto(const TConto& tc, int anno_es, const real& importo,
|
||||||
|
char sezione, bool movap, bool provv, bool somma);
|
||||||
|
void aggiorna_conto (int gruppo, int conto, long sottoconto, int anno_es,
|
||||||
|
const real& importo, char sezione, bool movap,
|
||||||
|
bool provv, bool somma);
|
||||||
};
|
};
|
||||||
|
|
||||||
class TSaldo_agg : public TObject
|
class TSaldo_agg : public TObject
|
||||||
{
|
{
|
||||||
TTab_conti _tab_conti;
|
TTab_conti _tab_conti;
|
||||||
bool _movap; // se e' mov. d'apertura (aggiorno SALDO e FLAGSALINI in
|
bool _movap; // se e' mov. d'apertura (aggiorno SALDO e FLAGSALINI in
|
||||||
// saldi)
|
// saldi)
|
||||||
bool _provv;
|
bool _provv;
|
||||||
int _anno_es; // anno esercizio
|
int _anno_es; // anno esercizio
|
||||||
TDate _data_ulmov; // data ultimo movimento
|
TDate _data_ulmov; // data ultimo movimento
|
||||||
@ -76,8 +82,12 @@ class TSaldo_agg : public TObject
|
|||||||
TConto& tconti() { return *(TConto*)_tab_conti.get(); }
|
TConto& tconti() { return *(TConto*)_tab_conti.get(); }
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
void clear_saldi(int year);
|
||||||
void registra();
|
void registra();
|
||||||
void aggiorna (const TConto& tc, const real& importo, char sezione, bool somma=TRUE);
|
void aggiorna (const TConto& tc, const real& importo, char sezione,
|
||||||
|
bool somma=TRUE);
|
||||||
|
void aggiorna (int gruppo, int conto, long sottoconto, const real& importo,
|
||||||
|
char sezione, bool somma=TRUE);
|
||||||
|
|
||||||
void set_anno_es(int anno) { _anno_es = anno; }
|
void set_anno_es(int anno) { _anno_es = anno; }
|
||||||
int anno_es() { return _anno_es; }
|
int anno_es() { return _anno_es; }
|
||||||
@ -96,6 +106,7 @@ public:
|
|||||||
|
|
||||||
void reset(); // pulisce l'array dei conti
|
void reset(); // pulisce l'array dei conti
|
||||||
TSaldo_agg();
|
TSaldo_agg();
|
||||||
|
int items() const { return _tab_conti.items();}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
172
cg/cglib02.cpp
172
cg/cglib02.cpp
@ -13,28 +13,9 @@
|
|||||||
#include "conto.h"
|
#include "conto.h"
|
||||||
#include "cglib.h"
|
#include "cglib.h"
|
||||||
|
|
||||||
void TTab_conti::aggiorna_conto(const TConto& tcon, const int anno_es, const real& importo, char sezione, bool movap, bool provv, bool somma)
|
void TTab_conti::do_agg(TConto* tc, int anno_es, const real& importo,
|
||||||
|
char sezione, bool movap, bool provv, bool somma, const char* key)
|
||||||
{
|
{
|
||||||
// TString16 key;
|
|
||||||
// key.format("%4d%3d%3d%6ld", anno_es, tcon.gruppo(),tcon.conto(),tcon.sottoconto());
|
|
||||||
TString key;
|
|
||||||
key << format("%4d", anno_es);
|
|
||||||
key << format("%3d", tcon.gruppo());
|
|
||||||
key << format("%3d", tcon.conto());
|
|
||||||
key << format("%6ld", tcon.sottoconto());
|
|
||||||
|
|
||||||
TConto* tc = (TConto*) objptr(key);
|
|
||||||
if (tc == NULL)
|
|
||||||
{
|
|
||||||
tc = new TConto(tcon);
|
|
||||||
add(key, tc);
|
|
||||||
tc->dare() = ZERO;
|
|
||||||
tc->avere() = ZERO;
|
|
||||||
tc->darepro() = ZERO;
|
|
||||||
tc->averepro() = ZERO;
|
|
||||||
tc->saldo() = ZERO;
|
|
||||||
}
|
|
||||||
|
|
||||||
real i = somma ? importo : -importo;
|
real i = somma ? importo : -importo;
|
||||||
|
|
||||||
if (movap)
|
if (movap)
|
||||||
@ -47,17 +28,59 @@ void TTab_conti::aggiorna_conto(const TConto& tcon, const int anno_es, const rea
|
|||||||
{
|
{
|
||||||
if (sezione == 'D') tc->darepro() += i;
|
if (sezione == 'D') tc->darepro() += i;
|
||||||
else tc->averepro() += i;
|
else tc->averepro() += i;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (sezione == 'D') tc->dare() += i;
|
if (sezione == 'D') tc->dare() += i;
|
||||||
else tc->avere() += i;
|
else tc->avere() += i;
|
||||||
}
|
}
|
||||||
|
|
||||||
// rimuovo dalla tabella il conto se dare e avere vanno a zero
|
// rimuovo dalla tabella il conto se dare e avere vanno a zero
|
||||||
if (tc->dare().is_zero() && tc->avere().is_zero() &&
|
if (tc->dare().is_zero() && tc->avere().is_zero() &&
|
||||||
tc->darepro().is_zero() && tc->averepro().is_zero() &&
|
tc->darepro().is_zero() && tc->averepro().is_zero() &&
|
||||||
tc->saldo().is_zero()) remove((const char*)key);
|
tc->saldo().is_zero()) remove(key);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void TTab_conti::aggiorna_conto(const TConto& tcon, const int anno_es, const real& importo, char sezione, bool movap, bool provv, bool somma)
|
||||||
|
{
|
||||||
|
TString key;
|
||||||
|
key << format("%4d", anno_es);
|
||||||
|
key << format("%3d", tcon.gruppo());
|
||||||
|
key << format("%3d", tcon.conto());
|
||||||
|
key << format("%6ld", tcon.sottoconto());
|
||||||
|
|
||||||
|
TConto* tc = (TConto*) objptr(key);
|
||||||
|
if (tc == NULL)
|
||||||
|
{
|
||||||
|
tc = new TConto(tcon);
|
||||||
|
add(key, tc);
|
||||||
|
tc->dare() = ZERO;
|
||||||
|
tc->avere() = ZERO;
|
||||||
|
tc->darepro() = ZERO;
|
||||||
|
tc->averepro() = ZERO;
|
||||||
|
tc->saldo() = ZERO;
|
||||||
|
}
|
||||||
|
do_agg(tc, anno_es, importo, sezione, movap, provv, somma, key);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TTab_conti::aggiorna_conto(int gruppo, int conto, long sottoconto,
|
||||||
|
int anno_es, const real& importo, char sezione,
|
||||||
|
bool movap, bool provv, bool somma)
|
||||||
|
{
|
||||||
|
TString key;
|
||||||
|
key << format("%4d", anno_es);
|
||||||
|
key << format("%3d", gruppo);
|
||||||
|
key << format("%3d", conto);
|
||||||
|
key << format("%6ld", sottoconto);
|
||||||
|
|
||||||
|
TConto* tc = (TConto*) objptr(key);
|
||||||
|
if (tc == NULL)
|
||||||
|
{
|
||||||
|
tc = new TConto(gruppo, conto, sottoconto);
|
||||||
|
add(key, tc);
|
||||||
|
}
|
||||||
|
do_agg(tc, anno_es, importo, sezione, movap, provv, somma, key);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -68,12 +91,20 @@ TSaldo_agg::TSaldo_agg()
|
|||||||
_num_ulmov = 0l;
|
_num_ulmov = 0l;
|
||||||
_movap = FALSE;
|
_movap = FALSE;
|
||||||
_provv = FALSE;
|
_provv = FALSE;
|
||||||
reset(); // pulizia dell'array dei conti
|
reset(); // pulizia dell'array dei conti
|
||||||
}
|
}
|
||||||
|
|
||||||
void TSaldo_agg::aggiorna(const TConto& tc, const real& importo, char sezione, bool somma)
|
void TSaldo_agg::aggiorna(const TConto& tc, const real& importo, char sezione,
|
||||||
|
bool somma)
|
||||||
{
|
{
|
||||||
_tab_conti.aggiorna_conto(tc, _anno_es, importo, sezione, _movap, _provv, somma);
|
_tab_conti.aggiorna_conto(tc, _anno_es, importo, sezione, _movap, _provv,
|
||||||
|
somma);
|
||||||
|
}
|
||||||
|
|
||||||
|
void TSaldo_agg::aggiorna(int gruppo, int conto, long sottoconto, const real& importo, char sezione, bool somma)
|
||||||
|
{
|
||||||
|
_tab_conti.aggiorna_conto(gruppo, conto, sottoconto, _anno_es, importo,
|
||||||
|
sezione, _movap, _provv, somma);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TSaldo_agg::reset()
|
void TSaldo_agg::reset()
|
||||||
@ -81,6 +112,41 @@ void TSaldo_agg::reset()
|
|||||||
_tab_conti.destroy();
|
_tab_conti.destroy();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
// pulizia file saldi
|
||||||
|
//
|
||||||
|
// Scorro il file saldi per l' anno year o per tutti gli anni se year = 0
|
||||||
|
// e azzero i progressivi.
|
||||||
|
//
|
||||||
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
void TSaldo_agg::clear_saldi(int year)
|
||||||
|
{
|
||||||
|
TLocalisamfile saldi(LF_SALDI);
|
||||||
|
|
||||||
|
set_anno_es(year);
|
||||||
|
saldi.zero();
|
||||||
|
if (anno_es() != 0)
|
||||||
|
saldi.put(SLD_ANNOES, anno_es());
|
||||||
|
|
||||||
|
TRectype last(saldi.curr());
|
||||||
|
|
||||||
|
for (saldi.read(_isgteq, _lock);
|
||||||
|
!saldi.eof() && saldi.curr() <= last;
|
||||||
|
saldi.next(_lock))
|
||||||
|
{
|
||||||
|
saldi.zero(SLD_NUMULTMOV);
|
||||||
|
saldi.zero(SLD_DATAULMOV);
|
||||||
|
saldi.put(SLD_FLAGSALINI, "D");
|
||||||
|
saldi.zero(SLD_SALDO);
|
||||||
|
saldi.zero(SLD_PDAREPRO);
|
||||||
|
saldi.zero(SLD_PAVEREPRO);
|
||||||
|
saldi.zero(SLD_PDARE);
|
||||||
|
saldi.zero(SLD_PAVERE);
|
||||||
|
saldi.rewrite();
|
||||||
|
}
|
||||||
|
saldi.reread(_unlock);
|
||||||
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
// Aggiornamento file saldi
|
// Aggiornamento file saldi
|
||||||
//
|
//
|
||||||
@ -123,34 +189,34 @@ void TSaldo_agg::registra()
|
|||||||
if (r != ZERO)
|
if (r != ZERO)
|
||||||
{
|
{
|
||||||
s = saldi.get_real(SLD_SALDO);
|
s = saldi.get_real(SLD_SALDO);
|
||||||
Flagsalini = saldi.get(SLD_FLAGSALINI);
|
Flagsalini = saldi.get(SLD_FLAGSALINI);
|
||||||
if (Flagsalini == "A") s = r - s;
|
if (Flagsalini == "A") s = r - s;
|
||||||
else s = r + s;
|
else s = r + s;
|
||||||
if (s < ZERO)
|
if (s < ZERO)
|
||||||
{
|
{
|
||||||
Flagsalini = "A"; s = -s;
|
Flagsalini = "A"; s = -s;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
Flagsalini = "D";
|
Flagsalini = "D";
|
||||||
saldi.put(SLD_FLAGSALINI, (const char *) Flagsalini);
|
saldi.put(SLD_FLAGSALINI, (const char *) Flagsalini);
|
||||||
saldi.put(SLD_SALDO, s);
|
saldi.put(SLD_SALDO, s);
|
||||||
}
|
}
|
||||||
r = saldi.get_real(SLD_PDAREPRO);
|
r = saldi.get_real(SLD_PDAREPRO);
|
||||||
r += tcon.darepro();
|
r += tcon.darepro();
|
||||||
saldi.put(SLD_PDAREPRO, r);
|
saldi.put(SLD_PDAREPRO, r);
|
||||||
r = saldi.get_real(SLD_PAVEREPRO);
|
r = saldi.get_real(SLD_PAVEREPRO);
|
||||||
r += tcon.averepro();
|
r += tcon.averepro();
|
||||||
saldi.put(SLD_PAVEREPRO, r);
|
saldi.put(SLD_PAVEREPRO, r);
|
||||||
r = saldi.get_real(SLD_PDARE);
|
r = saldi.get_real(SLD_PDARE);
|
||||||
r += tcon.dare();
|
r += tcon.dare();
|
||||||
saldi.put(SLD_PDARE, r);
|
saldi.put(SLD_PDARE, r);
|
||||||
r = saldi.get_real(SLD_PAVERE);
|
r = saldi.get_real(SLD_PAVERE);
|
||||||
r += tcon.avere();
|
r += tcon.avere();
|
||||||
saldi.put(SLD_PAVERE, r);
|
saldi.put(SLD_PAVERE, r);
|
||||||
saldi.rewrite();
|
saldi.rewrite();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
saldi.zero();
|
saldi.zero();
|
||||||
saldi.put(SLD_ANNOES, anno_es());
|
saldi.put(SLD_ANNOES, anno_es());
|
||||||
saldi.put(SLD_GRUPPO, tcon.gruppo());
|
saldi.put(SLD_GRUPPO, tcon.gruppo());
|
||||||
|
342
cg/conto.cpp
342
cg/conto.cpp
@ -1,171 +1,171 @@
|
|||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
||||||
#include <isam.h>
|
#include <isam.h>
|
||||||
#include <utility.h>
|
#include <utility.h>
|
||||||
#include <lffiles.h>
|
#include <lffiles.h>
|
||||||
|
|
||||||
#include "conto.h"
|
#include "conto.h"
|
||||||
|
|
||||||
|
|
||||||
// Certified 100%
|
// Certified 100%
|
||||||
TConto::TConto(int g, int c, long s, char t, const char* d)
|
TConto::TConto(int g, int c, long s, char t, const char* d)
|
||||||
: _tipo(toupper(t)), _gruppo(g), _conto(c), _sottoconto(s),
|
: _tipo(toupper(t)), _gruppo(g), _conto(c), _sottoconto(s),
|
||||||
_descrizione(d)
|
_descrizione(d)
|
||||||
{}
|
{}
|
||||||
|
|
||||||
|
|
||||||
// Certified 90%
|
// Certified 90%
|
||||||
TConto::TConto(TToken_string& s, int from, int mode)
|
TConto::TConto(TToken_string& s, int from, int mode)
|
||||||
{
|
{
|
||||||
const char* first = s.get(from);
|
const char* first = s.get(from);
|
||||||
if (mode & 0x1)
|
if (mode & 0x1)
|
||||||
{
|
{
|
||||||
_tipo = first ? toupper(*first) : ' ';
|
_tipo = first ? toupper(*first) : ' ';
|
||||||
first = s.get();
|
first = s.get();
|
||||||
} else _tipo = ' ';
|
} else _tipo = ' ';
|
||||||
|
|
||||||
#ifdef DBG
|
#ifdef DBG
|
||||||
if (strchr(" CF", _tipo) == NULL)
|
if (strchr(" CF", _tipo) == NULL)
|
||||||
{
|
{
|
||||||
error_box("Tipo conto errato: '%c'", _tipo);
|
error_box("Tipo conto errato: '%c'", _tipo);
|
||||||
_tipo = ' ';
|
_tipo = ' ';
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_gruppo = first ? atoi(first) : 0;
|
_gruppo = first ? atoi(first) : 0;
|
||||||
_conto = s.get_int();
|
_conto = s.get_int();
|
||||||
_sottoconto = s.get_long();
|
_sottoconto = s.get_long();
|
||||||
if (mode & 0x2)
|
if (mode & 0x2)
|
||||||
_descrizione = s.get();
|
_descrizione = s.get();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Certified 100%
|
// Certified 100%
|
||||||
TConto& TConto::set(int g, int c, long s, char t, const char* d)
|
TConto& TConto::set(int g, int c, long s, char t, const char* d)
|
||||||
{
|
{
|
||||||
_tipo = toupper(t);
|
_tipo = toupper(t);
|
||||||
_gruppo = g;
|
_gruppo = g;
|
||||||
_conto = c;
|
_conto = c;
|
||||||
_sottoconto = s;
|
_sottoconto = s;
|
||||||
_descrizione = d;
|
_descrizione = d;
|
||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Certified 100%
|
// Certified 100%
|
||||||
bool TConto::ok() const
|
bool TConto::ok() const
|
||||||
{
|
{
|
||||||
return _gruppo != 0 && _conto != 0 && _sottoconto != 0L;
|
return _gruppo != 0 && _conto != 0 && _sottoconto != 0L;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certified 99%
|
// Certified 99%
|
||||||
int TConto::compare(const TSortable& s) const
|
int TConto::compare(const TSortable& s) const
|
||||||
{
|
{
|
||||||
CHECK(class_name()==s.class_name(), "Can't compare TConto with TObject");
|
CHECK(class_name()==s.class_name(), "Can't compare TConto with TObject");
|
||||||
const TConto& c = (const TConto&)s;
|
const TConto& c = (const TConto&)s;
|
||||||
|
|
||||||
int res = _gruppo - c._gruppo;
|
int res = _gruppo - c._gruppo;
|
||||||
if (res) return res;
|
if (res) return res;
|
||||||
|
|
||||||
res = _conto - c._conto;
|
res = _conto - c._conto;
|
||||||
if (res) return res;
|
if (res) return res;
|
||||||
|
|
||||||
const long lres = _sottoconto - c._sottoconto;
|
const long lres = _sottoconto - c._sottoconto;
|
||||||
if (lres < 0L) res = -1; else
|
if (lres < 0L) res = -1; else
|
||||||
if (lres > 0L) res = +1;
|
if (lres > 0L) res = +1;
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Certified 90% (uses __tmp_string && isam)
|
// Certified 90% (uses __tmp_string && isam)
|
||||||
const char* TConto::describe()
|
const char* TConto::describe()
|
||||||
{
|
{
|
||||||
int err = NOERR;
|
int err = NOERR;
|
||||||
const char* desc = NULL;
|
const char* desc = NULL;
|
||||||
|
|
||||||
if (_tipo != 'C' && _tipo != 'F')
|
if (_tipo != 'C' && _tipo != 'F')
|
||||||
{
|
{
|
||||||
TLocalisamfile pcon(LF_PCON, FALSE);
|
TLocalisamfile pcon(LF_PCON, FALSE);
|
||||||
pcon.setkey(1);
|
pcon.setkey(1);
|
||||||
pcon.zero();
|
pcon.zero();
|
||||||
pcon.put("GRUPPO", _gruppo);
|
pcon.put("GRUPPO", _gruppo);
|
||||||
pcon.put("CONTO", _conto);
|
pcon.put("CONTO", _conto);
|
||||||
pcon.put("SOTTOCONTO", _sottoconto);
|
pcon.put("SOTTOCONTO", _sottoconto);
|
||||||
err = pcon.read();
|
err = pcon.read();
|
||||||
if (err == NOERR)
|
if (err == NOERR)
|
||||||
{
|
{
|
||||||
if (_sottoconto != 0)
|
if (_sottoconto != 0)
|
||||||
{
|
{
|
||||||
const char c = pcon.get_char("TMCF");
|
const char c = pcon.get_char("TMCF");
|
||||||
_tipo = (c < ' ') ? ' ' : c; // Force correct type
|
_tipo = (c < ' ') ? ' ' : c; // Force correct type
|
||||||
}
|
}
|
||||||
if (_tipo == ' ')
|
if (_tipo == ' ')
|
||||||
desc = pcon.get("DESCR");
|
desc = pcon.get("DESCR");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (_tipo == 'C' || _tipo == 'F')
|
if (_tipo == 'C' || _tipo == 'F')
|
||||||
{
|
{
|
||||||
TLocalisamfile clifo(LF_CLIFO, FALSE);
|
TLocalisamfile clifo(LF_CLIFO, FALSE);
|
||||||
clifo.setkey(1);
|
clifo.setkey(1);
|
||||||
clifo.zero();
|
clifo.zero();
|
||||||
clifo.put("TIPOCF", _tipo);
|
clifo.put("TIPOCF", _tipo);
|
||||||
clifo.put("CODCF", _sottoconto);
|
clifo.put("CODCF", _sottoconto);
|
||||||
err = clifo.read();
|
err = clifo.read();
|
||||||
if (err == NOERR)
|
if (err == NOERR)
|
||||||
desc = clifo.get("RAGSOC");
|
desc = clifo.get("RAGSOC");
|
||||||
}
|
}
|
||||||
|
|
||||||
return desc;
|
return desc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool TConto::read(TRectype &r)
|
bool TConto::read(TRectype &r)
|
||||||
{
|
{
|
||||||
TLocalisamfile pcon(LF_PCON, FALSE);
|
TLocalisamfile pcon(LF_PCON, FALSE);
|
||||||
pcon.setkey(1);
|
pcon.setkey(1);
|
||||||
pcon.zero();
|
pcon.zero();
|
||||||
pcon.put("GRUPPO", _gruppo);
|
pcon.put("GRUPPO", _gruppo);
|
||||||
pcon.put("CONTO", _conto);
|
pcon.put("CONTO", _conto);
|
||||||
pcon.put("SOTTOCONTO", _sottoconto);
|
pcon.put("SOTTOCONTO", _sottoconto);
|
||||||
|
|
||||||
const int err = pcon.read();
|
const int err = pcon.read();
|
||||||
if (err == NOERR)
|
if (err == NOERR)
|
||||||
{
|
{
|
||||||
r = pcon.curr();
|
r = pcon.curr();
|
||||||
_descrizione = r.get("DESCR");
|
_descrizione = r.get("DESCR");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
r.zero();
|
r.zero();
|
||||||
|
|
||||||
return err == NOERR;
|
return err == NOERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Certified 99% (describe uses __tmp_string)
|
// Certified 99% (describe uses __tmp_string)
|
||||||
const TString& TConto::descrizione()
|
const TString& TConto::descrizione()
|
||||||
{
|
{
|
||||||
if (_descrizione.empty())
|
if (_descrizione.empty())
|
||||||
{
|
{
|
||||||
const char* d = describe();
|
const char* d = describe();
|
||||||
if (d)
|
if (d)
|
||||||
_descrizione = *d ? d : " ";
|
_descrizione = *d ? d : " ";
|
||||||
else
|
else
|
||||||
_descrizione = "Sconosciuto";
|
_descrizione = "Sconosciuto";
|
||||||
}
|
}
|
||||||
return _descrizione;
|
return _descrizione;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Certified 99% (uses __tmp_string)
|
// Certified 99% (uses __tmp_string)
|
||||||
const char* TConto::string(int mode)
|
const char* TConto::string(int mode)
|
||||||
{
|
{
|
||||||
TFixed_string s(&__tmp_string[128], 80);
|
TFixed_string s(&__tmp_string[128], 80);
|
||||||
s.cut(0);
|
s.cut(0);
|
||||||
if (mode & 0x1)
|
if (mode & 0x1)
|
||||||
s << _tipo << '|';
|
s << _tipo << '|';
|
||||||
s << _gruppo << '|' << _conto << '|' << _sottoconto;
|
s << _gruppo << '|' << _conto << '|' << _sottoconto;
|
||||||
if (mode & 0x2) s << '|' << descrizione();
|
if (mode & 0x2) s << '|' << descrizione();
|
||||||
|
|
||||||
return s;
|
return s;
|
||||||
}
|
}
|
||||||
|
62
cg/conto.h
62
cg/conto.h
@ -8,48 +8,48 @@
|
|||||||
#ifndef __REAL_H
|
#ifndef __REAL_H
|
||||||
#include <real.h>
|
#include <real.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
enum TIndbil { ib_null, ib_attivita, ib_passivita, ib_costi, ib_ricavi, ib_conti_ordine };
|
enum TIndbil { ib_null, ib_attivita, ib_passivita, ib_costi, ib_ricavi, ib_conti_ordine };
|
||||||
|
|
||||||
class TConto : public TSortable
|
class TConto : public TSortable
|
||||||
{
|
{
|
||||||
char _tipo; // ' ' = Conto, 'C' = Cliente, 'F' = 'Fornitore'
|
char _tipo; // ' ' = Conto, 'C' = Cliente, 'F' = 'Fornitore'
|
||||||
int _gruppo, _conto;
|
int _gruppo, _conto;
|
||||||
long _sottoconto; // Sottoconto, codice cliente o fornitore
|
long _sottoconto; // Sottoconto, codice cliente o fornitore
|
||||||
TString80 _descrizione; // Vuota fino alla chiamata di describe
|
TString80 _descrizione; // Vuota fino alla chiamata di describe
|
||||||
real _dare, _avere;
|
real _dare, _avere;
|
||||||
real _darepro, _averepro;
|
real _darepro, _averepro;
|
||||||
real _saldo;
|
real _saldo;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual int compare(const TSortable& s) const;
|
virtual int compare(const TSortable& s) const;
|
||||||
virtual const char* class_name() const { return "Conto"; }
|
virtual const char* class_name() const { return "Conto"; }
|
||||||
|
|
||||||
const char* describe();
|
const char* describe();
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TConto(int g = 0, int c = 0, long s = 0L, char t = ' ', const char* d = NULL);
|
TConto(int g = 0, int c = 0, long s = 0L, char t = ' ', const char* d = NULL);
|
||||||
TConto(TToken_string& tgcsd, int from, int mode = 0);
|
TConto(TToken_string& tgcsd, int from, int mode = 0);
|
||||||
virtual ~TConto() {}
|
virtual ~TConto() {}
|
||||||
|
|
||||||
TConto& set(int g = 0, int c = 0, long s = 0L, char t = ' ', const char* d = NULL);
|
TConto& set(int g = 0, int c = 0, long s = 0L, char t = ' ', const char* d = NULL);
|
||||||
|
|
||||||
virtual bool ok() const; // Gruppo, Conto e Sottoconto non nulli
|
virtual bool ok() const; // Gruppo, Conto e Sottoconto non nulli
|
||||||
real& dare() { return _dare; }
|
real& dare() { return _dare; }
|
||||||
real& avere() { return _avere; }
|
real& avere() { return _avere; }
|
||||||
real& darepro() { return _darepro; }
|
real& darepro() { return _darepro; }
|
||||||
real& averepro() { return _averepro; }
|
real& averepro() { return _averepro; }
|
||||||
real& saldo() { return _saldo; }
|
real& saldo() { return _saldo; }
|
||||||
|
|
||||||
char tipo() const { return _tipo; }
|
char tipo() const { return _tipo; }
|
||||||
int gruppo() const { return _gruppo; }
|
int gruppo() const { return _gruppo; }
|
||||||
int conto() const { return _conto; }
|
int conto() const { return _conto; }
|
||||||
long sottoconto() const { return _sottoconto; }
|
long sottoconto() const { return _sottoconto; }
|
||||||
|
|
||||||
const TString& descrizione();
|
const TString& descrizione();
|
||||||
bool read(TRectype& r);
|
bool read(TRectype& r);
|
||||||
|
|
||||||
const char* string(int mode = 0);
|
const char* string(int mode = 0);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
17
cg/makefile
17
cg/makefile
@ -1,6 +1,6 @@
|
|||||||
EXE=$(EP)cg0 $(EP)cg1 $(EP)cg3 $(EP)cg4 $(EP)cg5
|
EXE=$(EP)cg0 $(EP)cg1 $(EP)cg3 $(EP)cg4 $(EP)cg5
|
||||||
FRL=$(EP)cg0.frl $(EP)cg1.frl $(EP)cg3.frl $(EP)cg4.frl $(EP)cg5.frl
|
FRL=$(EP)cg0.frl $(EP)cg1.frl $(EP)cg3.frl $(EP)cg4.frl $(EP)cg5.frl
|
||||||
MSK=$(EP)cg0100a.msk $(EP)cg0200a.msk $(EP)cg0300a.msk $(EP)cg0400a.msk $(EP)cg0500a.msk $(EP)cg1100a.msk $(EP)cg1200a.msk $(EP)cg1200b.msk $(EP)cg1400a.msk $(EP)cg1500a.msk $(EP)cg1600a.msk $(EP)cg1700a.msk $(EP)cg2100a.msk $(EP)cg2100b.msk $(EP)cg2100c.msk $(EP)cg2100i.msk $(EP)cg2100o.msk $(EP)cg3300a.msk $(EP)cg3100a.msk $(EP)cg3100b.msk $(EP)cg3100c.msk $(EP)cg3200a.msk $(EP)cg3500a.msk $(EP)cg4300a.msk $(EP)cg5000a.msk $(EP)cg4400a.msk $(EP)cg4500a.msk $(EP)cg4500b.msk $(EP)cg4600a.msk
|
MSK=$(EP)cg0100a.msk $(EP)cg0200a.msk $(EP)cg0300a.msk $(EP)cg0400a.msk $(EP)cg0500a.msk $(EP)cg1100a.msk $(EP)cg1200a.msk $(EP)cg1200b.msk $(EP)cg1400a.msk $(EP)cg1500a.msk $(EP)cg1600a.msk $(EP)cg1700a.msk $(EP)cg2100a.msk $(EP)cg2100b.msk $(EP)cg2100c.msk $(EP)cg2100i.msk $(EP)cg2100o.msk $(EP)cg3300a.msk $(EP)cg3100a.msk $(EP)cg3100b.msk $(EP)cg3100c.msk $(EP)cg3200a.msk $(EP)cg3500a.msk $(EP)cg4100a.msk $(EP)cg4300a.msk $(EP)cg4300b.msk $(EP)cg4300c.msk $(EP)cg5000a.msk $(EP)cg4400a.msk $(EP)cg4500a.msk $(EP)cg4500b.msk $(EP)cg4600a.msk
|
||||||
|
|
||||||
$(O)/%.o: %.cpp
|
$(O)/%.o: %.cpp
|
||||||
$(CCOMP) $(CFLAGSD) $(<:.cpp= ) $(O)/$*
|
$(CCOMP) $(CFLAGSD) $(<:.cpp= ) $(O)/$*
|
||||||
@ -108,7 +108,7 @@ $(O)/cg2102.o: cg2102.cpp cg2102.h $(I6) $(I10) $(I24) $(I27) $(I33)
|
|||||||
|
|
||||||
$(O)/cg2103.o: cg2103.cpp cg2103.h
|
$(O)/cg2103.o: cg2103.cpp cg2103.h
|
||||||
|
|
||||||
$(O)/cglib02.o: cglib02.cpp cglib.h
|
$(O)/cglib02.o: conto.h cglib02.cpp $(I24) $(I31) $(I33) $(I40) $(I42) $(I51) cglib.h
|
||||||
|
|
||||||
$(O)/conto.o: conto.cpp $(I6) $(I10) $(I24) $(I27) $(I33)
|
$(O)/conto.o: conto.cpp $(I6) $(I10) $(I24) $(I27) $(I33)
|
||||||
|
|
||||||
@ -214,20 +214,17 @@ $(O)/cg4500.o: cg4500.cpp $(I24) $(I31) $(I33) $(I40) $(I42) $(I51) cg4500a.h
|
|||||||
|
|
||||||
$(O)/cglib01.o: cglib01.cpp $(I24) $(I31) $(I33) $(I40) $(I42) $(I51) cglib.h
|
$(O)/cglib01.o: cglib01.cpp $(I24) $(I31) $(I33) $(I40) $(I42) $(I51) cglib.h
|
||||||
|
|
||||||
$(O)/cglib02.o: cglib02.cpp $(I24) $(I31) $(I33) $(I40) $(I42) $(I51) cglib.h
|
|
||||||
|
|
||||||
$(O)/conto.o: conto.cpp conto.h
|
$(O)/conto.o: conto.cpp conto.h
|
||||||
|
|
||||||
$(O)/cg2101.o: cg2101.cpp $(I6) $(I10) $(I24) $(I27) $(I33)
|
$(EP)cg4: $(O)/cg4.o $(LIBD1) $(O)/cg4300.o $(O)/cg4301.o $(O)/cg4302.o $(O)/cg4303.o $(O)/cg4304.o $(O)/cg4305.o $(O)/cg4400.o $(O)/cg4401.o $(O)/conto.o $(O)/cglib01.o $(O)/cglib02.o $(O)/cg4500.o $(O)/cg2101.o $(O)/cg2103.o $(O)/cg4100.o $(O)/cg4600.o $(EP)cg4.frl $(EP)cg4300a.msk $(EP)cg4300b.msk $(EP)cg4300c.msk $(O)/cglib03.o
|
||||||
|
$(LINK) $(LFLAGSD1) $@ $(O)/cg4.o $(O)/cg4300.o $(O)/cg4301.o $(O)/cg4302.o $(O)/cg4303.o $(O)/cg4304.o $(O)/cg4305.o $(O)/cg4400.o $(O)/cg4401.o $(O)/conto.o $(O)/cglib01.o $(O)/cglib02.o $(O)/cg4500.o $(O)/cglib03.o $(O)/cg2101.o $(O)/cg2103.o $(O)/cg4100.o $(O)/cg4600.o
|
||||||
$(O)/cg2103.o: cg2103.cpp cg2103.h
|
|
||||||
|
|
||||||
$(EP)cg4: $(O)/cg4.o $(LIBD1) $(O)/cg4300.o $(O)/cg4301.o $(O)/cg4302.o $(O)/cg4303.o $(O)/cg4304.o $(O)/cg4305.o $(O)/cg4400.o $(O)/cg4401.o $(O)/conto.o $(O)/cglib01.o $(O)/cglib02.o $(O)/cg4500.o $(O)/cg2101.o $(O)/cg2103.o $(EP)cg4.frl $(EP)cg4300a.msk $(EP)cg4300b.msk $(EP)cg4300c.msk $(O)/cglib03.o
|
|
||||||
$(LINK) $(LFLAGSD1) $@ $(O)/cg4.o $(O)/cg4300.o $(O)/cg4301.o $(O)/cg4302.o $(O)/cg4303.o $(O)/cg4304.o $(O)/cg4305.o $(O)/cg4400.o $(O)/cg4401.o $(O)/conto.o $(O)/cglib01.o $(O)/cglib02.o $(O)/cg4500.o $(O)/cglib03.o $(O)/cg2101.o $(O)/cg2103.o
|
|
||||||
|
|
||||||
$(EP)cg4400.frl: cg4400.url $(U1)
|
$(EP)cg4400.frl: cg4400.url $(U1)
|
||||||
$(RCOMP) cg4400 -l $(EP)cg4400
|
$(RCOMP) cg4400 -l $(EP)cg4400
|
||||||
|
|
||||||
|
$(EP)cg4100a.msk : cg4100a.uml
|
||||||
|
$(MCOMP) $(basename $?) $(basename $@)
|
||||||
|
|
||||||
$(EP)cg4300a.msk : cg4300a.uml
|
$(EP)cg4300a.msk : cg4300a.uml
|
||||||
$(MCOMP) $(basename $?) $(basename $@)
|
$(MCOMP) $(basename $?) $(basename $@)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user