From 0ffb4993aa46a1df720f5fb7106a1b84b768f2d0 Mon Sep 17 00:00:00 2001 From: luca Date: Tue, 6 Sep 2005 17:58:13 +0000 Subject: [PATCH] =?UTF-8?q?Patch=20level=20=20=20=20=20=20=20=20=20:2.2=20?= =?UTF-8?q?172=20Files=20correlati=20=20=20=20=20:stampa=20rendiconto=20Ri?= =?UTF-8?q?compilazione=20Demo=20:=20[=20]=20Commento=20=20=20=20=20=20=20?= =?UTF-8?q?=20=20=20=20=20:=20Aggiornate=20le=20maschere=20di=20tutti=20i?= =?UTF-8?q?=20programmi=20sfruttando=20i=20metodi=20in=20calib02.=20Sistem?= =?UTF-8?q?ato=20report=20rendiconto=20secondo=20nuove=20adolfiche=20richi?= =?UTF-8?q?este.=20sistemata=20stampa=20mastrini:=20adesso=20stampa=20pi?= =?UTF-8?q?=C3=B9=20di=20una=20commessa=20ed=20i=20casi=20particolari=20(a?= =?UTF-8?q?ncora=20da=20aggiornare=20il=20caso=20dei=20soli=20movimentati)?= =?UTF-8?q?.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://10.65.10.50/trunk@13334 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- ca/ca3100.cpp | 111 +------------------ ca/ca3100.uml | 1 + ca/ca3200.cpp | 286 +++++++++++++++---------------------------------- ca/ca3200.uml | 43 ++++---- ca/ca3700.cpp | 21 ++-- ca/ca3700.h | 16 +-- ca/ca3700.uml | 1 + ca/ca3700a.rep | 69 ++++++------ ca/calib02.cpp | 1 + ca/calib02.h | 15 --- ca/camask.h | 13 +++ 11 files changed, 184 insertions(+), 393 deletions(-) create mode 100755 ca/camask.h diff --git a/ca/ca3100.cpp b/ca/ca3100.cpp index a51b62199..6cc49a46c 100755 --- a/ca/ca3100.cpp +++ b/ca/ca3100.cpp @@ -9,11 +9,12 @@ #include "ca3100.h" #include "calib01.h" #include "calib02.h" +#include "camask.h" //////////////////////////////////////////////////////// // MASCHERA //////////////////////////////////////////////////////// -class TPrint_movimenti_ca_mask : public TAutomask +class TPrint_movimenti_ca_mask : public TAnal_report_mask { protected: bool on_field_event(TOperable_field& o, TField_event e, long jolly); @@ -117,113 +118,9 @@ bool TPrint_movimenti_ca_mask::on_field_event(TOperable_field& o, TField_event e return true; } -int TPrint_movimenti_ca_mask::create_page2_sheet(int lf, int& y, short& dlg, bool required) -{ - TSheet_field& sf = sfield(F_RIGHE); - TMask& sm = sf.sheet_mask(); - - const int h = ca_create_fields(sm, 0, lf, 1, y, dlg, dlg+50); - - for (int i = 0; i < h; i++) - { - TEdit_field& fld = sm.efield(dlg+i); - int logic = lf; - if (logic == LF_FASI) - { - const TMultilevel_code_info& fasinfo = ca_multilevel_code_info(LF_FASI); - if (fasinfo.parent() != 0) - { - const TMultilevel_code_info& parinfo = ca_multilevel_code_info(fasinfo.parent()); - if (i < parinfo.levels()) - logic = fasinfo.parent(); - } - } - - const char* fieldname = NULL; - switch(logic) - { - case LF_CDC : fieldname = RMOVANA_CODCCOSTO; break; - case LF_COMMESSE: fieldname = RMOVANA_CODCMS; break; - case LF_FASI : fieldname = RMOVANA_CODFASE; break; - default : fieldname = RMOVANA_CODCONTO; break; - } - TFieldref* f = (TFieldref*)fld.field(); - f->set_name(fieldname); - - fld.check_type(required ? CHECK_REQUIRED : CHECK_NORMAL); - - TEdit_field& dfld = sm.efield(dlg+50+i); - dfld.set_field(EMPTY_STRING); // Toglie campi che fan saltare gli output! - } - - y += h+1; - dlg += h; - - return h; -} - -void TPrint_movimenti_ca_mask::create_page2() -{ - TSheet_field& sf = sfield(F_RIGHE); - TMask& sm = sf.sheet_mask(); - sm.hide(-1); - - const TMultilevel_code_info& fasinfo = ca_multilevel_code_info(LF_FASI); - - TConfig_anal ini; - const bool fsc_req = ini.get_bool("FscRequired"); - - int y = 1; - short dlg = S_CDC1 + 100; // id del primo campo da generare - - for (int i = 0; i < 2; i++) - { - const TString& level = ini.get("Level", NULL, i+1); // Legge il livello 1 o 2 - if (level == "CDC") // Crea centro di costo - { - if (fasinfo.parent() == LF_CDC) - create_page2_sheet(LF_FASI, y, dlg, fsc_req); - else - { - const bool cdc_req = ini.get_bool("CdcRequired"); - create_page2_sheet(LF_CDC, y, dlg, cdc_req); - } - } else - if (level == "CMS") // Crea commessa - { - if (fasinfo.parent() == LF_COMMESSE) - create_page2_sheet(LF_FASI, y, dlg, fsc_req); - else - { - const bool cms_req = ini.get_bool("CmsRequired"); - create_page2_sheet(LF_COMMESSE, y, dlg, cms_req); - } - } - } - - if (fasinfo.levels() > 0 && fasinfo.parent() <= 0) - create_page2_sheet(LF_FASI, y, dlg, fsc_req); - - for (short id = S_CDC12+100; id >= S_CDC1+100; id--) - { - const int pos = sm.id2pos(id); - if (pos >= 0) - { - TMask_field& f = sm.fld(pos); - const int size = f.size(); - const TString& prompt = f.prompt(); - sf.set_column_header(id, prompt); - sf.set_column_justify(id, f.is_kind_of(CLASS_REAL_FIELD)); - sf.set_column_width(id, (max(3+size, prompt.len()+1)) * CHARX); - } - else - sf.delete_column(id); - } -} - TPrint_movimenti_ca_mask::TPrint_movimenti_ca_mask() - :TAutomask("ca3100") + :TAnal_report_mask("ca3100") { TConfig_anal cfg; const bool use_pdcc = cfg.get_bool("UsePdcc"); @@ -231,7 +128,7 @@ TPrint_movimenti_ca_mask::TPrint_movimenti_ca_mask() const int logicnum = use_pdcc ? LF_PCON : LF_PCONANA; // creazione dei campi della seconda pagina della maschera - create_page2(); + create_sheet(F_RIGHE); } diff --git a/ca/ca3100.uml b/ca/ca3100.uml index 0b757ad45..1aeff9772 100755 --- a/ca/ca3100.uml +++ b/ca/ca3100.uml @@ -1,4 +1,5 @@ #include "ca3100.h" +#include "camask.h" TOOLBAR "" 0 -3 0 3 diff --git a/ca/ca3200.cpp b/ca/ca3200.cpp index bb8c60a21..41de1a133 100755 --- a/ca/ca3200.cpp +++ b/ca/ca3200.cpp @@ -13,18 +13,18 @@ #include "ca3200.h" #include "calib01.h" #include "calib02.h" +#include "camask.h" //////////////////////////////////////////////////////// // MASCHERA //////////////////////////////////////////////////////// -class TPrint_mastrini_ca_mask : public TAutomask +class TPrint_mastrini_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_mastrini_ca_mask(); virtual ~TPrint_mastrini_ca_mask() {} @@ -115,120 +115,16 @@ bool TPrint_mastrini_ca_mask::on_field_event(TOperable_field& o, TField_event e, return true; } -int TPrint_mastrini_ca_mask::create_page2_sheet(int lf, int& y, short& dlg, bool required) -{ - TSheet_field& sf = sfield(F_RIGHE); - TMask& sm = sf.sheet_mask(); - - const int h = ca_create_fields(sm, 0, lf, 1, y, dlg, dlg+50); - - for (int i = 0; i < h; i++) - { - TEdit_field& fld = sm.efield(dlg+i); - int logic = lf; - if (logic == LF_FASI) - { - const TMultilevel_code_info& fasinfo = ca_multilevel_code_info(LF_FASI); - if (fasinfo.parent() != 0) - { - const TMultilevel_code_info& parinfo = ca_multilevel_code_info(fasinfo.parent()); - if (i < parinfo.levels()) - logic = fasinfo.parent(); - } - } - - const char* fieldname = NULL; - switch(logic) - { - case LF_CDC : fieldname = RMOVANA_CODCCOSTO; break; - case LF_COMMESSE: fieldname = RMOVANA_CODCMS; break; - case LF_FASI : fieldname = RMOVANA_CODFASE; break; - default : fieldname = RMOVANA_CODCONTO; break; - } - TFieldref* f = (TFieldref*)fld.field(); - f->set_name(fieldname); - - fld.check_type(required ? CHECK_REQUIRED : CHECK_NORMAL); - - TEdit_field& dfld = sm.efield(dlg+50+i); - dfld.set_field(EMPTY_STRING); // Toglie campi che fan saltare gli output! - } - - y += h+1; - dlg += h; - - return h; -} - -void TPrint_mastrini_ca_mask::create_page2() -{ - TSheet_field& sf = sfield(F_RIGHE); - TMask& sm = sf.sheet_mask(); - sm.hide(-1); - - const TMultilevel_code_info& fasinfo = ca_multilevel_code_info(LF_FASI); - - TConfig_anal ini; - const bool fsc_req = ini.get_bool("FscRequired"); - - int y = 1; - short dlg = S_CDC1 + 100; // id del primo campo da generare - - for (int i = 0; i < 2; i++) - { - const TString& level = ini.get("Level", NULL, i+1); // Legge il livello 1 o 2 - if (level == "CDC") // Crea centro di costo - { - if (fasinfo.parent() == LF_CDC) - create_page2_sheet(LF_FASI, y, dlg, fsc_req); - else - { - const bool cdc_req = ini.get_bool("CdcRequired"); - create_page2_sheet(LF_CDC, y, dlg, cdc_req); - } - } else - if (level == "CMS") // Crea commessa - { - if (fasinfo.parent() == LF_COMMESSE) - create_page2_sheet(LF_FASI, y, dlg, fsc_req); - else - { - const bool cms_req = ini.get_bool("CmsRequired"); - create_page2_sheet(LF_COMMESSE, y, dlg, cms_req); - } - } - } - - if (fasinfo.levels() > 0 && fasinfo.parent() <= 0) - create_page2_sheet(LF_FASI, y, dlg, fsc_req); - - for (short id = S_CDC12+100; id >= S_CDC1+100; id--) - { - const int pos = sm.id2pos(id); - if (pos >= 0) - { - TMask_field& f = sm.fld(pos); - const int size = f.size(); - const TString& prompt = f.prompt(); - sf.set_column_header(id, prompt); - sf.set_column_justify(id, f.is_kind_of(CLASS_REAL_FIELD)); - sf.set_column_width(id, (max(3+size, prompt.len()+1)) * CHARX); - } - else - sf.delete_column(id); - } -} - TPrint_mastrini_ca_mask::TPrint_mastrini_ca_mask() - :TAutomask("ca3200") + :TAnal_report_mask("ca3200") { TConfig_anal cfg; const bool use_pdcc = cfg.get_bool("UsePdcc"); const int logicnum = use_pdcc ? LF_PCON : LF_PCONANA; - const int nfields = ca_create_fields(*this, 0, logicnum, 2, 4, F_CDC1_INI, F_DES1_INI, 0x0, "#DACONTO"); - ca_create_fields(*this, 0, logicnum, 2, 10, F_CDC1_FIN, F_DES1_FIN, 0x0, "#ACONTO"); + const int nfields = ca_create_fields(*this, 1, logicnum, 2, 4, F_CDC1_INI, F_DES1_INI, 0x0, "#DACONTO"); + ca_create_fields(*this, 1, logicnum, 2, 10, F_CDC1_FIN, F_DES1_FIN, 0x0, "#ACONTO"); for (int i = 0; i < nfields; i++) { @@ -240,7 +136,7 @@ TPrint_mastrini_ca_mask::TPrint_mastrini_ca_mask() aconto.check_type(CHECK_NORMAL); } // creazione dei campi della seconda pagina della maschera - create_page2(); + create_sheet(F_RIGHE); } @@ -325,10 +221,17 @@ void TPrint_mastrini_ca_recordset::set_custom_filter(TCursor& cur) const { //filtro sui conti selezionati sulla maschera TRectype darec(cur.curr()), arec(cur.curr()); //record corrente (rmovana (solo movimentati)) - darec.put(RMOVANA_CODCONTO, _daconto); - darec.put(RMOVANA_DATACOMP, _dadata); - arec.put(RMOVANA_CODCONTO, _aconto); - arec.put(RMOVANA_DATACOMP, _adata); + + if (_daconto.not_empty()) + darec.put(RMOVANA_CODCONTO, _daconto); + if (_dadata.ok()) + darec.put(RMOVANA_DATACOMP, _dadata); + + if (_aconto.not_empty()) + arec.put(RMOVANA_CODCONTO, _aconto); + if (_adata.ok()) + arec.put(RMOVANA_DATACOMP, _adata); + cur.setregion(darec, arec); myself = this; @@ -496,106 +399,83 @@ void TPrint_mastrini_ca_alternative_recordset::set_filter(const TPrint_mastrini_ _tipoconti = msk.get_int(F_TIPOCONTI); //scandisce il piano dei conti analitico creando un cursore con i conti nell'intervallo scelto sulla maschera - TRelation rel_pconana(LF_PCONANA); + TPconana_recordset pconana; + + pconana.set_filter(' ', _daconto, _aconto, _codcosto, _codcms, _codfas, + _dadata, _adata, _tipimov, _tipoconti==1, _tipoconti==2); - TRectype daconto(LF_PCONANA); - daconto.put(PCONANA_CODCONTO, _daconto); - TRectype aconto(LF_PCONANA); - aconto.put(PCONANA_CODCONTO, _aconto); - - //solo i gr/co/sottoc completi interessano!!! - int contolen = 0; - const TMultilevel_code_info& info = ca_multilevel_code_info(LF_PCONANA); - for (int l = info.levels()-1; l >= 0; l--) - contolen += info.len(l); - - TString filtro; - filtro << "LEN(CODCONTO)==" << contolen; - - TCursor cur_pconana(&rel_pconana, filtro, 1, &daconto, &aconto); - const long pconana_items = cur_pconana.items(); - cur_pconana.freeze(); + const long pconana_items = pconana.items(); TProgind pi(pconana_items, "Scansione conti..."); + TRelation rel_rmovana(LF_RMOVANA); + rel_rmovana.add(LF_MOVANA, "NUMREG==NUMREG"); //aggiunge le testate x avere i tipi mov. + + TRectype da_rmovana(LF_RMOVANA); + da_rmovana.put(RMOVANA_DATACOMP, _dadata); + TRectype a_rmovana(LF_RMOVANA); + a_rmovana.put(RMOVANA_DATACOMP, _adata); + + TString filtro; + if (_codcosto.not_empty()) + filtro << "(" << RMOVANA_CODCCOSTO << "==\"" << _codcosto << "\")"; + if (_codcms.not_empty()) + { + if (filtro.not_empty()) + filtro << "&&"; + filtro << "(" << RMOVANA_CODCMS << "==\"" << _codcms << "\")"; + } + if (_codfas.not_empty()) + { + if (filtro.not_empty()) + filtro << "&&"; + filtro << "(" << RMOVANA_CODFASE << "==\"" << _codfas << "\")"; + } + //scandisce il piano dei conti.. - for (cur_pconana = 0; cur_pconana.pos() < pconana_items; ++cur_pconana) + for (TRecnotype j = 0; pconana.move_to(j); j++) { pi.addstatus(1); - TRectype& current_pconana_rec = cur_pconana.curr(); - const TString conto = current_pconana_rec.get(PCONANA_CODCONTO); + const TString& conto = pconana.get(PCONANA_CODCONTO).as_string(); - bool aggiungi = true; - if (_tipoconti == 2) //se si è scelto di stampare solo quelli con saldo != 0... + //..crea un cursore su rmovana per vedere se i conti selezionati hanno veri movimenti che soddisfano + //i parametri del filtro sulla maschera + da_rmovana.put(RMOVANA_CODCONTO, conto); + a_rmovana.put(RMOVANA_CODCONTO, conto); + + TCursor cur_rmovana(&rel_rmovana, filtro, 2, &da_rmovana, &a_rmovana); + const long rmovana_items = cur_rmovana.items(); + cur_rmovana.freeze(); + bool almeno_uno_aggiunto = false; + if (rmovana_items > 0) { - const TImporto& saldo_fin = saldo_finale(conto); - aggiungi = !saldo_fin.is_zero(); - } - if (aggiungi) //se il conto va aggiunto (casi: conti con saldo !=0 trovato, tutti i conti comunque).. - { - TRelation rel_rmovana(LF_RMOVANA); - rel_rmovana.add(LF_MOVANA, "NUMREG==NUMREG"); //aggiunge le testate x avere i tipi mov. - - //..crea un cursore su rmovana per vedere se i conti selezionati hanno veri movimenti che soddisfano - //i parametri del filtro sulla maschera - TRectype da_rmovana(LF_RMOVANA); - da_rmovana.put(RMOVANA_CODCONTO, conto); - da_rmovana.put(RMOVANA_DATACOMP, _dadata); - TRectype a_rmovana(LF_RMOVANA); - a_rmovana.put(RMOVANA_CODCONTO, conto); - a_rmovana.put(RMOVANA_DATACOMP, _adata); - - TString filtro; - if (_codcosto.not_empty()) - filtro << "(" << RMOVANA_CODCCOSTO << "==\"" << _codcosto << "\")"; - if (_codcms.not_empty()) + for (cur_rmovana = 0; cur_rmovana.pos() < rmovana_items; ++cur_rmovana) { - if (filtro.not_empty()) - filtro << "&&"; - filtro << "(" << RMOVANA_CODCMS << "==\"" << _codcms << "\")"; - } - if (_codfas.not_empty()) - { - if (filtro.not_empty()) - filtro << "&&"; - filtro << "(" << RMOVANA_CODFASE << "==\"" << _codfas << "\")"; - } - - TCursor cur_rmovana(&rel_rmovana, filtro, 2, &da_rmovana, &a_rmovana); - const long rmovana_items = cur_rmovana.items(); - cur_rmovana.freeze(); - bool almeno_uno_aggiunto = false; - if (rmovana_items > 0) - { - for (cur_rmovana = 0; cur_rmovana.pos() < rmovana_items; ++cur_rmovana) + //deve coincidere anche il tipomov! sarebbe stato troppo semplice... + const char tipomov = rel_rmovana.curr(LF_MOVANA).get_char(MOVANA_TIPOMOV); + int tipomov_int = 0; + switch (tipomov) { - //deve coincidere anche il tipomov! sarebbe stato troppo semplice... - const char tipomov = rel_rmovana.curr(LF_MOVANA).get_char(MOVANA_TIPOMOV); - int tipomov_int = 0; - switch (tipomov) - { - case 'P': tipomov_int = 2; break; - case 'V': tipomov_int = 4; break; - default: tipomov_int = 1; break; - } - if ((_tipimov & tipomov_int) != 0) - { - _tmp_rmovana->write(cur_rmovana.curr()); // aggiunge i record al file temporaneo - almeno_uno_aggiunto = true; - } + case 'P': tipomov_int = 2; break; + case 'V': tipomov_int = 4; break; + default: tipomov_int = 1; break; + } + if ((_tipimov & tipomov_int) != 0) + { + _tmp_rmovana->write(cur_rmovana.curr()); // aggiunge i record al file temporaneo + almeno_uno_aggiunto = true; } } - //se non ha aggiunto nemmeno un record valido.. - //crea un record di rmovana con il solo conto,datacomp e lo aggiunge al file temporaneo - if (!almeno_uno_aggiunto) - { - TRectype fake_rmovana_rec(LF_RMOVANA); - fake_rmovana_rec.put(RMOVANA_CODCONTO, conto); - fake_rmovana_rec.put(RMOVANA_DATACOMP, _dadata); - _tmp_rmovana->write(fake_rmovana_rec); - } + } + //se non ha aggiunto nemmeno un record valido.. + //crea un record di rmovana con il solo conto,datacomp e lo aggiunge al file temporaneo + if (!almeno_uno_aggiunto) + { + TRectype fake_rmovana_rec(LF_RMOVANA); + fake_rmovana_rec.put(RMOVANA_CODCONTO, conto); + fake_rmovana_rec.put(RMOVANA_DATACOMP, _dadata); + _tmp_rmovana->write(fake_rmovana_rec); + } - } //end if aggiungi - } //end for su pconana_items } @@ -621,6 +501,8 @@ bool TPrint_mastrini_ca_rep::set_recordset(const TString& sql) void TPrint_mastrini_ca_rep::set_filter(const TPrint_mastrini_ca_mask& msk, int cms_row) { + TReport::set_recordset(NULL); //forza azzeramento file anal.dbf prima di ricostruirlo + const int tipoconti = msk.get_int(F_TIPOCONTI); TPrint_mastrini_ca_recordset* recset = NULL; diff --git a/ca/ca3200.uml b/ca/ca3200.uml index ff0b3dd20..00be295ce 100755 --- a/ca/ca3200.uml +++ b/ca/ca3200.uml @@ -1,4 +1,5 @@ #include "ca3200.h" +#include "camask.h" TOOLBAR "" 0 -3 0 3 @@ -21,6 +22,27 @@ END ENDPAGE +PAGE "Selezioni" -1 -1 78 20 + +SPREADSHEET F_RIGHE -1 -2 +BEGIN + PROMPT 0 2 "" + ITEM "Cdc1" + ITEM "Cdc2" + ITEM "Cdc3" + ITEM "Cdc4" + ITEM "Cdc5" + ITEM "Cdc6" + ITEM "Cdc7" + ITEM "Cdc8" + ITEM "Cdc9" + ITEM "Cdc10" + ITEM "Cdc11" + ITEM "Cdc12" +END + +ENDPAGE + PAGE "Parametri stampa" -1 -1 78 20 NUMBER F_CODDITTA 5 @@ -123,27 +145,6 @@ END ENDPAGE -PAGE "Selezioni" -1 -1 78 20 - -SPREADSHEET F_RIGHE -1 -2 -BEGIN - PROMPT 0 2 "" - ITEM "Cdc1" - ITEM "Cdc2" - ITEM "Cdc3" - ITEM "Cdc4" - ITEM "Cdc5" - ITEM "Cdc6" - ITEM "Cdc7" - ITEM "Cdc8" - ITEM "Cdc9" - ITEM "Cdc10" - ITEM "Cdc11" - ITEM "Cdc12" -END - -ENDPAGE - ENDMASK PAGE "Riga" -1 -1 78 19 diff --git a/ca/ca3700.cpp b/ca/ca3700.cpp index 3765ce64b..279e3faad 100755 --- a/ca/ca3700.cpp +++ b/ca/ca3700.cpp @@ -318,7 +318,6 @@ void TPrint_rendiconto_ca_recordset::set_custom_filter(TCursor& cur) const cur.setfilter(filtro); myself = (TPrint_rendiconto_ca_recordset*)this; - //cur.set_filterfunction(mov_filter, true); } //metodo per il calcolo del budget PREVENTIVO o VARIAZIONE (sezione di raggruppamento sul report) @@ -537,14 +536,14 @@ void TPrint_rendiconto_ca_recordset::scrive_riga(const TRectype& rmovana, const codnum_desc = movana.get(MOVANA_DCODNUM); //serve anche in fondo al metodo tmpcurr.put("CODNUM", codnum_desc); //codnum del documento che origina il movana tmpcurr.put("ANNO", movana.get(MOVANA_DANNO)); //anno del doc di origine - tmpcurr.put("NUMRD", movana.get(MOVANA_DNDOC)); // + tmpcurr.put("NUMRD", movana.get(MOVANA_DNDOC)); //numero del doc che origina movana tmpcurr.put("DATA", newdoc->get(DOC_DATADOC)); //data del documento che genera movana.. } //..non esiste il campo in movana else //movimento normale (senza documento) { tmpcurr.put("CODNUM", movana.get(MOVANA_CODCAUS)); //mette la causale del movimento tmpcurr.put("ANNO", movana.get(MOVANA_ANNOES)); //anno del movimento - tmpcurr.put("NUMRD", movana.get(MOVANA_NUMREG)); //numreg del movana + tmpcurr.put("NUMRD", movana.get(MOVANA_NUMREGCG)); //numregcg del movana tmpcurr.put("DATA", movana.get(MOVANA_DATACOMP)); //data del movana } @@ -619,7 +618,7 @@ F=IMF*/ selettore = FATTURATO; selettore |= MATURATO; selettore |= IMPEGNATO; - } + } //if(newdoc != NULL) //****modificare il metodo per accelerare const char sezione = rmovana.get_char(RMOVANA_SEZIONE); @@ -636,7 +635,12 @@ F=IMF*/ if (tipoiva == iva_acquisti) sezione_normale = 'D'; else - sezione_normale = 'D'; //questo in preparazione di casi futuri + { + if (caus.sezione_clifo() == 'D') + sezione_normale = 'A'; + else + sezione_normale = 'D'; + } imp.normalize(sezione_normale); @@ -656,6 +660,8 @@ F=IMF*/ descr.ltrim(pos+1); descr.trim(); } + + tmpcurr.put("NUMREG", rmovana.get(RMOVANA_NUMREG)); tmpcurr.put("DESC", descr); //descrizione movana tmpcurr.put("NRIGA", rmovana.get(RMOVANA_NUMRIG)); //numero riga tmpcurr.put("DESCRIGA", rmovana.get(RMOVANA_DESCR)); //descrizione rmovana @@ -892,12 +898,13 @@ void TPrint_rendiconto_ca_recordset::crea_trr(const TFilename& trr) const { ofstream of(trr); of << 1000 << endl; - of << 15 << endl; + of << 16 << endl; of << "CONTO|1|20|0|Conto analitico" << endl; of << "CODNUM|1|4|0|Numerazione documento" << endl; of << "DATA|5|8|0|Data movimento o documento" << endl; - of << "NUMRD|3|7|0|Numero registrazione o documento" << endl; + of << "NUMRD|3|7|0|Numero registrazione contabile o numero documento di origine" << endl; of << "NRIGA|2|3|0|Riga movimento o documento" << endl; + of << "NUMREG|3|7|0|Numero registrazione del movimento analitico" << endl; of << "ANNO|9|4|0|Anno" << endl; of << "NUMDOCRIF|1|7|0|Numero documento riferimento" << endl; of << "DATADOCRIF|5|8|0|Data documento riferimento" << endl; diff --git a/ca/ca3700.h b/ca/ca3700.h index 2e2dfc2cd..845a5183e 100755 --- a/ca/ca3700.h +++ b/ca/ca3700.h @@ -2,13 +2,13 @@ #define __CA3700_H //pagina 1 -#define F_CODDITTA 251 -#define F_RAGSOC 252 -#define F_DATASTAMPA 253 -#define F_ANNO 254 -#define F_REPORT 255 -#define F_DATAINI 256 -#define F_DATAFIN 257 +#define F_CODDITTA 251 +#define F_RAGSOC 252 +#define F_DATASTAMPA 253 +#define F_ANNO 254 +#define F_REPORT 255 +#define F_DATAINI 256 +#define F_DATAFIN 257 //campi generati dai piani dei conti #define F_PIANO 319 @@ -45,7 +45,7 @@ #define F_PANDES4_FIN 368 //sheet di pagina 2 -#define F_RIGHE 260 +#define F_RIGHE 260 #endif // __CA3700_H diff --git a/ca/ca3700.uml b/ca/ca3700.uml index 0657b9799..19c334748 100755 --- a/ca/ca3700.uml +++ b/ca/ca3700.uml @@ -1,4 +1,5 @@ #include "ca3700.h" +#include "camask.h" TOOLBAR "" 0 -3 0 3 diff --git a/ca/ca3700a.rep b/ca/ca3700a.rep index 001354df6..bc0891157 100755 --- a/ca/ca3700a.rep +++ b/ca/ca3700a.rep @@ -15,21 +15,22 @@ #REPORT.PAGE - - + + - - - - - - - - - - + + + + + + + + + + + - +
MESSAGE RESET,F1.101 @@ -174,36 +175,39 @@ MESSAGE RESET,F2.103
- + + NUMREG + + DATA - + NUMDOCRIF - + DATADOCRIF - + DESC - + NRIGA - + DESCRIGA - + DOCORIG - + FATTURATO MESSAGE ADD,F2.101 - + MATURATO MESSAGE ADD,F2.102 - + IMPEGNATO MESSAGE ADD,F2.103 @@ -243,37 +247,36 @@ MESSAGE RESET,F2.103
- + - + - + - + - + - + #103-#101 - + #103-#102 - + #H2.103-#103
- 0 -#B1.100 ! + 0 #B1.100 !
USE 1000 \ No newline at end of file diff --git a/ca/calib02.cpp b/ca/calib02.cpp index 92aa7b2e6..56a6ca56b 100755 --- a/ca/calib02.cpp +++ b/ca/calib02.cpp @@ -2,6 +2,7 @@ #include "calib01.h" #include "calib02.h" +#include "camask.h" #include "../cg/cglib01.h" diff --git a/ca/calib02.h b/ca/calib02.h index 7bc34b7b7..07b28a7c7 100755 --- a/ca/calib02.h +++ b/ca/calib02.h @@ -132,21 +132,6 @@ public: // meglio pubic? // TAnal_rapport_mask /////////////////////////////////////////////////////////// -//elementi dello sheet di selezione CdC/Cms/Fas -#define S_CDC1 101 -#define S_CDC2 102 -#define S_CDC3 103 -#define S_CDC4 104 -#define S_CDC5 105 -#define S_CDC6 106 -#define S_CDC7 107 -#define S_CDC8 108 -#define S_CDC9 109 -#define S_CDC10 110 -#define S_CDC11 111 -#define S_CDC12 112 - - class TAnal_report_mask : public TAutomask { protected: diff --git a/ca/camask.h b/ca/camask.h new file mode 100755 index 000000000..d4af13a81 --- /dev/null +++ b/ca/camask.h @@ -0,0 +1,13 @@ +//elementi dello sheet di selezione CdC/Cms/Fas +#define S_CDC1 101 +#define S_CDC2 102 +#define S_CDC3 103 +#define S_CDC4 104 +#define S_CDC5 105 +#define S_CDC6 106 +#define S_CDC7 107 +#define S_CDC8 108 +#define S_CDC9 109 +#define S_CDC10 110 +#define S_CDC11 111 +#define S_CDC12 112