diff --git a/lv/lv0400.cpp b/lv/lv0400.cpp index 51196f301..21c48ead9 100755 --- a/lv/lv0400.cpp +++ b/lv/lv0400.cpp @@ -289,15 +289,14 @@ protected: bool TContratti_app:: user_create() { + TDate datasc(TODAY); + if (esercizi().date2esc(datasc) == 0) + return error_box("Attenzione non esiste l'esercizio corrispondente al %s", datasc.string()); + _rel=new TRelation (LF_LVCONDV); _msk= new TContratti_msk; - TDate datasc(TODAY); - if (esercizi().date2esc(datasc) == 0) - return message_box("Attenzione non esiste l'esercizio corrispondente al %s", datasc.string()); - - TSheet_field& ss=_msk->sfield(F_RIGHE); - + TSheet_field& ss = _msk->sfield(F_RIGHE); ss.set_auto_append(); ss.set_append(false);