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  può esserci, essere bloccante o non bloccante sulla base del tipo documento 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@24170 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
bonazzi 2017-11-02 13:04:34 +00:00
parent df0a6328ed
commit 233daf7d4e
3 changed files with 19 additions and 4 deletions

View File

@ -211,6 +211,8 @@ public:
virtual ~TFormula_documento();
};
enum TTipo_cms_check {_bloccante = 0, _non_bloccante, _nessuno};
class TTipo_documento : public TRectype // velib03
{
static TAssoc_array _formule_documento;
@ -333,6 +335,7 @@ public:
bool is_costo() const ;
bool is_ricavo() const ;
const TString& module() const { return _module; }
TTipo_cms_check tipo_cms_check() const {return (TTipo_cms_check) get_int("I3");}
TFormula_documento* first_formula() { return succ_formula(true); }
TFormula_documento* succ_formula(bool restart = false);

View File

@ -2920,12 +2920,13 @@ bool cms_mag_handler(TMask_field& f, KEY key)
{
if ((key == K_TAB && f.focusdirty()))
{
bool chiusa = curr.get_bool(COMMESSE_CHIUSA);
const TTipo_cms_check t = mask.doc().tipo().tipo_cms_check();
bool chiusa = (t != _nessuno) && 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.yesno_box(FR("La commessa chiusa %s, vuoi utilizzarla"), (const char*)codcms);
return (t == _bloccante) ? f.error_box(FR("La commessa %s è chiusa "), (const char*)codcms) : f.yesno_box(FR("La commessa chiusa %s, vuoi utilizzarla"), (const char*)codcms);
}
mask.codcms_sh() = codcms;
@ -2988,12 +2989,13 @@ bool codcms_handler(TMask_field& f, KEY key)
{
if ((key == K_TAB && f.focusdirty()))
{
bool chiusa = curr_cms.get_bool(COMMESSE_CHIUSA);
const TTipo_cms_check t = mask.doc().tipo().tipo_cms_check();
bool chiusa = (t != _nessuno) && 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.yesno_box(FR("La commessa chiusa %s, vuoi utilizzarla"), (const char*)codcms);
return (t == _bloccante) ? f.error_box(FR("La commessa %s è chiusa "), (const char*)codcms) : f.yesno_box(FR("La commessa chiusa %s, vuoi utilizzarla"), (const char*)codcms);
}
doc.put(DOC_CODCMS, codcms);
FOR_EACH_PHYSICAL_RDOC(doc, r, riga)

View File

@ -1360,6 +1360,16 @@ BEGIN
CHECKTYPE NORMAL
END
LIST F_CMSCHECK 1 13
BEGIN
PROMPT 2 18 "Controllo commesse "
FILED I3
ITEM "0|Bloccante"
ITEM "1|Non Bloccante"
ITEM "2|Nessuno"
END
ENDPAGE
ENDMASK