Files correlati : Ricompilazione Demo : [ ] Commento : Aggiunto recordset per gestire "trasparentemente" i piani dei conti contabile o analitico. Potenziato calcolo saldi per gestire anche i livelli intermedi dei conti e soprattutto gestire la riclassificazione dei conti analitici tramite la tabella panapdc Potenziato il generatore di movimenti casuale per gestire anche il piano dei conti contabile nonche' la generazione automatica della tabela panapdc. git-svn-id: svn://10.65.10.50/trunk@13265 c028cbd2-c16b-5b4b-a496-9718f37d4682
186 lines
5.2 KiB
C++
Executable File
186 lines
5.2 KiB
C++
Executable File
#ifndef __CALIB01_H
|
|
#define __CALIB01_H
|
|
|
|
#ifndef __AUTOMASK_H
|
|
#include <automask.h>
|
|
#endif
|
|
|
|
#ifndef __MULTIREC_H
|
|
#include <multirec.h>
|
|
#endif
|
|
|
|
#ifndef __RELAPP_H
|
|
#include <relapp.h>
|
|
#endif
|
|
|
|
#ifndef __CGLIB03_H
|
|
class TBill;
|
|
#endif
|
|
|
|
|
|
class TMultilevel_code_info : public TObject
|
|
{
|
|
int _logicnum; // Logic number of main file
|
|
TString_array _prompt; // Prompts of mask fields
|
|
TString_array _picture; // Pictures of mask fields
|
|
TArray _key1_fields; // TFieldrefs of key 1 mask fields
|
|
TArray _key2_fields; // TFieldrefs of key 2 mask fields
|
|
int _parentnum; // Logic number of parent file (LF_FASI only)
|
|
|
|
protected:
|
|
bool get_cfg_vars(TString& key, TString& des) const;
|
|
const char* get_key_fieldname(int k = 1) const;
|
|
void add_fieldref(int k, int from, int to);
|
|
|
|
public:
|
|
int levels() const;
|
|
int len(int level) const;
|
|
int total_len(int level) const;
|
|
const TString& picture(int level) const;
|
|
bool is_numeric_picture(int level) const;
|
|
bool is_required(int level) const;
|
|
const TString& prompt(int level) const;
|
|
const TFieldref& fieldref(int level, int key = 1) const;
|
|
int parent() const { return _parentnum; }
|
|
|
|
TMultilevel_code_info(int logicnum);
|
|
virtual ~TMultilevel_code_info() { }
|
|
};
|
|
|
|
const TMultilevel_code_info& ca_multilevel_code_info(int logicnum);
|
|
bool ca_test_multilevel_field(TEdit_field& fld, int level);
|
|
int ca_create_fields(TMask& msk, int page, int logicnum, int x, int y, short key_id, short des_id,
|
|
unsigned int mode = 0x0, const char* fieldname = NULL);
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TSimple_anal_msk
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TSimple_anal_msk : public TAutomask
|
|
{
|
|
protected:
|
|
bool test_key_field(short id);
|
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
|
virtual void read(const char* msk);
|
|
|
|
void append_select_clause(ostream& out, int level) const;
|
|
void create_key_browse(TEdit_field& kfld, int level);
|
|
void create_des_browse(TEdit_field& kfld, int level);
|
|
virtual int create_key_fields();
|
|
|
|
virtual short create_tree_field();
|
|
int compute_offset() const;
|
|
|
|
protected:
|
|
TSimple_anal_msk() { }
|
|
|
|
public:
|
|
void update_tree_field();
|
|
|
|
const TFieldref& fieldref(int n, int key = 1) const;
|
|
int fieldrefs(int key = 1) const;
|
|
|
|
virtual int get_logicnum() const pure;
|
|
virtual short get_field_id(int n, int key = 1) const;
|
|
|
|
virtual const TToken_string& get_key_value(const TRectype& rec, int k = 1) const;
|
|
virtual const TToken_string& get_key_value(int k = 1) const;
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TAnal_app
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TAnal_app : public TRelation_application
|
|
{
|
|
TRelation* _rel;
|
|
TSimple_anal_msk* _msk;
|
|
|
|
virtual const char * extra_modules() const {return "cm";} //funziona anche con autorizzazione CM
|
|
|
|
protected:
|
|
virtual TMask* get_mask(int) { return _msk; }
|
|
virtual TRelation* get_relation() const { return _rel; }
|
|
virtual bool user_create();
|
|
virtual bool user_destroy();
|
|
virtual int write(const TMask& m);
|
|
virtual int rewrite(const TMask& m);
|
|
void init_key_fields(TSimple_anal_msk & m) const;
|
|
virtual void init_query_mode(TMask& mask);
|
|
virtual void init_modify_mode(TMask& mask);
|
|
virtual void init_insert_mode(TMask& mask);
|
|
|
|
protected:
|
|
virtual TSimple_anal_msk* create_mask() const pure;
|
|
virtual TRelation* create_relation() const;
|
|
};
|
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TAnal_mov
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TAnal_mov : public TMultiple_rectype
|
|
{
|
|
TAssoc_array _saldi;
|
|
|
|
protected:
|
|
TImporto& saldo(const TRectype& rec);
|
|
void load_saldi(bool reset);
|
|
void kill_saldi() { _saldi.destroy(); }
|
|
void update_saldi(bool kill);
|
|
bool save_saldi();
|
|
void update_datacomp() const;
|
|
|
|
public:
|
|
virtual int readat(TBaseisamfile& f, TRecnotype nrec, word lockop);
|
|
virtual int read(TBaseisamfile& f, word op, word lockop);
|
|
virtual int write(TBaseisamfile& f) const;
|
|
virtual int rewrite(TBaseisamfile& f) const;
|
|
virtual int remove(TBaseisamfile& f) const;
|
|
|
|
public:
|
|
int read(long numreg, word lockop = _nolock); // Funzione read di comodo
|
|
TAnal_mov(long numreg = 0);
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TAnal_rip
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TAnal_rip : public TMultiple_rectype
|
|
{
|
|
public:
|
|
TAnal_rip();
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TCache_ripartizioni
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TCache_ripartizioni : public TCache
|
|
{
|
|
protected:
|
|
virtual TObject* key2obj(const char* key);
|
|
|
|
public:
|
|
const TRecord_array& righe(const char* costo, const char* commessa);
|
|
const TRecord_array& righe(const int gruppo, const int conto, const long sottoconto);
|
|
const TRecord_array& righe(const TBill& bill);
|
|
};
|
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TConfig_anal
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TConfig_anal : public TConfig
|
|
{
|
|
bool _has_ca;
|
|
public:
|
|
virtual const TString& get(const char* var, const char* section = NULL, int index = -1, const char* def = "");
|
|
TConfig_anal();
|
|
};
|
|
|
|
#endif
|