diff --git a/src/ve/velib.h b/src/ve/velib.h index 7692f2442..d3857f99d 100755 --- a/src/ve/velib.h +++ b/src/ve/velib.h @@ -429,7 +429,11 @@ public: const bool save_and_new() const { return get_bool("B4"); } const bool test_eser() const { return !get_bool("B5"); } const bool auto_archive() const { return get_bool("B6"); } - const bool newnumdef() const { return get_bool("B8"); } + const bool newnumdef() const { return get_bool("B8"); } + const bool numspecMSP() const { return get_bool("B9"); } + const bool fattprovv() const { return get_bool("B10"); } + const bool contresercemri() const { return get_bool("B11"); } + const bool nofuturedocs() const { return get_bool("B13"); } const TString& codnumdef() const { return get("S8"); } const TString& tipodocdef() const { return get("S9"); } const int revision_len() const { return get_int("I0"); } diff --git a/src/ve/velib06a.cpp b/src/ve/velib06a.cpp index 719e06e50..71e80adce 100755 --- a/src/ve/velib06a.cpp +++ b/src/ve/velib06a.cpp @@ -497,7 +497,9 @@ bool data_hndl( TMask_field& field, KEY key ) if (m.id2pos(F_DATACAMBIO1) >= 0 && !m.get(F_CODVAL).empty()) m.set(F_DATACAMBIO1, field.get(), TRUE); } + const TDate datadoc(m.get(F_DATADOC)); + if (key == K_ENTER || field.to_check(key)) { const int annodoc = m.get_int(F_ANNO); @@ -533,6 +535,9 @@ bool data_hndl( TMask_field& field, KEY key ) } } } + if (field.running_check(key) && codnum.nofuturedocs() && datadoc> today) + if (!field.yesno_box("Data documento superiore oggi (%s), devo continuare ugualmente ?", datadoc.stringa())) + return false; if (codnum.dont_test_datadoc()) return true; // Non devo fare altri test @@ -554,7 +559,7 @@ bool data_hndl( TMask_field& field, KEY key ) doc.read(_isgreat); same_key = doc.curr().same_key(m.doc().head(), 1, 1); if (doc.good() && same_key && datadoc > doc.get_date(DOC_DATADOC)) - return field.error_box("Data documento superiore alla data del documento successivo (a %s - s %s)", datadoc.stringa(), doc.get_date(DOC_DATADOC).stringa()); + return field.error_box("Data documento superiore alla data del documento successivo (%s - succ. %s)", datadoc.stringa(), doc.get_date(DOC_DATADOC).stringa()); } if (key == K_ENTER || field.to_check(key)) { diff --git a/src/ve/vetbnum.h b/src/ve/vetbnum.h index d1e0b8cde..7caa2a002 100755 --- a/src/ve/vetbnum.h +++ b/src/ve/vetbnum.h @@ -12,7 +12,8 @@ #define F_AUTOREOPEN 112 #define F_DOCDEFDIV 113 #define FN_CODNUM 114 -#define FN_TIPODOC 115 +#define FN_TIPODOC 115 +#define F_NOFUTUREDOCS 116 #define F_TIPODOC1 210 diff --git a/src/ve/vetbnum.uml b/src/ve/vetbnum.uml index 2a8138cd9..37cc87ecf 100755 --- a/src/ve/vetbnum.uml +++ b/src/ve/vetbnum.uml @@ -122,9 +122,15 @@ BEGIN FIELD B2 END +BOOLEAN F_NOFUTUREDOCS +BEGIN + PROMPT 2 14 "Nessun documento nel futuro" + FIELD B13 +END + BOOLEAN F_EMRI BEGIN - PROMPT 2 14 "Fatture da emettere/ricevere" + PROMPT 2 15 "Fatture da emettere/ricevere" MESSAGE FALSE CLEAR,F_EMRICKYR MESSAGE TRUE ENABLE,F_EMRICKYR FIELD B3 @@ -132,43 +138,43 @@ END BOOLEAN F_EMRICKYR BEGIN - PROMPT 40 14 "Controllo esercizio" + PROMPT 40 15 "Controllo esercizio" FIELD B11 END BOOLEAN F_SAVEANDNEW BEGIN - PROMPT 2 15 "Rimanere in inserimento dopo la registrazione" + PROMPT 2 16 "Rimanere in inserimento dopo la registrazione" FIELD B4 END BOOLEAN F_CNTES BEGIN - PROMPT 2 16 "Nessun controllo sull'esercizio" + PROMPT 2 17 "Nessun controllo sull'esercizio" FIELD B5 END BOOLEAN F_AUTOREOPEN BEGIN - PROMPT 2 17 "Riapertura automatica" + PROMPT 2 18 "Riapertura automatica" FIELD B7 END BOOLEAN F_ARCHIVE BEGIN - PROMPT 2 18 "Archiviazione automatica dei documenti stampati in definitiva" + PROMPT 2 19 "Archiviazione automatica dei documenti stampati in definitiva" FIELD B6 END BOOLEAN F_SPMSP BEGIN - PROMPT 2 19 "Numerazione speciale per MSP" + PROMPT 2 20 "Numerazione speciale per MSP" FIELD B9 END LIST F_REVLEN 1 8 BEGIN - PROMPT 2 20 "Cifre riservate alle revisioni (Preventivi) " + PROMPT 2 21 "Cifre riservate alle revisioni (Preventivi) " ITEM "0|Nessuna" ITEM "1|1 Cifra" ITEM "2|2 Cifre"