17e79bc7c9
Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 3.2 patch 1092 git-svn-id: svn://10.65.10.50/trunk@16293 c028cbd2-c16b-5b4b-a496-9718f37d4682
92 lines
3.8 KiB
C++
Executable File
92 lines
3.8 KiB
C++
Executable File
#include <applicat.h>
|
|
#include <recarray.h>
|
|
#include <relation.h>
|
|
#include <reputils.h>
|
|
#include <textset.h>
|
|
|
|
///////////////////////////////////////////////////////////
|
|
// TTS_sender
|
|
///////////////////////////////////////////////////////////
|
|
class TRiclassifica_cache;
|
|
class TTS_textset;
|
|
|
|
class TTS_sender : public TSkeleton_application
|
|
{
|
|
TRiclassifica_cache* _tabelle;
|
|
TRecord_cache* _conti;
|
|
TAssoc_array _riclassifica;
|
|
TTS_textset* _tsfile;
|
|
TLog_report* _log;
|
|
bool _errors_logged;
|
|
TString8 _dittamulti;
|
|
TAssoc_array _dittemulti;
|
|
long _empty_caus;
|
|
TArray _recsets;
|
|
TAssoc_array _iva;
|
|
TAssoc_array _contiiva;
|
|
TAssoc_array _contirit;
|
|
bool _professionista;
|
|
real _rit_acc;
|
|
|
|
protected:
|
|
TRecordset * get_recset(const int logicnum) const { return (TRecordset *) _recsets.objptr(logicnum);}
|
|
TRecordset * set_recset(const int logicnum, TRecordset * r) { _recsets.add(r, logicnum); return r;}
|
|
TArray & recsets() { return _recsets;}
|
|
bool new_rec(const char* t);
|
|
void remove_last();
|
|
void set(const char* field, const TVariant& var);
|
|
void set(const char* field, const int n) { set(field, TVariant((long)n)); }
|
|
void set(const char* field, const char* s) { set(field, TVariant(s)); }
|
|
void set(const char* field, const TDate& d) { set(field, TVariant(d)); }
|
|
void set(const char* field, const real& v) { set(field, TVariant(v)); }
|
|
|
|
const TVariant& get(const char* field);
|
|
void add_mov(TRecordset& mov);
|
|
void add_clifor(char tipocf, long codcf);
|
|
void add_header(const TRecordset& mov, const bool fullhead = true);
|
|
void add_datiiva(const TRecordset& mov);
|
|
void add_tot_fattura(const TRecordset& mov);
|
|
void add_conti_ricavo_costo(const TRecordset& mov);
|
|
void add_new_rec(const TRecordset& mov);
|
|
void add_diversi(const TRecordset& mov, const bool moviva);
|
|
void add_ratei_risconti(const TRecordset& mov);
|
|
void add_ulteriori(TRecordset& mov);
|
|
bool add_regol(TRecordset& mov, bool rec_to_add);
|
|
bool add_optional_rec(TRecordset& mov, bool rec_to_add);
|
|
const TString & scod2ricl(const char* tab, const TString& cod);
|
|
const TString & scod2ricl(const char* tab, const TVariant& cod);
|
|
const long cod2ricl(const char* tab, const TString& cod);
|
|
const long cod2ricl(const char* tab, const TVariant& cod);
|
|
const long bill2ricl(char & t, int gr, int co, long so, const bool header_cli = false);
|
|
virtual void get_citta_provincia(const TRecordset& cli, TString & dencom, TString & provcom, bool nascita = false);
|
|
virtual const char * decode_causale(const TRecordset& mov) { return EMPTY_STRING; }
|
|
virtual bool test_swap(const TRecordset& mov) { return false;}
|
|
virtual bool swap_ritsoc(const TRecordset& mov) { return false;}
|
|
virtual bool mov_regolarizzazione(const TRecordset& mov) { return false;}
|
|
virtual bool mov_intra(const TRecordset& mov) { return false;}
|
|
virtual bool mov_reverse_charge(const TRecordset& mov) { return false;}
|
|
virtual long iva11_reverse(const TRecordset & mov) { return 0L;}
|
|
bool add_iva_to_mov(const TRecordset& mov) { return mov_intra(mov) || mov_reverse_charge(mov);}
|
|
|
|
protected:
|
|
virtual bool find_regolarizzazione(TRecordset& mov) {return false;}
|
|
virtual TRecordset & movrecset() pure;
|
|
virtual TRecordset & rmovrecset(const TRecordset & mov) pure;
|
|
virtual TRecordset & rivarecset(const TRecordset & mov) pure;
|
|
virtual const TRecordset & clirecset(const char tipocf, const long codcf) pure;
|
|
virtual TMask & get_mask() pure ;
|
|
|
|
public:
|
|
void log(int sev, const char* msg);
|
|
virtual bool multi_activity() const { return true; }
|
|
const TString & dittamulti(const TRecordset& mov) const ;
|
|
TAssoc_array & riclassifica() {return _riclassifica;}
|
|
|
|
virtual void postprocess_movs(TRecordset & mov) {}
|
|
virtual void set_parameters();
|
|
virtual bool create();
|
|
virtual void main_loop();
|
|
virtual bool destroy();
|
|
TTS_sender() : _tabelle(NULL), _conti(NULL), _tsfile(NULL), _log(NULL) {}
|
|
};
|