diff --git a/sc/sc3100.cpp b/sc/sc3100.cpp index 40a9406dd..48fef4043 100755 --- a/sc/sc3100.cpp +++ b/sc/sc3100.cpp @@ -723,7 +723,19 @@ bool TForm_EC_editor::edit(char s, pagetype p) form().print_on(out); } else - form().write_profile(); + { + TForm& ff = form(); + ff.write_profile(); + TLocalisamfile r(LF_RFORM); // scrivera' un record sulle righe, relativo alla sezione + r.put("TIPOPROF",ff.name());// per memorizzare i formati numero/data + r.put("CODPROF",ff.code()); + r.put("SEZ","DN"); + r.put("ID",0); + TToken_string t(get_formato_data(),'\n'); + t.add(get_formato_numero()); + r.put("SPECIAL",t); + if (r.write()!= NOERR) r.rewrite(); + } } else if (k==K_ESC && form()._isnew) @@ -842,6 +854,18 @@ bool TForm_EC_editor::ask_profile() { check_form(); set_form(new TForm_EC(fform, (fcode!=0) ? cod : "", extra() ? 2 :1, fdesc)); + + TLocalisamfile r(LF_RFORM); // Setta l'eventuale formato date/numero impostati + r.put("TIPOPROF",fform); + r.put("CODPROF",cod); + r.put("SEZ","DN");r.put("ID",0); + if (r.read() == NOERR) + { + TToken_string special (r.get("SPECIAL"),'\n'); + set_formato_data(special.get(0)); + set_formato_numero(special.get(1)); + } + break; } else if (k == K_DEL)