Solleciti via mail
git-svn-id: svn://10.65.10.50/branches/R_10_00@22836 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
15fd4130ae
commit
25e42a7868
@ -226,15 +226,18 @@ bool TStampaSol_application::get_next_mail(TToken_string& to, TToken_string& cc,
|
|||||||
|
|
||||||
if (ok)
|
if (ok)
|
||||||
{
|
{
|
||||||
|
const TRectype& clifo = form().cursor()->curr();
|
||||||
const TDate oggi = mask().get(F_DATASEND);
|
const TDate oggi = mask().get(F_DATASEND);
|
||||||
subj << TR("Sollecito ") << prefix().firm().ragione_sociale();
|
|
||||||
|
subj << TR("Sollecito ") << prefix().firm().ragione_sociale();
|
||||||
|
text << "Spett. " << clifo.get(CLI_RAGSOC) << '\n';
|
||||||
text << TR("Si sollecita il rispetto delle scadenze aperte al ") << oggi << TR(" riepilogate nel file ") << attach
|
text << TR("Si sollecita il rispetto delle scadenze aperte al ") << oggi << TR(" riepilogate nel file ") << attach
|
||||||
<< "\n" << prefix().firm().ragione_sociale();
|
<< "\n" << prefix().firm().ragione_sociale();
|
||||||
if (to.full())
|
if (to.full())
|
||||||
ui &= ~0x1; // No user interface
|
ui &= ~0x1; // No user interface
|
||||||
ui |= 0x2; // Query receipt
|
ui |= 0x2; // Query receipt
|
||||||
|
|
||||||
const long codcf = form().cursor()->curr().get_long(CLI_CODCF);
|
const long codcf = clifo.get_long(CLI_CODCF);
|
||||||
TFilename pdf;
|
TFilename pdf;
|
||||||
ok = get_next_pdf(oggi.year(), -1, "SOLL", oggi.date2ansi(), codcf, pdf);
|
ok = get_next_pdf(oggi.year(), -1, "SOLL", oggi.date2ansi(), codcf, pdf);
|
||||||
attach = pdf;
|
attach = pdf;
|
||||||
@ -334,16 +337,32 @@ bool TStampaSol_application::mail_selected()
|
|||||||
|
|
||||||
log.preview();
|
log.preview();
|
||||||
|
|
||||||
if (!mail.empty() && yesno_box(FR("Confermare l'invio di %ld mail?"), mail.items()))
|
if (!mail.empty())
|
||||||
{
|
{
|
||||||
FOR_EACH_ARRAY_ITEM(mail, r,obj)
|
TArray_sheet sheet(-1, -1, 78, 20, TR("Mail"), HR("@1|Destinatario@32|Messaggio@50"), 0, 1);
|
||||||
|
FOR_EACH_ARRAY_ITEM(mail, r, obj)
|
||||||
{
|
{
|
||||||
const TMail_message& m = *(TMail_message*)obj;
|
const TMail_message& m = *(TMail_message*)obj;
|
||||||
xvt_mail_send(m._to, m._cc, m._ccn, m._subj, m._text, m._attach, m._ui);
|
TToken_string* row = new TToken_string;
|
||||||
|
*row = "X";
|
||||||
|
row->add(m._to);
|
||||||
|
row->add(m._text.before('\n'));
|
||||||
|
sheet.add(row);
|
||||||
|
}
|
||||||
|
if (sheet.run() == K_ENTER)
|
||||||
|
{
|
||||||
|
const long m = sheet.checked();
|
||||||
|
if (m > 0 && yesno_box(FR("Confermare l'invio di %ld mail?"), m))
|
||||||
|
{
|
||||||
|
FOR_EACH_CHECKED_ROW(sheet, r, row)
|
||||||
|
{
|
||||||
|
const TMail_message& m = (const TMail_message&)mail[r];
|
||||||
|
xvt_mail_send(m._to, m._cc, m._ccn, m._subj, m._text, m._attach, m._ui);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user