Files correlati : sc2.exe sc2100a.msk sc2100b.msk sc2200a.msk sc2300a.msk sc2400a.msk sc2400b.msk sc2600a.msk Commento: Invio etratti conti e solleciti via mail
168 lines
5.0 KiB
C++
Executable File
168 lines
5.0 KiB
C++
Executable File
#ifndef __SC2101_H
|
|
#define __SC2101_H
|
|
|
|
#ifndef __TEXTSET_H
|
|
#include "textset.h"
|
|
#endif
|
|
|
|
#ifndef __SCSELECT_H
|
|
#include "scselect.h"
|
|
#endif
|
|
|
|
class TEC_mask;
|
|
|
|
class TEC_recordset : public TAS400_recordset
|
|
{
|
|
TString4 _who;
|
|
TString _agente;
|
|
TString _pagam;
|
|
|
|
public:
|
|
const TString & who() const { return _who; }
|
|
TString & set_agente(const char * agente) { _agente = agente; return _agente; }
|
|
TString & set_pagam(const char * pagam) { _pagam = pagam; return _pagam; }
|
|
void add_fields();
|
|
TEC_recordset(const char * who);
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TEC_gamelist
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TEC_Game_list
|
|
{
|
|
TAssoc_array _games;
|
|
|
|
protected:
|
|
void signature(const TRectype& rec, TToken_string& signature) const;
|
|
|
|
public:
|
|
void add_game(const TRectype& rec);
|
|
bool has_clifo(long codcf);
|
|
bool has_game(const TRectype& rec);
|
|
};
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TEC_form
|
|
///////////////////////////////////////////////////////////
|
|
|
|
class TEC_form : public TESSL_form
|
|
{
|
|
friend class TEC_row;
|
|
|
|
static TEC_form* _form;
|
|
TEC_recordset* _recordset;
|
|
|
|
enum { MAXTOT = 16 };
|
|
|
|
TCursor* _cursore;
|
|
TTotalizer _totali;
|
|
bool _export;
|
|
|
|
TString _lingua; // Codice lingua del form
|
|
TDate _dlo, _dls, _dir; // Data limite operazione, scaduto e inizio rischio
|
|
int _giorni_rischio; // Numero giorni rischio nella maschera di selezione
|
|
bool _in_valuta; // Il form e' in valuta
|
|
int _fincatura; // 0 = nessuna, 1 = testo, 2 = grafica
|
|
word _num_rip; // Numero di righe usate per i riporti
|
|
word _total_rows; // Numero di righe usate per i totali
|
|
word _maxtot; // Numero massimo di totali da stampare
|
|
bool _stampa_saldo; // Stampa il saldo di ogni partita
|
|
bool _note_scadenti; // Considera scadute le note di credito non assegnate
|
|
|
|
protected:
|
|
void init_header(const TMask& m);
|
|
word ordina_totali_per_valuta(THash_object* tot[MAXTOT]);
|
|
|
|
int find_magic(TString& s, TString& magic1, TString& magic2) const;
|
|
void change_magic_body(const TEC_row& o, TString& s);
|
|
void change_magic_footer(const THash_object& o, TString& s);
|
|
void print_total(int riga, const THash_object& o);
|
|
|
|
void stampa_testata(TPrinter& p);
|
|
void stampa_pedata();
|
|
void stampa_riporti(TPrinter& p);
|
|
|
|
static void ec_header_handler(TPrinter& p);
|
|
static void ec_footer_handler(TPrinter& p);
|
|
|
|
public:
|
|
TTotalizer& totali() { return _totali; }
|
|
|
|
virtual TRelation* relation() const { return _cursore->relation(); }
|
|
virtual TCursor* cursor() { return _cursore; }
|
|
virtual TEC_recordset* recordset() { return _recordset; }
|
|
|
|
const TDate& data_limite_operazione() const { return _dlo; }
|
|
const TDate& data_limite_scaduto() const { return _dls; }
|
|
int giorni_rischio() const { return _giorni_rischio; }
|
|
const TDate& data_inizio_rischio() const { return _dir; }
|
|
bool note_scadenti() const { return _note_scadenti; }
|
|
|
|
const TString& lingua() const { return _lingua; }
|
|
bool in_valuta() const { return _in_valuta; }
|
|
const TString& describe(short id, char sez = 'H', pagetype pt = last_page) const;
|
|
|
|
void azzera_totali();
|
|
void ultima_pagina();
|
|
bool print_game(const TPartita& game);
|
|
bool stampa_saldo() const { return _stampa_saldo; }
|
|
void stampa_saldo(bool ss) { _stampa_saldo = ss; }
|
|
|
|
void set_agente(const TString& codag);
|
|
|
|
bool exporting() const { return _export; }
|
|
bool printing() const { return !exporting(); }
|
|
void set_export(const bool on) { _export = on; }
|
|
void export_total();
|
|
|
|
void set_pagam(const TString& codpag);
|
|
|
|
|
|
|
|
TEC_recordset& recordset() const { CHECK(_export == true, "Not exporting"); return *_recordset; }
|
|
|
|
TEC_form(const TEC_mask& m, bool gesval);
|
|
virtual ~TEC_form();
|
|
};
|
|
|
|
class TEC_mask : public TSelection_mask
|
|
{
|
|
TRelation _ditta;
|
|
TMail_mask _ec_mail;
|
|
TEC_form * _form;
|
|
TEC_Game_list * _games;
|
|
char _tiponumec; // Tipo numerazione EC ' ', 'G', 'A'
|
|
long _lastnumec; // Ultimo numero EC 'G'
|
|
TAssoc_array _lastnumcf; // Ultimo numero stampato 'A'
|
|
bool _export;
|
|
|
|
protected: // TMask
|
|
virtual void on_firm_change();
|
|
virtual void start_run();
|
|
|
|
virtual TESSL_form & form() override;
|
|
virtual const TToken_string & get_anal_filter() const override { return EMPTY_STRING; }
|
|
virtual bool some_to_print(const char * tipo, const long codice) override;
|
|
virtual int print_one(const char * tipo, const long codice) override;
|
|
bool print_selected(); // print selected items
|
|
void save_numec();
|
|
void update_numec(const TRectype& clf, int sign);
|
|
|
|
void find_agents_scads(TAssoc_array& agents);
|
|
void find_agents_unassigned_pags(TAssoc_array& agents);
|
|
long find_agents_games(TAssoc_array& agents);
|
|
bool print_agents(); // print selected items by agent
|
|
virtual TMail_mask & mail_mask() override { return _ec_mail; }
|
|
|
|
public:
|
|
virtual bool on_field_event(TOperable_field& o, TField_event e, long jolly);
|
|
bool export_print() const { return _export; }
|
|
void set_export(bool on = true) { _export = on; }
|
|
|
|
TEC_mask(const char* name);
|
|
virtual ~TEC_mask();
|
|
};
|
|
|
|
#endif
|