2011-10-29 08:35:57 +00:00
|
|
|
|
#ifndef __HALIB_H
|
|
|
|
|
#define __HALIB_H
|
2010-10-07 15:51:23 +00:00
|
|
|
|
|
2010-09-27 14:30:54 +00:00
|
|
|
|
#ifndef __VELIB_H
|
|
|
|
|
#include "../ve/velib.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2010-09-01 15:47:38 +00:00
|
|
|
|
//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 <20> meglio!)
|
|
|
|
|
#define RC_1_PREMIO RDOC_QTAGG1
|
|
|
|
|
#define RC_1_NSCARICO RDOC_QTAGG2
|
|
|
|
|
#define RC_1_BONUS RDOC_QTAGG5
|
|
|
|
|
|
2010-09-27 14:30:54 +00:00
|
|
|
|
#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;
|
2011-10-07 15:59:54 +00:00
|
|
|
|
long codcf_fatt() const;
|
2010-09-01 15:47:38 +00:00
|
|
|
|
|
2010-09-27 14:30:54 +00:00
|
|
|
|
TContratto_premi(char provv, int anno, const char* codnum, long ndoc);
|
|
|
|
|
TContratto_premi(const TRectype& rec_doc);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
2011-04-12 13:38:18 +00:00
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
// TCodArtEsselunga_cache
|
|
|
|
|
///////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
|
|
class TCodArtEsselunga_cache : public TCache
|
|
|
|
|
{
|
|
|
|
|
protected:
|
|
|
|
|
virtual TObject* key2obj(const char* key);
|
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
const TString& decode(const TString& codart);
|
|
|
|
|
TCodArtEsselunga_cache() {}
|
|
|
|
|
};
|
|
|
|
|
|
2010-10-07 15:51:23 +00:00
|
|
|
|
//----------------------------------------------------------
|
|
|
|
|
//metodi di utility
|
|
|
|
|
//----------------------------------------------------------
|
2010-11-24 09:41:54 +00:00
|
|
|
|
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);
|
2011-01-26 16:56:02 +00:00
|
|
|
|
const TDate upload_format_date6(const TString& str_data);
|
2010-11-24 09:41:54 +00:00
|
|
|
|
long hd_key2cli(const TString& key);
|
2011-09-12 11:09:22 +00:00
|
|
|
|
long hd_key2for(const TString& key);
|
2011-01-05 15:49:21 +00:00
|
|
|
|
void hd_key2conto(const TString& key, int& gr, int& co, long& so);
|
2011-10-29 08:35:57 +00:00
|
|
|
|
const TString& hd_get_next_att_key(const TString& codart);
|
|
|
|
|
|
|
|
|
|
#endif
|