Patch level : 01.00 1372

Files correlati     : sc2.exe
Commento:
estratti conto per email
This commit is contained in:
Alessandro Bonazzi 2024-11-28 16:33:15 +01:00
parent e4a40464cf
commit 76ff953bae

View File

@ -4,6 +4,7 @@
#include <modaut.h>
#include <postman.h>
#include <printer.h>
#include <progind.h>
#include "scselect.h"
#include "sc2400a.h"
#include "sc2400b.h"
@ -1891,49 +1892,53 @@ bool TSelection_mask::on_field_event(TOperable_field& o, TField_event e, long jo
mail.load();
sh.reset();
update_checked();
const int last = s.last_one();
for (long pos = s.first_one(); pos <= last; pos++)
{
fc = pos;
TProgind p(s.items(), "Selezione");
const TRectype & cli = fc.curr();
const TString & tipo = cli.get(CLI_TIPOCF);
const long codice = cli.get_long(CLI_CODCF);
if (s.checked(pos) && some_to_print(tipo, codice))
for (long pos = s.first_one(); p.addstatus() && pos <= last; pos++)
{
TString ragsoc = cli.get(CLI_RAGSOC);
TToken_string email;
for (int i = 1; email.blank() && i <= 3; i++)
fc = pos;
const TRectype & cli = fc.curr();
const TString & tipo = cli.get(CLI_TIPOCF);
const long codice = cli.get_long(CLI_CODCF);
if (s.checked(pos) && some_to_print(tipo, codice))
{
const char order = ini_get_string(CONFIG_USER, "Mail", "Email", "", i)[0];
TString ragsoc = cli.get(CLI_RAGSOC);
TToken_string email;
switch (order)
for (int i = 1; email.blank() && i <= 3; i++)
{
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 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());
sh.enable_cell(nrow, S_SELECTED, email.full());
sh.set_row_cell(S_CODCF, cli.get_long(CLI_CODCF), nrow);
sh.set_row_cell(S_EMAIL, email, nrow);
ragsoc.strip_double_spaces();
sh.set_row_cell(S_RAGSOC, ragsoc, nrow);
}
const int nrow = sh.set_row_cell(S_SELECTED, email.full());
sh.enable_cell(nrow, S_SELECTED, email.full());
sh.set_row_cell(S_CODCF, cli.get_long(CLI_CODCF), nrow);
sh.set_row_cell(S_EMAIL, email, nrow);
ragsoc.strip_double_spaces();
sh.set_row_cell(S_RAGSOC, ragsoc, nrow);
}
}
sh.sort(sort);