Patch level : 12.00 1284
Files correlati : fp0.exe Commento : Gli allegati esterni non venivano elaborati
This commit is contained in:
parent
749a907557
commit
fb59d994d2
@ -2984,7 +2984,9 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
}
|
||||
}
|
||||
}
|
||||
TToken_string allegati(doc.get("COLL_GOLEM"), '\n');
|
||||
|
||||
TToken_string allegati(doc.get(DOC_COLL_GOLEM), '\n');
|
||||
|
||||
bool load_allegati = true;
|
||||
if (allegati.full())
|
||||
{
|
||||
@ -3000,12 +3002,56 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
TFilename fname;
|
||||
FOR_EACH_TOKEN(allegati, row)
|
||||
{
|
||||
const TToken_string entry(row);
|
||||
TToken_string entry(row);
|
||||
const bool external = entry.get_bool(2);
|
||||
|
||||
if (entry.get(0, fname))
|
||||
{
|
||||
TFilename file_path = golem_path;
|
||||
file_path.add(fname.name());
|
||||
TFilename file_path = fname;
|
||||
|
||||
if (!external)
|
||||
{
|
||||
file_path = golem_path;
|
||||
file_path.add(fname.name());
|
||||
}
|
||||
if (file_path.exist())
|
||||
{
|
||||
if (!add_row_alleg(file_path, nprogr, paf2600f))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
allegati = doc.get(DOC_CARTACEI);
|
||||
|
||||
if (allegati.full())
|
||||
{
|
||||
if (_def_fld.empty())
|
||||
{
|
||||
TString msgerr; msgerr << "Errore: il documento " << _bfatt << " ha degli allegati ma nella configurazione non stato impostato come trametterli\nCaricare il documento senza allegati?";
|
||||
load_allegati = false;
|
||||
if (!yesno_box(msgerr))
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
TFilename fname;
|
||||
FOR_EACH_TOKEN(allegati, row)
|
||||
{
|
||||
TToken_string entry(row);
|
||||
const bool external = entry.get_bool(2);
|
||||
|
||||
if (entry.get(0, fname))
|
||||
{
|
||||
TFilename file_path = fname;
|
||||
|
||||
if (!external)
|
||||
{
|
||||
file_path = golem_path;
|
||||
file_path.add(fname.name());
|
||||
}
|
||||
if (file_path.exist())
|
||||
{
|
||||
if (!add_row_alleg(file_path, nprogr, paf2600f))
|
||||
|
Loading…
x
Reference in New Issue
Block a user