Patch level : 12.0 462
Files correlati : ve0.exe Errore segnalato da Dinamica I controllo di commessa chiusa sui documenti era bloccante, non può esserlo perché devo poter modificare un vecchio documento o evadere fatture da emettere o ricevere La segnalazione non bloccante viene data quanto la commessa è e chiusa e siamo oltre l'eventuale proroga, solo al cambio di commessa. git-svn-id: svn://10.65.10.50/branches/R_10_00@24166 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8c0f387ffa
commit
6a22030d15
@ -2915,11 +2915,18 @@ bool cms_mag_handler(TMask_field& f, KEY key)
|
|||||||
const TRectype& curr = m.efield(mask.cms_end_sh()).browse()->cursor()->curr();
|
const TRectype& curr = m.efield(mask.cms_end_sh()).browse()->cursor()->curr();
|
||||||
const TString80 codcms = curr.get(COMMESSE_CODCMS);
|
const TString80 codcms = curr.get(COMMESSE_CODCMS);
|
||||||
|
|
||||||
if (curr.get_bool(COMMESSE_CHIUSA))
|
|
||||||
return f.error_box(FR("Impossibile operare sulla commessa chiusa %s"), (const char*)codcms);
|
|
||||||
|
|
||||||
if (mask.codcms_sh() != codcms) // Cambio commessa
|
if (mask.codcms_sh() != codcms) // Cambio commessa
|
||||||
{
|
{
|
||||||
|
if ((key == K_TAB && f.focusdirty()))
|
||||||
|
{
|
||||||
|
bool chiusa = curr.get_bool(COMMESSE_CHIUSA);
|
||||||
|
|
||||||
|
if (chiusa && curr.get_bool(COMMESSE_PROROGA))
|
||||||
|
chiusa = mask.get_date(F_DATADOC) > curr.get_date(COMMESSE_DATAPROR);
|
||||||
|
if (chiusa)
|
||||||
|
return f.error_box(FR("La commessa chiusa %s, vuoi utilizzarla"), (const char*)codcms);
|
||||||
|
}
|
||||||
mask.codcms_sh() = codcms;
|
mask.codcms_sh() = codcms;
|
||||||
|
|
||||||
const TString80 codcosto = curr.get(COMMESSE_CODCOSTO);
|
const TString80 codcosto = curr.get(COMMESSE_CODCOSTO);
|
||||||
@ -2973,14 +2980,21 @@ bool codcms_handler(TMask_field& f, KEY key)
|
|||||||
const TRectype& curr_cms = ((TEdit_field&)f).browse()->cursor()->curr();
|
const TRectype& curr_cms = ((TEdit_field&)f).browse()->cursor()->curr();
|
||||||
const TString80 codcms = curr_cms.get(COMMESSE_CODCMS);
|
const TString80 codcms = curr_cms.get(COMMESSE_CODCMS);
|
||||||
mask.set(F_CMSH, codcms);
|
mask.set(F_CMSH, codcms);
|
||||||
if (curr_cms.get_bool(COMMESSE_CHIUSA))
|
|
||||||
return f.error_box(FR("Impossibile operare sulla commessa chiusa %s"), (const char*)codcms);
|
|
||||||
|
|
||||||
if ((key == K_TAB && f.focusdirty()) || key == K_ENTER)
|
if ((key == K_TAB && f.focusdirty()) || key == K_ENTER)
|
||||||
{
|
{
|
||||||
// Controlla se c'e' la gestione dei centri di costo al secondo livello
|
// Controlla se c'e' la gestione dei centri di costo al secondo livello
|
||||||
if (mask.codcms() != codcms)
|
if (mask.codcms() != codcms)
|
||||||
{
|
{
|
||||||
|
if ((key == K_TAB && f.focusdirty()))
|
||||||
|
{
|
||||||
|
bool chiusa = curr_cms.get_bool(COMMESSE_CHIUSA);
|
||||||
|
|
||||||
|
if (chiusa && curr_cms.get_bool(COMMESSE_PROROGA))
|
||||||
|
chiusa = mask.get_date(F_DATADOC) > curr_cms.get_date(COMMESSE_DATAPROR);
|
||||||
|
if (chiusa)
|
||||||
|
return f.error_box(FR("La commessa chiusa %s, vuoi utilizzarla"), (const char*)codcms);
|
||||||
|
}
|
||||||
doc.put(DOC_CODCMS, codcms);
|
doc.put(DOC_CODCMS, codcms);
|
||||||
FOR_EACH_PHYSICAL_RDOC(doc, r, riga)
|
FOR_EACH_PHYSICAL_RDOC(doc, r, riga)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user