diff --git a/ps/ps0017100.cpp b/ps/ps0017100.cpp index 65da150e8..ed8acbc37 100755 --- a/ps/ps0017100.cpp +++ b/ps/ps0017100.cpp @@ -339,9 +339,9 @@ bool TPE_mask::fill_rate() for (id = _start[LF_COMMESSE]; id <= _end[LF_COMMESSE]; id++) commessa << get(id); for (id = _start[LF_CDC]; id <= _end[LF_CDC]; id++) - commessa << get(id); + cdc << get(id); for (id = _start[LF_FASI]; id <= _end[LF_FASI]; id++) - commessa << get(id); + fase << get(id); const long items = partite.items(); partite.freeze(); @@ -835,7 +835,6 @@ bool TPE_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) _is_new = !ok; // Memorizza se è una distinta nuova enable(-3, _is_new); // Abilita tipo, cliente, valuta, ecc., solo se nuova enable(F_TIPOPAG, _is_new); - disable(F_AGGIORNA); } break; case F_CODVAL: @@ -979,15 +978,6 @@ bool TPE_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) } } break; - case F_CDC1: - case F_DA_DATA: - case F_A_DATA: - if (e == fe_modify) - { - if (get(F_CDC1).not_empty() || get(F_DA_DATA).not_empty() || get(F_A_DATA).not_empty()) - enable(F_AGGIORNA); - } - break; case F_SHEET: return on_sheet_event(o, e, jolly); default: @@ -1001,8 +991,6 @@ bool TPE_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) int TPE_mask::insert_anal_fields(TMask& m, int page, int lf, int& y, short& dlg, short& dlgd, bool required) { - _start[lf] = dlg; - _end[lf] = dlg + ca_multilevel_code_info(lf).levels()-1; const int h = ca_create_fields(m, page, lf, 2, y, dlg, dlgd); y += h+1; @@ -1012,7 +1000,7 @@ int TPE_mask::insert_anal_fields(TMask& m, int page, int lf, int& y, void TPE_mask::insert_anal_page() { - add_groupbox(DLG_NULL, 2, TR("Contabilita' Analitica"), 1, 4, 78, 14); + add_groupbox(DLG_NULL, 1, TR("Contabilita' Analitica"), 1, 4, 78, 14); const TMultilevel_code_info& fasinfo = ca_multilevel_code_info(LF_FASI); const bool use_fsc = fasinfo.levels() > 0; @@ -1028,29 +1016,45 @@ void TPE_mask::insert_anal_page() const TString& level = ini.get("Level", NULL, i+1); // Legge il livello 1 o 2 if (level == "CDC") // Crea centro di costo { + _start[LF_CDC] = dlg; + _end[LF_CDC] = dlg + ca_multilevel_code_info(LF_CDC).levels()-1; if (use_fsc && fasinfo.parent() == LF_CDC) - insert_anal_fields(*this, 2, LF_FASI, y, dlg, dlgd, fsc_req); + { + _start[LF_FASI] = _end[LF_CDC] + 1; + insert_anal_fields(*this, 1, LF_FASI, y, dlg, dlgd, fsc_req); + _end[LF_FASI] = dlg - 1; + } else { const bool cdc_req = ini.get_bool("CdcRequired"); - insert_anal_fields(*this, 2, LF_CDC, y, dlg, dlgd, cdc_req); + insert_anal_fields(*this, 1, LF_CDC, y, dlg, dlgd, cdc_req); } } else if (level == "CMS") // Crea commessa { + _start[LF_COMMESSE] = dlg; + _end[LF_COMMESSE] = dlg + ca_multilevel_code_info(LF_COMMESSE).levels()-1; if (use_fsc && fasinfo.parent() == LF_COMMESSE) - insert_anal_fields(*this, 2, LF_FASI, y, dlg, dlgd, fsc_req); + { + _start[LF_FASI] = _end[LF_COMMESSE] + 1; + insert_anal_fields(*this, 1, LF_FASI, y, dlg, dlgd, fsc_req); + _end[LF_FASI] = dlg - 1; + } else { const bool cms_req = ini.get_bool("CmsRequired"); - insert_anal_fields(*this, 2, LF_COMMESSE, y, dlg, dlgd, cms_req); + insert_anal_fields(*this, 1, LF_COMMESSE, y, dlg, dlgd, cms_req); } } } if (use_fsc && fasinfo.parent() <= 0) - insert_anal_fields(*this, 2, LF_FASI, y, dlg, dlgd, fsc_req); + { + _start[LF_FASI] = dlg; + _end[LF_FASI] = dlg + ca_multilevel_code_info(LF_FASI).levels()-1; + insert_anal_fields(*this, 1, LF_FASI, y, dlg, dlgd, fsc_req); + } } TPE_mask::TPE_mask() : TAutomask("ps0017100a") @@ -1072,6 +1076,8 @@ class TIncasso_fatture : public TSkeleton_application { TPE_mask* _mask; +virtual const char * extra_modules() const {return "ef";} + public: virtual bool create(); virtual void main_loop(); @@ -1112,9 +1118,6 @@ void TIncasso_fatture::print() bool TIncasso_fatture::create() { - if (!has_module(EPAUT) && !has_module(EEAUT)) - return error_box(TR("Modulo non autorizzato")); - return TSkeleton_application::create(); } diff --git a/ps/ps0017100a.uml b/ps/ps0017100a.uml index b06849be4..38048490b 100755 --- a/ps/ps0017100a.uml +++ b/ps/ps0017100a.uml @@ -1,4 +1,4 @@ -#include "ef0A00a.h" +#include "ps0017100a.h" TOOLBAR "Toolbar" 0 -3 0 3 @@ -104,9 +104,6 @@ BEGIN OUTPUT F_CAMBIO CAMBIO OUTPUT F_DATACAMBIO DATACAMBIO OUTPUT F_EURO CONTROEURO - OUTPUT F_TIPOCF TIPOCF - OUTPUT F_ABI CODABIP - OUTPUT F_CAB CODCABP OUTPUT F_TIPOPAG TIPOPAG OUTPUT F_SPESE SPESE CHECKTYPE SEARCH