Files correlati : Ricompilazione Demo : [ ] Commento : Corretto %Ric. in caso di stampa 'C' o 'R' in base a segnalazione Dinamica (i denominatori sono sempre Preventivi) git-svn-id: svn://10.65.10.50/branches/R_10_00@21830 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			140 lines
		
	
	
		
			5.5 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			140 lines
		
	
	
		
			5.5 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
| #ifndef __CA3883_H
 | |
| #define __CA3883_H
 | |
| 
 | |
| #include <assoc.h>
 | |
| #include <reprint.h>
 | |
| 
 | |
| #include "../cg/cglib01.h"
 | |
| 
 | |
| #include "ca3883a.h"
 | |
| 
 | |
| ///////////////////////////////////////////////////////////////
 | |
| //	CACHE INDICATORI BILANCIO 
 | |
| ///////////////////////////////////////////////////////////////
 | |
| //simpatica classe utile per smanettare con piani dei conti contabili ed analitici, riclassificazioni,..
 | |
| //..indicatori di bilancio e roba simile!
 | |
| //ACHTUNG! potrebbe fallire se uno ha conti analitici puri lunghi 12 caratteri e solo numerici
 | |
| class TIndbil_cache : public TCache
 | |
| {
 | |
| 	bool _usepdcc;
 | |
| 	TString80 _prefix;
 | |
| 
 | |
| protected:
 | |
| 	virtual TObject* key2obj(const char* key);
 | |
| 
 | |
| public:
 | |
| 	int get_indbil(const TString& conto, TString& conto_anale);
 | |
| 	void set_prefix(const char* prefix);
 | |
| 	int get_prefix_length() const { return _prefix.len(); }
 | |
| 	TIndbil_cache();
 | |
| 
 | |
| };
 | |
| 
 | |
| 
 | |
| ///////////////////////////////////////////////////////////////
 | |
| //	REPORT A COLONNE VARIABILI
 | |
| ///////////////////////////////////////////////////////////////
 | |
| class TCRPA_report : public TReport
 | |
| {
 | |
| protected:
 | |
| 	void merge_array(TString_array& c, TString_array& t, 
 | |
| 															 TString_array& codici, TString_array& testate) const;
 | |
| 	void analize_pconana_structure (const TString& prefix, const int depth, 
 | |
| 																	TString_array& codici, TString_array& testate) const;
 | |
| 	bool generate_columns (TString_array& codici, TString_array& testate, const int model_id, 
 | |
|                          const bool show_fasi, const bool show_cdc, const bool show_cms_descr, const bool show_cms_date);
 | |
| 	void offset_and_fill_columns(TReport_section& rep_sect, const TString_array& str_arr, 
 | |
| 															 const int model_id, const bool show_fasi, const bool show_cdc, 
 | |
|                                const bool show_cms_descr, const bool show_cms_date);
 | |
|   void offset_and_fill_sectionf4(TReport_section& rep_sect, const int model_id);
 | |
|   int show_hide_left_column(const bool show_fld, TReport_field* fld, int x0);
 | |
| 
 | |
| public:
 | |
| 	TCRPA_report (const char* rep_name, const TString& prefix, const int depth, 
 | |
|                 const bool show_fasi, const bool show_cdc, const bool show_cms_descr, const bool show_cms_date);
 | |
| };
 | |
| 
 | |
| ///////////////////////////////////////////////////////////////
 | |
| //	RECORDSET PER STAMPE DI SALDANA CA3800, CA3900
 | |
| ///////////////////////////////////////////////////////////////
 | |
| class TPrint_saldana_recordset : public TRecordset
 | |
