Patch level : 12.00 1398
Files correlati : ve01.exe ve11.exe fp01.exe cg021.exe Commento : Invio con FePA
This commit is contained in:
parent
f78c0c2121
commit
188d2f1b2b
@ -1190,7 +1190,7 @@ protected:
|
|||||||
TOutput_mode key2mode(KEY k) const;
|
TOutput_mode key2mode(KEY k) const;
|
||||||
|
|
||||||
void set_next_pdf(const TRecordset* doc);
|
void set_next_pdf(const TRecordset* doc);
|
||||||
virtual bool get_next_pdf(int anno, long ditta, const char* codnum, long numdoc, long codcf, TFilename& pdf) const;
|
virtual bool get_next_pdf(int anno, long ditta, const char* codnum, long numdoc, long codcf, TFilename& pdf) const override;
|
||||||
bool get_mail_address(TToken_string& to, TToken_string& cc) const;
|
bool get_mail_address(TToken_string& to, TToken_string& cc) const;
|
||||||
virtual bool get_next_mail(TToken_string& to, TToken_string& cc, TToken_string& ccn,
|
virtual bool get_next_mail(TToken_string& to, TToken_string& cc, TToken_string& ccn,
|
||||||
TString& subj, TString& text, TToken_string& attach, short& ui) const ;
|
TString& subj, TString& text, TToken_string& attach, short& ui) const ;
|
||||||
@ -1483,7 +1483,7 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool final_
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Controllo se devo archiviare in base ai parametri passati
|
// Controllo se devo archiviare in base ai parametri passati
|
||||||
arc = (_arc_type == _force || _arc_type == _auto) && arc;
|
arc = (_arc_type == _force) || (_arc_type == _auto && arc);
|
||||||
|
|
||||||
set_next_pdf(&doc);
|
set_next_pdf(&doc);
|
||||||
|
|
||||||
@ -1740,6 +1740,7 @@ void TReport_doc_app::main_loop()
|
|||||||
// Chiamata: ve1 -2 {CODNUM} {ANNO} {PROVV} {NDOC}(-{ANDOC}) {TIPO_ELABORAZIONE} {TIPO_STAMPA} {NUM_COPIE} {ARCHIVIAZIONE}
|
// Chiamata: ve1 -2 {CODNUM} {ANNO} {PROVV} {NDOC}(-{ANDOC}) {TIPO_ELABORAZIONE} {TIPO_STAMPA} {NUM_COPIE} {ARCHIVIAZIONE}
|
||||||
|
|
||||||
const int a = argc();
|
const int a = argc();
|
||||||
|
|
||||||
if (a > 2)
|
if (a > 2)
|
||||||
{
|
{
|
||||||
const TFixed_string arg = argv(2);
|
const TFixed_string arg = argv(2);
|
||||||
@ -1790,6 +1791,7 @@ void TReport_doc_app::main_loop()
|
|||||||
if(a > 9)
|
if(a > 9)
|
||||||
{
|
{
|
||||||
const TString arc_type = argv(9);
|
const TString arc_type = argv(9);
|
||||||
|
|
||||||
if(arc_type == "A")
|
if(arc_type == "A")
|
||||||
{
|
{
|
||||||
_arc_type = _auto;
|
_arc_type = _auto;
|
||||||
|
@ -2251,29 +2251,18 @@ bool TDocumento::add_allegati(TXmlItem & body)
|
|||||||
// Costruisco la chiamata
|
// Costruisco la chiamata
|
||||||
TString commandline = "ve011 -2 ";
|
TString commandline = "ve011 -2 ";
|
||||||
|
|
||||||
commandline << get(DOC_CODNUM) << ' ' << get(DOC_ANNO) << ' ' << get(DOC_PROVV) << ' ' << get(DOC_NDOC) << " X P 1 D"; // X: stampa su disco, P: provvisorio, 1: 1 copia, D: disabilita archiviazione
|
commandline << get(DOC_CODNUM) << ' ' << get(DOC_ANNO) << ' ' << get(DOC_PROVV) << ' ' << get(DOC_NDOC) << " X P 1 D"; // X: stampa su disco, P: provvisorio, 1: 1 copia, D: non archivia
|
||||||
|
|
||||||
TExternal_app interattivo(commandline);
|
TExternal_app interattivo(commandline);
|
||||||
|
|
||||||
#ifdef DBG
|
interattivo.run();
|
||||||
interattivo.run(); // non terminano in debug da sistemare
|
|
||||||
#else
|
TFilename pdf; pdf.tempdir();
|
||||||
if (interattivo.run() != NOERR)
|
|
||||||
|
|
||||||
{
|
|
||||||
TString msgerr = "Fallita generazione PDF documento ";
|
|
||||||
msgerr << get(DOC_CODNUM) << ' ' << get(DOC_ANNO) << ' ' << get(DOC_PROVV) << ' ' << get(DOC_NDOC);
|
|
||||||
error_box(msgerr);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
TFilename pdf; pdf.tempdir();
|
|
||||||
pdf << SLASH << get(DOC_ANNO) << '_' << get(DOC_CODNUM) << '_' << get(DOC_NDOC) << ".pdf";
|
pdf << SLASH << get(DOC_ANNO) << '_' << get(DOC_CODNUM) << '_' << get(DOC_NDOC) << ".pdf";
|
||||||
if (!pdf.exist() && !yesno_box("Attenzione! Non stato possibile creare il pdf, continuare?"))
|
if (!pdf.exist() && !yesno_box("Attenzione! Non stato possibile creare il pdf, continuare?"))
|
||||||
return false;
|
return false;
|
||||||
add_allegato(body, pdf, "Fattura di cortesia");
|
add_allegato(body, pdf, "Fattura di cortesia");
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user