1994-12-09 16:29:50 +00:00
|
|
|
#include <applicat.h>
|
|
|
|
#include <mask.h>
|
1995-02-03 11:51:44 +00:00
|
|
|
#include <tabutil.h>
|
|
|
|
|
|
|
|
class TSheet_field;
|
1994-12-09 16:29:50 +00:00
|
|
|
|
|
|
|
class Visliq_app : public TApplication
|
|
|
|
{
|
|
|
|
TString _freqviva;
|
|
|
|
int _year;
|
1995-02-01 11:49:54 +00:00
|
|
|
long _firm;
|
|
|
|
|
|
|
|
TRelation* _nditte;
|
|
|
|
TArray_sheet* _ditte;
|
|
|
|
TArray _nomiditte;
|
1994-12-09 16:29:50 +00:00
|
|
|
|
|
|
|
TTable* _lim;
|
|
|
|
TTable* _lia;
|
|
|
|
TTable* _del;
|
|
|
|
|
|
|
|
TRectype* _lim_r;
|
|
|
|
TRectype* _del_r;
|
|
|
|
TRecfield* _del_ditta;
|
|
|
|
TRecfield* _del_anno;
|
|
|
|
TRecfield* _del_mese;
|
|
|
|
TRecfield* _del_tipo;
|
|
|
|
TRecfield* _lim_anno;
|
|
|
|
TRecfield* _lim_mese;
|
|
|
|
|
1995-02-03 11:51:44 +00:00
|
|
|
TSheet_field* _vers_sheet, *_liq_sheet;
|
|
|
|
TArray _vers_rows, _liq_rows;
|
|
|
|
|
1994-12-16 10:14:26 +00:00
|
|
|
TMask* _mask;
|
|
|
|
|
1994-12-09 16:29:50 +00:00
|
|
|
const char* itoname(int m);
|
|
|
|
|
|
|
|
bool is_trim(int x);
|
|
|
|
bool is_month_ok(int x, int month = -1);
|
|
|
|
|
1994-12-23 11:56:34 +00:00
|
|
|
void set_risultato(TViswin*, long, real&);
|
1994-12-09 16:29:50 +00:00
|
|
|
|
|
|
|
protected:
|
|
|
|
|
|
|
|
virtual bool menu(MENU_TAG);
|
|
|
|
virtual bool create();
|
|
|
|
virtual bool destroy();
|
|
|
|
|
|
|
|
// handlers
|
|
|
|
static bool set_ditta(TMask_field&, KEY);
|
1995-02-01 11:49:54 +00:00
|
|
|
static bool set_ragsoc(TMask_field&, KEY);
|
1994-12-16 10:14:26 +00:00
|
|
|
static bool sel_mese_sh1 (TMask_field&, KEY);
|
|
|
|
static bool sel_mese_sh2 (TMask_field&, KEY);
|
1995-02-01 11:49:54 +00:00
|
|
|
static bool ch_year_handler(TMask_field& f, KEY key);
|
1994-12-16 10:14:26 +00:00
|
|
|
|
|
|
|
static const char* link_handler(TMask&, int, const char*, bool doubleclick);
|
|
|
|
|
|
|
|
static bool sheet_action(int r, KEY k);
|
1995-02-01 11:49:54 +00:00
|
|
|
static bool vers_action(int r, KEY k);
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
|
|
|
static Visliq_app& app() { return (Visliq_app&)main_app(); }
|
|
|
|
TArray_sheet* get_ditte_sheet() { return _ditte; }
|
1994-12-09 16:29:50 +00:00
|
|
|
|
1995-02-01 11:49:54 +00:00
|
|
|
void build_ditte_sheet();
|
|
|
|
void build_nomiditte();
|
1995-01-09 12:14:11 +00:00
|
|
|
|
|
|
|
bool look_lia(int year = 0);
|
|
|
|
bool look_lim(int m);
|
1995-02-03 11:51:44 +00:00
|
|
|
bool look_del(int month, int type, bool create = FALSE);
|
1994-12-09 16:29:50 +00:00
|
|
|
|
|
|
|
void set_freqviva();
|
1995-02-01 11:49:54 +00:00
|
|
|
void set_freqviva(const char* f) { _freqviva = f; }
|
1994-12-09 16:29:50 +00:00
|
|
|
void set_mask_freq(TMask&);
|
1995-02-01 11:49:54 +00:00
|
|
|
void set_year(const char* y) { _year = atoi(y); }
|
|
|
|
void set_year(int y) { _year = y; }
|
|
|
|
void reset_fields();
|
1994-12-16 10:14:26 +00:00
|
|
|
|
1995-02-03 11:51:44 +00:00
|
|
|
// 2 palle
|
1994-12-16 10:14:26 +00:00
|
|
|
TMask* get_main_mask() { return _mask; }
|
1995-01-09 12:14:11 +00:00
|
|
|
void update_sheet_row(TToken_string& t);
|
1994-12-09 16:29:50 +00:00
|
|
|
|
|
|
|
// workhorses
|
|
|
|
bool vis_liq();
|
|
|
|
bool vis_all();
|
|
|
|
bool vis_one(int);
|
|
|
|
|
|
|
|
Visliq_app() : TApplication() {}
|
|
|
|
virtual ~Visliq_app() {}
|
|
|
|
};
|
|
|
|
|