Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : git-svn-id: svn://10.65.10.50/branches/R_10_00@21857 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
4ad5200f4c
commit
3c2672239a
@ -82,7 +82,7 @@ TObject* TCodArtEsselunga_cache::key2obj(const char* key)
|
|||||||
{
|
{
|
||||||
TToken_string code(key);
|
TToken_string code(key);
|
||||||
TString80 codart; code.get(0, codart);
|
TString80 codart; code.get(0, codart);
|
||||||
const long codcf = 1000;
|
const TString& codcf = ini_get_string(CONFIG_DITTA, "ha", "Esselunga_CodEsselunga");
|
||||||
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));
|
||||||
@ -91,7 +91,8 @@ TObject* TCodArtEsselunga_cache::key2obj(const char* key)
|
|||||||
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 NULL;
|
else
|
||||||
|
return new TString80(codart);
|
||||||
}
|
}
|
||||||
|
|
||||||
const TString& TCodArtEsselunga_cache::decode(const TString& codart)
|
const TString& TCodArtEsselunga_cache::decode(const TString& codart)
|
||||||
@ -252,13 +253,19 @@ void THardy_esselunga::elabora(const TMask& mask)
|
|||||||
{
|
{
|
||||||
TDocumento* doc = new TDocumento(recset.cursor()->curr());
|
TDocumento* doc = new TDocumento(recset.cursor()->curr());
|
||||||
// passo tutte le righe del documento all'AS400recordset
|
// passo tutte le righe del documento all'AS400recordset
|
||||||
FOR_EACH_PHYSICAL_RDOC(*doc, r, rigadoc)
|
TString16 numdoc;
|
||||||
|
const TString& num = doc->numerazione();
|
||||||
|
numdoc.format("%012d",doc->numero());
|
||||||
|
numdoc << cache().get("%NUM", num, "S7");
|
||||||
|
numdoc.strip("/");
|
||||||
|
numdoc.right(12);
|
||||||
|
FOR_EACH_PHYSICAL_RDOC(*doc, r, rigadoc)
|
||||||
{
|
{
|
||||||
const TString80& codart_esselunga = cache_ca.decode(rigadoc->get(RDOC_CODART));
|
const TString80& codart_esselunga = cache_ca.decode(rigadoc->get(RDOC_CODART));
|
||||||
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);
|
||||||
privat.set("NUMBOLLA", "000000000000");
|
privat.set("NUMBOLLA", numdoc);
|
||||||
privat.set("DATABOLLA", recset.get(DOC_DATADOC));
|
privat.set("DATABOLLA", recset.get(DOC_DATADOC));
|
||||||
real qta = rigadoc->get_real(RDOC_QTA);
|
real qta = rigadoc->get_real(RDOC_QTA);
|
||||||
TString16 qtastr = qta.string(8,2,'0');
|
TString16 qtastr = qta.string(8,2,'0');
|
||||||
@ -266,7 +273,6 @@ void THardy_esselunga::elabora(const TMask& mask)
|
|||||||
privat.set("QTACONS", qtastr);
|
privat.set("QTACONS", qtastr);
|
||||||
privat.set("QTARESA", "0000000");
|
privat.set("QTARESA", "0000000");
|
||||||
} //FOR_EACH...
|
} //FOR_EACH...
|
||||||
delete doc;
|
|
||||||
} // if check_cliente...
|
} // if check_cliente...
|
||||||
} //for (bool ok = recset.move_first()...
|
} //for (bool ok = recset.move_first()...
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user