Patch level : 12.0 no-patch
Files correlati : fp Commento : Vincolato al modulo RS l'esportazione della fattura nell'XML
This commit is contained in:
parent
f4eda260e8
commit
eeec3674ff
@ -76,6 +76,7 @@ BOOLEAN F_ESPORTADOC
|
|||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 12 "Allega pdf documento nell'XML"
|
PROMPT 2 12 "Allega pdf documento nell'XML"
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
|
MODULE RS
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_FLDDEST 300 50
|
STRING F_FLDDEST 300 50
|
||||||
|
@ -1425,43 +1425,33 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
|||||||
remove(paf2600f); // Cancella eventuali allegati
|
remove(paf2600f); // Cancella eventuali allegati
|
||||||
long nprogr = 0; // Numero di file allegati
|
long nprogr = 0; // Numero di file allegati
|
||||||
// Se abilitato stampo il documento e lo allego
|
// Se abilitato stampo il documento e lo allego
|
||||||
if (_allegafattura)
|
TFilename rep;
|
||||||
|
if (_allegafattura && dongle().active(RSAUT) && doc.tipo().main_print_profile(rep, 2))
|
||||||
{
|
{
|
||||||
//ve1 - 2 FPA 2017 D 202 P D / uADMIN
|
//ve1 -2 {CODNUM} {ANNO} {PROVV} {NDOC}(-{ANDOC}) {TIPO_ELABORAZIONE} {TIPO_STAMPA}
|
||||||
TFilename rep;
|
|
||||||
int filter = dongle().active(RSAUT) ? 2 : 1;
|
|
||||||
while (filter > 0 && !doc.tipo().main_print_profile(rep, filter))
|
|
||||||
filter--;
|
|
||||||
if (filter > 0)
|
|
||||||
{
|
|
||||||
// Costruisco la chiamata
|
|
||||||
TString commandline = "ve1 -";
|
|
||||||
if (filter == 2)
|
|
||||||
commandline << 2; // Esiste il nuovo report :-)
|
|
||||||
else
|
|
||||||
commandline << 0; // Esiste il vecchio form :-(
|
|
||||||
|
|
||||||
commandline << ' ' << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO)
|
// Costruisco la chiamata
|
||||||
<< ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC) << " X P"; // X: stampa su disco, P: provvisorio
|
static TString commandline;
|
||||||
TExternal_app interattivo(commandline);
|
commandline.cut(0) << "ve1 -2 " << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO)
|
||||||
if (interattivo.run() != NOERR)
|
<< ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC) << " X P"; // X: stampa su disco, P: provvisorio
|
||||||
|
TExternal_app interattivo(commandline);
|
||||||
|
if (interattivo.run() != NOERR)
|
||||||
|
{
|
||||||
|
TString msgerr = "Fallita generazione PDF documento ";
|
||||||
|
msgerr << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO)
|
||||||
|
<< ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC);
|
||||||
|
error_box(msgerr);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
TFilename pdf; pdf.tempdir();
|
||||||
|
pdf << SLASH << doc.get(DOC_ANNO) << '_' << doc.get(DOC_CODNUM) << '_' << doc.get(DOC_NDOC) << ".pdf";
|
||||||
|
if (!pdf.exist() && !yesno_box("Attenzione! Non è stato possibile creare il pdf, continuare?"))
|
||||||
{
|
{
|
||||||
TString msgerr = "Fallita generazione PDF documento ";
|
return false;
|
||||||
msgerr << doc.get(DOC_CODNUM) << ' ' << doc.get(DOC_ANNO)
|
|
||||||
<< ' ' << doc.get(DOC_PROVV) << ' ' << doc.get(DOC_NDOC);
|
|
||||||
error_box(msgerr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
TFilename pdf; pdf.tempdir();
|
|
||||||
pdf << SLASH << doc.get(DOC_ANNO) << '_' << doc.get(DOC_CODNUM) << '_' << doc.get(DOC_NDOC) << ".pdf";
|
|
||||||
if (!pdf.exist() && !yesno_box("Attenzione! Non è stato possibile creare il pdf, continuare?"))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (!add_row_alleg(pdf, nprogr, paf2600f))
|
|
||||||
return false;
|
|
||||||
}
|
}
|
||||||
|
if (!add_row_alleg(pdf, nprogr, paf2600f))
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user