Patch level :
Files correlati : Ricompilazione Demo : [ ] Commento : Corretto invio documenti di carico: ora salta i documenti in uso git-svn-id: svn://10.65.10.50/branches/R_10_00@22460 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
f22db5a276
commit
096a2295b1
@ -336,7 +336,13 @@ bool TFile2Txt::genera_clienti_txt(const long da_codcli)
|
|||||||
clienti.set("EsenteIVA", archivio_clienti.get(CFV_ASSFIS));
|
clienti.set("EsenteIVA", archivio_clienti.get(CFV_ASSFIS));
|
||||||
|
|
||||||
clienti.set(CLI_CODCFFATT, archivio_clienti.get(CLI_CODCFFATT));
|
clienti.set(CLI_CODCFFATT, archivio_clienti.get(CLI_CODCFFATT));
|
||||||
clienti.set("TipoDoc", "F");
|
|
||||||
|
TString8 td = archivio_clienti.get("CFVEN.CODLEG").as_string();
|
||||||
|
if (td.blank())
|
||||||
|
td = "F";
|
||||||
|
else
|
||||||
|
td.cut(1);
|
||||||
|
clienti.set("TipoDoc", td);
|
||||||
|
|
||||||
real fido = archivio_clienti.get(CLI_FIDO).as_real();
|
real fido = archivio_clienti.get(CLI_FIDO).as_real();
|
||||||
fido *= CENTO;
|
fido *= CENTO;
|
||||||
@ -806,10 +812,16 @@ bool TFile2Txt::genera_carico_txt(const TMask& mask)
|
|||||||
const long ndoc = archivio_rdoc.get(RDOC_NDOC).as_int();
|
const long ndoc = archivio_rdoc.get(RDOC_NDOC).as_int();
|
||||||
if (ndoc != last_ndoc)
|
if (ndoc != last_ndoc)
|
||||||
{
|
{
|
||||||
last_ndoc = ndoc;
|
|
||||||
TLocalisamfile& doc = archivio_rdoc.cursor()->file(LF_DOC);
|
TLocalisamfile& doc = archivio_rdoc.cursor()->file(LF_DOC);
|
||||||
doc.put(DOC_STATO, stato_fin);
|
int err = doc.read(_isequal, _testandlock);
|
||||||
doc.rewrite();
|
if (err == NOERR)
|
||||||
|
{
|
||||||
|
doc.put(DOC_STATO, stato_fin);
|
||||||
|
doc.rewrite();
|
||||||
|
last_ndoc = ndoc;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
carico.new_rec("");
|
carico.new_rec("");
|
||||||
|
@ -324,26 +324,19 @@ bool TUpload2Campo::archivia_file_importato(const TString& dst_root_path, const
|
|||||||
if (!crea_dir)
|
if (!crea_dir)
|
||||||
{
|
{
|
||||||
TString msg;
|
TString msg;
|
||||||
msg.format("Impossibile creare la cartella %s !", dst_file);
|
msg.format(FR("Impossibile creare la cartella %s!"), (const char*)dst_file);
|
||||||
log.log(2, msg);
|
log.log(2, msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
//se invece crea/trova la cartella -> copia il file
|
//se invece crea/trova la cartella -> copia il file
|
||||||
//il file di destinazione ha nome modificato con data e ora di upload
|
dst_file.add(curr_fname.name());
|
||||||
TString str_curr_fname = curr_fname.name();
|
|
||||||
struct tm* adesso = xvt_time_now();
|
|
||||||
TString80 str_adesso;
|
|
||||||
str_adesso << "__" << adesso->tm_year + 1900 << "_" << adesso->tm_mon + 1 << "_" << adesso->tm_mday << "__" << adesso->tm_hour << "_" << adesso->tm_min << "_" << adesso->tm_sec;
|
|
||||||
const short pos = str_curr_fname.rfind('.');
|
|
||||||
str_curr_fname.insert(str_adesso, pos);
|
|
||||||
dst_file.add(str_curr_fname);
|
|
||||||
|
|
||||||
const bool copia_riuscita = fcopy(curr_fname, dst_file);
|
const bool copia_riuscita = fcopy(curr_fname, dst_file);
|
||||||
if (!copia_riuscita)
|
if (!copia_riuscita)
|
||||||
{
|
{
|
||||||
TString msg;
|
TString msg;
|
||||||
msg.format("Impossibile copiare il file %s !", curr_fname.name());
|
msg.format(FR("Impossibile copiare il file %s!"), (const char*)curr_fname.name());
|
||||||
log.log(2, msg);
|
log.log(2, msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -356,7 +349,7 @@ bool TUpload2Campo::archivia_file_importato(const TString& dst_root_path, const
|
|||||||
if (src_size != dst_size)
|
if (src_size != dst_size)
|
||||||
{
|
{
|
||||||
TString msg;
|
TString msg;
|
||||||
msg.format("Copia del file %s non completata !", curr_fname.name());
|
msg.format(FR("Copia del file %s non completata!"), curr_fname.name());
|
||||||
log.log(2, msg);
|
log.log(2, msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -366,7 +359,7 @@ bool TUpload2Campo::archivia_file_importato(const TString& dst_root_path, const
|
|||||||
if (!src_file_removed)
|
if (!src_file_removed)
|
||||||
{
|
{
|
||||||
TString msg;
|
TString msg;
|
||||||
msg.format("Impossibile eliminare il file origine %s ", curr_fname.name());
|
msg.format(FR("Impossibile eliminare il file origine %s"), curr_fname.name());
|
||||||
log.log(1, msg);
|
log.log(1, msg);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -387,7 +380,7 @@ const TString& TUpload2Campo::check_agente(TString& codice_terminale, TLog_repor
|
|||||||
{
|
{
|
||||||
_can_write = false;
|
_can_write = false;
|
||||||
TString msg;
|
TString msg;
|
||||||
msg << "Codice agente " << codice_agente << " da terminale: sconosciuto";
|
msg << TR("Codice agente ") << codice_agente << TR(" da terminale: sconosciuto");
|
||||||
log.log(2, msg);
|
log.log(2, msg);
|
||||||
}
|
}
|
||||||
return codage_campo;
|
return codage_campo;
|
||||||
@ -404,7 +397,7 @@ const TString& TUpload2Campo::check_articolo(TString& codart, TLog_report& log)
|
|||||||
{
|
{
|
||||||
_can_write = false;
|
_can_write = false;
|
||||||
TString msg;
|
TString msg;
|
||||||
msg << "Codice articolo " << codart << " sconosciuto su Campo";
|
msg << TR("Codice articolo ") << codart << TR(" sconosciuto su Campo");
|
||||||
log.log(2, msg);
|
log.log(2, msg);
|
||||||
}
|
}
|
||||||
return rec_anamag.get(ANAMAG_DESCR);
|
return rec_anamag.get(ANAMAG_DESCR);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user