Patch level : 12.0 1020
Files correlati : cg0.exe Commento : Sistemata la segnalazione di errore per il codice destinatario SDI Interno: Risistemata la segnalazione anche se sembrava corretta.
This commit is contained in:
parent
8d430376c8
commit
c8699875f9
@ -580,12 +580,22 @@ bool TClifo_application::stato_handler(TMask_field& f, KEY k)
|
||||
bool TClifo_application::coddest_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
// Controllo che il codice immesso sia di 6/7 cifre in base al clifo
|
||||
if(f.focusdirty() && !f.empty() && f.to_check(k) &&
|
||||
((f.mask().get_int(F_ALLEG) == 7 && f.get().len() != 6) || // P.A.
|
||||
(f.mask().get_int(F_ALLEG) != 7 && f.get().len() != 7))) // Privato
|
||||
{
|
||||
warning_box("Lunghezza codice destinatario incoerente");
|
||||
}
|
||||
if (f.to_check(k, false))
|
||||
if (f.full())
|
||||
{
|
||||
const int tipo_alleg = f.mask().get_int(F_ALLEG);
|
||||
|
||||
if (tipo_alleg == 7)
|
||||
{
|
||||
if (f.get().len() != 6) // P.A.
|
||||
return cond_error_box(k == K_ENTER, TR("Il codice destinatario deve essere di 6 caratteri"));
|
||||
}
|
||||
else
|
||||
{
|
||||
if (f.get().len() != 7) // Privato
|
||||
return cond_error_box(k == K_ENTER, TR("Il codice destinatario deve essere di 7 caratteri"));
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -787,8 +797,9 @@ void TClifo_application::init_modify_mode(TMask& m)
|
||||
|
||||
void TClifo_application::set_pnae(TMask& m, TToken_string& nonacc, TToken_string& nonscd)
|
||||
{
|
||||
TSheet_field& pnae = m.sfield(F_NONACCEFF);
|
||||
pnae.destroy();
|
||||
TSheet_field& pnae = m.sfield(F_NONACCEFF);
|
||||
|
||||
pnae.reset_sheet();
|
||||
TToken_string periodo(12, ',');
|
||||
int per = 0;
|
||||
for (bool good = nonacc.get(per, periodo); good; good = nonacc.get(++per, periodo))
|
||||
@ -925,6 +936,7 @@ int TClifo_application::read(TMask& m)
|
||||
if (_gesven)
|
||||
{
|
||||
TToken_string riga(240);
|
||||
|
||||
indsp_sheet().reset();
|
||||
for (i = 0; i < _rel->indirizzi(); i++)
|
||||
{
|
||||
@ -971,7 +983,8 @@ int TClifo_application::read(TMask& m)
|
||||
}
|
||||
|
||||
TSheet_field& s = m.sfield(F_SHEET_CONT);
|
||||
s.destroy();
|
||||
|
||||
s.reset_sheet();
|
||||
for (int c = 0; c < _rel->contatti(); c++)
|
||||
{
|
||||
const TRectype& contact = _rel->contatto(c);
|
||||
@ -991,7 +1004,7 @@ int TClifo_application::read(TMask& m)
|
||||
const TRectype& clifo = get_relation()->curr(LF_CLIFO);
|
||||
TSheet_field & ns_sh = m.sfield(F_BANA);
|
||||
|
||||
ns_sh.destroy(-1, false);
|
||||
ns_sh.reset_sheet();
|
||||
for (i = 1; i <= ns_ban.rows(); i++)
|
||||
add_bank(ns_sh, ns_ban.row(i));
|
||||
if (ns_ban.rows() == 0 && clifo.get_int(CLI_CODABI) != 0)
|
||||
@ -1005,7 +1018,7 @@ int TClifo_application::read(TMask& m)
|
||||
TRecord_array vs_ban(key, LF_CFBAN);
|
||||
TSheet_field & vs_sh = m.sfield(F_BANP);
|
||||
|
||||
vs_sh.destroy(-1, false);
|
||||
vs_sh.reset_sheet();
|
||||
for (i = 1; i <= vs_ban.rows(); i++)
|
||||
add_bank(vs_sh, vs_ban.row(i));
|
||||
if (vs_ban.rows() == 0 && cfven.get_int(CFV_CODABIPR) != 0)
|
||||
@ -1040,7 +1053,7 @@ void TClifo_application::ini2mask(TConfig& ini, TMask& m, bool query)
|
||||
if (!ini.set_paragraph(para))
|
||||
break;
|
||||
if (i == 0)
|
||||
indsp_sheet().reset();
|
||||
indsp_sheet().reset_sheet();
|
||||
|
||||
riga.cut(0);
|
||||
riga.add(ini.get(IND_RAGSOC));
|
||||
@ -1280,7 +1293,6 @@ void TClifo_application::reset_sheet()
|
||||
{
|
||||
TToken_string nulla = "|**";
|
||||
nulla << TR("Nessuno") << "**";
|
||||
|
||||
|
||||
TClifo_application& a = app();
|
||||
a.field_sheet(F_CODINDDOC).destroy();
|
||||
@ -1588,7 +1600,8 @@ bool TClifo_application::user_create() // initvar e arrmask
|
||||
TSheet_field& ind = _msk->sfield(F_SHEET_G_VEN);
|
||||
ind.set_notify(indsp_notify);
|
||||
ind.sheet_mask().set_handler(F_COMI, comi_handler);
|
||||
|
||||
ind.sheet_mask().set_handler(F_PADESTINI, coddest_handler);
|
||||
|
||||
TSheet_field& pnae = _msk->sfield(F_NONACCEFF);
|
||||
pnae.set_notify(effetti_notify);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user