campo-sirio/ba/baeur.h
alex 8a05210c2d Patch level : xx.7.054
Files correlati     :
Ricompilazione Demo : [ ]
Commento            :
Riportata la version 1.7 patch 054 aga sul main trunk


git-svn-id: svn://10.65.10.50/trunk@9655 c028cbd2-c16b-5b4b-a496-9718f37d4682
2001-04-30 14:22:43 +00:00

102 lines
2.8 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);
class TEuro_app : public TSkeleton_application
{
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);
void zap_file(int lf, bool euro) const;
void zap_table(const char * tab, bool euro);
bool is_com_file(int lf) const;
bool is_firm_file(int lf) const { return !is_com_file(lf); }
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);
};
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);
};
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);
const real EURO(1936.27);
int baeur00(int argc, char* argv[]);
int baeur01(int argc, char* argv[]);
int baeur02(int argc, char* argv[]);
int baeur03(int argc, char* argv[]);
int baeur04(int argc, char* argv[]);
int baeur05(int argc, char* argv[]);
int baeur06(int argc, char* argv[]);
int baeur07(int argc, char* argv[]);
int baeur08(int argc, char* argv[]);
int baeur09(int argc, char* argv[]);
#endif