| {
 | |
|   enum { NUM_LEVELS = 5 };
 | |
| 
 | |
|   TRecnotype _curr;
 | |
| 	TArray _righe;
 | |
| 	TArray _colonne;
 | |
|   TAssoc_array _totali[NUM_LEVELS];
 | |
| 	TIndbil_cache _indicatori;
 | |
| 	TEsercizi_contabili _esc;
 | |
| 
 | |
|   TDate _datacalcolo;
 | |
|   TString16 _fase;
 | |
|   TString80 _cdc;
 | |
| 
 | |
|   int _tipo;
 | |
| 	int _anno;
 | |
| 	int _depth;
 | |
|   int _tipostampa;
 | |
| 
 | |
| 	bool _vitaintera;
 | |
|   bool _detrazioni_consuntive;
 | |
|   bool _include_documenti;
 | |
|   bool _forza_maturato;
 | |
| 
 | |
| 	char _tipostima;
 | |
| 
 | |
| 
 | |
| protected:
 | |
|   virtual int tipo() const { return _tipo; }
 | |
| 	virtual TRecnotype items() const { return _righe.items(); }
 | |
|   virtual bool move_to(TRecnotype pos);
 | |
|   virtual TRecnotype current_row() const { return _curr; }
 | |
|   virtual void requery();
 | |
|   virtual const TString& query_text() const { return EMPTY_STRING; }
 | |
| 	virtual unsigned int columns() const { return _colonne.items(); }
 | |
|   virtual const TRecordset_column_info& column_info(unsigned int column) const { return (TRecordset_column_info&) _colonne[column]; }
 | |
|   virtual const TVariant& get(unsigned int column) const;
 | |
| 	virtual const TVariant& get(const char* column_name) const;
 | |
| 
 | |
| 	void parse_bill(const TString& bill, TString& conto) const;
 | |
|   int estrai_saldi(const TRectype& saldana, const int indbil, 
 | |
| 			 						 TImporto& saldo, TImporto& saldop, const bool cms_detraz, const bool is_totale) const;
 | |
| 
 | |
|   void elabora_rmovana(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc, 
 | |
|                        const TRectype& movana, const TRectype& rmovana);
 | |
|   void parse_rmovana(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc);
 | |
|   void parse_saldana(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc);
 | |
|   void parse_saldana_futuri();
 | |
|   void parse_rdoc_ordini(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc);
 | |
|   void parse_rdoc_fatture(TAssoc_array* cms, const TDate& datainiesc, const TDate& datafinesc);
 | |
|   const TString& crea_select(const int logicnum);
 | |
|   const TString& crea_query_saldana();
 | |
| 
 | |
|   //per il solo ca3800
 | |
| 	void aggiorna_importo(TAssoc_array& riga_array, const TString& livello, const int indbil, 
 | |
|                         const TRectype& saldana, const bool is_detrazione = false, const bool is_totale = false) const;
 | |
| 	real calcola_avanzamento_tempo() const;
 | |
|   const TDate calcola_min_datacomp(const TDate& datainiesc, const TDate& datafinesc) const;
 | |
|   int ricava_sezione_di_stampa(const TRectype& rec_commesse, const TDate& datainiesc, const TDate& datafinesc) const;
 | |
|   void ricava_chiave_cdc_fase(const TString& codcms, const TString& fase, const TString& cdc, TString& chiave) const;
 | |
| 
 | |
|   void create_lines_to_print();
 | |
| 
 | |
|   //per il solo ca3900
 | |
|   void aggiorna_importi(TAssoc_array& riga_array, const int indbil, const TRectype& saldana, 
 | |
| 												const int tempo) const;
 | |
| 	void incrementa_importo(TAssoc_array& riga_array, const TString& livello, const int indbil, 
 | |
| 													const TImporto& saldo, const bool inverti) const;
 | |
| 
 | |
|   TAssoc_array& get_row(TAssoc_array& cms, const char* chiave,
 | |
| 												const int indice, const TString& codcms, const TString& fase,
 | |
| 												const TString& cdc, const TString& descrizione) const;
 | |
| 
 | |
| public:
 | |
|   virtual void set_filter(const TMask& msk, const TString& curr_sublevel);
 | |
|   TPrint_saldana_recordset(int tipo) : _tipo(tipo) { }
 | |
| };
 | |
| 
 | |
| #endif
 |