diff --git a/build/AgaLib.vcxproj b/build/AgaLib.vcxproj index 7ed602a3b..30a458a36 100644 --- a/build/AgaLib.vcxproj +++ b/build/AgaLib.vcxproj @@ -41,9 +41,9 @@ <_ProjectFileVersion>10.0.30319.1 ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ $(ProjectName) $(ProjectName) @@ -216,7 +216,6 @@ - @@ -567,7 +566,6 @@ %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) - %(AdditionalIncludeDirectories) %(PreprocessorDefinitions) diff --git a/build/AgaLib.vcxproj.filters b/build/AgaLib.vcxproj.filters index 958661ae8..e7dd7b67e 100644 --- a/build/AgaLib.vcxproj.filters +++ b/build/AgaLib.vcxproj.filters @@ -526,9 +526,6 @@ Headers - - Headers - @@ -783,9 +780,6 @@ Sources - - Sources - diff --git a/build/Cb6.vcxproj b/build/Cb6.vcxproj index 16e37313a..97aebe8ea 100644 --- a/build/Cb6.vcxproj +++ b/build/Cb6.vcxproj @@ -40,14 +40,14 @@ <_ProjectFileVersion>10.0.30319.1 ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false true false false $(ProjectName) ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false false $(ProjectName) diff --git a/build/PATCHDEF.EXE b/build/PATCHDEF.EXE index b4cf135fd..a0d30711b 100644 Binary files a/build/PATCHDEF.EXE and b/build/PATCHDEF.EXE differ diff --git a/build/Uno.vcxproj b/build/Uno.vcxproj index 05dfc3130..a99d8dbad 100644 --- a/build/Uno.vcxproj +++ b/build/Uno.vcxproj @@ -40,9 +40,9 @@ <_ProjectFileVersion>10.0.30319.1 ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ $(ProjectName) $(ProjectName) diff --git a/build/agalib_alx.vcxproj b/build/agalib_alx.vcxproj index e9099e982..611fe9b1e 100644 --- a/build/agalib_alx.vcxproj +++ b/build/agalib_alx.vcxproj @@ -48,11 +48,11 @@ <_ProjectFileVersion>10.0.30319.1 ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false false ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false false diff --git a/build/agalib_bagn.vcxproj b/build/agalib_bagn.vcxproj index 56f3d934f..cc9cb55d8 100644 --- a/build/agalib_bagn.vcxproj +++ b/build/agalib_bagn.vcxproj @@ -43,11 +43,11 @@ <_ProjectFileVersion>10.0.30319.1 ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false false ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false false diff --git a/build/agalib_bagn.vcxproj.filters b/build/agalib_bagn.vcxproj.filters index 7f6b0e818..a025edf29 100644 --- a/build/agalib_bagn.vcxproj.filters +++ b/build/agalib_bagn.vcxproj.filters @@ -74,4 +74,14 @@ Headers + + + Trr + + + + + Dir + + \ No newline at end of file diff --git a/build/agalib_rep.vcxproj b/build/agalib_rep.vcxproj index 71d687c48..da726ba20 100644 --- a/build/agalib_rep.vcxproj +++ b/build/agalib_rep.vcxproj @@ -44,11 +44,11 @@ <_ProjectFileVersion>10.0.30319.1 ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false false ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false false diff --git a/build/ca.sln b/build/ca.sln index 9d58b18f6..739b3c757 100644 --- a/build/ca.sln +++ b/build/ca.sln @@ -51,8 +51,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "cglib", "cglib.vcxproj", "{ EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "vedocext", "vedocext.vcxproj", "{0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}" EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "lilib", "lilib.vcxproj", "{B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}" -EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Win32 = Debug|Win32 @@ -107,10 +105,6 @@ Global {0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Debug|Win32.Build.0 = Debug|Win32 {0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Release|Win32.ActiveCfg = Release|Win32 {0042619A-6B7C-4D3D-9CD9-9BDD8D200C15}.Release|Win32.Build.0 = Release|Win32 - {B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Debug|Win32.ActiveCfg = Debug|Win32 - {B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Debug|Win32.Build.0 = Debug|Win32 - {B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Release|Win32.ActiveCfg = Release|Win32 - {B61F0AD4-0CCE-4371-8E92-85A26CAF1A7C}.Release|Win32.Build.0 = Release|Win32 EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/build/cglib.vcxproj b/build/cglib.vcxproj index 2f78637ec..f7e206f32 100644 --- a/build/cglib.vcxproj +++ b/build/cglib.vcxproj @@ -42,9 +42,9 @@ <_ProjectFileVersion>10.0.30319.1 ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ $(ProjectName) $(ProjectName) AllRules.ruleset diff --git a/build/fastrip.exe b/build/fastrip.exe index 0a766454c..8bc86e627 100644 Binary files a/build/fastrip.exe and b/build/fastrip.exe differ diff --git a/build/fp0.vcxproj b/build/fp0.vcxproj index d516e6f23..43596688e 100644 --- a/build/fp0.vcxproj +++ b/build/fp0.vcxproj @@ -92,7 +92,6 @@ MachineX86 - false true diff --git a/build/fp1.vcxproj b/build/fp1.vcxproj index 474c948c3..283be2e26 100644 --- a/build/fp1.vcxproj +++ b/build/fp1.vcxproj @@ -92,7 +92,6 @@ MachineX86 - false true diff --git a/build/gfm.vcxproj b/build/gfm.vcxproj index 6e312ddfa..2d281319e 100644 --- a/build/gfm.vcxproj +++ b/build/gfm.vcxproj @@ -42,10 +42,10 @@ <_ProjectFileVersion>10.0.30319.1 ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ true ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false $(ProjectName) false diff --git a/build/lilib.vcxproj b/build/lilib.vcxproj index 12dee11c6..6658c27be 100644 --- a/build/lilib.vcxproj +++ b/build/lilib.vcxproj @@ -42,10 +42,10 @@ <_ProjectFileVersion>10.0.30319.1 ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false false false @@ -158,6 +158,7 @@ + diff --git a/build/pdflib_dll.vcxproj b/build/pdflib_dll.vcxproj index e2e11d426..4c656e159 100644 --- a/build/pdflib_dll.vcxproj +++ b/build/pdflib_dll.vcxproj @@ -43,10 +43,10 @@ <_ProjectFileVersion>10.0.30319.1 ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ true ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ $(ProjectName) false false diff --git a/build/pdflibwrap.vcxproj b/build/pdflibwrap.vcxproj index 84134f5da..b516580c1 100644 --- a/build/pdflibwrap.vcxproj +++ b/build/pdflibwrap.vcxproj @@ -40,9 +40,9 @@ <_ProjectFileVersion>10.0.30319.1 ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ $(ProjectName) $(ProjectName) diff --git a/build/vedoc.vcxproj b/build/vedoc.vcxproj index 6121d748e..162e98e58 100644 --- a/build/vedoc.vcxproj +++ b/build/vedoc.vcxproj @@ -42,9 +42,9 @@ <_ProjectFileVersion>10.0.30319.1 ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ $(ProjectName) $(ProjectName) AllRules.ruleset diff --git a/build/vedocext.vcxproj b/build/vedocext.vcxproj index dc229e2bb..d27d02848 100644 --- a/build/vedocext.vcxproj +++ b/build/vedocext.vcxproj @@ -43,9 +43,9 @@ <_ProjectFileVersion>10.0.30319.1 ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ $(ProjectName) $(ProjectName) diff --git a/build/xi.vcxproj b/build/xi.vcxproj index 921fc47eb..8a8667a8b 100644 --- a/build/xi.vcxproj +++ b/build/xi.vcxproj @@ -42,10 +42,10 @@ <_ProjectFileVersion>10.0.30319.1 ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ true ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false $(ProjectName) false diff --git a/build/xvaga.vcxproj b/build/xvaga.vcxproj index 4acd78986..5287f21c7 100644 --- a/build/xvaga.vcxproj +++ b/build/xvaga.vcxproj @@ -43,10 +43,10 @@ <_ProjectFileVersion>10.0.30319.1 ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ true $(ProjectName) false diff --git a/build/xvapp.vcxproj b/build/xvapp.vcxproj index 9fbb6e666..6ba9e33fe 100644 --- a/build/xvapp.vcxproj +++ b/build/xvapp.vcxproj @@ -42,9 +42,9 @@ <_ProjectFileVersion>10.0.30319.1 ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ ..\lib\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ $(ProjectName) $(ProjectName) diff --git a/build/xvtdb.vcxproj b/build/xvtdb.vcxproj index 9c133349a..a8fa3f6b8 100644 --- a/build/xvtdb.vcxproj +++ b/build/xvtdb.vcxproj @@ -44,10 +44,10 @@ <_ProjectFileVersion>10.0.30319.1 ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ false ..\exe\ - ..\obj\common\$(ProjectName)\ + ..\obj\$(SolutionName)\$(ProjectName)\ true $(ProjectName) false diff --git a/cd/Setup.exe b/cd/Setup.exe index 670d1ffd1..07d92d59f 100644 Binary files a/cd/Setup.exe and b/cd/Setup.exe differ diff --git a/src/ba/ba0100.cpp b/src/ba/ba0100.cpp index da5291b49..a068cb241 100755 --- a/src/ba/ba0100.cpp +++ b/src/ba/ba0100.cpp @@ -1512,18 +1512,6 @@ bool TMenu_application::dongle_update_needed() const bool TMenu_application::user_create() { - TFilename dir; - - if (xvt_sys_get_env("TEMP", dir.get_buffer(), dir.size())) - if (!dexist(dir)) - return error_box(FR("La cartella temporanea %s definita dalla variabile d'ambiente TEMP non esiste."), (const char *)dir); - if (xvt_sys_get_env("TMP", dir.get_buffer(), dir.size())) - if (!dexist(dir)) - return error_box(FR("La cartella temporanea %s definita dalla variabile d'ambiente TMP non esiste."), (const char *)dir); - dir.cut(0); - dir.tempdir(); - if (!dexist(dir)) - return error_box(FR("La cartella temporanea %s definita in campo.ini non esiste."), (const char *)dir); disable_menu_item(M_FILE_PRINT); // Questa voce di menu non serve per ora disable_menu_item(M_FILE_PREVIEW); // Figuriamoci questa @@ -1587,7 +1575,7 @@ bool TMenu_application::user_create() _menu.read(menu); update_preferred_tree(); } - + return true; } diff --git a/src/ba/ba1100.cpp b/src/ba/ba1100.cpp index d336756b7..6c503a8a1 100755 --- a/src/ba/ba1100.cpp +++ b/src/ba/ba1100.cpp @@ -13,9 +13,11 @@ #include "ba1100.h" #include "ba1103.h" +#include #include -#include +#include #include +#include #include #include @@ -33,6 +35,59 @@ #define Dir_file "dir.gen" #define Trc_file "trc.gen" +class TManutenzione_app : public TSkeleton_application +{ + TDir_sheet* _browse; + TArray _dirs; + TArray _recs; + TMask* _mask; + long _firm; + long _level; + long _history_firm; + TRec_sheet* _rec; + TLog_report* _log; + bool _print_log; + + bool _superprassi; + +protected: + virtual void main_loop(); + virtual bool create () ; + virtual bool destroy(); + void insert_riga(long, TToken_string&); + void edit_riga(long, TToken_string&); + void edit_riga(const TString&); + void delete_riga(long); + virtual bool extended_firm() const { return true; } + + bool set_converting(); + bool reset_converting(); + + bool try_to_recover(TSystemisamfile& f, int err); + void update(); + void update_dir(); + void convert_dir(); + virtual void print(); + virtual void do_print(TPrinter & p, TRec_sheet & r); + const char* dumpfilename(const FileDes& dep) const; + void load_des(); + void open_history(); + void put_history(const char* firm); + void close_history(); + void dump_trc(const char * dir, const bool des_too, const long modules); + void repair_file(int i); + void save_file(const char * file); + + void open_log(); + void write_log(const char* line, const int severity = 0); + void close_log(); + + bool moveable_file(int file) const; +public: + + TManutenzione_app(); +}; + HIDDEN bool browse_file_handler(TMask_field& f, KEY k) { if (k == K_F9) @@ -263,12 +318,12 @@ void TManutenzione_app::print() bool TManutenzione_app::create() // initvar e arrmask { + _firm = get_firm(); + TString sw(argc()>2 ? argv(2) : ""); // Posso fare le operazione avanzate solo se sono ammistratore // e NON mi trovo su di una installazione di tipo client - - xvt_vobj_show(TASK_WIN); - _superprassi = user() == ::dongle().administrator() && !::dongle().demo(); + _superprassi = user() == ::dongle().administrator() && !::dongle().demo(); if (_superprassi) { const int type = ini_get_int(CONFIG_INSTALL, "Main", "Type"); @@ -306,8 +361,7 @@ bool TManutenzione_app::create() // initvar e arrmask else if (!::dongle().demo() && !set_firm()) return false; - _firm = atol(prefix().name()); - load_des(); + load_des(); _mask = new TMask("ba1100a"); _browse = new TDir_sheet(TR("Manutenzione file di sistema"), _superprassi); @@ -330,24 +384,6 @@ bool TManutenzione_app::destroy() return TApplication::destroy(); } -void TManutenzione_app::show_log() -{ - if (db_log()) - { - if (admin()) - { - TLog_mask m; - - m.run(); - } - else - message_box(TR("Il log delle transazioni è visualizzabile dall'amministratore")); - } - else - message_box(TR("Il log delle transazioni è disattivato")); -} - - void TManutenzione_app::open_log() { _print_log = false; diff --git a/src/ba/ba1100.h b/src/ba/ba1100.h index 443cc783a..ff79ff996 100755 --- a/src/ba/ba1100.h +++ b/src/ba/ba1100.h @@ -1,10 +1,6 @@ #ifndef __BA1100_H #define __BA1100_H -#ifndef __APPLICAT_H -#include -#endif - #ifndef __CONFIG_H #include #endif @@ -21,14 +17,6 @@ class TMask_field; #endif -#ifndef __PRINTER_H -#include -#endif - -#ifndef __REPUTILS_H -#include -#endif - #include "ba1100a.h" /////////////////////////////////////////////////////////// @@ -104,62 +92,4 @@ public: virtual ~TEdit_file() {} }; -class TManutenzione_app : public TSkeleton_application -{ - TDir_sheet* _browse; - TArray _dirs; - TArray _recs; - TMask* _mask; - long _firm; - long _level; - long _history_firm; - TRec_sheet* _rec; - TLog_report* _log; - bool _print_log; - - bool _superprassi; - -protected: - virtual void main_loop(); - virtual bool create(); - virtual bool destroy(); - void insert_riga(long, TToken_string&); - void edit_riga(long, TToken_string&); - void edit_riga(const TString&); - void delete_riga(long); - virtual bool extended_firm() const { return true; } - - bool set_converting(); - bool reset_converting(); - - bool try_to_recover(TSystemisamfile& f, int err); - void update(); - void update_dir(); - void convert_dir(); - virtual void print(); - virtual void do_print(TPrinter & p, TRec_sheet & r); - const char* dumpfilename(const FileDes& dep) const; - void load_des(); - void open_history(); - void put_history(const char* firm); - void close_history(); - void dump_trc(const char * dir, const bool des_too, const long modules); - void repair_file(int i); - void save_file(const char * file); - - virtual void show_log(); - - void open_log(); - void write_log(const char* line, const int severity = 0); - void close_log(); - - bool moveable_file(int file) const; -public: - long get_firm() const { return _firm; } - - TManutenzione_app(); -}; - -inline TManutenzione_app & app() { return (TManutenzione_app &)main_app(); } - #endif diff --git a/src/ba/ba1101.cpp b/src/ba/ba1101.cpp index 82863f895..f413898ce 100755 --- a/src/ba/ba1101.cpp +++ b/src/ba/ba1101.cpp @@ -275,17 +275,9 @@ void TRec_sheet::edit() } f2.set_notify(key_notify); f2.set_append(FALSE); - int nkeys = _rec.keys(); - - for (i = 0; i < nkeys; i++) - f2.row(i) = _rec.keydef(i); + for (i = 0; i < nkeys; i++) f2.row(i) = _rec.keydef(i); f2.disable_cell(0, 1); - - const bool enable_save = (_dir.is_com() && app().get_firm() == 0) || - (_dir.is_firm() && app().get_firm() > 0); - - _mask->enable(DLG_SAVEREC, enable_save); while (true) { f1.force_update(0); // Non togliere, serve per fare l'update della descrizione quando si fa l'import!! diff --git a/src/ba/ba2900.cpp b/src/ba/ba2900.cpp index ab54b52bc..faffa4b7b 100644 --- a/src/ba/ba2900.cpp +++ b/src/ba/ba2900.cpp @@ -136,7 +136,7 @@ protected: bool dir_gen() const; bool trc_gen() const; bool export_manager(const TString generalErrors) const; - bool show_export_log(); + bool show_log(); void log(int severity, const char* msg); public: @@ -980,7 +980,7 @@ bool TMSSQLExport_app::export_manager(TString generalErrors) const return true; } -bool TMSSQLExport_app::show_export_log() +bool TMSSQLExport_app::show_log() { if (_log) { @@ -1089,7 +1089,7 @@ void TMSSQLExport_app::main_loop() } message_box("Migrazione effettuata correttamente!"); } while (loop); - show_export_log(); + show_log(); } else message_box("Fallita connessione"); diff --git a/src/ba/ba3400.cpp b/src/ba/ba3400.cpp index 14a4dd375..62cccd6b1 100755 --- a/src/ba/ba3400.cpp +++ b/src/ba/ba3400.cpp @@ -52,26 +52,24 @@ bool TTestrel_application::user_destroy() // Testmask /////////////////////////////////////////////////////////// -class TTest_application : public TApplication +class TTest_application : public TSkeleton_application { const char* _maskname; protected: - bool create() { return menu(0); } - bool destroy() { return TRUE; } - bool menu(MENU_TAG); + void main_loop(); public: TTest_application(const char* name) : _maskname(name) {} }; -bool TTest_application::menu(MENU_TAG) +void TTest_application::main_loop() { if (*_maskname) { TMask m(_maskname); - KEY k = m.run(); - if (k == K_QUIT) stop_run(); + + while (m.run() == K_ENTER); } else { @@ -83,8 +81,6 @@ bool TTest_application::menu(MENU_TAG) m.run(); } } - - return FALSE; } /////////////////////////////////////////////////////////// diff --git a/src/ba/ba3400a.uml b/src/ba/ba3400a.uml index b056d73fb..7ef31e31b 100755 --- a/src/ba/ba3400a.uml +++ b/src/ba/ba3400a.uml @@ -4,7 +4,7 @@ PAGE "Richiesta" -1 -1 76 12 STRING F_NOME 50 BEGIN - PROMPT 3 3 "Nome maschera" + PROMPT 3 3 "Maschera " END BUTTON DLG_OK 10 2 diff --git a/src/ba/ba7100.cpp b/src/ba/ba7100.cpp index ffd601aa6..a166a511e 100755 --- a/src/ba/ba7100.cpp +++ b/src/ba/ba7100.cpp @@ -1742,7 +1742,6 @@ class TMailer : public TSkeleton_application bool _start_full_screen; protected: - virtual bool task_win_iconized() const { return !_start_full_screen && xvt_win_is_taskbar_visible(); } virtual bool create(); virtual void main_loop(); }; @@ -1768,7 +1767,7 @@ void TMailer::main_loop() WINDOW tray = xvt_trayicon_create(TASK_WIN, 9013, appname); // CampoServer.ico open_files(LF_USER, 0); -/* if (!_start_full_screen && xvt_win_is_taskbar_visible()) + if (!_start_full_screen && xvt_win_is_taskbar_visible()) { if (tray != NULL_WIN) { @@ -1779,7 +1778,7 @@ void TMailer::main_loop() if (xvt_rect_get_width(&rct_postman) >= xvt_rect_get_width(&rct_screen) - 64) xvt_vobj_set_visible(TASK_WIN, FALSE); } - } */ + } TMailer_mask mm; diff --git a/src/ba/batbiva.uml b/src/ba/batbiva.uml index 1b74f4c28..ddaacf0b2 100755 --- a/src/ba/batbiva.uml +++ b/src/ba/batbiva.uml @@ -46,7 +46,7 @@ BEGIN WARNING "Manca la descrizione" END -LIST LST_TABIVA_S1 2 28 +LIST LST_TABIVA_S1 2 20 BEGIN PROMPT 2 2 "Tipo " FIELD S1 @@ -70,15 +70,11 @@ BEGIN MESSAGE CLEAR,FLD_TABIVA_R0|CLEAR,FLD_TABIVA_I0 MESSAGE ENABLE,FLD_TABIVA_I3|ENABLE,FLD_TABIVA_I4|SHOW,CHK_TABIVA_B5 MESSAGE ENABLE,FLD_TABIVA_S6 - ITEM "RC|Reverse Charge (vendite)" - MESSAGE CLEAR,FLD_TABIVA_R0|CLEAR,FLD_TABIVA_I0 - MESSAGE CLEAR,FLD_TABIVA_I3|CLEAR,FLD_TABIVA_I4|HIDE,CHK_TABIVA_B5 - MESSAGE ENABLE,FLD_TABIVA_S6 - END +END STRING FLD_TABIVA_S6 4 BEGIN - PROMPT 44 2 "C.IVA a cui ventilare " + PROMPT 39 2 "C.IVA a cui ventilare " FLAGS "U" FIELD S6 COPY USE FLD_TABIVA_CODTAB @@ -150,7 +146,7 @@ END BOOLEAN CHK_TABIVA_B5 BEGIN - PROMPT 30 5 "Escluso dal calcolo dei bolli su fatture esenti" + PROMPT 30 5 "Escluso dal calcolo dei bolli sufatture esenti" FIELD B5 END @@ -192,8 +188,6 @@ BEGIN INPUT FLD_TABIVA_I3 OUTPUT FLD_TABIVA_I3 ITEM " |Nessuno" - ITEM "14|Passaggi interni" - ITEM "16|Cessioni beni ammortizzabili" ITEM "20|Operazioni non imponibili (comma 1, artt.8, 8bis e 9)" ITEM "21|Operazioni non imponibili a seguito di dich. d'intento" ITEM "22|Altre operazioni non imponibili" @@ -207,7 +201,6 @@ BEGIN ITEM "36|Cessione di microprocessori" ITEM "37|Prestazioni comparto edile e settori connessi" ITEM "38|Operazioni settore energetico" - ITEM "39|Reverse charge altri casi" ITEM "B1|Ammontare op. es. escluse da nr. 1 a 9 e 11 art. 10" ITEM "B2|Ammontare op. es. di cui al nr. 11 art. 10" ITEM "B3|Ammontare op. es. di cui ai nr. 1 a 9 art. 10" diff --git a/src/ca/ca2100.cpp b/src/ca/ca2100.cpp index 9ccc1082e..feb491c68 100755 --- a/src/ca/ca2100.cpp +++ b/src/ca/ca2100.cpp @@ -1025,7 +1025,7 @@ bool TMovanal_msk::row2imp(int r, TImporto& imp) const return !imp.is_zero(); } -const TToken_string& TMovanal_msk::rec2key(const TRectype& rec) const //qui +const TToken_string& TMovanal_msk::rec2key(const TRectype& rec) const { TToken_string& key = get_tmp_string(); key = get(F_TIPO); @@ -1127,6 +1127,7 @@ void TMovanal_msk::aggiorna_saldo_riga(int r) sld += TImporto('D', dare); } } + sld.normalize(); set(F_DARE, sld.sezione() == 'D' ? sld.valore() : ZERO); set(F_AVERE, sld.sezione() == 'A' ? sld.valore() : ZERO); diff --git a/src/ca/ca2300.cpp b/src/ca/ca2300.cpp index 58a8e3c89..027f480e4 100755 --- a/src/ca/ca2300.cpp +++ b/src/ca/ca2300.cpp @@ -50,8 +50,11 @@ bool TRic_saldi_msk::on_field_event(TOperable_field& o, TField_event e, long jol const long recset_items = recset.items(); TProgind pi(recset_items, "Ricerca movimenti che interessano l'esercizio selezionato...", true, true); - for (bool ok = recset.move_first(); pi.addstatus(1) && ok; ok = recset.move_next()) + for (bool ok = recset.move_first(); ok; ok = recset.move_next()) { + if (!pi.addstatus(1)) + break; + const TDate curr_date = recset.get(MOVANA_DATACOMP).as_date(); const TDate fcomp_date = recset.get(MOVANA_DATAFCOMP).as_date(); diff --git a/src/ca/ca3100.cpp b/src/ca/ca3100.cpp index 9febd1644..bf36a5370 100755 --- a/src/ca/ca3100.cpp +++ b/src/ca/ca3100.cpp @@ -1,6 +1,7 @@ #include #include #include +#include #include #include "movana.h" @@ -19,116 +20,59 @@ class TPrint_movimenti_ca_mask : public TAnal_report_mask { protected: bool on_field_event(TOperable_field& o, TField_event e, long jolly); - const TString& get_report_class() const; - bool test_compatible_report(); void create_page2(); int create_page2_sheet(int lf, int& y, short& dlg, bool required); + public: - TPrint_movimenti_ca_mask(); + virtual const TString & get_report_class() const; + TPrint_movimenti_ca_mask(); virtual ~TPrint_movimenti_ca_mask() {} }; -const TString& TPrint_movimenti_ca_mask::get_report_class() const +const TString & TPrint_movimenti_ca_mask::get_report_class() const { - TString& classe = get_tmp_string(); - classe = "ca3100"; - const int stp = get_int(F_TIPOSTAMPA); - classe << (stp == 1 ? 'a' : 'b'); // tipo di report da usare - return classe; -} + TString classe = TAnal_report_mask::get_report_class(); + const int stp = get_int(F_TIPOSTAMPA); -bool TPrint_movimenti_ca_mask::test_compatible_report() -{ - TFilename lib = get_report_class(); - const TString& name = get(F_REPORT); - bool ok = name.not_empty(); - if (ok) - { - TReport rep; - ok = rep.load(name); - if (ok) - { - const TString& classe = rep.get_class(); - ok = classe == lib; - } - } - if (!ok) - { - set(F_REPORT, lib); - lib.ext("rep"); - ok = lib.custom_path(); - } - return ok; + classe.cut(6); + classe << (stp == 1 ? 'a' : 'b'); // tipo di report da usare + return get_tmp_string() = classe; } bool TPrint_movimenti_ca_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) { switch (o.dlg()) { - case DLG_PRINT: - if (e == fe_button) - { - main_app().print(); - return false; - } - break; - case DLG_PREVIEW: - if (e == fe_button) - { - main_app().preview(); - return false; - } - break; - case F_TIPOSTAMPA: - if (e == fe_init || e == fe_modify) - { - test_compatible_report(); //in base al tipo stampa setta i report compatibili - } - break; - case F_REPORT: - if (e == fe_button) - { - const TString8 lib = get_report_class(); - TFilename path = o.get(); - if (select_custom_file(path, "rep", lib)) - { - path = path.name(); - path.ext(""); - o.set(path); - } - } else - if (e == fe_close) - { - if (!test_compatible_report()) - return error_box(TR("Impossibile trovare un report compatibile")); - } - break; - case F_DATAINI: - case F_DATAFIN: - if (e == fe_close) - { - const TString& anno = get(F_ANNO); - if (anno.not_empty()) //se l'anno esercizio esiste... + case F_TIPOSTAMPA: + if (e == fe_modify || e == fe_init) + set_report_class(); + break; + case F_DATAINI: + case F_DATAFIN: + if (e == fe_close) { - const TRectype& esc = cache().get("ESC", anno); - const TDate datainiesc = esc.get("D0"); - const TDate datafinesc = esc.get("D1"); - if (o.empty()) + const TString& anno = get(F_ANNO); + if (anno.not_empty()) //se l'anno esercizio esiste... { - const TDate dataesc = o.dlg() == F_DATAINI ? datainiesc : datafinesc; - o.set(dataesc.string()); - } - else - { - const TDate d = o.get(); - if (d < datainiesc || d > datafinesc) - return error_box(TR("La data deve essere compresa nell'esercizio selezionato")); + const TRectype& esc = cache().get("ESC", anno); + const TDate datainiesc = esc.get("D0"); + const TDate datafinesc = esc.get("D1"); + if (o.empty()) + { + const TDate dataesc = o.dlg() == F_DATAINI ? datainiesc : datafinesc; + o.set(dataesc.string()); + } + else + { + const TDate d = o.get(); + if (d < datainiesc || d > datafinesc) + return error_box(TR("La data deve essere compresa nell'esercizio selezionato")); + } } } - } - break; - - default: break; + break; + default: + break; } return true; } @@ -158,7 +102,7 @@ class TPrint_movimenti_ca_recordset : public TISAM_recordset char _tipomov; long _danumreg, _anumreg; TString4 _dacaus, _acaus; - TString _codcosto, _codcms, _codfas; + TString _codcosto, _codcms, _codfas, _contsep; protected: static bool mov_filter(const TRelation* rel); @@ -217,25 +161,14 @@ bool TPrint_movimenti_ca_recordset::valid_record(const TRelation& rel) const //..poi le righe (devono comparire solo le righe con cdc/cms/fsc che appaiono nello sheet) const TRectype& rmov = rel.curr(LF_RMOVANA); - if (_codcosto.not_empty()) - { - const TString& cos = rmov.get(RMOVANA_CODCCOSTO); - if (!cos.starts_with(_codcosto)) + if (_codcosto.full() && rmov.get(RMOVANA_CODCCOSTO).starts_with(_codcosto)) return false; - } - if (_codcms.not_empty()) - { - const TString& cms = rmov.get(RMOVANA_CODCMS); - if (!cms.starts_with(_codcms)) + if (_codcms.full() && rmov.get(RMOVANA_CODCMS).starts_with(_codcms)) return false; - } - if (_codfas.not_empty()) - { - const TString& fas = rmov.get(RMOVANA_CODFASE); - if (!fas.starts_with(_codfas)) + if (_codfas.full() && rmov.get(RMOVANA_CODFASE).starts_with(_codfas)) return false; - } - + if (_contsep.full() && _contsep != mov.get(MOVANA_CONTSEP)) + return false; return true; } @@ -286,6 +219,7 @@ void TPrint_movimenti_ca_recordset::set_filter(const TPrint_movimenti_ca_mask& m _acaus = msk.get(F_CAUSALEFIN); _tipomov = msk.get(F_TIPOMOV)[0]; + _contsep = msk.get(F_CONTSEP); } @@ -359,64 +293,68 @@ void TPrint_movimenti_ca_rep::set_filter(const TPrint_movimenti_ca_mask& msk, in //////////////////////////////////////////////////////// // APPLICAZIONE //////////////////////////////////////////////////////// -class TPrint_movimenti_ca : public TSkeleton_application +class TPrint_movimenti_ca : public TReport_application { - TPrint_movimenti_ca_mask* _mask; + TPrint_movimenti_ca_mask * _mask; + TPrint_movimenti_ca_rep * _rep; protected: virtual const char * extra_modules() const {return "cm";} //funziona anche con autorizzazione CM + virtual TReport & get_report(const TAutomask & m); + //virtual TTrec * get_dbase_recdesc(TReport & rep); + virtual TAutomask & get_mask(); + virtual void execute_print(TReport_book & book, TAutomask & mask, TReport & rep, export_type type = _export_printer); + virtual short output_id() const { return 0; } + virtual const char * output_name(const TReport & rep) const { return "listamov"; } + // @cmember Distruzione dei dati dell'utente + virtual bool user_destroy(); - void print_or_preview(const bool stampa); - virtual void print(); - virtual void preview(); - - virtual void main_loop(); +public: + TPrint_movimenti_ca() : _mask(nullptr), _rep(nullptr) {} + ~TPrint_movimenti_ca() {} }; - -void TPrint_movimenti_ca::print_or_preview(const bool stampa) +TReport & TPrint_movimenti_ca::get_report(const TAutomask & m) { - //costruzione della query x il report in base ai parametri della maschera - TSheet_field& sheet = _mask->sfield(F_RIGHE); - const int n_righe_sheet = sheet.items(); - //se lo sheet è vuoto aggiunge una riga vuota - if (n_righe_sheet == 0) - sheet.insert(); + if (_rep == nullptr) + _rep = new TPrint_movimenti_ca_rep; - //report e book - TReport_book book; //book dei report + TString path = _mask->get(DLG_REPORT); - TPrint_movimenti_ca_rep rep; - rep.load(_mask->get(F_REPORT)); - - FOR_EACH_SHEET_ROW(sheet, r, row) - { - rep.set_filter(*_mask, r); - book.add(rep); - } - - if (stampa) - book.print(); //stampa il book dei report - else - book.preview(); //anteprima il book dei report + if (path.empty()) + path = _mask->get_report_class(); + _rep->load(_mask->get(DLG_REPORT)); + return * _rep; } -void TPrint_movimenti_ca::print() +TAutomask & TPrint_movimenti_ca::get_mask() { - print_or_preview(true); + if (_mask == nullptr) + _mask = new TPrint_movimenti_ca_mask; + return *_mask; } -void TPrint_movimenti_ca::preview() +void TPrint_movimenti_ca::execute_print(TReport_book & book, TAutomask & mask, TReport & rep, export_type type) { - print_or_preview(false); + //costruzione della query x il report in base ai parametri della maschera + TSheet_field & sheet = mask.sfield(F_RIGHE); + const int n_righe_sheet = sheet.items(); + + //se lo sheet è vuoto aggiunge una riga vuota + if (n_righe_sheet == 0) + sheet.insert(); + FOR_EACH_SHEET_ROW(sheet, r, row) + { + ((TPrint_movimenti_ca_rep &) rep).set_filter((TPrint_movimenti_ca_mask &) mask, r); + book.add(rep); + } } -void TPrint_movimenti_ca::main_loop() +bool TPrint_movimenti_ca::user_destroy() { - _mask = new TPrint_movimenti_ca_mask; - _mask->run(); - delete _mask; - _mask = NULL; + safe_delete(_mask); + safe_delete(_rep); + return TReport_application::user_destroy(); } int ca3100(int argc, char* argv[]) diff --git a/src/ca/ca3100.h b/src/ca/ca3100.h index 21991b612..a1f6283fb 100755 --- a/src/ca/ca3100.h +++ b/src/ca/ca3100.h @@ -14,8 +14,9 @@ #define F_NUMEROFIN 210 #define F_CAUSALEINI 211 #define F_CAUSALEFIN 212 -#define F_REPORT 213 #define F_TIPOMOV 214 +#define F_CONTSEP 215 +#define F_DESCONTSEP 216 //sheet di pagina 2 #define F_RIGHE 400 diff --git a/src/ca/ca3100.uml b/src/ca/ca3100.uml index e56fd336e..81d0a6aa9 100755 --- a/src/ca/ca3100.uml +++ b/src/ca/ca3100.uml @@ -1,25 +1,15 @@ #include "ca3100.h" #include "camask.h" +#define ALL_EXPORT +#define CLASS_NAME "ca3100a" + TOOLBAR "topbar" 0 0 0 2 #include ENDPAGE -TOOLBAR "bottombar" 0 -2 0 1 - -STRING F_REPORT 256 66 -BEGIN - PROMPT 1 -2 "Report " - FLAGS "B" - CHECKTYPE REQUIRED -END - -STRING DLG_PROFILE 50 -BEGIN - PROMPT 1 -1 "Profilo " - PSELECT -END - +TOOLBAR "bottombar" 0 -3 0 1 +#include ENDPAGE PAGE "Parametri stampa" 0 0 0 2 @@ -151,9 +141,35 @@ BEGIN ITEM "T|Trasferito" END +STRING F_CONTSEP 6 +BEGIN + PROMPT 1 10 "Cont. separata " + USE &NPENT + INPUT CODTAB F_CONTSEP + DISPLAY "Codice@6" CODTAB + DISPLAY "Descrizione@50" S0 + OUTPUT F_CONTSEP CODTAB + OUTPUT F_DESCONTSEP S0 + CHECKTYPE NORMAL + FIELD CONTSEP + MODULE NP +END + +STRING F_DESCONTSEP 50 48 +BEGIN + PROMPT 26 10 "" + USE &NPENT KEY 2 + INPUT S0 F_DESCONTSEP + DISPLAY "Descrizione@50" S0 + DISPLAY "Codice@6" CODTAB + COPY OUTPUT F_CONTSEP + CHECKTYPE NORMAL + MODULE NP +END + SPREADSHEET F_RIGHE -1 -1 BEGIN - PROMPT 1 12 "Selezione su CdC / Commesse / Fasi" + PROMPT 0 12 "Selezione su CdC / Commesse / Fasi" ITEM "Cdc1" ITEM "Cdc2" ITEM "Cdc3" diff --git a/src/ca/ca3100a.rep b/src/ca/ca3100a.rep index 519db804b..4e2dc0964 100755 --- a/src/ca/ca3100a.rep +++ b/src/ca/ca3100a.rep @@ -1,8 +1,8 @@ - + Movimenti CA per numero registrazione -
+ -
+ -
+ -
-
+