Patch level : 12.0 1052

Files correlati     : 777.exe 777200c.msk
Commento        :

Aggiunto messaggio opzionale
This commit is contained in:
Alessandro Bonazzi 2021-04-08 15:22:34 +02:00
parent e7102193b3
commit c97358844b
5 changed files with 23 additions and 7 deletions

View File

@ -1214,7 +1214,7 @@ bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
TString ragsoc = sh.get_str_row_cell(r, S_RAGSOC);
send_cu(perc, quality, simple, anno, tipoa, percip, email, m.get(F_CCNEMAIL), ragsoc,
m.get_bool(F_RECEIPT), m.get(F_TESTEMAIL).full(), log);
m.get_bool(F_RECEIPT), m.get(F_TESTEMAIL).full(), m.get(F_MESSAGE), log);
}
}
}
@ -1225,6 +1225,8 @@ bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
cantread_box(tmp);
if (log.rows() > 0)
log.print_or_preview();
reset(F_INVIATE);
reset(F_RESET);
return false; // don't close mask
}
break;
@ -1265,8 +1267,9 @@ void TCU_app::main_loop()
// Eseguo controllo adeguamento database 2017
isUpdated();
m.reset(F_RESET);
m.field(F_INVIATE).set_default("");
m.field(F_RESET).set_default("");
while (m.run() == K_ENTER)
{
const int anno = m.get_int(F_ANNO);
@ -1276,10 +1279,13 @@ void TCU_app::main_loop()
t.set_operazione(m.get(F_INVIO)[0], m.get(F_IDENTIFICATIVO));
TString query;
query.format("USE %d\nFROM CODDITTA=%ld\nTO CODDITTA=%ld",
LF_BASE, m.get_long(F_DADITTA), m.get_long(F_ADITTA));
TISAM_recordset cur_base(query);
const TRecnotype ditte = cur_base.items();
if (ditte > 0)
{
TLog_report log; log.kill_duplicates();

View File

@ -87,7 +87,8 @@ public:
void print_cu(const TFilename& datafile, int quality, bool simple);
void send_cu(TISAM_recordset& perc, int quality, bool syntetic, int anno, const char * tipoa, long percip,
const char * email, const char * ccnemail, const char * ragsoc, bool receipt, bool test, TLog_report & log);
const char * email, const char * ccnemail, const char * ragsoc, bool receipt, bool test,
const char * emailmsg, TLog_report & log);
void edit_cu(const TFilename& datafile, int quality, bool simple);
#endif

View File

@ -1,7 +1,8 @@
#define F_SHEET 201
#define F_CCNEMAIL 202
#define F_RECEIPT 203
#define F_TESTEMAIL 204
#define F_MESSAGE 204
#define F_TESTEMAIL 205
#define S_SELECTED 101
#define S_EMAIL 102

View File

@ -30,15 +30,20 @@ BEGIN
PROMPT 70 1 "Ricevuta"
END
ZOOM F_MESSAGE 50
BEGIN
PROMPT 1 2 "Messaggio "
END
STRING F_TESTEMAIL 50
BEGIN
PROMPT 1 2 "Email prova "
PROMPT 1 3 "Email prova "
FLAGS "H"
END
SPREADSHEET F_SHEET -1 -1
BEGIN
PROMPT 0 4 ""
PROMPT 0 6 ""
ITEM "@1"
ITEM "Email@50"
ITEM "Tipo"

View File

@ -927,7 +927,8 @@ void print_cu(const TFilename& datafile, int quality, bool syntetic)
}
void send_cu(TISAM_recordset& perc, int quality, bool syntetic, int anno, const char * tipoa, long percip,
const char * email, const char * ccnemail, const char * ragsoc, bool receipt, bool test, TLog_report & log)
const char * email, const char * ccnemail, const char * ragsoc, bool receipt, bool test,
const char * emailmsg, TLog_report & log)
{
TCU_report cur(quality, syntetic, true);
TFilename datafile;
@ -963,6 +964,8 @@ void send_cu(TISAM_recordset& perc, int quality, bool syntetic, int anno, const
subj << anno + 1;
message << anno + 1 << " di " << ragsoc << " (" << email << ")";
if (emailmsg && *emailmsg)
message << '\n' << emailmsg << '.';
msg << email;
if (!send_mail(to, cc, ccn, subj, message, attachment, false, receipt))
msg << " non ";