Patch level : 12.0 1050
Files correlati : 777.exe 777200a.msk Commento : Corretti dati anagrafici inviante
This commit is contained in:
parent
19f3713235
commit
d20ecc0607
@ -650,6 +650,7 @@ bool TTrasferimentoCU::append_record_d(const TRectype& qla, TLog_report& log)
|
|||||||
rec.set(11, false); // Conferma singola certificazione
|
rec.set(11, false); // Conferma singola certificazione
|
||||||
|
|
||||||
const TAnagrafica sost(LF_NDITTE, _cod_ditta);
|
const TAnagrafica sost(LF_NDITTE, _cod_ditta);
|
||||||
|
|
||||||
rec.np_put("DA001001", cod_fis_dic());
|
rec.np_put("DA001001", cod_fis_dic());
|
||||||
if (sost.fisica())
|
if (sost.fisica())
|
||||||
{
|
{
|
||||||
@ -1073,32 +1074,37 @@ public:
|
|||||||
|
|
||||||
void TCU_mask::fill_row(TMask & m, const char * tipoa, long percip)
|
void TCU_mask::fill_row(TMask & m, const char * tipoa, long percip)
|
||||||
{
|
{
|
||||||
TSheet_field & sh = m.sfield(F_SHEET);
|
const bool da_inviare = !ini_get_bool(CONFIG_DITTA, "CU", format("%1s%6ld", tipoa, percip));
|
||||||
const int nrow = sh.set_row_cell(S_SELECTED, !ini_get_bool(CONFIG_DITTA, "CU", format("%1s%6ld", tipoa, percip)));
|
|
||||||
|
|
||||||
sh.set_row_cell(S_TIPOA, tipoa, nrow);
|
if (da_inviare || get_bool(F_INVIATE))
|
||||||
sh.set_row_cell(S_CODANAGR, percip, nrow);
|
{
|
||||||
|
TSheet_field & sh = m.sfield(F_SHEET);
|
||||||
|
const int nrow = sh.set_row_cell(S_SELECTED, da_inviare);
|
||||||
|
|
||||||
TToken_string key(tipoa);
|
sh.set_row_cell(S_TIPOA, tipoa, nrow);
|
||||||
TString email;
|
sh.set_row_cell(S_CODANAGR, percip, nrow);
|
||||||
|
|
||||||
key.add(percip);
|
TToken_string key(tipoa);
|
||||||
|
TString email;
|
||||||
|
|
||||||
const TRectype & cli = cache().get(LF_CLIFO, key, 7);
|
key.add(percip);
|
||||||
|
|
||||||
email = cli.get(CLI_PEC);
|
const TRectype & cli = cache().get(LF_CLIFO, key, 7);
|
||||||
if (email.blank())
|
|
||||||
email = cli.get(CLI_MAIL);
|
|
||||||
if (email.blank())
|
|
||||||
email = cli.get(CLI_DOCMAIL);
|
|
||||||
if (email.blank())
|
|
||||||
sh.set_row_cell(S_SELECTED, false, nrow);
|
|
||||||
sh.set_row_cell(S_EMAIL, email, nrow);
|
|
||||||
|
|
||||||
TString ragsoc = cache().get(LF_ANAG, key, ANA_RAGSOC);
|
email = cli.get(CLI_PEC);
|
||||||
|
if (email.blank())
|
||||||
|
email = cli.get(CLI_MAIL);
|
||||||
|
if (email.blank())
|
||||||
|
email = cli.get(CLI_DOCMAIL);
|
||||||
|
if (email.blank())
|
||||||
|
sh.set_row_cell(S_SELECTED, false, nrow);
|
||||||
|
sh.set_row_cell(S_EMAIL, email, nrow);
|
||||||
|
|
||||||
ragsoc.strip_double_spaces();
|
TString ragsoc = cache().get(LF_ANAG, key, ANA_RAGSOC);
|
||||||
sh.set_row_cell(S_RAGSOC, ragsoc, nrow);
|
|
||||||
|
ragsoc.strip_double_spaces();
|
||||||
|
sh.set_row_cell(S_RAGSOC, ragsoc, nrow);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
||||||
@ -1143,7 +1149,7 @@ bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
{
|
{
|
||||||
TFilename tmp = get(F_PATH);
|
TFilename tmp = get(F_PATH);
|
||||||
TLog_report log("Invio certificazione unica");
|
TLog_report log("Invio certificazione unica");
|
||||||
|
|
||||||
tmp.add(CU_DEFAULT_NAME);
|
tmp.add(CU_DEFAULT_NAME);
|
||||||
if (tmp.exist())
|
if (tmp.exist())
|
||||||
{
|
{
|
||||||
@ -1157,11 +1163,13 @@ bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
TString email;
|
TString email;
|
||||||
TString4 tipoa;
|
TString4 tipoa;
|
||||||
long percip;
|
long percip;
|
||||||
|
const long save_ditta = main_app().get_firm();
|
||||||
|
|
||||||
for (long codditta = daditta; codditta <= aditta; codditta++)
|
for (long codditta = daditta; codditta <= aditta; codditta++)
|
||||||
{
|
{
|
||||||
TString query;
|
TString query;
|
||||||
|
|
||||||
|
main_app().set_firm(codditta);
|
||||||
query.format("USE %d SELECT (ANNO=%d)\nBY TIPOA CODANAGR CAUSALE\nFROM CODDITTA=%ld\nTO CODDITTA=%ld",
|
query.format("USE %d SELECT (ANNO=%d)\nBY TIPOA CODANAGR CAUSALE\nFROM CODDITTA=%ld\nTO CODDITTA=%ld",
|
||||||
LF_QUALA, anno, codditta, codditta);
|
LF_QUALA, anno, codditta, codditta);
|
||||||
|
|
||||||
@ -1178,6 +1186,8 @@ bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
{
|
{
|
||||||
last_tipoa = tipoa;
|
last_tipoa = tipoa;
|
||||||
last_percip = percip;
|
last_percip = percip;
|
||||||
|
if (get_bool(F_RESET))
|
||||||
|
ini_set_bool(CONFIG_DITTA, "CU", format("%1s%6ld", (const char *)tipoa, percip), false);
|
||||||
fill_row(m, tipoa, percip);
|
fill_row(m, tipoa, percip);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1186,6 +1196,7 @@ bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
if (m.run() == K_ENTER)
|
if (m.run() == K_ENTER)
|
||||||
{
|
{
|
||||||
set_test_mail(m.get(F_TESTEMAIL));
|
set_test_mail(m.get(F_TESTEMAIL));
|
||||||
|
|
||||||
FOR_EACH_SHEET_ITEM(sh, r)
|
FOR_EACH_SHEET_ITEM(sh, r)
|
||||||
{
|
{
|
||||||
if (sh.get_bool_row_cell(r, S_SELECTED))
|
if (sh.get_bool_row_cell(r, S_SELECTED))
|
||||||
@ -1202,11 +1213,13 @@ bool TCU_mask::on_field_event(TOperable_field& o, TField_event e, long jolly)
|
|||||||
TISAM_recordset perc(query);
|
TISAM_recordset perc(query);
|
||||||
TString ragsoc = sh.get_str_row_cell(r, S_RAGSOC);
|
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), log);
|
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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
main_app().set_firm(save_ditta);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
cantread_box(tmp);
|
cantread_box(tmp);
|
||||||
@ -1252,6 +1265,7 @@ void TCU_app::main_loop()
|
|||||||
|
|
||||||
// Eseguo controllo adeguamento database 2017
|
// Eseguo controllo adeguamento database 2017
|
||||||
isUpdated();
|
isUpdated();
|
||||||
|
m.reset(F_RESET);
|
||||||
|
|
||||||
while (m.run() == K_ENTER)
|
while (m.run() == K_ENTER)
|
||||||
{
|
{
|
||||||
|
@ -87,7 +87,7 @@ public:
|
|||||||
|
|
||||||
void print_cu(const TFilename& datafile, int quality, bool simple);
|
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,
|
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, TLog_report & log);
|
const char * email, const char * ccnemail, const char * ragsoc, bool receipt, bool test, TLog_report & log);
|
||||||
void edit_cu(const TFilename& datafile, int quality, bool simple);
|
void edit_cu(const TFilename& datafile, int quality, bool simple);
|
||||||
|
|
||||||
#endif
|
#endif
|
@ -9,7 +9,9 @@
|
|||||||
|
|
||||||
#define F_INVIO 115
|
#define F_INVIO 115
|
||||||
#define F_IDENTIFICATIVO 116
|
#define F_IDENTIFICATIVO 116
|
||||||
|
#define F_INVIATE 117
|
||||||
|
#define F_RESET 118
|
||||||
|
|
||||||
#define F_INTER_CODFIS 120
|
#define F_INTER_CODFIS 120
|
||||||
#define F_INTER_RAGSOC 121
|
#define F_INTER_RAGSOC 121
|
||||||
#define F_INTER_DATA 122
|
#define F_INTER_DATA 122
|
||||||
|
@ -130,7 +130,7 @@ BEGIN
|
|||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 3
|
GROUPBOX DLG_NULL 78 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 11 "@bParametri di stampa"
|
PROMPT 1 11 "@bParametri di stampa"
|
||||||
END
|
END
|
||||||
@ -145,14 +145,25 @@ BEGIN
|
|||||||
PROMPT 42 12 "Modello sintetico"
|
PROMPT 42 12 "Modello sintetico"
|
||||||
END
|
END
|
||||||
|
|
||||||
|
BOOLEAN F_INVIATE
|
||||||
|
BEGIN
|
||||||
|
PROMPT 2 13 "Visualizza le certificazioni inviate"
|
||||||
|
END
|
||||||
|
|
||||||
|
|
||||||
|
BOOLEAN F_RESET
|
||||||
|
BEGIN
|
||||||
|
PROMPT 42 13 "Azzera Invio"
|
||||||
|
END
|
||||||
|
|
||||||
GROUPBOX DLG_NULL 78 4
|
GROUPBOX DLG_NULL 78 4
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 14 "@bParametri di invio"
|
PROMPT 1 15 "@bParametri di invio"
|
||||||
END
|
END
|
||||||
|
|
||||||
LIST F_INVIO 1 12
|
LIST F_INVIO 1 12
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 15 "Tipo operazione "
|
PROMPT 2 16 "Tipo operazione "
|
||||||
ITEM " |Normale" MESSAGE DISABLE,F_IDENTIFICATIVO
|
ITEM " |Normale" MESSAGE DISABLE,F_IDENTIFICATIVO
|
||||||
ITEM "A|Annullamento" MESSAGE ENABLE,F_IDENTIFICATIVO
|
ITEM "A|Annullamento" MESSAGE ENABLE,F_IDENTIFICATIVO
|
||||||
ITEM "S|Sostituzione" MESSAGE ENABLE,F_IDENTIFICATIVO
|
ITEM "S|Sostituzione" MESSAGE ENABLE,F_IDENTIFICATIVO
|
||||||
@ -160,7 +171,7 @@ END
|
|||||||
|
|
||||||
STRING F_IDENTIFICATIVO 17
|
STRING F_IDENTIFICATIVO 17
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 2 16 "Identificativo invio "
|
PROMPT 2 17 "Identificativo invio "
|
||||||
FLAGS "RZ"
|
FLAGS "RZ"
|
||||||
CHECKTYPE REQUIRED
|
CHECKTYPE REQUIRED
|
||||||
END
|
END
|
||||||
|
@ -1,7 +1,9 @@
|
|||||||
#include "777200.h"
|
#include "777200.h"
|
||||||
|
#include <applicat.h>
|
||||||
#include <automask.h>
|
#include <automask.h>
|
||||||
#include <config.h>
|
#include <config.h>
|
||||||
#include <reprint.h>
|
#include <reprint.h>
|
||||||
|
#include <recarray.h>
|
||||||
|
|
||||||
#include <colors.h>
|
#include <colors.h>
|
||||||
#include <isam.h>
|
#include <isam.h>
|
||||||
@ -924,7 +926,8 @@ void print_cu(const TFilename& datafile, int quality, bool syntetic)
|
|||||||
xvtil_statbar_set(NULL);
|
xvtil_statbar_set(NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
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, TLog_report & log)
|
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)
|
||||||
{
|
{
|
||||||
TCU_report cur(quality, syntetic, true);
|
TCU_report cur(quality, syntetic, true);
|
||||||
TFilename datafile;
|
TFilename datafile;
|
||||||
@ -938,7 +941,9 @@ void send_cu(TISAM_recordset& perc, int quality, bool syntetic, int anno, const
|
|||||||
pdf.temp("cu", "pdf");
|
pdf.temp("cu", "pdf");
|
||||||
{
|
{
|
||||||
TTrasferimentoCU t(datafile, 'w');
|
TTrasferimentoCU t(datafile, 'w');
|
||||||
|
const TRectype & base = cache().get(LF_BASE, format("|%ld", main_app().get_firm()));
|
||||||
|
|
||||||
|
t.read_codfis_dic(base);
|
||||||
for (bool ok = perc.move_first(); ok; ok = perc.move_next())
|
for (bool ok = perc.move_first(); ok; ok = perc.move_next())
|
||||||
{
|
{
|
||||||
t.append_record_d(rec, log);
|
t.append_record_d(rec, log);
|
||||||
@ -962,7 +967,8 @@ void send_cu(TISAM_recordset& perc, int quality, bool syntetic, int anno, const
|
|||||||
if (!send_mail(to, cc, ccn, subj, message, attachment, false, receipt))
|
if (!send_mail(to, cc, ccn, subj, message, attachment, false, receipt))
|
||||||
msg << " non ";
|
msg << " non ";
|
||||||
else
|
else
|
||||||
ini_set_bool(CONFIG_DITTA, "CU", format("%1s%6ld", (const char *)tipoa, percip), true);
|
if (!test && to.full())
|
||||||
|
ini_set_bool(CONFIG_DITTA, "CU", format("%1s%6ld", (const char *)tipoa, percip), true);
|
||||||
msg << " riuscito";
|
msg << " riuscito";
|
||||||
log.log(0, msg);
|
log.log(0, msg);
|
||||||
xvtil_statbar_set(NULL);
|
xvtil_statbar_set(NULL);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user