Patch level : 10.0 patch 4??

Files correlati     : lv2
Ricompilazione Demo : [ ]
Commento            :
4) Velocizzare la generazione dei buoni di consegna -> FATTO; lunedì verrà rilascita un'ulteriore patch per rendere il filtro sui documenti di sporco ancora più stringente (Si controlla anche la data di prevista consegna)  (mail 07/08)

6) Come di avevo anticipato al telefono occorre un tabulato durante la generazione delle bolle di consegna Per elencare gli articoli SULLA BOLLA DI SPORCO e messi in bolla di consegna che non sono presenti in contratto Il tabulato dovrebbe fornire i seguenti dati Cliente,articolo quantità , numero e data bolla -> VERRA' RILASCIATO LUNEDI' CON IL FILTRO AGGIUNTIVO  (mail 07/08)

8) Ho scaricato l’ultima patch, quando apro il programma di acquisizione dati da conta pezzi Clicco su elabora, mi va in errore il pgm lv2.exe Poi riapro e riclicco su elabora e va correttamente -> VERRA' RILASCIATO LUNEDI', SONO IN CORSO ULTERIORI TEST (mail 07/08)

1) ho generato i buoni di consegna per cliente ma mi da un errore
Fatal error – Espressione errata : (Tipocf = ‘C’) &&(codcf = 105015)&&
(mail 10/08)


git-svn-id: svn://10.65.10.50/trunk@19200 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca83 2009-08-10 14:13:34 +00:00
parent b79a28f865
commit 22ee2bea9c
2 changed files with 35 additions and 26 deletions

View File

