37178085ef
Files correlati : nessuno Ricompilazione Demo : [ ] Commento : Riportata la versione aga 07.150 sul main trunk git-svn-id: svn://10.65.10.50/trunk@9871 c028cbd2-c16b-5b4b-a496-9718f37d4682
105 lines
3.0 KiB
C++
Executable File
105 lines
3.0 KiB
C++
Executable File
#ifndef __BAEUR_H
|
|
#define __BAEUR_H
|
|
|
|
#ifndef __APPLICAT_H
|
|
#include <applicat.h>
|
|
#endif
|
|
|
|
#ifndef __ISAM_H
|
|
#include <isam.h>
|
|
#endif
|
|
|
|
#ifndef __CGLIB01_H
|
|
class TBill;
|
|
#endif
|
|
|
|
|
|
// Handler personalizzato. Se ritorna true rewrite, altrimenti remove
|
|
typedef bool (*record_handler)(TRectype& rec, void* jolly);
|
|
typedef void (*zap_function)(int lf, bool euro, void * jolly);
|
|
|
|
class TEuro_app : public TSkeleton_application
|
|
{
|
|
TFilename old_study;
|
|
|
|
protected:
|
|
bool goto_lire(long ditta = -1);
|
|
bool goto_euro(long ditta = -1);
|
|
bool copy_dir(const char* src, const char* dst) const;
|
|
|
|
void convert_file(int lf, const char* cnv, const char* res,
|
|
record_handler rh = NULL, void* jolly = NULL, const char* filter = NULL);
|
|
void zap_file(int lf, bool euro = TRUE, const char* filter = NULL) const;
|
|
void zap_table(const char * tab, bool euro = TRUE);
|
|
bool is_com_file(int lf) const;
|
|
bool is_firm_file(int lf) const { return !is_com_file(lf); }
|
|
|
|
virtual bool create();
|
|
virtual bool destroy();
|
|
|
|
public:
|
|
bool get_aree_dati(TFilename& lit, TFilename& eur) const;
|
|
bool data_adozione_euro(long firm, TDate& adozione, bool& inizio) const;
|
|
|
|
bool save_round_bill(const TBill& b) const;
|
|
bool load_round_bill(TBill& b) const;
|
|
};
|
|
|
|
class TEuroisamfile : public TIsamtempfile
|
|
{
|
|
public:
|
|
TEuroisamfile(int logicnum, bool euro = FALSE, long firm = -1);
|
|
virtual ~TEuroisamfile() { }
|
|
};
|
|
|
|
struct TCG_rmov : public TObject
|
|
{
|
|
int _gruppo, _conto;
|
|
long _sottoconto;
|
|
TImporto _importo;
|
|
};
|
|
|
|
class TCG_mov : public TArray
|
|
{
|
|
enum { MAX_CG_ROWS = 98};
|
|
|
|
protected:
|
|
const TCG_rmov& row(int i) const { return (const TCG_rmov&)*objptr(i); }
|
|
|
|
void crea_testata(TLocalisamfile& mov, const TString& caus,
|
|
const TDate& datareg, const TString& desc) const;
|
|
void crea_riga(const TRectype& mov, TRectype& rmov, int r) const;
|
|
void update_saldo(const TRectype& mov, const TRectype& rmov, TLocalisamfile& saldi);
|
|
|
|
public:
|
|
void add(int g, int c, long s, char sez, const real& imp);
|
|
void add(const TBill& bill, const TImporto& imp);
|
|
TImporto save(const TDate& datareg, const TString& caus, const TString& desc,
|
|
const TBill& contro, bool adeuro, bool convert, bool invert);
|
|
TImporto calc_bil(bool convert, bool invert); // Sommatoria delle righe
|
|
};
|
|
|
|
class TCG_movs : public TArray
|
|
{
|
|
public:
|
|
int indbil(int g, int c) const;
|
|
TCG_mov& mov(int ib);
|
|
int add(int g, int c, long s, char sez, const real& imp);
|
|
TImporto save(const TDate& datareg, const TString& caus, const TString& desc, const TBill& contro,
|
|
bool adeuro, bool convert, bool invert);
|
|
};
|
|
|
|
bool dir_equal(const char* dir1, const char* dir2);
|
|
void convert_import(TRectype& rec, const char* str);
|
|
void zero_import(TRectype& rec, const char* str);
|
|
void keep_import(TRectype& rec, const char* str);
|
|
const TString& build_name(int logicnum, bool euro, long firm);
|
|
bool dbf_exists(int logicnum, bool euro = FALSE, long firm = -1);
|
|
|
|
const real EURO(1936.27);
|
|
|
|
int ceeur01(int argc, char* argv[]);
|
|
int ceeur02(int argc, char* argv[]);
|
|
|
|
#endif
|