Patch level : 12.0 no-patch
Files correlati : Commento : Sistemate tabelle O01C/E con filtri non funzionanti git-svn-id: svn://10.65.10.50/branches/R_10_00@23676 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
87298d823b
commit
f93f07229a
@ -200,9 +200,9 @@ TString TCampass_app::esporta(const TString& DSN, const TString& usr, const TStr
|
||||
TODBC_recordset sqlset("");
|
||||
if (!sqlset.connect(DSN, usr, psw))
|
||||
return "Connessione fallita!";
|
||||
/*
|
||||
|
||||
logFile << getTime() << " - Connessione effettuata!\n";
|
||||
|
||||
|
||||
// INIZIO O03
|
||||
logFile << getTime() << " - Inizio esportazione O03:\n";
|
||||
|
||||
@ -271,9 +271,9 @@ TString TCampass_app::esporta(const TString& DSN, const TString& usr, const TStr
|
||||
logFile << getTime() << " - Esportata tabella O02C - PRC\n";
|
||||
|
||||
endExport(o02);
|
||||
|
||||
|
||||
logFile << getTime() << " - Fine esportazione O02!\n";
|
||||
*/
|
||||
|
||||
// INIZIO O01
|
||||
|
||||
logFile << getTime() << " - Inizio esportazione O01:\n";
|
||||
@ -310,7 +310,7 @@ TString TCampass_app::esporta(const TString& DSN, const TString& usr, const TStr
|
||||
endExport(a01);
|
||||
|
||||
logFile << getTime() << " - Fine esportazione A01!\n";
|
||||
|
||||
|
||||
logFile.close();
|
||||
|
||||
return errors;
|
||||
@ -516,7 +516,7 @@ bool TCampass_app::o01c(const TString id) const
|
||||
|
||||
// Vado a prendere la riga di riferimento
|
||||
TRectype filtroFiltro(filtro.curr());
|
||||
if(rowRDoc.get("DACODNUM") == "ORC")
|
||||
if(rowRDoc.get("DACODNUM") == "ORC" || rowRDoc.get("DACODNUM") == "PRC")
|
||||
{
|
||||
filtroFiltro.put("CODNUM", rowRDoc.get("DACODNUM"));
|
||||
filtroFiltro.put("ANNO", rowRDoc.get("DAANNO"));
|
||||
@ -526,9 +526,10 @@ bool TCampass_app::o01c(const TString id) const
|
||||
TCursor curFiltro(&rdoc, "RIGAEVASA != \"X\"", 1, &filtroFiltro, &filtroFiltro);
|
||||
for (curFiltro = 0; curFiltro.pos() < curFiltro.items() && !p.is_cancelled(); ++curFiltro)
|
||||
{
|
||||
if(curFiltro.curr().get_int("IDRIGA") != rowRDoc.get_int("DAIDRIGA")) continue;
|
||||
TString sqlQuery;
|
||||
sqlQuery << "INSERT INTO O01C ( IKRUNIMP, CStr, CPRD, CARTFIL, CUDM, QIMP, QBASE, XTCALC, NSEQ ) \
|
||||
VALUES('" << id << "','DBS','" << rowRDoc.get("NDOC") << "','" << rowRDist.get("CODCOMP") << "','"
|
||||
VALUES('" << id << "','DBS','" << zeroFill(rowRDoc.get("NDOC")) << "." << rowRDoc.get("IDRIGA") << "','" << rowRDist.get("CODCOMP") << "','"
|
||||
<< rowRDist.get("UM") << "','" << rowRDist.get("EXPR") << "','1','0','" << rowRDist.get("NRIG") << "');";
|
||||
if(sqlset.exec(sqlQuery) != 1)
|
||||
{
|
||||
@ -577,6 +578,7 @@ bool TCampass_app::o01e(const TString id) const
|
||||
for (curFiltro = 0; curFiltro.pos() < curFiltro.items() && !p.is_cancelled(); ++curFiltro)
|
||||
{
|
||||
TRectype rowFiltro(curFiltro.curr());
|
||||
if(rowFiltro.get_int("IDRIGA") != rowRDoc.get_int("DAIDRIGA")) continue;
|
||||
// Dichiaro la stringa
|
||||
TString sqlQuery;
|
||||
TString codagg; codagg << rowFiltro.get("CODAGG1");
|
||||
@ -695,10 +697,10 @@ bool TCampass_app::o02c(const TString CodNum, const TString id) const
|
||||
filtroFiltro.put("NDOC", rowRDoc.get("DANDOC"));
|
||||
filtroFiltro.put("IDRIGA", rowRDoc.get("DAIDRIGA"));
|
||||
|
||||
TCursor curFiltro(&rdoc, "RIGAEVASA != \"X\"", 1, &filtroFiltro, &filtroFiltro);
|
||||
if(curFiltro.items() == 0) continue; // Se non ho elementi salto tutto
|
||||
|
||||
TCursor curFiltro(&rdoc, "RIGAEVASA!=\"X\"", 1, &filtroFiltro, &filtroFiltro);
|
||||
curFiltro = 0;
|
||||
// Se non ho elementi salto tutto
|
||||
if(rowRDoc.get_int("DAIDRIGA") != curFiltro.curr().get_int("IDRIGA") || curFiltro.items() == 0 || curFiltro.curr().get_bool("RIGAEVASA")) continue; // Aggiungo ulteriore controllo, PERCHÉ NON METTE DAIDRIGA!?
|
||||
// Dichiaro la stringa
|
||||
TString sqlQuery;
|
||||
// Inserisco Tutto (yeeeeeeeeeeeeeee)
|
||||
|
Loading…
x
Reference in New Issue
Block a user