Patch level : 10.1036

Files correlati     :   cg0.exe
Ricompilazione Demo : [ ]
Commento            :

Nuova funzione per avere un nuovo codice cliente con incrementi maggiori di uno.
Il default e' cento, altrimenti bisogandefinire nel paragrafo cg del config ditta la variabile CliForModule=<incremento>

Bisogna poi aggiungere un bottone alla toolbar dei clienti tipo il seguente

BU 262
BE
PR 13 1 "Prompt"
END


git-svn-id: svn://10.65.10.50/branches/R_10_00@22325 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
alex 2011-06-25 17:55:28 +00:00
parent c2a8964859
commit b531719f8d
2 changed files with 22 additions and 0 deletions

View File

@ -562,6 +562,19 @@ HIDDEN bool codalleg_handler(TMask_field& f, KEY key)
return true;
}
HIDDEN bool altnewcli_handler(TMask_field& f, KEY key)
{
TMask& m = f.mask();
if (key == K_SPACE && m.mode() == MODE_INS)
{
long divisore = ini_get_int(CONFIG_DITTA, "cg", "CliForModule", 100);
const long cod = (m.get_long(F_CODCF) / divisore + 1) * divisore;
m.set(F_CODCF, cod);
}
return true;
}
HIDDEN bool contrlav_handler(TMask_field& f, KEY key)
{
if (key == K_SPACE)
@ -604,6 +617,8 @@ void TClifo_application::on_config_change()
init_pages(*_msk);
_msk->show(-9, _gessal); // Mostra campi Estratti conto
_msk->enable(DLG_CONTRLAV, main_app().has_module(LVAUT));
if (_msk->id2pos(DLG_ALTNEWCLI) >= 0)
_msk->set_handler(DLG_ALTNEWCLI, altnewcli_handler);
}
@ -625,6 +640,8 @@ void TClifo_application::init_query_mode(TMask& m)
m.show(F_CODLIST, _liscatven);
m.show(F_CODLIST1, !_liscatven);
m.disable(DLG_CONTRLAV);
if (m.id2pos(DLG_ALTNEWCLI) >= 0)
m.disable(DLG_ALTNEWCLI);
}
void TClifo_application::init_query_insert_mode(TMask& m)
@ -642,6 +659,8 @@ void TClifo_application::init_insert_mode(TMask& m)
if (_geslv)
m.set(F_ARTSEP, "X");
}
if (m.id2pos(DLG_ALTNEWCLI) >= 0)
m.enable(DLG_ALTNEWCLI);
}
void TClifo_application::init_modify_mode(TMask& m)
@ -650,6 +669,8 @@ void TClifo_application::init_modify_mode(TMask& m)
if(_gesven)
m.enable_page(10, _geslv);
m.enable(DLG_CONTRLAV, _geslv && m.get(F_TIPOCF) == "C");
if (m.id2pos(DLG_ALTNEWCLI) >= 0)
m.disable(DLG_ALTNEWCLI);
}
void TClifo_application::set_pnae(TMask& m, TToken_string& nonacc, TToken_string& nonscd)

View File

@ -153,6 +153,7 @@
#define F_CODCAUSINC 259
#define F_STATONASC 260
#define F_DESTANASC 261
#define DLG_ALTNEWCLI 262
#define DLG_RIC 300
#define DLG_CST 301