2010-10-07 15:51:23 +00:00
|
|
|
|
#ifndef __TEXTSET_H
|
|
|
|
|
#include <textset.h>
|
|
|
|
|
#endif __TEXTSET_H
|
|
|
|
|
|
2010-09-27 14:30:54 +00:00
|
|
|
|
#ifndef __VELIB_H
|
|
|
|
|
#include "../ve/velib.h"
|
|
|
|
|
#endif
|
|
|
|
|
|
2010-10-07 15:51:23 +00:00
|
|
|
|
#include "../mg/rmovmag.h"
|
|
|
|
|
#include "../pr/agenti.h"
|
|
|
|
|
#include "../ve/condv.h"
|
|
|
|
|
#include "../ve/rcondv.h"
|
|
|
|
|
|
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;
|
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
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/////////////////////////////////////////////////////////////
|
|
|
|
|
// Recordset specifici per i dati da trasferire
|
|
|
|
|
/////////////////////////////////////////////////////////////
|
|
|
|
|
//classe generica per poter aggiungere pedissequamente i campi seguendo le tracce sulla documentazione
|
|
|
|
|
//tipologie di campo secondo il ricevente
|
|
|
|
|
#define T_N "N"
|
|
|
|
|
#define T_2N "2N"
|
|
|
|
|
#define T_Nv2N "N,2N"
|
|
|
|
|
#define T_Nv3N "N,3N"
|
|
|
|
|
#define T_2Nv2N "2N,2N"
|
|
|
|
|
#define T_X "X"
|
|
|
|
|
#define T_NS "NS"
|
|
|
|
|
|
2010-10-11 14:55:31 +00:00
|
|
|
|
|
|
|
|
|
//------------------------------------------------------------
|
|
|
|
|
// Hardy_recordset: serve per l'OUTPUT
|
|
|
|
|
//------------------------------------------------------------
|
|
|
|
|
|
2010-10-07 15:51:23 +00:00
|
|
|
|
class THardy_recordset : public TAS400_recordset
|
|
|
|
|
{
|
|
|
|
|
protected:
|
2010-10-11 14:55:31 +00:00
|
|
|
|
//esportazione
|
2010-10-07 15:51:23 +00:00
|
|
|
|
void add_field(const char* name, const char* tipo, int pos, int len);
|
|
|
|
|
void insert_field(const char* name, const char* tipo, int pos, int len);
|
2010-11-16 15:12:49 +00:00
|
|
|
|
void add_eol_field();
|
2010-10-11 14:55:31 +00:00
|
|
|
|
//importazione
|
|
|
|
|
void add_trc_field(const char* tr, const char* name, const char* tipo, int pos, int len);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
|
|
|
|
|
public:
|
|
|
|
|
THardy_recordset(const int rec_length);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Agenti
|
|
|
|
|
//-------
|
|
|
|
|
class TEsporta_agenti_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_agenti_recordset(int rec_length = 77);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Clienti (clifo + cfven)
|
|
|
|
|
//-----------------------
|
|
|
|
|
class TEsporta_clienti_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-23 15:28:56 +00:00
|
|
|
|
void set_fatt(const char* fld_name, const TVariant& value, const bool is_fatt);
|
|
|
|
|
TEsporta_clienti_recordset(int rec_length = 307);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
//..e variazioni clienti!
|
|
|
|
|
class TEsporta_clientiVAR_recordset : public TEsporta_clienti_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
TEsporta_clientiVAR_recordset();
|
|
|
|
|
};
|
|
|
|
|
|
2010-10-14 13:15:43 +00:00
|
|
|
|
|
|
|
|
|
//Sospesi ()
|
|
|
|
|
//-----------------------
|
|
|
|
|
class TEsporta_sospesi_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_sospesi_recordset(int rec_length = 69);
|
2010-10-14 13:15:43 +00:00
|
|
|
|
};
|
|
|
|
|
//..e variazioni sospesi!
|
|
|
|
|
class TEsporta_sospesiVAR_recordset : public TEsporta_sospesi_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
TEsporta_sospesiVAR_recordset();
|
|
|
|
|
};
|
|
|
|
|
|
2010-10-07 15:51:23 +00:00
|
|
|
|
//Listini (condv + rcondv)
|
|
|
|
|
//------------------------
|
|
|
|
|
class TEsporta_listini_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_listini_recordset(int rec_length = 38);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
//..e variazioni listini
|
|
|
|
|
class TEsporta_listiniVAR_recordset : public TEsporta_listini_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
TEsporta_listiniVAR_recordset();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//Contratti (Particolari) (condv + rcondv)
|
|
|
|
|
//----------------------------------------
|
|
|
|
|
class TEsporta_contratti_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_contratti_recordset(int rec_length = 51);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//Offerte (Promo) (condv + rcondv)
|
|
|
|
|
//----------------------------------------
|
|
|
|
|
class TEsporta_offerte_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_offerte_recordset(int rec_length = 24);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//Prodotti (anamag + umart)
|
|
|
|
|
//-------------------------
|
|
|
|
|
class TEsporta_prodotti_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_prodotti_recordset(int rec_length = 65);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
//..e variazioni prodotti
|
|
|
|
|
class TEsporta_prodottiVAR_recordset : public TEsporta_prodotti_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
|
|
|
|
TEsporta_prodottiVAR_recordset();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//Linee
|
|
|
|
|
//-----
|
|
|
|
|
class TEsporta_linee_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_linee_recordset(int rec_length = 53);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2010-10-14 13:15:43 +00:00
|
|
|
|
//Carico (rdoc di carico)
|
|
|
|
|
//-----------------------
|
2010-10-08 15:06:07 +00:00
|
|
|
|
class TEsporta_carico_recordset : public THardy_recordset
|
2010-10-07 15:51:23 +00:00
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_carico_recordset(int rec_length = 27);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
2010-10-08 15:06:07 +00:00
|
|
|
|
//Decodart ()
|
2010-10-07 15:51:23 +00:00
|
|
|
|
//----------------
|
|
|
|
|
class TEsporta_decodart_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_decodart_recordset(int rec_length = 19);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
2010-10-08 15:06:07 +00:00
|
|
|
|
//Barcode ()
|
2010-10-07 15:51:23 +00:00
|
|
|
|
//---------------
|
|
|
|
|
class TEsporta_barcode_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_barcode_recordset(int rec_length = 27);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//Attrezzature ()
|
|
|
|
|
//----------------
|
|
|
|
|
class TEsporta_attrezzature_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_attrezzature_recordset(int rec_length = 71);
|
2010-10-07 15:51:23 +00:00
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
//Pagamenti ()
|
|
|
|
|
//-----------------
|
|
|
|
|
class TEsporta_pagamenti_recordset : public THardy_recordset
|
|
|
|
|
{
|
|
|
|
|
public:
|
2010-11-16 15:12:49 +00:00
|
|
|
|
TEsporta_pagamenti_recordset(int rec_length = 27);
|
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);
|
2010-12-15 14:16:07 +00:00
|
|
|
|
long hd_key2forn(const TString& key);
|
2011-01-05 15:49:21 +00:00
|
|
|
|
void hd_key2conto(const TString& key, int& gr, int& co, long& so);
|