git-svn-id: svn://10.65.10.50/branches/R_10_00@22791 c028cbd2-c16b-5b4b-a496-9718f37d4682
		
			
				
	
	
		
			73 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			73 lines
		
	
	
		
			2.3 KiB
		
	
	
	
		
			C++
		
	
	
		
			Executable File
		
	
	
	
	
#ifndef __HALIB_H
 | 
						|
#define __HALIB_H
 | 
						|
 | 
						|
#ifndef __VELIB_H 
 | 
						|
#include "../ve/velib.h"
 | 
						|
#endif
 | 
						|
 | 
						|
//definizioni delle righe dei contratti premio Hardy (da includere nei .cpp)
 | 
						|
#define HARDY_TIPORIGA_MERCE "H01"
 | 
						|
#define HARDY_TIPORIGA_SOMMA "H02"
 | 
						|
 | 
						|
//ridefinizione dei campi per rendere chiare le elaborazioni
 | 
						|
//legenda per il sagace programmatore:
 | 
						|
//RC = riga contratto standard, tipo 1, merce
 | 
						|
//RCA = riga contratto anticipo, tipo 2, spese (1 per ogni contratto anticipo)
 | 
						|
// 1 = riga tipo 1, merce
 | 
						|
// 2 = riga tipo 2, spese
 | 
						|
// segue il vero significato del campo (vero... verosimile, che è meglio!)
 | 
						|
#define RC_1_PREMIO       RDOC_QTAGG1
 | 
						|
#define RC_1_NSCARICO     RDOC_QTAGG2
 | 
						|
#define RC_1_BONUS        RDOC_QTAGG5
 | 
						|
 | 
						|
#define RCA_2_ANTICIPATO      RDOC_PREZZO
 | 
						|
#define RCA_2_RESO_STORICO    RDOC_QTAGG5
 | 
						|
#define RCA_2_RESO_CORRENTE   RDOC_QTAGG3
 | 
						|
 | 
						|
 | 
						|
class TContratto_premi : public TDocumento
 | 
						|
{
 | 
						|
  static TString4 _tipo_ant, _tipo_post, _tipo_rifa;
 | 
						|
 | 
						|
public:
 | 
						|
  char tipo_contratto() const;
 | 
						|
  char frequenza() const;
 | 
						|
  long codcf_fatt() const;
 | 
						|
 | 
						|
  TDate data_inizio() const { return get_date(DOC_DATACOMP); }
 | 
						|
  TDate data_fine() const { return get_date(DOC_DATAFCOMP); }
 | 
						|
  bool data_valida(const TDate& datadoc) const;
 | 
						|
 | 
						|
  TContratto_premi(char provv, int anno, const char* codnum, long ndoc);
 | 
						|
  TContratto_premi(const TRectype& rec_doc);
 | 
						|
};
 | 
						|
 | 
						|
///////////////////////////////////////////////////////////
 | 
						|
// TCodArtEsselunga_cache
 | 
						|
///////////////////////////////////////////////////////////
 | 
						|
 | 
						|
class TCodArtEsselunga_cache : public TCache
 | 
						|
{
 | 
						|
protected:
 | 
						|
  virtual TObject* key2obj(const char* key);
 | 
						|
 | 
						|
public:
 | 
						|
	const TString& decode(const TString& codart);
 | 
						|
	TCodArtEsselunga_cache() {}
 | 
						|
};
 | 
						|
 | 
						|
//----------------------------------------------------------
 | 
						|
//metodi di utility
 | 
						|
//----------------------------------------------------------
 | 
						|
real hd_find_sconto(const TString& str_sconto);
 | 
						|
const TString& hd_find_codag(long codcf);  // Da cliente campo ad agente Hardy ("007")
 | 
						|
const TString& hd_format_date8(const TDate& data);
 | 
						|
const TString& hd_format_date6(const TDate& data);
 | 
						|
const TDate upload_format_date6(const TString& str_data);
 | 
						|
long hd_key2cli(const TString& key);
 | 
						|
long hd_key2for(const TString& key);
 | 
						|
void hd_key2conto(const TString& key, int& gr, int& co, long& so);
 | 
						|
const TString& hd_get_next_att_key(const TString& codart);
 | 
						|
 | 
						|
#endif
 |