Patch level : 01.00 1370

Files correlati     : ba0.exe ba0100m.msk sc2.exe sc2100b.msk sc2400b.msk
Commento:
Invio solleciti per email
This commit is contained in:
Alessandro Bonazzi 2024-11-21 15:29:36 +01:00
parent ad94717a90
commit e555a3b76e

View File

@ -1640,7 +1640,7 @@ int TSelection_mask::send_doc(long codice, const TString & ragsoc, const TToken_
TToken_string to(email, ';'), attachment("", ';');
TString esito("Invio a ");
TString subject(subj);
TString message(msg);
TString message;
TString stat("Invio a ");
stat << ' ' << ragsoc;
@ -1657,16 +1657,30 @@ int TSelection_mask::send_doc(long codice, const TString & ragsoc, const TToken_
if (subject.blank())
subject << (sollecito ? TR("Sollecito da ") : TR("Estratto conto da "));
subject << ' ' << prefix().firm().ragione_sociale();
if (message.blank())
TToken_string key;
key.add(who());
key.add(codice);
const TString & tipo = cache().get(LF_CLIFO, key, CLI_TIPOPERS);
if (tipo == "G")
message << "Spett. ";
else
message << "Gent.mo/a ";
message << ragsoc << '\n';
if (msg.full())
message << msg << '\n';
else
{
message << "Spett. " << ragsoc << '\n';
if (sollecito)
message << TR("Si ricorda il rispetto delle scadenze aperte al ") << data << '\n'
<< TR(" riepilogate nel file allegato ") << '\n';
else
message << TR("Si invia in allegato lestratto conto delle partite aperte al ") << data
<< TR(" con preghiera di provvedere al saldo quanto prima.") << '\n';
else
message << TR("Invio estratto conto al ") << data << TR(" nel file allegato ") << '\n';
// message << prefix().firm().ragione_sociale();
}
message << TR("Cordiali saluti\nAmministrazione ") << prefix().firm().ragione_sociale();
pdf.temp("cu", "pdf");
attachment.add(pdf);
pr.set_export_file(pdf, true);
@ -1893,11 +1907,25 @@ bool TSelection_mask::on_field_event(TOperable_field& o, TField_event e, long jo
TString ragsoc = cli.get(CLI_RAGSOC);
TToken_string email;
email = cli.get(CLI_PEC);
if (email.blank())
email = cli.get(CLI_MAIL);
if (email.blank())
email = cli.get(CLI_DOCMAIL);
for (int i = 1; email.blank() && i <= 3; i++)
{
const char order = ini_get_string(CONFIG_USER, "Mail", "Email", "", i)[0];
switch (order)
{
case 'P':
email = cli.get(CLI_PEC);
break;
case 'N':
email = cli.get(CLI_MAIL);
break;
case 'D':
email = cli.get(CLI_DOCMAIL);
break;
default:
break;
}
}
const int nrow = sh.set_row_cell(S_SELECTED, email.full());