597 lines
18 KiB
C++
Executable File
597 lines
18 KiB
C++
Executable File
#include <automask.h>
|
||
#include <config.h>
|
||
#include <execp.h>
|
||
#include <progind.h>
|
||
#include <recarray.h>
|
||
#include <relation.h>
|
||
#include <utility.h>
|
||
|
||
#include "ha1250.h"
|
||
|
||
bool THardy_transaction::is_server() const
|
||
{
|
||
static int nType = -1;
|
||
if (nType < 0)
|
||
nType = ini_get_int(CONFIG_INSTALL, "Main", "Type", 1);
|
||
return nType < 3;
|
||
}
|
||
|
||
bool THardy_transaction::is_by_postino() const
|
||
{
|
||
if (argc() < 3)
|
||
return false;
|
||
|
||
const TFixed_string trans(argv(2));
|
||
return (trans.starts_with("/i", true) || trans.starts_with("-i", true));
|
||
}
|
||
|
||
bool THardy_transaction::wait_for_file(const TFilename& filename) const
|
||
{
|
||
TString msg;
|
||
msg << TR("In attesa del file ") << filename;
|
||
const int time_to_wait = 60;
|
||
|
||
TProgind pi(time_to_wait, msg, true, true);
|
||
|
||
long last_size = 0L;
|
||
for (int s = 0; s < 60; s++)
|
||
{
|
||
if (!pi.addstatus(1))
|
||
break;
|
||
|
||
xvt_sys_sleep(3000);
|
||
long size = fsize(filename);
|
||
if (size == last_size && size > 0)
|
||
break;
|
||
last_size = size;
|
||
}
|
||
|
||
if (last_size == 0L && !is_by_postino())
|
||
return cantread_box(filename);
|
||
|
||
return last_size > 0L;
|
||
}
|
||
|
||
/*
|
||
void THardy_transaction::chiudi_concentratore()
|
||
{
|
||
TFilename bat_chiudi = _conc_path;
|
||
bat_chiudi.add("chiudi.bat");
|
||
TExternal_app app_chiudi(bat_chiudi);
|
||
app_chiudi.run();
|
||
//sara' meglio aspettare qualche secondo
|
||
xvt_sys_sleep(3000);
|
||
}
|
||
|
||
void THardy_transaction::carica_concentratore()
|
||
{
|
||
TFilename bat_carica = _conc_path;
|
||
bat_carica.add("car.bat");
|
||
TExternal_app app_carica(bat_carica);
|
||
app_carica.run();
|
||
//sara' meglio aspettare qualche secondo
|
||
xvt_sys_sleep(1000);
|
||
}
|
||
|
||
bool THardy_transaction::scarica_concentratore()
|
||
{
|
||
TFilename bat_scarica = _conc_path;
|
||
bat_scarica.add("descar.bat");
|
||
TExternal_app app_scarica(bat_scarica);
|
||
app_scarica.run();
|
||
//deve assicurarsi che il file upload.d sia completato; usa un test sulle dimensioni
|
||
//aspetta qualche secondo per permettere al concentratore di iniziare a generare il file
|
||
TFilename upload = _input_path;
|
||
upload.add("upload.d");
|
||
//se trova il file upload.d comincia a fare i test
|
||
return wait_for_file(upload);
|
||
}
|
||
|
||
void THardy_transaction::trasmetti_concentratore()
|
||
{
|
||
TFilename bat_trasm = _conc_path;
|
||
bat_trasm.add("trasmissione.bat");
|
||
TExternal_app app_trasm(bat_trasm);
|
||
app_trasm.run();
|
||
}
|
||
*/
|
||
|
||
void THardy_transaction::main_loop()
|
||
{
|
||
TMask* mask = create_mask();
|
||
TLog_report log(title());
|
||
log.kill_duplicates();
|
||
log.log(0, "");
|
||
|
||
//sono il server?
|
||
const bool i_am_server = is_server();
|
||
|
||
//sono lanciato dal postino?
|
||
if (is_by_postino())
|
||
{
|
||
//se sono il server eseguo subito l'elaborazione
|
||
if (i_am_server)
|
||
{
|
||
//legge i files da trasferire
|
||
TFilename trans = argv(2);
|
||
trans.ltrim(2);
|
||
TConfig ini(trans, fake_trans_file());
|
||
FOR_EACH_MASK_FIELD(*mask, i, f)
|
||
{
|
||
const TFieldref* field = f->field();
|
||
if (field != NULL)
|
||
{
|
||
const char* val = field->read(ini, fake_trans_file());
|
||
if (val && *val)
|
||
{
|
||
f->set(val);
|
||
f->on_hit();
|
||
}
|
||
}
|
||
}
|
||
if (ini.get("Mode", "Transaction")[0] == 'A')
|
||
{
|
||
elabora(*mask, log);
|
||
|
||
//sono il server ma via postino; viene salvato il log in formato txt
|
||
trans.ext("txt");
|
||
log.save(trans);
|
||
|
||
delete mask;
|
||
return;
|
||
}
|
||
}
|
||
else
|
||
error_box(TR("Le transazioni possono essere eseguite solo dal server!"));
|
||
}
|
||
else //sono lanciato in modo interattivo
|
||
{
|
||
while (mask->run() == K_ENTER)
|
||
{
|
||
//se <20> il server -> esegue le operazioni di elaborazione, viene fatta la preview diretta del log
|
||
|
||
// if (i_am_server) // Non c'<27> pi<70> distinzione tra server e client
|
||
{
|
||
log.reset();
|
||
elabora(*mask, log);
|
||
log.preview();
|
||
}
|
||
/*
|
||
else //senno' prepara il .ini per l'elaborazione postinica
|
||
{
|
||
TFilename trans = _trans_path;
|
||
trans.add(name());
|
||
trans.ext("ini");
|
||
TConfig ini(trans, "Transaction");
|
||
ini.set("Action", "RUN");
|
||
ini.set("Mode", "AUTO");
|
||
ini.set_paragraph(fake_trans_file());
|
||
FOR_EACH_MASK_FIELD(*mask, i, f)
|
||
{
|
||
const TFieldref* field = f->field();
|
||
if (field != NULL && f->active())
|
||
field->write(ini, fake_trans_file(), f->get());
|
||
}
|
||
message_box(TR("Transazione di scarico inviata al server"));
|
||
//client in interattivo: gli viene spedito il log via file txt e fatta la preview cosi' che l'utente..
|
||
//..lo possa vedere
|
||
trans.ext("txt");
|
||
if (wait_for_file(trans))
|
||
{
|
||
TScanner f(trans);
|
||
log.recordset()->read_from(f);
|
||
log.preview();
|
||
trans.fremove();
|
||
}
|
||
}
|
||
*/
|
||
}
|
||
} //if(by_postino(...
|
||
|
||
delete mask;
|
||
}
|
||
|
||
|
||
bool THardy_transaction::create()
|
||
{
|
||
TConfig config(CONFIG_DITTA, "ha");
|
||
_output_path = config.get("OutputPath");
|
||
_input_path = config.get("InputPath");
|
||
_archive_path = config.get("ArchivePath");
|
||
|
||
if (!_output_path.exist())
|
||
return error_box(FR("Non esiste la cartella di destinazione %s!"), (const char*)_output_path);
|
||
|
||
if (!_input_path.exist())
|
||
return error_box(FR("Non esiste la cartella di upload %s!"), (const char*)_input_path);
|
||
|
||
if (!_archive_path.exist())
|
||
return error_box(FR("Non esiste la cartella di archiviazione dei files processati %s!"), (const char*)_archive_path);
|
||
|
||
/* Controllo inutile
|
||
_conc_path = config.get("ConcentratorePath");
|
||
if (!_conc_path.exist())
|
||
return error_box(FR("Non esiste la cartella del concentratore %s!"), (const char*)_conc_path);
|
||
TFilename conc_prog_path = _conc_path;
|
||
conc_prog_path.add("ProgettoConcentratore.exe");
|
||
if (!conc_prog_path.exist())
|
||
return error_box(FR("Il programma concentratore non si trova nella cartella %s!"), (const char*)_conc_path);
|
||
_trans_path = config.get("TransactionPath");
|
||
if (!_trans_path.exist())
|
||
return error_box(FR("Non esiste la cartella di transazione %s!"), (const char*)_trans_path);
|
||
*/
|
||
|
||
open_files(LF_TABCOM, LF_TAB, LF_CLIFO, LF_DOC, LF_RIGHEDOC, LF_SVRIEP, 0);
|
||
|
||
return TSkeleton_application::create();
|
||
}
|
||
|
||
|
||
/////////////////////////////////////////////////////////////
|
||
// Recordset specifici per i dati da trasferire OUTPUT
|
||
/////////////////////////////////////////////////////////////
|
||
//questo serve solo per l'ultima riga con il return (\r\n)
|
||
void THardy_recordset::add_eol_field()
|
||
{
|
||
create_field("ACapo", -1, 2, _alfafld, false, TVariant("\r\n"));
|
||
}
|
||
|
||
//questo <20> il metodo magico che vale per tutti
|
||
void THardy_recordset::add_field(const char* name, const char* tipo, int pos, int len)
|
||
{
|
||
const TFixed_string str_tipo(tipo);
|
||
if (str_tipo.ends_with("N"))
|
||
{
|
||
create_field(name, pos-1, len, _intzerofld);
|
||
return;
|
||
}
|
||
create_field(name, pos-1, len, _alfafld);
|
||
}
|
||
|
||
void THardy_recordset::add_trc_field(const char* tr, const char* name, const char* tipo, int pos, int len)
|
||
{
|
||
CHECK(tr && strlen(tr) == 2, "Lunghezza tipo record errata!!");
|
||
TString80 trc_name;
|
||
trc_name << tr << '.' << name;
|
||
add_field(trc_name, tipo, pos, len);
|
||
}
|
||
|
||
void THardy_recordset::insert_field(const char* name, const char* tipo, int pos, int len)
|
||
{
|
||
if (pos >= 1)
|
||
{
|
||
TArray& trc = (TArray&)*_trc.first_item();
|
||
FOR_EACH_ARRAY_ITEM(trc, r, itm)
|
||
{
|
||
TAS400_column_info& fld = (TAS400_column_info&)*itm;
|
||
if (fld._pos+1 >= pos)
|
||
{
|
||
fld._pos += len;
|
||
}
|
||
}
|
||
}
|
||
add_field(name, tipo, pos, len);
|
||
}
|
||
|
||
void THardy_recordset::duplica_capi_zona()
|
||
{
|
||
TString8 ct = get("CodiceTerminale").as_string();
|
||
while (ct.full())
|
||
{
|
||
ct.right_just(5, '0');
|
||
ct = cache().get(LF_AGENTI, ct, AGE_CODCAPO).right(3);
|
||
if (ct.full())
|
||
{
|
||
const TToken_string& r = row(items()-1);
|
||
new_rec(r);
|
||
set("CodiceTerminale", ct);
|
||
}
|
||
}
|
||
}
|
||
|
||
//al costruttore viene passato come parametro la lunghezza del tracciato
|
||
THardy_recordset::THardy_recordset(const int rec_lenght) : TAS400_recordset("AS400()")
|
||
{
|
||
TString16 query;
|
||
query << "AS400(" << rec_lenght << ")";
|
||
TFilename cazzone;
|
||
parse_query(query, cazzone);
|
||
}
|
||
|
||
|
||
//Agenti
|
||
//-------
|
||
TEsporta_agenti_recordset::TEsporta_agenti_recordset()
|
||
: THardy_recordset(77)
|
||
{
|
||
add_field("CodiceTerminale", T_N, 1, 3); //x
|
||
add_field(AGE_CODAGE, T_N, 4, 3); //x
|
||
add_field("NonUsato", T_X, 7, 6);
|
||
add_field("Targa", T_X, 13, 8);
|
||
add_field("nDDT", T_N, 21, 5);
|
||
add_field("nFATT", T_N, 26, 5);
|
||
add_field("nBOLLA", T_N, 31, 5);
|
||
add_field(AGE_RAGSOC, T_X, 36, 30); //x
|
||
add_field("nORD", T_N, 66, 5);
|
||
add_field("nSAGIT", T_N, 71, 5);
|
||
add_eol_field();
|
||
}
|
||
|
||
//------------------------------------------------------------------------------------
|
||
//Clienti
|
||
//-------
|
||
|
||
void TEsporta_clienti_recordset::set_fatt(const char* fld_name, const TVariant& value, const bool is_fatt)
|
||
{
|
||
TString80 new_fld_name = fld_name;
|
||
if (is_fatt)
|
||
new_fld_name << "Fatt";
|
||
|
||
THardy_recordset::set(new_fld_name, value);
|
||
}
|
||
|
||
TEsporta_clienti_recordset::TEsporta_clienti_recordset(int recsize) : THardy_recordset(recsize)
|
||
{
|
||
add_field("CodiceTerminale", T_N, 1, 3); //x
|
||
add_field("CodiceCliente", T_N, 4, 6); //x
|
||
add_field("RagioneSociale", T_X, 10, 34); //x
|
||
add_field("Indirizzo", T_X, 44, 34); //x
|
||
add_field("Localita", T_X, 78, 20); //x
|
||
add_field("CAP", T_X, 98, 5); //x
|
||
add_field("Provincia", T_X, 103, 2); //x
|
||
add_field("PartitaIVA", T_X, 105, 11); //x
|
||
add_field("CodiceFiscale", T_X, 116, 16); //x
|
||
add_field("RagioneSocialeFatt", T_X, 132, 34); //x da qui i dati di codalleg
|
||
add_field("IndirizzoFatt", T_X, 166, 34); //x
|
||
add_field("LocalitaFatt", T_X, 200, 20); //x
|
||
add_field("CAPFatt", T_X, 220, 5); //x
|
||
add_field("ProvinciaFatt", T_X, 225, 2); //x
|
||
add_field("PartitaIVAFatt", T_X, 227, 11); //x
|
||
add_field("CodiceFiscaleFatt", T_X, 238, 16); //x //fine dati di codalleg
|
||
add_field("CodicePagamento", T_X, 254, 2); //x
|
||
add_field("CodiceListino", T_X, 256, 3); //x
|
||
add_field("CodicePromozione", T_X, 259, 3);
|
||
add_field("ScontoFineFattura", T_2Nv2N,262, 4); //x
|
||
add_field("Giro01", T_N, 266, 3);
|
||
add_field("Giro02", T_N, 269, 3);
|
||
add_field("Giro03", T_N, 272, 3);
|
||
add_field("Giro04", T_N, 275, 3);
|
||
add_field("Giro05", T_N, 278, 3);
|
||
add_field("Giro06", T_N, 281, 3);
|
||
add_field("NumeroTelefono", T_X, 284, 10); //x
|
||
add_field("EsenteIVA", T_X, 294, 2); //x
|
||
add_field("TipoDoc", T_X, 296, 1);
|
||
add_field("NoConsegna", T_X, 297, 1); //x
|
||
add_field("Fido", T_Nv2N, 298, 8); //x
|
||
|
||
add_eol_field();
|
||
}
|
||
//..e variazioni clienti
|
||
TEsporta_clientiVAR_recordset::TEsporta_clientiVAR_recordset()
|
||
: TEsporta_clienti_recordset(308)
|
||
{
|
||
insert_field("Segno", T_X, 4, 1); //x
|
||
}
|
||
|
||
//Prodotti
|
||
//--------
|
||
TEsporta_prodotti_recordset::TEsporta_prodotti_recordset(int rec_length)
|
||
: THardy_recordset(rec_length)
|
||
{
|
||
add_field(ANAMAG_CODART, T_X, 1, 5); //x
|
||
add_field(ANAMAG_DESCR, T_X, 6, 30); //x
|
||
add_field(UMART_PREZZO, T_Nv3N, 36, 7); //x
|
||
add_field(ANAMAG_CODIVA, T_N, 43, 2); //x attenzione che <20> una aliquota!
|
||
add_field(UMART_UM, T_X, 45, 2); //x
|
||
add_field("NONusato", T_X, 47, 1);
|
||
add_field(ANAMAG_SCONTO, T_2Nv2N,48, 4); //x
|
||
add_field("ScontoArt2", T_2Nv2N,52, 4);
|
||
add_field("Fascia", T_X, 56, 1); //x prodotto da controllare (tazzine)
|
||
add_field("PrezzoMinimo", T_Nv3N, 57, 7);
|
||
add_eol_field();
|
||
}
|
||
//..e variazioni prodotti
|
||
TEsporta_prodottiVAR_recordset::TEsporta_prodottiVAR_recordset()
|
||
: TEsporta_prodotti_recordset(66)
|
||
{
|
||
insert_field("Segno", T_X, 1, 1); //x
|
||
}
|
||
|
||
//Linee
|
||
//-----
|
||
TEsporta_linee_recordset::TEsporta_linee_recordset(int rec_length)
|
||
: THardy_recordset(rec_length)
|
||
{
|
||
add_field("Fascia", T_X, 1, 1);
|
||
add_field("Descrizione", T_X, 2, 50);
|
||
add_eol_field();
|
||
}
|
||
|
||
|
||
//Righe Listini
|
||
//-------------
|
||
TEsporta_listini_recordset::TEsporta_listini_recordset(int rec_length)
|
||
: THardy_recordset(rec_length)
|
||
{
|
||
add_field("CodiceTerminale", T_N, 1, 3); //x
|
||
add_field(RCONDV_COD, T_X, 4, 3); //x
|
||
add_field(RCONDV_CODRIGA, T_X, 7, 5); //x
|
||
add_field(RCONDV_PREZZO, T_Nv3N, 12, 7); //x
|
||
add_field(RCONDV_SCONTO, T_2Nv2N,19, 4); //x
|
||
add_field("Sconto2", T_2Nv2N,23, 4);
|
||
add_field("Sconto3", T_2Nv2N,27, 4);
|
||
add_field("CasaMandante", T_NS, 31, 6);
|
||
add_eol_field();
|
||
}
|
||
//..e variazioni listini
|
||
TEsporta_listiniVAR_recordset::TEsporta_listiniVAR_recordset()
|
||
: TEsporta_listini_recordset(39)
|
||
{
|
||
insert_field("Segno", T_X, 4, 1); //x
|
||
}
|
||
|
||
|
||
//Offerte
|
||
//-------
|
||
TEsporta_offerte_recordset::TEsporta_offerte_recordset(int rec_length)
|
||
: THardy_recordset(rec_length)
|
||
{
|
||
add_field(CONDV_COD, T_X, 1, 3);
|
||
add_field(CONDV_CODVAL, T_X, 4, 3);
|
||
add_field(CONDV_VALIN, T_X, 7, 8);
|
||
add_field(CONDV_VALFIN, T_X, 15, 8);
|
||
add_eol_field();
|
||
}
|
||
|
||
|
||
//Righe Contratti
|
||
//---------------
|
||
TEsporta_contratti_recordset::TEsporta_contratti_recordset(int rec_length)
|
||
: THardy_recordset(rec_length)
|
||
{
|
||
add_field("CodiceTerminale", T_N, 1, 3); //x
|
||
add_field(CONDV_CODCF, T_N, 4, 6); //x
|
||
add_field(RCONDV_CODRIGA, T_X, 10, 5); //x
|
||
add_field(RCONDV_PREZZO, T_Nv3N, 15, 7); //x
|
||
add_field(RCONDV_SCONTO, T_2Nv2N,22, 4); //x
|
||
add_field("Sconto2", T_2Nv2N,26, 4);
|
||
add_field("Sconto3", T_2Nv2N,30, 4);
|
||
add_field(CONDV_VALIN, T_X, 34, 8); //x
|
||
add_field(CONDV_VALFIN, T_X, 42, 8); //x
|
||
add_eol_field();
|
||
}
|
||
|
||
|
||
//Rdoc (Carico) <20> una riga di un documento o un movimento di magazzino nel caso del ripristino
|
||
//-------------
|
||
TEsporta_carico_recordset::TEsporta_carico_recordset(int rec_length)
|
||
: THardy_recordset(rec_length)
|
||
{
|
||
add_field("CodiceTerminale", T_N, 1, 3); //x
|
||
add_field("CodiceArticolo", T_X, 4, 5); //x
|
||
add_field("QuantitaCaricata",T_Nv2N,9, 7); //x
|
||
add_field("CodiceLotto", T_X, 16, 10);
|
||
add_eol_field();
|
||
}
|
||
|
||
//Sospesi
|
||
//-------
|
||
TEsporta_sospesi_recordset::TEsporta_sospesi_recordset(int rec_length)
|
||
: THardy_recordset(rec_length)
|
||
{
|
||
add_field("CodiceTerminale", T_N, 1, 3); //x
|
||
add_field("CodiceCliente", T_N, 4, 6); //x
|
||
add_field("NumeroFattura", T_X, 10, 12); //x
|
||
add_field("DataFattura", T_X, 22, 6); //x
|
||
add_field("ImportoResiduo", T_Nv2N, 28, 9); //x
|
||
add_field("ImpOriginalDoc", T_N, 37, 9); //x
|
||
add_field("DataScadenza", T_X, 46, 6); //x
|
||
add_field("Partita", T_X, 52, 15); //x
|
||
add_field("TipoDocumento", T_X, 67, 1); //x
|
||
add_eol_field();
|
||
}
|
||
//..e variazioni sospesi
|
||
TEsporta_sospesiVAR_recordset::TEsporta_sospesiVAR_recordset()
|
||
: TEsporta_sospesi_recordset(70)
|
||
{
|
||
insert_field("Segno", T_X, 4, 1); //x
|
||
}
|
||
|
||
|
||
//Decodart ()
|
||
//---------------
|
||
TEsporta_decodart_recordset::TEsporta_decodart_recordset()
|
||
: THardy_recordset(49)
|
||
{
|
||
add_field(CODCORR_CODART, T_X, 1, 5); //x
|
||
add_field(CODCORR_CODCF, T_N, 6, 6); //x
|
||
add_field(CODCORR_CODARTALT, T_X, 12, 6); //x
|
||
add_field(CODCORR_DESCR, T_X, 18,30); //x
|
||
add_eol_field();
|
||
}
|
||
|
||
|
||
//Barcode
|
||
//---------------
|
||
TEsporta_barcode_recordset::TEsporta_barcode_recordset(int rec_length)
|
||
: THardy_recordset(rec_length)
|
||
{
|
||
add_field(CODCORR_CODARTALT, T_X, 1, 20); //x
|
||
add_field(CODCORR_CODART, T_X, 21, 5); //x
|
||
add_eol_field();
|
||
}
|
||
|
||
|
||
//Attrezzature
|
||
//---------------
|
||
TEsporta_attrezzature_recordset::TEsporta_attrezzature_recordset(int rec_length)
|
||
: THardy_recordset(rec_length)
|
||
{
|
||
add_field("CodiceTerminale", T_N, 1, 3);
|
||
add_field("CodiceArticolo", T_X, 4, 5);
|
||
add_field("Progressivo", T_N, 9, 7);
|
||
add_field("Matricola", T_X, 16, 15);
|
||
add_field("DescrAttrezz", T_X, 31, 50);
|
||
add_field("CodiceCliente", T_N, 81, 6);
|
||
add_field("CodiceSedeCliente",T_N, 87, 3);
|
||
add_field("DataAssegnamento", T_X, 90, 8);
|
||
add_field("DataFabbricazione",T_X, 98, 8);
|
||
add_eol_field();
|
||
}
|
||
|
||
//Storico Attrezzature
|
||
//--------------------
|
||
TEsporta_storico_attrezzature_recordset::TEsporta_storico_attrezzature_recordset(int rec_length)
|
||
: THardy_recordset(rec_length)
|
||
{
|
||
add_field("CodiceTerminale", T_N, 1, 3);
|
||
add_field("CodiceArticolo", T_X, 4, 5);
|
||
add_field("Progressivo", T_N, 9, 7);
|
||
add_field("ProgrIntervento", T_N, 16, 5);
|
||
add_field("DataIntervento", T_X, 21, 8);
|
||
add_field("TipoIntervento", T_X, 29, 1);
|
||
add_field("DescrIntervento", T_X, 30, 50);
|
||
add_field("CodArtIntervento", T_X, 80, 5);
|
||
add_field("UnitaMisura", T_X, 85, 2);
|
||
add_field("Quantita", T_Nv2N,87, 7);
|
||
add_field("Importo", T_Nv2N,94, 9);
|
||
add_field("ChiusuraComodato", T_X, 103, 1);
|
||
add_eol_field();
|
||
}
|
||
|
||
//Pagamenti
|
||
//---------------
|
||
TEsporta_pagamenti_recordset::TEsporta_pagamenti_recordset()
|
||
: THardy_recordset(27)
|
||
{
|
||
add_field("CodicePagamento", T_X, 1, 2); //x
|
||
add_field("DescrPagamento", T_X, 3, 20); //x
|
||
add_field("GiorniScadenza", T_N, 23, 3); //x
|
||
add_eol_field();
|
||
}
|
||
|
||
//Consumi
|
||
//---------------
|
||
TEsporta_consumi_recordset::TEsporta_consumi_recordset()
|
||
: THardy_recordset(137)
|
||
{
|
||
add_field("CodiceTerminale", T_N, 1, 3);
|
||
add_field("CodiceCliente", T_X, 4, 6);
|
||
add_field("Anno", T_N, 10, 4);
|
||
add_field("GruppoMerc", T_X, 14, 5);
|
||
add_field("Qta1", T_N, 19, 9);
|
||
add_field("Qta2", T_N, 28, 9);
|
||
add_field("Qta3", T_N, 37, 9);
|
||
add_field("Qta4", T_N, 46, 9);
|
||
add_field("Qta5", T_N, 55, 9);
|
||
add_field("Qta6", T_N, 64, 9);
|
||
add_field("Qta7", T_N, 73, 9);
|
||
add_field("Qta8", T_N, 82, 9);
|
||
add_field("Qta9", T_N, 91, 9);
|
||
add_field("Qta10", T_N,100, 9);
|
||
add_field("Qta11", T_N,109, 9);
|
||
add_field("Qta12", T_N,118, 9);
|
||
add_field("QtaOmaggi", T_N,127, 9);
|
||
add_eol_field();
|
||
}
|