Files correlati : Ricompilazione Demo : [ ] Commento : Riportata la versione 3.1 patch 873 git-svn-id: svn://10.65.10.50/trunk@15151 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			84 lines
		
	
	
		
			3.4 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			84 lines
		
	
	
		
			3.4 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;
 | 
						|
	TArray _recsets;
 | 
						|
	TAssoc_array _iva;
 | 
						|
	TAssoc_array _contiiva;
 | 
						|
	TAssoc_array _contirit;
 | 
						|
 | 
						|
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(const 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(const TRecordset& mov);
 | 
						|
	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;}
 | 
						|
	bool add_iva_to_mov(const TRecordset& mov) { return mov_intra(mov) || mov_reverse_charge(mov);}
 | 
						|
 | 
						|
protected:
 | 
						|
	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);
 | 
						|
 | 
						|
	TString & dittamulti() { return _dittamulti;}
 | 
						|
	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) {}
 | 
						|
};
 |