diff --git a/include/defmask.h b/include/defmask.h index 671699b33..848eca314 100755 --- a/include/defmask.h +++ b/include/defmask.h @@ -46,6 +46,8 @@ #define DLG_PACKTMAG 42 /* TAG del bottone Pacco a magazzino */ #define DLG_SORT 43 /* TAG del bottone Sort */ #define DLG_BARCODE 44 /* TAG del bottone codice a barre */ +#define DLG_COPY 45 /* TAG del bottone copia */ +#define DLG_PASTE 46 /* TAG del bottone incolla */ #define DLG_USER 100 /* TAG del primo controllo definito dall'utente */ diff --git a/include/recset.cpp b/include/recset.cpp index b23661887..63b44cbb3 100755 --- a/include/recset.cpp +++ b/include/recset.cpp @@ -693,7 +693,7 @@ void TRecordset::parsed_text(TString& sql) const bool ask_variable(const char* name, TVariant& var) { - TMask m(TR("Richiesta variabile"), 1, 52, 4); + TMask m(TR("Richiesta variabile"), 1, 52, 5); m.add_static(-1, 0, name, 1, 0); m.add_string(101, 0, "", 1, 1, 80, "", 50); m.add_button(DLG_OK, 0, "", -12, -1, 10, 2); @@ -703,6 +703,8 @@ bool ask_variable(const char* name, TVariant& var) if (ok) { const TString& str = m.get(101); + if (str.match("??-??-2???")) + var = TDate(str); else if (is_numeric(str)) var = real(str); else