@ -47,8 +47,8 @@ class TGenera_documenti_app : public TSkeleton_application
private:
//Metodi per la generazione dei documenti
bool crea_documento(const TISAM_recordset& plan);
void crea_riga(const TString& codart, const char modpas, const int tplis, const bool tmp, const bool prinbo,TDocumento& doc);
bool crea_documento(const TISAM_recordset& plan, TLog_report& rep);
void crea_riga(const TString& codart, const char modpas, const int tplis, const bool tmp, const bool prinbo,TDocumento& doc, TLog_report& rep);
//Metodi per il recupero di codnum, tpdoc, stato
bool numerazione_ddt(TString& codnum, TString& tpdoc, TString& statoi, TString& statof) const;
bool numerazione_drit(const int cod, TString& codnum, TString& tpdoc, TString& statoi, TString& statof) const;
@ -110,7 +110,7 @@ bool TGenera_documenti_app::destroy()
///////////////////////////////////////////////////////
//CREA_DOCUMENTO: metodo che crea un nuovo documento di trasporto dai dati salvati
bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan)
bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan, TLog_report& rep)
{
//recupero i dati di interesse dalla maschera
const TDate datagen(TODAY);
@ -195,7 +195,7 @@ bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan)
FOR_EACH_ASSOC_OBJECT(_quantita,h,codart,obj)
{
crea_riga(codart, modpas, tplis, false, prinbo ,doc);
crea_riga(codart, modpas, tplis, false, prinbo ,doc, rep);
/*const TDate dadata = rcont.get(LVRCONDV_INDTTMP).as_date();
const TDate adata = rcont.get(LVRCONDV_FIDTTMP).as_date();
@ -222,7 +222,7 @@ bool TGenera_documenti_app::crea_documento(const TISAM_recordset& plan)
}
//CREA_RIGA: questa funzione crea una riga merce per una bolla di consegna
void TGenera_documenti_app::crea_riga(const TString& codart, const char modpas, const int tplis, const bool tmp, const bool prinbo, TDocumento& doc)
void TGenera_documenti_app::crea_riga(const TString& codart, const char modpas, const int tplis, const bool tmp, const bool prinbo, TDocumento& doc, TLog_report& rep)
{
const int perarr = _configlv->get_int("Perarr");
@ -249,6 +249,15 @@ void TGenera_documenti_app::crea_riga(const TString& codart, const char modpas,
keyrcont.add(codart);
//instanzio una cache sulla tabella delle righe contratti
const TRectype& rcont = cache().get(LF_LVRCONDV,keyrcont);
//se il record è vuoto aggiorno il log
if (rcont.empty())
{
TString str;
str << "L'articolo " << codart << "non è prsente sul contratto del cliente " << codcli;
rep.log(1, str);
}
//recupero i dati di interesse dalla riga del contratto
bool arrot;
if (rcont.get_int(LVRCONDV_CALCCONS) == 1)
@ -710,7 +719,8 @@ bool TGenera_documenti_app::transfer()
TString4 statof;
// bool err;
TLog_report *rep = new TLog_report("Documenti non evasi");
TLog_report rep("Articoli non in contratto");
rep.kill_duplicates();
numerazione_drit(0, codnum, tpdoc, statoi, statof);
@ -718,14 +728,18 @@ bool TGenera_documenti_app::transfer()
TString query_bolle = "USE DOC\nSELECT ";
if(codcli > 0)
query_bolle << "(TIPOCF=\"C\")&&(CODCF=" << codcli << ")&&\n";
query_bolle << "(TIPOCF=\"C\")&&(CODCF=" << codcli << ")&&";
query_bolle << "(TIPODOC=\"" << tpdoc << "\")&&(STATO=\"" << statoi << "\")&&";
query_bolle << "(G1:DATAPRCO<=" << adatacons << ")\n";
query_bolle << "(BETWEEN(G1:DATAPRCO,#DADATA,#ADATA))\n";
query_bolle << "FROM PROVV=\"D\" ANNO=" << daanno << " CODNUM=\"" << codnum << "\"\n";
query_bolle << "TO PROVV=\"D\" ANNO=" << aanno << " CODNUM=\"" << codnum << "\"\n";
query_bolle << "TO PROVV=\"D\" ANNO=" << aanno << " CODNUM=\"" << codnum << "\"\n";
TISAM_recordset docritiri(query_bolle);
docritiri.set_var("#DADATA", dadatacons);
docritiri.set_var("#ADATA", adatacons);
int cazzone = docritiri.items();
TProgind pi(docritiri.items(), TR("Generazione documenti in corso..."), true, true);
@ -766,23 +780,16 @@ bool TGenera_documenti_app::transfer()
TISAM_recordset plan(query);
if (!plan.move_first())
{
TString str;
str << "Il documento " << docritiri.get(DOC_CODNUM) << ' ' << docritiri.get(DOC_TIPODOC) << " del cliente "
<< docritiri.get(DOC_CODCF) << " non è stato evaso (manca data di prevista consegna)";
rep->log(0, str);
}
else
if (plan.move_first())
{
_quantita.destroy();
_quantita_ritirata.destroy();
crea_documento(plan);
crea_documento(plan, rep);
}
}
TReport_book buc;
buc.add(*rep);
buc.add(rep);
if (buc.pages() > 0)
buc.preview();
else

View File

@ -124,8 +124,9 @@ TObject* TAcquisizione_cache::key2obj(const char* key)
doc->put(DOC_TIPOCF, 'C');
doc->put(DOC_CODCF, codcf);
doc->put(DOC_CODCONT, codcont);
doc->put("DATAGEN", datagen);
doc->put("DATAPRCO", dataprco);
doc->put("DATACON", datadoc); //data conteggio
doc->put("DATAGEN", datagen); //data generazione del documento
doc->put("DATAPRCO", dataprco); //data prevista consegna
doc->write(); // Scrivo subito per prenotare il numero documento
}
return doc;
@ -318,7 +319,7 @@ void TAcquisizione_lavanderie_app::elabora_file(const TString& file, bool new_fi
{
const TRectype& anamag = cache().get(LF_ANAMAG, codart);
doc.put("DATACON", datadoc);
//
TRiga_documento& rdoc = doc.new_row("22");
rdoc.put(RDOC_CODART, codart);
@ -363,7 +364,9 @@ bool TAcquisizione_lavanderie_app::transfer()
const TString& path = _msk->get(F_PATH);
TSheet_field& sheet = _msk->sfield(F_SHEET_NAME);
TFilename file;
TLog_report logrep("Aquisizione da contapezzi");
TLog_report logrep("Aquisizione da contapezzi");
logrep.kill_duplicates(true);
//per ogni riga dello sheet, leggo il suo contenuto, se contiene dei caratteri jolly
//preparo la lista dei file che soddisfano la maschera in quella directory e li elaboro
@ -392,10 +395,9 @@ bool TAcquisizione_lavanderie_app::transfer()
elabora_file(file, true, logrep);
}
}
TReport_book buc;
TReport_book buc;
buc.add(logrep);
logrep.kill_duplicates(true);
if (buc.pages() > 0)
buc.preview();
else