Patch level : 11.0
Files correlati : ve1.exe Ricompilazione Demo : [ ] Commento : Corretta stampa fattura combiante con invio per email. A volte i font cambiavano le dimensioni del 20%, infatti: Risoluzione PDF = 720 DPI; Risoluzione stampa = 600 DPI; 720 / 600 = 1.20 git-svn-id: svn://10.65.10.50/branches/R_10_00@22075 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
95ad7491ae
commit
14031e74a1
@ -1156,10 +1156,10 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def
|
||||
if (docs <= 0)
|
||||
return false;
|
||||
|
||||
if (mode == out_signed_mail && !xvt_sign_start())
|
||||
if ((mode == out_signed_mail || mode == out_signed_pdf) && !xvt_sign_start())
|
||||
{
|
||||
if (yesno_box(TR("Si desidera generare comunque documenti non firmati?")))
|
||||
mode = out_mail;
|
||||
mode = TOutput_mode(mode-1);
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@ -1173,8 +1173,23 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def
|
||||
|
||||
bool attach_mail = mode==out_mail || mode==out_signed_mail;
|
||||
if (attach_mail && is_power_station())
|
||||
attach_mail = yesno_box(TR("Si desidera spedire veramente i documenti via mail?\n"
|
||||
{
|
||||
attach_mail =
|
||||
#ifdef DBG
|
||||
noyes_box
|
||||
#else
|
||||
yesno_box
|
||||
#endif
|
||||
(TR("Si desidera spedire veramente i documenti via mail?\n"
|
||||
"Rispondendo NO verranno solo salvati gli allegati."));
|
||||
}
|
||||
|
||||
const bool mail_requested = (mode == out_mail || mode == out_signed_mail);
|
||||
|
||||
for (short loop = mail_requested ? 0 : 1; loop < 2; loop++)
|
||||
{
|
||||
const bool mail_loop = (loop == 0);
|
||||
const bool print_loop = !mail_loop;
|
||||
|
||||
for (int i = 0; i < docs; i++)
|
||||
{
|
||||
@ -1200,7 +1215,8 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def
|
||||
doc.get(DOC_NDOC).as_int(), doc.get(DOC_TIPOCF).as_string()[0],
|
||||
doc.get(DOC_CODCF).as_int());
|
||||
|
||||
const bool send_mail = ( mode == out_mail || mode == out_signed_mail) && get_mail_address().full();
|
||||
// const bool send_mail = ( mode == out_mail || mode == out_signed_mail) && get_mail_address().full();
|
||||
const bool send_mail = mail_requested && get_mail_address().full();
|
||||
const bool paperless = send_mail || mode == out_pdf || mode == out_signed_pdf;
|
||||
|
||||
// Tenta di costruirsi il nome del report: se non stampo su carta cerco di usare un profilo con sfondo
|
||||
@ -1221,6 +1237,8 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def
|
||||
|
||||
TReport_doc& report = reports.get(profilo);
|
||||
if (send_mail)
|
||||
{
|
||||
if (mail_loop)
|
||||
{
|
||||
mail_book = new TDoc_book;
|
||||
if (!report.print(doc, *mail_book, is_definitive, 1, true, false, false)) // Non archiviare per ora...
|
||||
@ -1233,13 +1251,17 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def
|
||||
<< TR(" del ") << doc.get(DOC_DATADOC) << TR(" a ") << get_mail_address();
|
||||
mail_log.log(0, mesg);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (print_loop)
|
||||
{
|
||||
if (!report.print(doc, book, is_definitive, copies, true, arc, signature))
|
||||
break;
|
||||
if (!paperless)
|
||||
print_extra_copies(report, doc, book, copies);
|
||||
}
|
||||
}
|
||||
} //if(profilo.custom_path()...
|
||||
else
|
||||
{
|
||||
@ -1263,14 +1285,20 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def
|
||||
}
|
||||
// Il flag di definitivo deve essere false altrimenti riaggiorna lo stato e ristampa i documenti allegati
|
||||
if (send_mail)
|
||||
{
|
||||
if (mail_loop)
|
||||
allegato.print(doc, *mail_book, false, 1, false, false, false); // Non archivio gli allegati alla mail
|
||||
}
|
||||
else
|
||||
{
|
||||
if (print_loop)
|
||||
{
|
||||
allegato.print(doc, book, false, copies, false, arc, signature);
|
||||
if (!paperless)
|
||||
print_extra_copies(allegato, doc, book, copies);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mail_book != NULL)
|
||||
{
|
||||
@ -1300,6 +1328,7 @@ bool TReport_doc_app::print_loop(TRecordset& doc, TOutput_mode mode, bool is_def
|
||||
mail_book = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (book.pages() > 0)
|
||||
{
|
||||
|
@ -3623,15 +3623,9 @@ bool TDocumento_mask::print_handler( TMask_field& f, KEY key )
|
||||
{
|
||||
switch (f.dlg())
|
||||
{
|
||||
case DLG_EMAIL :
|
||||
app().mailto();
|
||||
break;
|
||||
case DLG_PREVIEW :
|
||||
app().preview();
|
||||
break;
|
||||
default :
|
||||
app().print();
|
||||
break;
|
||||
case DLG_EMAIL : app().mailto(); break;
|
||||
case DLG_PREVIEW : app().preview(); break;
|
||||
default : app().print(); break;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
Loading…
x
Reference in New Issue
Block a user