Miglioramenti vari postino e report
git-svn-id: svn://10.65.10.50/branches/R_10_00@22899 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
07764a97e8
commit
56722f3773
@ -986,7 +986,7 @@ void TMenu_application::test_temp()
|
|||||||
TFilename dir; dir.tempdir(); // Directory temporanea
|
TFilename dir; dir.tempdir(); // Directory temporanea
|
||||||
dir.add("*");
|
dir.add("*");
|
||||||
TString_array files;
|
TString_array files;
|
||||||
const int count = list_files(dir, files);
|
const int count = ::list_files(dir, files);
|
||||||
|
|
||||||
if (count > 0 && yesno_box(TR("Cancellare tutti i file temporanei in %s?"), dir.path()))
|
if (count > 0 && yesno_box(TR("Cancellare tutti i file temporanei in %s?"), dir.path()))
|
||||||
{
|
{
|
||||||
|
@ -376,15 +376,15 @@ int TInstaller_mask::precheck_modules(bool only_newer)
|
|||||||
|
|
||||||
TString html;
|
TString html;
|
||||||
html << "<html><body>"
|
html << "<html><body>"
|
||||||
<< "<h5>Attenzione: chiave " << dongle().number() << " non riconosciuta.</h5>\n"
|
<< "<h5>Attenzione: chiave " << dongle().number() << " non riconosciuta.</h5>\n"
|
||||||
<< "<p align=justify>Al fine di poter riattivare la chiave <b>" << dongle().product().before(" ")
|
<< "<p align=justify>Al fine di poter riattivare la chiave <b>" << dongle().product().before(" ")
|
||||||
<< "</b> in oggetto e poter quindi effettuare il download di eventuali aggiornamenti software, "
|
<< "</b> in oggetto e poter quindi effettuare registrazioni, "
|
||||||
<< "La preghiamo di contattare Sirio informatica e sistemi ai seguenti riferimenti:</p><br/>"
|
<< "La preghiamo di contattare Sirio informatica e sistemi ai seguenti riferimenti:</p><br/>"
|
||||||
<< "<ul><li>Sara Coppini, segreteria commerciale: <br />"
|
<< "<ul><li>Sara Coppini, segreteria commerciale: <br />"
|
||||||
<< "<a href=mailto:scoppini@sirio-is.it>scoppini@sirio-is.it</a> Tel. 348-9897249</li>"
|
<< "<a href=mailto:scoppini@sirio-is.it>scoppini@sirio-is.it</a> Tel. 348-9897249</li>"
|
||||||
<< "<li>Morena Martini, responsabile commerciale canale: <br />"
|
<< "<li>Casella vocale Hotline Campo: <br />"
|
||||||
<< "<a href=mailto:mmartini@sirio-is.it>mmartini@sirio-is.it</a> Tel. 349-3421433</li></ul>"
|
<< "<a href=mailto:hotlinecampo@sirio-is.it>hotlinecampo@sirio-is.it</a> Tel. 02-36583540</li></ul>"
|
||||||
<< "</body></html>";
|
<< "</body></html>";
|
||||||
error_box(html);
|
error_box(html);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -57,6 +57,7 @@ int TOEM_cache::Agente2OEM(int agente) const
|
|||||||
switch (agente)
|
switch (agente)
|
||||||
{
|
{
|
||||||
case 2: oem = 0; break; // Aga
|
case 2: oem = 0; break; // Aga
|
||||||
|
case 3: oem = 3; break; // Geisoft
|
||||||
case 5: oem = 6; break; // Sipag -> Sicuri
|
case 5: oem = 6; break; // Sipag -> Sicuri
|
||||||
case 7: oem = 7; break; // Prassi Roma -> Itertec
|
case 7: oem = 7; break; // Prassi Roma -> Itertec
|
||||||
case 8: // Prassi Calabria
|
case 8: // Prassi Calabria
|
||||||
@ -64,6 +65,7 @@ int TOEM_cache::Agente2OEM(int agente) const
|
|||||||
case 10: oem = 6; break; // Socogem -> Sicuri
|
case 10: oem = 6; break; // Socogem -> Sicuri
|
||||||
case 11: oem = 7; break; // Itertec
|
case 11: oem = 7; break; // Itertec
|
||||||
case 13: oem = 2; break; // Tetractis
|
case 13: oem = 2; break; // Tetractis
|
||||||
|
case 14: oem = 9; break; // San Zeno informatica
|
||||||
default: oem = 1; break; // Sirio
|
default: oem = 1; break; // Sirio
|
||||||
}
|
}
|
||||||
return oem;
|
return oem;
|
||||||
@ -418,9 +420,6 @@ bool Tdninst_mask::load_odbc(TString_array& a) const
|
|||||||
r.add(_oem.Agente2OEM(agente), _c_dboem);
|
r.add(_oem.Agente2OEM(agente), _c_dboem);
|
||||||
r.add(smart_trim(att.get("RagioneSociale").as_string(), 50), _c_dbowner);
|
r.add(smart_trim(att.get("RagioneSociale").as_string(), 50), _c_dbowner);
|
||||||
|
|
||||||
if (atoi(r) == 5160)
|
|
||||||
int cazzone = 1;
|
|
||||||
|
|
||||||
TString16 kill;
|
TString16 kill;
|
||||||
TString16 stato = att.get("Stato").as_string();
|
TString16 stato = att.get("Stato").as_string();
|
||||||
if (stato[0] > 'A') // Non Attivo
|
if (stato[0] > 'A') // Non Attivo
|
||||||
@ -522,7 +521,7 @@ bool Tdninst_mask::load_xml(TString_array& a) const
|
|||||||
TString_array xml;
|
TString_array xml;
|
||||||
list_files(path, xml);
|
list_files(path, xml);
|
||||||
|
|
||||||
TString msg; msg.format(FR("Scansione cartella %s: %d files"), (const char*)path, xml.items());
|
TString msg; msg.format(FR("Scansione %s: %d files"), (const char*)path, xml.items());
|
||||||
TProgind pi(xml.items(), msg);
|
TProgind pi(xml.items(), msg);
|
||||||
TFilename fname, tmpname;
|
TFilename fname, tmpname;
|
||||||
TFilename tmpdir; tmpdir.tempdir(); tmpdir.add("www");
|
TFilename tmpdir; tmpdir.tempdir(); tmpdir.add("www");
|
||||||
@ -1073,9 +1072,10 @@ bool Tdninst_manager::create()
|
|||||||
return error_box(TR("Utente non abilitato"));
|
return error_box(TR("Utente non abilitato"));
|
||||||
|
|
||||||
const word n = dongle().number();
|
const word n = dongle().number();
|
||||||
// 8453 = Ilaria; 8517 = Sara; 8578 = Monica
|
// 8453 = Ilaria; 8517 = Sara
|
||||||
if (n != 8453 && n != 8517 && !is_power_station() &&
|
if (n != 8453 && n != 8517 && !is_power_station() &&
|
||||||
get_hostname().compare("nbkgiardini", -1, true) != 0)
|
get_hostname().compare("nbkgiardini", -1, true) != 0 &&
|
||||||
|
get_hostname().compare("pcpiccolow7", -1, true) != 0)
|
||||||
return error_box(TR("Postazione non abilitata"));
|
return error_box(TR("Postazione non abilitata"));
|
||||||
|
|
||||||
TSheet_field::set_line_number_width(4); // Numero di chiavette ~ 1000
|
TSheet_field::set_line_number_width(4); // Numero di chiavette ~ 1000
|
||||||
|
@ -170,9 +170,10 @@ BEGIN
|
|||||||
ITEM "3|Geisoft"
|
ITEM "3|Geisoft"
|
||||||
ITEM "4|Tetractis"
|
ITEM "4|Tetractis"
|
||||||
ITEM "5|Procom"
|
ITEM "5|Procom"
|
||||||
ITEM "6|Socogem"
|
ITEM "6|Sicuri"
|
||||||
ITEM "7|Itertec"
|
ITEM "7|Itertec"
|
||||||
ITEM "8|Metacalabria"
|
ITEM "8|Metacalabria"
|
||||||
|
ITEM "9|SanZeno"
|
||||||
END
|
END
|
||||||
|
|
||||||
TEXT DLG_NULL
|
TEXT DLG_NULL
|
||||||
@ -211,9 +212,10 @@ BEGIN
|
|||||||
ITEM "3|Geisoft"
|
ITEM "3|Geisoft"
|
||||||
ITEM "4|Tetractis"
|
ITEM "4|Tetractis"
|
||||||
ITEM "5|Procom"
|
ITEM "5|Procom"
|
||||||
ITEM "6|Socogem"
|
ITEM "6|Sicuri"
|
||||||
ITEM "7|Itertec"
|
ITEM "7|Itertec"
|
||||||
ITEM "8|Metacalabria"
|
ITEM "8|Metacalabria"
|
||||||
|
ITEM "9|SanZeno"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_DBOWNER 50
|
STRING F_DBOWNER 50
|
||||||
@ -244,6 +246,7 @@ BEGIN
|
|||||||
ITEM "6|Socogem"
|
ITEM "6|Socogem"
|
||||||
ITEM "7|Itertec"
|
ITEM "7|Itertec"
|
||||||
ITEM "8|Metacalabria"
|
ITEM "8|Metacalabria"
|
||||||
|
ITEM "9|SanZeno"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_ATOWNER 50
|
STRING F_ATOWNER 50
|
||||||
|
158
ba/ba7100.cpp
158
ba/ba7100.cpp
@ -7,6 +7,7 @@
|
|||||||
#include <expr.h>
|
#include <expr.h>
|
||||||
#include <golem.h>
|
#include <golem.h>
|
||||||
#include <netsock.h>
|
#include <netsock.h>
|
||||||
|
#include <progind.h>
|
||||||
#include <recarray.h>
|
#include <recarray.h>
|
||||||
#include <relation.h>
|
#include <relation.h>
|
||||||
#include <sheet.h>
|
#include <sheet.h>
|
||||||
@ -499,6 +500,7 @@ protected:
|
|||||||
|
|
||||||
void track(const TMail_message& msg, const TString& app, const TString& action, int err);
|
void track(const TMail_message& msg, const TString& app, const TString& action, int err);
|
||||||
bool exec_app(int & err, const TString& appname, TMail_message & msg, TToken_string & sh_row);
|
bool exec_app(int & err, const TString& appname, TMail_message & msg, TToken_string & sh_row);
|
||||||
|
void scan_ini_files(const char* dir, TString_array& result, int level) const;
|
||||||
void scan_dir(const TFilename& dir, TMail_messages& box) const;
|
void scan_dir(const TFilename& dir, TMail_messages& box) const;
|
||||||
bool unattended() const;
|
bool unattended() const;
|
||||||
|
|
||||||
@ -508,7 +510,7 @@ public:
|
|||||||
bool save_sheet_line(int& err, int line = -1);
|
bool save_sheet_line(int& err, int line = -1);
|
||||||
void save_all_lines();
|
void save_all_lines();
|
||||||
void exec_scripts();
|
void exec_scripts();
|
||||||
void auto_save_all();
|
void auto_save_all(bool manual);
|
||||||
|
|
||||||
void save() const;
|
void save() const;
|
||||||
void load();
|
void load();
|
||||||
@ -550,29 +552,26 @@ void TMailer_mask::test_delete()
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
deleted = mailbox.remove(id);
|
deleted = mailbox.remove(id);
|
||||||
}
|
} else
|
||||||
else
|
if (mailer == "CNP")
|
||||||
if (mailer == "CNP")
|
{
|
||||||
{
|
TFilename file;
|
||||||
TFilename file;
|
row->get(sender_pos, file); // Cartella di provenienza
|
||||||
row->get(sender_pos, file); // Cartella di provenienza
|
file.add(id);
|
||||||
file.add(id);
|
file.ext("ini");
|
||||||
file.ext("ini");
|
deleted = file.fremove();
|
||||||
file.fremove();
|
} else
|
||||||
deleted = true;
|
if (mailer == "MAPI")
|
||||||
}
|
{
|
||||||
else
|
TMail_message* msg = new TMail_message("");
|
||||||
if (mailer == "MAPI")
|
msg->set_id(id);
|
||||||
{
|
mapidel.add(msg);
|
||||||
TMail_message* msg = new TMail_message("");
|
deleted = true;
|
||||||
msg->set_id(id);
|
}
|
||||||
mapidel.add(msg);
|
|
||||||
deleted = true;
|
|
||||||
}
|
|
||||||
if (deleted)
|
if (deleted)
|
||||||
{
|
{
|
||||||
_box.destroy(nrow);
|
_box.destroy(nrow, true);
|
||||||
sf.destroy(nrow);
|
sf.destroy(nrow, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -593,6 +592,8 @@ void TMailer_mask::test_delete()
|
|||||||
mapidel.remove();
|
mapidel.remove();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sf.force_update();
|
||||||
|
|
||||||
xvtil_statbar_set(TR("Pronto"));
|
xvtil_statbar_set(TR("Pronto"));
|
||||||
do_events();
|
do_events();
|
||||||
_mail_semaphore = 0;
|
_mail_semaphore = 0;
|
||||||
@ -633,12 +634,44 @@ void TMailer_mask::expand_tabs(TMail_message& msg, const int tab) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void TMailer_mask::scan_ini_files(const char* dir, TString_array& result, int level) const
|
||||||
|
{
|
||||||
|
TFilename mask = dir; mask.add("*.ini");
|
||||||
|
|
||||||
|
SLIST files = xvt_fsys_list_files("ini", mask, FALSE);
|
||||||
|
for (SLIST_ELT e = xvt_slist_get_first(files); e; e = xvt_slist_get_next(files, e))
|
||||||
|
{
|
||||||
|
const char* fn = xvt_slist_get(files, e, NULL);
|
||||||
|
result.add(fn);
|
||||||
|
}
|
||||||
|
xvt_slist_destroy(files);
|
||||||
|
|
||||||
|
if (level == 0)
|
||||||
|
{
|
||||||
|
mask = dir; mask.add("*");
|
||||||
|
files = xvt_fsys_list_files(DIR_TYPE, mask, TRUE);
|
||||||
|
const int tot = xvt_slist_count(files);
|
||||||
|
if (tot > 0)
|
||||||
|
{
|
||||||
|
TProgind pi(tot, TR("Elaborazione cartelle transazioni"), true, true);
|
||||||
|
for (SLIST_ELT e = xvt_slist_get_first(files); e; e = xvt_slist_get_next(files, e))
|
||||||
|
{
|
||||||
|
if (!pi.addstatus(1))
|
||||||
|
break;
|
||||||
|
const char* fn = xvt_slist_get(files, e, NULL);
|
||||||
|
if (dexist(fn))
|
||||||
|
scan_ini_files(fn, result, level+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
xvt_slist_destroy(files);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void TMailer_mask::scan_dir(const TFilename& dir, TMail_messages& box) const
|
void TMailer_mask::scan_dir(const TFilename& dir, TMail_messages& box) const
|
||||||
{
|
{
|
||||||
|
box.destroy();
|
||||||
TString_array msg;
|
TString_array msg;
|
||||||
TFilename mask = dir;
|
scan_ini_files(dir, msg, 0);
|
||||||
mask.add("*.ini");
|
|
||||||
::list_files(mask, msg);
|
|
||||||
|
|
||||||
TString subject, text, strdata;
|
TString subject, text, strdata;
|
||||||
TToken_string id(_MAX_FNAME, '_');
|
TToken_string id(_MAX_FNAME, '_');
|
||||||
@ -654,24 +687,39 @@ void TMailer_mask::scan_dir(const TFilename& dir, TMail_messages& box) const
|
|||||||
scanner.read(buffer, size);
|
scanner.read(buffer, size);
|
||||||
buffer[size] = '\0';
|
buffer[size] = '\0';
|
||||||
|
|
||||||
subject.cut(0);
|
if (text.starts_with("[TRANSACTION]")) // Zucchetti maiuscolo!
|
||||||
int parc = text.find(']'); // fine primo paragrafo
|
|
||||||
if (parc > 0)
|
|
||||||
{
|
{
|
||||||
int para = text.find('[', parc+1);
|
const char* maiusc[] = { "[TRANSACTION]", "ACTION=", "FIRM=", "MODE=I", "USER=", "RESULT=", "ERRORMSG=", NULL};
|
||||||
if (para > 0)
|
const char* minusc[] = { "[Transaction]", "Action=", "Firm=", "Mode=A", "User=", "Result=", "Error= ", NULL};
|
||||||
|
for (int w = 0; maiusc[w]; w++)
|
||||||
{
|
{
|
||||||
parc = text.find(']', para+1);
|
const int i = text.find(maiusc[w]);
|
||||||
if (parc > 0)
|
if (i >= 0)
|
||||||
subject = text.sub(para+1, parc);
|
text.overwrite(minusc[w], i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
subject.cut(0);
|
||||||
|
if (text.find("[Transaction]") >= 0)
|
||||||
|
{
|
||||||
|
int parc = text.find(']'); // fine primo paragrafo
|
||||||
|
if (parc > 0)
|
||||||
|
{
|
||||||
|
int para = text.find('[', parc+1);
|
||||||
|
if (para > 0)
|
||||||
|
{
|
||||||
|
parc = text.find(']', para+1);
|
||||||
|
if (parc > 0)
|
||||||
|
subject = text.sub(para+1, parc);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (subject.full())
|
if (subject.full())
|
||||||
{
|
{
|
||||||
xvt_fsys_parse_pathname (*row, NULL, NULL, id.get_buffer(), NULL, NULL);
|
FILE_SPEC fs; xvt_fsys_convert_str_to_fspec(*row, &fs);
|
||||||
|
|
||||||
TMail_message* msg = new TMail_message(user(), subject, text, dir);
|
TMail_message* msg = new TMail_message(user(), subject, text, fs.dir.path);
|
||||||
msg->set_id(id);
|
msg->set_id(id = fs.name);
|
||||||
|
|
||||||
if (id.items() == 3) // Nome file in formato YYMMDD_HHMMSS_NN.ini
|
if (id.items() == 3) // Nome file in formato YYMMDD_HHMMSS_NN.ini
|
||||||
{
|
{
|
||||||
@ -681,7 +729,12 @@ void TMailer_mask::scan_dir(const TFilename& dir, TMail_messages& box) const
|
|||||||
msg->set_date_time(data, hhmmss);
|
msg->set_date_time(data, hhmmss);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
msg->set_date_time(TDate(TODAY));
|
{
|
||||||
|
const time_t dt = xvt_fsys_get_file_attr(&fs, XVT_FILE_ATTR_MTIME);
|
||||||
|
const struct tm* t = localtime(&dt);
|
||||||
|
msg->set_date_time(TDate(t->tm_mday, t->tm_mon, t->tm_year+1900),
|
||||||
|
t->tm_hour*10000 + t->tm_min*100 + t->tm_sec);
|
||||||
|
}
|
||||||
|
|
||||||
box.add(msg);
|
box.add(msg);
|
||||||
}
|
}
|
||||||
@ -744,10 +797,10 @@ void TMailer_mask::fill_messages()
|
|||||||
TSheet_field& sf = sfield(F_MESSAGES);
|
TSheet_field& sf = sfield(F_MESSAGES);
|
||||||
sf.destroy();
|
sf.destroy();
|
||||||
TString mess;
|
TString mess;
|
||||||
for (int m = 0; m < _box.items(); m++)
|
FOR_EACH_ARRAY_ITEM(_box, m, obj)
|
||||||
{
|
{
|
||||||
TMail_message& msg = _box.msg(m);
|
TMail_message& msg = _box.msg(m);
|
||||||
TToken_string& row = sf.row(m);
|
TToken_string& row = sf.row(-1);
|
||||||
row.add(msg.sender(), sf.cid2index(F_SENDER));
|
row.add(msg.sender(), sf.cid2index(F_SENDER));
|
||||||
row.add(msg.date(), sf.cid2index(F_DATE));
|
row.add(msg.date(), sf.cid2index(F_DATE));
|
||||||
const real t = msg.time();
|
const real t = msg.time();
|
||||||
@ -950,7 +1003,6 @@ bool TMailer_mask::exec_app(int& err, const TString& appname, TMail_message& msg
|
|||||||
{
|
{
|
||||||
ofstream outf(tmp);
|
ofstream outf(tmp);
|
||||||
const int items = msg.items();
|
const int items = msg.items();
|
||||||
bool long_lines = false;
|
|
||||||
TString message;
|
TString message;
|
||||||
for (int i = 0; i < items; i++)
|
for (int i = 0; i < items; i++)
|
||||||
{
|
{
|
||||||
@ -1053,7 +1105,7 @@ bool TMailer_mask::save_sheet_line(int& err, int nrow)
|
|||||||
line.strip_spaces();
|
line.strip_spaces();
|
||||||
if (line.items() == 2)
|
if (line.items() == 2)
|
||||||
{
|
{
|
||||||
subj = line.get(1);
|
subj = line.get(1); subj.cut(3);
|
||||||
if (logic == LF_TABCOM)
|
if (logic == LF_TABCOM)
|
||||||
subj.insert("%");
|
subj.insert("%");
|
||||||
}
|
}
|
||||||
@ -1192,11 +1244,14 @@ void TMailer_mask::find_redundant_messages()
|
|||||||
TToken_string key1;
|
TToken_string key1;
|
||||||
|
|
||||||
// Scorro tutti i messaggi non ancora elaborati
|
// Scorro tutti i messaggi non ancora elaborati
|
||||||
FOR_EACH_SHEET_ROW_BACK(sf, nrow, row) if (row->get_char(0) != 'X')
|
FOR_EACH_SHEET_ROW_BACK(sf, nrow, row) if (row->get_char(0) <= ' ')
|
||||||
{
|
{
|
||||||
row->get(sf.cid2index(F_BODY), body);
|
row->get(sf.cid2index(F_BODY), body);
|
||||||
if (body.find("[Transaction]") < 0) // Scarto i messaggi che non siano transazioni
|
if (body.find("[Transaction]") < 0) // Scarto i messaggi che non siano transazioni
|
||||||
|
{
|
||||||
|
row->add("F", 0); // Messaggio farlocco!
|
||||||
continue;
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
row->get(sf.cid2index(F_SUBJECT), subj);
|
row->get(sf.cid2index(F_SUBJECT), subj);
|
||||||
|
|
||||||
@ -1262,12 +1317,16 @@ void TMailer_mask::save_all_lines()
|
|||||||
const char mark = *row->get(0);
|
const char mark = *row->get(0);
|
||||||
|
|
||||||
if (mark == 'X')
|
if (mark == 'X')
|
||||||
msg << "ignorato in quanto già elaborato";
|
msg << "ignorato in quanto già elaborato"; else
|
||||||
|
|
||||||
if (mark == 'R')
|
if (mark == 'R')
|
||||||
{
|
{
|
||||||
msg << "ignorato in quanto ridondante";
|
msg << "ignorato in quanto ridondante";
|
||||||
row->add("X", 0); // Marcalo come elaborato comunque
|
row->add("X", 0); // Marcalo come elaborato comunque
|
||||||
|
} else
|
||||||
|
if (mark == 'F')
|
||||||
|
{
|
||||||
|
msg << "ignorato in quanto in formato errato";
|
||||||
|
row->add("X", 0); // Marcalo come elaborato comunque
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mark <= ' ')
|
if (mark <= ' ')
|
||||||
@ -1311,7 +1370,8 @@ void TMailer_mask::save_all_lines()
|
|||||||
enable(DLG_DELREC);
|
enable(DLG_DELREC);
|
||||||
|
|
||||||
#ifdef DBG
|
#ifdef DBG
|
||||||
one_saved &= yesno_box("Si desidera eliminare i messaggi processati?");
|
if (one_saved)
|
||||||
|
one_saved = yesno_box("Si desidera eliminare i messaggi processati?");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
_mail_semaphore = 0;
|
_mail_semaphore = 0;
|
||||||
@ -1385,7 +1445,7 @@ bool TMailer_mask::on_field_event(TOperable_field& o, TField_event e, long jolly
|
|||||||
} else
|
} else
|
||||||
if (e == se_query_add)
|
if (e == se_query_add)
|
||||||
{
|
{
|
||||||
auto_save_all();
|
auto_save_all(true);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
@ -1509,13 +1569,13 @@ void TMailer_mask::load_sheet(TConfig& ini, short dlg, const char* var)
|
|||||||
sf.row(r) = ini.get(var, NULL, r);
|
sf.row(r) = ini.get(var, NULL, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
void TMailer_mask::auto_save_all()
|
void TMailer_mask::auto_save_all(bool manual)
|
||||||
{
|
{
|
||||||
if (_mail_semaphore == 0)
|
if (_mail_semaphore == 0)
|
||||||
{
|
{
|
||||||
TSheet_field& sf = sfield(F_MESSAGES);
|
TSheet_field& sf = sfield(F_MESSAGES);
|
||||||
test_delete();
|
test_delete();
|
||||||
if (sf.items() == 0)
|
if (manual || sf.empty())
|
||||||
fill_messages();
|
fill_messages();
|
||||||
if (_interval > 0 && sf.items() > 0)
|
if (_interval > 0 && sf.items() > 0)
|
||||||
save_all_lines();
|
save_all_lines();
|
||||||
@ -1547,7 +1607,7 @@ long TMailer_mask::handler(WINDOW win, EVENT* ep)
|
|||||||
{
|
{
|
||||||
_secs = 0L;
|
_secs = 0L;
|
||||||
if (_mail_semaphore == 0 && unattended())
|
if (_mail_semaphore == 0 && unattended())
|
||||||
auto_save_all();
|
auto_save_all(false);
|
||||||
}
|
}
|
||||||
return 0L;
|
return 0L;
|
||||||
}
|
}
|
||||||
|
@ -199,7 +199,7 @@ BEGIN
|
|||||||
PROMPT 48 0 "Trasferito"
|
PROMPT 48 0 "Trasferito"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_SENDER 80 66
|
STRING F_SENDER 128 60
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 2 "Da "
|
PROMPT 1 2 "Da "
|
||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
@ -217,7 +217,7 @@ BEGIN
|
|||||||
FLAGS "D"
|
FLAGS "D"
|
||||||
END
|
END
|
||||||
|
|
||||||
STRING F_SUBJECT 256 66
|
STRING F_SUBJECT 256 60
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 1 4 "Soggetto "
|
PROMPT 1 4 "Soggetto "
|
||||||
END
|
END
|
||||||
@ -245,7 +245,7 @@ TOOLBAR "Topbar" 0 0 0 2
|
|||||||
|
|
||||||
BUTTON DLG_USER 10 2
|
BUTTON DLG_USER 10 2
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT -12 -1 ""
|
PROMPT -12 -1 "Conferma"
|
||||||
PICTURE TOOL_SAVEREC
|
PICTURE TOOL_SAVEREC
|
||||||
END
|
END
|
||||||
|
|
||||||
|
@ -79,16 +79,15 @@ void TCopia_ini_app::save_ini_var(ostream& out, TConfig& input, const char* key,
|
|||||||
|
|
||||||
bool TCopia_ini_app::copy_ini(const TFilename& ini_in, TFilename& ini_out) const
|
bool TCopia_ini_app::copy_ini(const TFilename& ini_in, TFilename& ini_out) const
|
||||||
{
|
{
|
||||||
TFilename tmp_out; tmp_out.tempdir();
|
TFilename tmp_out; tmp_out.temp("pm", "ini");
|
||||||
tmp_out.add(ini_out.name());
|
ofstream output(tmp_out);
|
||||||
|
if (!output)
|
||||||
|
return false;
|
||||||
|
|
||||||
TConfig input(ini_in, "Transaction");
|
TConfig input(ini_in, "Transaction");
|
||||||
const TString user = input.get("User");
|
const TString user = input.get("User");
|
||||||
const TString host = input.get("HostName");
|
const TString host = input.get("HostName");
|
||||||
|
|
||||||
ofstream output(tmp_out);
|
|
||||||
if (!output)
|
|
||||||
return false;
|
|
||||||
TString str;
|
TString str;
|
||||||
|
|
||||||
output << "[Transaction]" << endl;
|
output << "[Transaction]" << endl;
|
||||||
@ -112,7 +111,7 @@ bool TCopia_ini_app::copy_ini(const TFilename& ini_in, TFilename& ini_out) const
|
|||||||
save_ini_var(output, input, "CODCF", 7);
|
save_ini_var(output, input, "CODCF", 7);
|
||||||
save_ini_var(output, input, "TOTDOC", 0);
|
save_ini_var(output, input, "TOTDOC", 0);
|
||||||
output << "PROVVIS = 0" << endl;
|
output << "PROVVIS = 0" << endl;
|
||||||
output << "CODPAG = " << endl;
|
save_ini_var(output, input, "CODPAG");
|
||||||
save_ini_var(output, input, "CODCAUS");
|
save_ini_var(output, input, "CODCAUS");
|
||||||
|
|
||||||
for (int r = 1; ; r++)
|
for (int r = 1; ; r++)
|
||||||
@ -128,8 +127,8 @@ bool TCopia_ini_app::copy_ini(const TFilename& ini_in, TFilename& ini_out) const
|
|||||||
save_ini_var(output, input, "IMPOSTA", 0);
|
save_ini_var(output, input, "IMPOSTA", 0);
|
||||||
save_ini_var(output, input, "GRUPPO", 2);
|
save_ini_var(output, input, "GRUPPO", 2);
|
||||||
save_ini_var(output, input, "CONTO", 2);
|
save_ini_var(output, input, "CONTO", 2);
|
||||||
str.format("%02d%02d%03d",
|
str.format("%02d%02d%03d", input.get_int("GRUPPO"),
|
||||||
input.get_int("GRUPPO"), input.get_int("CONTO"), input.get_int("SOTTOCONTO"));
|
input.get_int("CONTO"), input.get_int("SOTTOCONTO"));
|
||||||
output << "SOTTOCONTO = " << str << endl;
|
output << "SOTTOCONTO = " << str << endl;
|
||||||
output << "TIPODET = " << endl;
|
output << "TIPODET = " << endl;
|
||||||
}
|
}
|
||||||
@ -155,24 +154,31 @@ void TCopia_ini_app::main_loop()
|
|||||||
}
|
}
|
||||||
if (ini_in.exist())
|
if (ini_in.exist())
|
||||||
{
|
{
|
||||||
TFilename ini_out = ini_get_string(CONFIG_DITTA, "ba7", "ForwardTo");
|
const TString& vers = ini_get_string(ini_in, "Transaction", "Version");
|
||||||
|
if (vers.full()) // Elabora solo file generati da campo
|
||||||
int err = 0;
|
|
||||||
if (ini_out.full())
|
|
||||||
{
|
{
|
||||||
const struct tm* n = xvt_time_now();
|
int err = NOERR;
|
||||||
TString80 fname;
|
|
||||||
fname.format("%02d%02d%02d_%02d%02d%02d_0.ini",
|
TFilename ini_out = ini_get_string(CONFIG_DITTA, "ba7", "ForwardTo");
|
||||||
n->tm_year%100, n->tm_mon+1, n->tm_mday,
|
if (ini_out.full())
|
||||||
n->tm_hour, n->tm_min, n->tm_sec);
|
{
|
||||||
ini_out.add(fname);
|
const struct tm* n = xvt_time_now();
|
||||||
if (!copy_ini(ini_in, ini_out))
|
TString80 fname;
|
||||||
err = EACCES;
|
fname.format("%02d%02d%02d_%02d%02d%02d_0.ini",
|
||||||
|
n->tm_year%100, n->tm_mon+1, n->tm_mday,
|
||||||
|
n->tm_hour, n->tm_min, n->tm_sec);
|
||||||
|
ini_out.add(fname);
|
||||||
|
if (!copy_ini(ini_in, ini_out))
|
||||||
|
{
|
||||||
|
xvt_dm_popup_error(TString("Impossibile copiare file in ") << ini_out);
|
||||||
|
err = EACCES;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
err = ENOTDIR;
|
||||||
|
ini_set_string(ini_in, "Transaction", "Result", err ? "ERROR" : "OK");
|
||||||
|
ini_set_int(ini_in, "Transaction", "Error", err);
|
||||||
}
|
}
|
||||||
else
|
|
||||||
err = ENOTDIR;
|
|
||||||
ini_set_string(ini_in, "Transaction", "Result", err ? "ERROR" : "OK");
|
|
||||||
ini_set_int(ini_in, "Transaction", "Error", err);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -12,12 +12,12 @@ END
|
|||||||
|
|
||||||
BOOLEAN F_PAGE_SPLIT
|
BOOLEAN F_PAGE_SPLIT
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 26 1 "Suddividi una pagina su piu' fogli"
|
PROMPT 26 1 "Suddividi una pagina su più fogli"
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOLEAN F_PAGE_MERGE
|
BOOLEAN F_PAGE_MERGE
|
||||||
BEGIN
|
BEGIN
|
||||||
PROMPT 26 2 "Raggruppa piu' pagine in un foglio"
|
PROMPT 26 2 "Raggruppa più pagine in un foglio"
|
||||||
END
|
END
|
||||||
|
|
||||||
BOOLEAN F_FONT_AUTO
|
BOOLEAN F_FONT_AUTO
|
||||||
|
@ -675,9 +675,6 @@ TReport_base_mask::TReport_base_mask(const char* name, TReport& rep)
|
|||||||
: TAutomask(name), _report(rep), _font_changed(false), _halign('C'), _valign('C'),
|
: TAutomask(name), _report(rep), _font_changed(false), _halign('C'), _valign('C'),
|
||||||
_fgcolor(COLOR_BLACK), _bgcolor(COLOR_WHITE)
|
_fgcolor(COLOR_BLACK), _bgcolor(COLOR_WHITE)
|
||||||
{
|
{
|
||||||
// Toglie le sfumature ai mortali
|
|
||||||
if (!is_power_reseller(true))
|
|
||||||
kill_special_pattern();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////
|
||||||
@ -854,7 +851,7 @@ void TReport_field_mask::set_field(const TReport_field& rf)
|
|||||||
char str[2] = { rf.type(), '\0' };
|
char str[2] = { rf.type(), '\0' };
|
||||||
set(F_TYPE, str, true);
|
set(F_TYPE, str, true);
|
||||||
|
|
||||||
if (strchr("ELR", rf.type()))
|
if (strchr("EL", rf.type()))
|
||||||
kill_special_pattern();
|
kill_special_pattern();
|
||||||
|
|
||||||
const TReport_rct& r = rf.get_rect();
|
const TReport_rct& r = rf.get_rect();
|
||||||
@ -1954,9 +1951,18 @@ void TReport_window::draw_field(const TReport_field& rf)
|
|||||||
TVariant var;
|
TVariant var;
|
||||||
curr_section().report().evaluate(rf.field(), var, _alfafld);
|
curr_section().report().evaluate(rf.field(), var, _alfafld);
|
||||||
const TString& name = var.as_string();
|
const TString& name = var.as_string();
|
||||||
const TImage* img = _images.image(name);
|
if (name.find(".png") > 0)
|
||||||
if (img != NULL && img->ok())
|
{
|
||||||
img->draw(win(), r);
|
TFilename n(name);
|
||||||
|
if (n.custom_path())
|
||||||
|
xvt_dwin_draw_image_on_pdf(win(), n, &r);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const TImage* img = _images.image(name);
|
||||||
|
if (img != NULL && img->ok())
|
||||||
|
img->draw(win(), r);
|
||||||
|
}
|
||||||
advanced_draw_rect(r, PAT_HOLLOW, rf.border(), rf.fore_color(), COLOR_INVALID, COLOR_INVALID, 0, off, 0);
|
advanced_draw_rect(r, PAT_HOLLOW, rf.border(), rf.fore_color(), COLOR_INVALID, COLOR_INVALID, 0, off, 0);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user