Patch level :
Files correlati : ha1, ha2 Ricompilazione Demo : [ ] Commento : Corretto invio Esselunga git-svn-id: svn://10.65.10.50/branches/R_10_00@22481 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
50fb6aef88
commit
4332bbd94a
@ -435,9 +435,6 @@ bool TFile2Txt::genera_righelistini_txt()
|
|||||||
|
|
||||||
TISAM_recordset agenti("USE AGENTI");
|
TISAM_recordset agenti("USE AGENTI");
|
||||||
const long agenti_items = agenti.items();
|
const long agenti_items = agenti.items();
|
||||||
for (bool ok = agenti.move_first(); ok; ok = agenti.move_next())
|
|
||||||
{
|
|
||||||
const TString4 codage = agenti.get(AGE_CODAGE).as_string().right(3);
|
|
||||||
|
|
||||||
TString query;
|
TString query;
|
||||||
query << "USE RCONDV";
|
query << "USE RCONDV";
|
||||||
@ -447,6 +444,9 @@ bool TFile2Txt::genera_righelistini_txt()
|
|||||||
TISAM_recordset archivio_rcondv(query);
|
TISAM_recordset archivio_rcondv(query);
|
||||||
const long archivio_rcondv_items = archivio_rcondv.items();
|
const long archivio_rcondv_items = archivio_rcondv.items();
|
||||||
|
|
||||||
|
for (bool ok = agenti.move_first(); ok; ok = agenti.move_next())
|
||||||
|
{
|
||||||
|
const TString4 codage = agenti.get(AGE_CODAGE).as_string().right(3);
|
||||||
TProgind progind(archivio_rcondv_items, "Listini...", false, true);
|
TProgind progind(archivio_rcondv_items, "Listini...", false, true);
|
||||||
for (bool ok = archivio_rcondv.move_first(); ok; ok = archivio_rcondv.move_next())
|
for (bool ok = archivio_rcondv.move_first(); ok; ok = archivio_rcondv.move_next())
|
||||||
{
|
{
|
||||||
@ -521,6 +521,7 @@ bool TFile2Txt::genera_contratti_txt()
|
|||||||
const TDate dataini = archivio_rcondv.get("CONDV.VALIN").as_date();
|
const TDate dataini = archivio_rcondv.get("CONDV.VALIN").as_date();
|
||||||
righe_contratti.set(CONDV_VALIN, hd_format_date8(dataini));
|
righe_contratti.set(CONDV_VALIN, hd_format_date8(dataini));
|
||||||
righe_contratti.set(CONDV_VALFIN, hd_format_date8(datafine));
|
righe_contratti.set(CONDV_VALFIN, hd_format_date8(datafine));
|
||||||
|
righe_contratti.duplica_capi_zona();
|
||||||
}
|
}
|
||||||
|
|
||||||
return salva_recordset(righe_contratti, "particolari");
|
return salva_recordset(righe_contratti, "particolari");
|
||||||
@ -611,6 +612,7 @@ bool TFile2Txt::genera_barcode_txt()
|
|||||||
barcode.new_rec("");
|
barcode.new_rec("");
|
||||||
barcode.set(CODCORR_CODARTALT, archivio_codcorr.get(CODCORR_CODARTALT));
|
barcode.set(CODCORR_CODARTALT, archivio_codcorr.get(CODCORR_CODARTALT));
|
||||||
barcode.set(CODCORR_CODART, archivio_codcorr.get(CODCORR_CODART));
|
barcode.set(CODCORR_CODART, archivio_codcorr.get(CODCORR_CODART));
|
||||||
|
barcode.duplica_capi_zona();
|
||||||
}
|
}
|
||||||
|
|
||||||
return salva_recordset(barcode, "barcode");
|
return salva_recordset(barcode, "barcode");
|
||||||
@ -637,6 +639,7 @@ bool TFile2Txt::genera_decodart_txt()
|
|||||||
const TString& data = archivio_codcorr.get(MULTI_DATA).as_string();
|
const TString& data = archivio_codcorr.get(MULTI_DATA).as_string();
|
||||||
decodart.set(CODCORR_CODARTALT, data.left(6));
|
decodart.set(CODCORR_CODARTALT, data.left(6));
|
||||||
decodart.set(CODCORR_DESCR, data.mid(6, 30));
|
decodart.set(CODCORR_DESCR, data.mid(6, 30));
|
||||||
|
decodart.duplica_capi_zona();
|
||||||
}
|
}
|
||||||
|
|
||||||
return salva_recordset(decodart, "decodart");
|
return salva_recordset(decodart, "decodart");
|
||||||
@ -677,6 +680,7 @@ bool TFile2Txt::genera_attrezzature_txt()
|
|||||||
attrezzature.set("DataAssegnamento", hd_format_date8(data_ass));
|
attrezzature.set("DataAssegnamento", hd_format_date8(data_ass));
|
||||||
TDate data_fabb = archivio_attr.get("D1").as_date();
|
TDate data_fabb = archivio_attr.get("D1").as_date();
|
||||||
attrezzature.set("DataFabbricazione", hd_format_date8(data_fabb));
|
attrezzature.set("DataFabbricazione", hd_format_date8(data_fabb));
|
||||||
|
attrezzature.duplica_capi_zona();
|
||||||
}
|
}
|
||||||
|
|
||||||
salva_recordset(attrezzature, "attrezzature");
|
salva_recordset(attrezzature, "attrezzature");
|
||||||
@ -722,6 +726,7 @@ bool TFile2Txt::genera_attrezzature_txt()
|
|||||||
importo.round();
|
importo.round();
|
||||||
storico.set("Importo", importo);
|
storico.set("Importo", importo);
|
||||||
storico.set("ChiusuraComodato", archivio_storico.get("B0"));
|
storico.set("ChiusuraComodato", archivio_storico.get("B0"));
|
||||||
|
storico.duplica_capi_zona();
|
||||||
}
|
}
|
||||||
|
|
||||||
return salva_recordset(storico, "storico");
|
return salva_recordset(storico, "storico");
|
||||||
@ -752,6 +757,7 @@ bool TFile2Txt::genera_tabpag_txt()
|
|||||||
if (giorni <= 0)
|
if (giorni <= 0)
|
||||||
giorni = archivio_pagamenti.get("I3").as_int();
|
giorni = archivio_pagamenti.get("I3").as_int();
|
||||||
tabpag.set("GiorniScadenza", giorni);
|
tabpag.set("GiorniScadenza", giorni);
|
||||||
|
tabpag.duplica_capi_zona();
|
||||||
}
|
}
|
||||||
|
|
||||||
return salva_recordset(tabpag, "tabpag");
|
return salva_recordset(tabpag, "tabpag");
|
||||||
|
@ -461,7 +461,6 @@ bool TUpload2Campo::genera_incasso(TPartita& game, int nriga, int nrata,
|
|||||||
msg.insert(TR("Non esiste la rata"));
|
msg.insert(TR("Non esiste la rata"));
|
||||||
msg << " Creazione pagamento non assegnato.";
|
msg << " Creazione pagamento non assegnato.";
|
||||||
log.log(1, msg);
|
log.log(1, msg);
|
||||||
//return false;
|
|
||||||
nriga = nrata = game.UNASSIGNED;
|
nriga = nrata = game.UNASSIGNED;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -582,16 +581,6 @@ void TUpload2Campo::elabora_VC(THardy_upload_recordset& recset, TLog_report& log
|
|||||||
log.log(0, msg);
|
log.log(0, msg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
_can_write = false;
|
|
||||||
TString msg;
|
|
||||||
msg << "Annullata importazione cliente " << codcf;
|
|
||||||
log.log(2, msg);
|
|
||||||
codcf = 0L;
|
|
||||||
}*/
|
|
||||||
} //if(codcf<=0)...
|
} //if(codcf<=0)...
|
||||||
|
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
|
|
||||||
#include <doc.h>
|
#include <doc.h>
|
||||||
#include <rdoc.h>
|
#include <rdoc.h>
|
||||||
#include "../mg/codcorr.h"
|
//#include "../mg/codcorr.h"
|
||||||
#include "../cg/cglib01.h"
|
#include "../cg/cglib01.h"
|
||||||
#include "../ve/velib.h"
|
#include "../ve/velib.h"
|
||||||
|
|
||||||
@ -18,8 +18,6 @@
|
|||||||
#include "ha2.h"
|
#include "ha2.h"
|
||||||
#include "ha2100a.h"
|
#include "ha2100a.h"
|
||||||
|
|
||||||
const char* const APPNAME = TR("Esselunga: generazione file Privat");
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
// TAutomask
|
// TAutomask
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -204,7 +202,10 @@ void THardy_esselunga::elabora(const TMask& mask)
|
|||||||
numdoc = numdoc.right(12);
|
numdoc = numdoc.right(12);
|
||||||
FOR_EACH_PHYSICAL_RDOC(*doc, r, rigadoc)
|
FOR_EACH_PHYSICAL_RDOC(*doc, r, rigadoc)
|
||||||
{
|
{
|
||||||
const TString80& codart_esselunga = cache_ca.decode(rigadoc->get(RDOC_CODART));
|
const TString& codart = rigadoc->get(RDOC_CODART);
|
||||||
|
const TString& codart_esselunga = cache_ca.decode(codart);
|
||||||
|
if (codart_esselunga.full())
|
||||||
|
{
|
||||||
privat.new_rec("");
|
privat.new_rec("");
|
||||||
privat.set("CDC", TVariant(codcf_esselunga));
|
privat.set("CDC", TVariant(codcf_esselunga));
|
||||||
privat.set("CODART", codart_esselunga);
|
privat.set("CODART", codart_esselunga);
|
||||||
@ -215,6 +216,7 @@ void THardy_esselunga::elabora(const TMask& mask)
|
|||||||
qtastr.strip(".");
|
qtastr.strip(".");
|
||||||
privat.set("QTACONS", qtastr);
|
privat.set("QTACONS", qtastr);
|
||||||
privat.set("QTARESA", "0000000");
|
privat.set("QTARESA", "0000000");
|
||||||
|
}
|
||||||
} //FOR_EACH...
|
} //FOR_EACH...
|
||||||
} // if check_cliente...
|
} // if check_cliente...
|
||||||
} //for (bool ok = recset.move_first()...
|
} //for (bool ok = recset.move_first()...
|
||||||
@ -235,9 +237,8 @@ void THardy_esselunga::elabora(const TMask& mask)
|
|||||||
long THardy_esselunga::check_cliente(const long codcf, const TString4 dipendenza)
|
long THardy_esselunga::check_cliente(const long codcf, const TString4 dipendenza)
|
||||||
{
|
{
|
||||||
long codcf_hardy = -1;
|
long codcf_hardy = -1;
|
||||||
TString key;
|
TString8 key; key << codcf;
|
||||||
key.format("%ld", codcf);
|
const TRectype& rec_cliente = cache().get("&CEL", key);
|
||||||
const TRectype rec_cliente = cache().get("&CEL", key);
|
|
||||||
const bool invio = rec_cliente.get_bool("B0");
|
const bool invio = rec_cliente.get_bool("B0");
|
||||||
if (invio)
|
if (invio)
|
||||||
{
|
{
|
||||||
@ -264,6 +265,6 @@ bool THardy_esselunga::create()
|
|||||||
int ha2100 (int argc, char* argv[])
|
int ha2100 (int argc, char* argv[])
|
||||||
{
|
{
|
||||||
THardy_esselunga elabapp;
|
THardy_esselunga elabapp;
|
||||||
elabapp.run(argc, argv, APPNAME);
|
elabapp.run(argc, argv, TR("Esselunga: generazione file Privat"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
@ -554,8 +554,11 @@ void THardy_esselunga_fat::add_recs_dettaglio(TFatture_recordset& fat, TDocument
|
|||||||
TCodArtEsselunga_cache cache_ca;
|
TCodArtEsselunga_cache cache_ca;
|
||||||
FOR_EACH_PHYSICAL_RDOC(doc, r, rigadoc)
|
FOR_EACH_PHYSICAL_RDOC(doc, r, rigadoc)
|
||||||
{
|
{
|
||||||
const TString80& codart_esselunga = cache_ca.decode(rigadoc->get(RDOC_CODART));
|
const TString16 codart = rigadoc->get(RDOC_CODART);
|
||||||
const TRectype& rec_anamag = cache().get(LF_ANAMAG, rigadoc->get(RDOC_CODART));
|
const TString& codart_esselunga = cache_ca.decode(codart);
|
||||||
|
if (codart_esselunga.blank())
|
||||||
|
continue;
|
||||||
|
const TRectype& rec_anamag = cache().get(LF_ANAMAG, codart);
|
||||||
fat.new_rec("DET");
|
fat.new_rec("DET");
|
||||||
long rl(r);
|
long rl(r);
|
||||||
fat.set("DET.NUMRIGA", TVariant(rl));
|
fat.set("DET.NUMRIGA", TVariant(rl));
|
||||||
|
@ -60,13 +60,9 @@ TObject* TCodArtEsselunga_cache::key2obj(const char* key)
|
|||||||
TISAM_recordset codcorr("USE CODCORR\nSELECT CODCF=#CODCF\nFROM CODART=#COD\nTO CODART=#COD");
|
TISAM_recordset codcorr("USE CODCORR\nSELECT CODCF=#CODCF\nFROM CODART=#COD\nTO CODART=#COD");
|
||||||
codcorr.set_var("#COD", TVariant(codart));
|
codcorr.set_var("#COD", TVariant(codart));
|
||||||
codcorr.set_var("#CODCF", TVariant(codcf));
|
codcorr.set_var("#CODCF", TVariant(codcf));
|
||||||
if (codcorr.items()>0)
|
if (codcorr.move_first())
|
||||||
{
|
|
||||||
codcorr.move_first();
|
|
||||||
return new TString80(codcorr.get(CODCORR_CODARTALT).as_string());
|
return new TString80(codcorr.get(CODCORR_CODARTALT).as_string());
|
||||||
}
|
return new TString4;
|
||||||
else
|
|
||||||
return new TString80(codart);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const TString& TCodArtEsselunga_cache::decode(const TString& codart)
|
const TString& TCodArtEsselunga_cache::decode(const TString& codart)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user