From 696c2fd07a38af91eaa1cdc47fc637dba383d685 Mon Sep 17 00:00:00 2001 From: Simone Palacino Date: Tue, 10 Sep 2019 17:33:59 +0200 Subject: [PATCH 1/2] Patch level : 12.0 no-patch Files correlati : f9.exe, f23.dirr, f23.trr Commento : - Pulizia codice - Ripensata estrazione - Corretta procedura di guessing - Spostata pagina controllo errori in una nuova maschera - Aggiunta maschera per estrazione degli esclusi - Aggionto campo elabf9 su mov per segnarmi lo stato di estrazione --- src/cg/f23.dir | 2 +- src/cg/f23.trr | 3 +- src/f1/f1lib.cpp | 124 ++++--- src/f1/f1lib.h | 37 +- src/f9/f90100.cpp | 892 +++++++++++++++++++++++++++++++++++++++++---- src/f9/f90100.h | 183 ++++++++++ src/f9/f90100a.h | 62 ++-- src/f9/f90100a.uml | 49 +-- src/f9/f90100b.h | 42 +++ src/f9/f90100b.uml | 263 +++++++++++++ src/f9/f90100c.h | 16 + src/f9/f90100c.uml | 145 ++++++++ src/f9/f90101.cpp | 40 -- src/f9/f90101.h | 37 -- src/f9/f901tab.h | 172 ++++----- src/include/mov.h | 2 +- 16 files changed, 1724 insertions(+), 345 deletions(-) create mode 100644 src/f9/f90100.h create mode 100644 src/f9/f90100b.h create mode 100644 src/f9/f90100b.uml create mode 100644 src/f9/f90100c.h create mode 100644 src/f9/f90100c.uml delete mode 100644 src/f9/f90101.cpp delete mode 100644 src/f9/f90101.h diff --git a/src/cg/f23.dir b/src/cg/f23.dir index fd08daf51..5510300f2 100755 --- a/src/cg/f23.dir +++ b/src/cg/f23.dir @@ -1,3 +1,3 @@ 23 0 -$mov|||574|0|Movimenti di prima nota|NMOV|| +$mov|96160|96160|586|0|Movimenti di prima nota|NMOV|| diff --git a/src/cg/f23.trr b/src/cg/f23.trr index dd82626ab..39a036cd7 100755 --- a/src/cg/f23.trr +++ b/src/cg/f23.trr @@ -1,5 +1,5 @@ 23 -62 +63 ANNOES|9|4|0|Codice esercizio NUMREG|3|7|0|Numero di operazione DATAREG|5|8|0|Data operazione @@ -62,6 +62,7 @@ TFDATA|5|8|0|Data ultimo invio Trasferimento Fatture IVALIQ|8|1|0|Iva per cassa liquidata completamente KEYFPPRO|1|80|0|Chiavi dell'FPPRO [KEYPRGINVIO;KEYHEADERFATT;KEYBODYFATT] MOVCOLL|3|7|0|Movimento collegato +ELABF9|1|12|0|archiviato , data , esclusione 4 NUMREG| DATAREG+NUMREG|X diff --git a/src/f1/f1lib.cpp b/src/f1/f1lib.cpp index b56def31f..1282beb94 100644 --- a/src/f1/f1lib.cpp +++ b/src/f1/f1lib.cpp @@ -1,6 +1,5 @@ #include "f1lib.h" #include "config.h" -#include "modaut.h" #include "cg2103.h" #include "cg2102.h" #include "execp.h" @@ -27,45 +26,34 @@ bool TFppro::check_reg(TToken_string& keys, int numreg) return get_numreg(keys) == numreg; } -// todo: da mettere apposto fa ancora schifo bool TFppro::guess_the_doc(const TLocalisamfile& mov) { + // Prendo il fornitore del mov per controllare la p.iva + TLocalisamfile clifo(LF_CLIFO); + clifo.put(CLI_TIPOCF, "F"); + const TString& codforn = mov.get(MOV_CODCF); + clifo.put(CLI_CODCF, codforn); + clifo.read(); + TString cli_statopiva, cli_piva; + cli_statopiva << clifo.get(CLI_STATOPAIV); + cli_piva << clifo.get(CLI_PAIV); + const real tot = mov.get_real(MOV_TOTDOC) + mov.get_real(MOV_RITFIS) + mov.get_real(MOV_RITSOC); + // Controllo datadoc - numdoc - totdoc - p.iva TString query; query << "SELECT PQ_KEYPRGINVIO AS KEYPRGINVIO, PQ_KEYHEADERFATT AS KEYHEADERFATT, PQ_KEYBODYFATT AS KEYBODYFATT, P7_DATA AS DATA,\n" << "\tP7_NUMERO AS NUMDOC, PQ_IMPTOTDOC AS IMPTOTDOC, P2_FISCIVAPAESE AS STATOPIVA, P2_FISCIVACOD AS PIVA FROM PAA2700F\n" << "JOIN PAA0700F ON PQ_KEYPRGINVIO = P7_KEYPRGINVIO AND PQ_KEYHEADERFATT = P7_KEYHEADERFATT AND PQ_KEYBODYFATT = P7_KEYBODYFATT\n" << - "JOIN PAA0200F ON PQ_KEYPRGINVIO = P2_KEYPRGINVIO AND PQ_KEYHEADERFATT = P2_KEYHEADERFATT AND PQ_KEYBODYFATT = P2_KEYBODYFATT\n"; - _db->sq_set_exec(query, false); + "JOIN PAA0200F ON PQ_KEYPRGINVIO = P2_KEYPRGINVIO AND PQ_KEYHEADERFATT = P2_KEYHEADERFATT AND PQ_KEYBODYFATT = P2_KEYBODYFATT\n" << + "WHERE P7_DATA = '" << mov.get_date(MOV_DATADOC).date2ansi() << "' AND \n" << + "(P7_NUMERO = '" << mov.get(MOV_NUMDOC) << "' OR P7_NUMERO = '" << mov.get(MOV_NUMDOCEXT) << "') AND \n" << + (cli_statopiva.full()? TString("P2_FISCIVAPAESE = '") << cli_statopiva << "' AND P2_FISCIVACOD = '" << cli_piva << "'": TString("P2_FISCIVACOD = '") << cli_piva << "'") << " AND \n" << + "PQ_IMPTOTDOC = '" << tot << "'"; - for(bool f = _db->sq_next(); f; f = _db->sq_next()) + if (_db->sq_set_exec(query) && _db->sq_items() == 1) { - const keys_s keys = { _db->sq_get("KEYPRGINVIO"), _db->sq_get("KEYHEADERFATT"), _db->sq_get("KEYBODYFATT") }; - const TDate data = _db->sq_get_date("DATA"); - const TString numdoc = _db->sq_get("NUMDOC"); - const real imptotdoc(_db->sq_get("IMPTOTDOC")); - const TString4 statopiva = _db->sq_get("STATOPIVA"); - const TString piva = _db->sq_get("PIVA"); - - // Prendo il fornitore del mov per controllare la p.iva - TLocalisamfile clifo(LF_CLIFO); - clifo.put(CLI_TIPOCF, "F"); - const TString& codforn = mov.get(MOV_CODCF); - clifo.put(CLI_CODCF, codforn); - clifo.read(); - TString cli_statopiva, cli_piva; - cli_statopiva << clifo.get(CLI_STATOPAIV); - cli_piva << clifo.get(CLI_PAIV); - - bool ok = data == mov.get_date(MOV_DATAREG); - ok = ok && numdoc == mov.get(MOV_NUMDOC) || numdoc == mov.get(MOV_NUMDOCEXT); - ok = ok && imptotdoc == real(mov.get(MOV_TOTDOC)); - ok = ok && cli_statopiva.full() && statopiva == cli_statopiva && piva == cli_piva || !cli_statopiva.full() && piva == cli_piva; - if (ok) - { - _keys = keys; - return true; - } + _keys = { _db->sq_get("KEYPRGINVIO"), _db->sq_get("KEYHEADERFATT"), _db->sq_get("KEYBODYFATT") }; + return true; } return false; @@ -138,17 +126,18 @@ TFppro& TFppro::set_keys(TToken_string& keys) { if(keys.items() == 3) { - _keys.prginvio = keys.get(0); - _keys.headerfatt = keys.get(1); - _keys.bodyfatt = keys.get(2); - _is_set = false; - _keys_setted = true; + _keys.prginvio = keys.get(0); + _keys.headerfatt = keys.get(1); + _keys.bodyfatt = keys.get(2); + _is_set = false; + _keys_setted = true; } - _keys_setted = false; + else + _keys_setted = false; return *this; } -TFppro& TFppro::set_keys(keys_s keys) +TFppro& TFppro::set_keys(const keys_s& keys) { if(*keys.prginvio != 0 && *keys.headerfatt != 0 && *keys.bodyfatt != 0) { @@ -163,7 +152,7 @@ TFppro& TFppro::set_keys(keys_s keys) bool TFppro::associa_mov(const int numreg) const { - bool ok = false; + bool ok; TLocalisamfile mov(LF_MOV); mov.put(MOV_NUMREG, numreg); if ((ok = mov.read() == NOERR)) @@ -186,6 +175,51 @@ bool TFppro::associa_mov(const int numreg) const return ok; } +const char* TFppro::get_tipoprot() const +{ + TString query; + static TString tipo; + query << "SELECT PZ_TIPOPROT AS TIPOPROT FROM FPPRO00F\r\n" << where_str(); + _db->sq_set_exec(query); + return tipo.cut(0) = _db->sq_get("TIPOPROT"); +} + +const char* TFppro::get_numprot() const +{ + TString query; + static TString num; + query << "SELECT PZ_NUMPROT AS NUMPROT FROM FPPRO00F\r\n" << where_str(); + _db->sq_set_exec(query); + return num.cut(0) = _db->sq_get("NUMPROT"); +} + +const char* TFppro::get_annoprot() const +{ + TString query; + static TString anno; + query << "SELECT PZ_ANNOPROT AS ANNOPROT FROM FPPRO00F\r\n" << where_str(); + _db->sq_set_exec(query); + return anno.cut(0) = _db->sq_get("ANNOPROT"); +} + +const char* TFppro::get_dataoraric() const +{ + TString query; + static TString data; + query << "SELECT PZ_DATAORARIC AS DATAORARIC FROM FPPRO00F\r\n" << where_str(); + _db->sq_set_exec(query); + return data.cut(0) << _db->sq_get_date("DATAORARIC").date2ansi(); +} + +const char* TFppro::get_tipodoc() const +{ + TString query; + static TString tipodoc; + query << "SELECT PZ_TIPODOC AS TIPODOC FROM FPPRO00F\r\n" << where_str(); + _db->sq_set_exec(query); + return tipodoc.cut(0) << _db->sq_get("TIPODOC"); +} + TDate TFppro::get_data_first_doc() const { TString query; @@ -229,7 +263,7 @@ const char* TFppro::where_str() const return str; } -TFppro::TFppro() : _keys({ "\0", "\0", "\0" }), _guess(false), _keys_setted(false), _is_set(false) +TFppro::TFppro() : _keys({ "\0", "\0", "\0" }), _keys_setted(false), _is_set(false) { _db = new SSimple_query(); const bool ok = set_connection(*_db); @@ -241,6 +275,12 @@ TFppro::TFppro() : _keys({ "\0", "\0", "\0" }), _guess(false), _keys_setted(fals // TProtocollo ////////////////////////////////////////////////////////// +prot_s TProtocollo::get_prot() +{ + const prot_s prot = { _tipoprot, _progres, _year }; + return prot; +} + TString& TProtocollo::prot_in(const int year, const char* tipoprot, const char* progres) { static TString protocollo; @@ -251,7 +291,7 @@ TString& TProtocollo::prot_in(const int year, const char* tipoprot, const char* return protocollo; } -void TProtocollo::set(const TProtocollo prot) +void TProtocollo::set(const TProtocollo& prot) { _year = prot._year; _tipoprot = prot._tipoprot; @@ -430,7 +470,7 @@ bool TF1_log::show_log() { _log->preview(); delete _log; - _log = NULL; + _log = nullptr; } return true; } \ No newline at end of file diff --git a/src/f1/f1lib.h b/src/f1/f1lib.h index 92fc81e88..76a2de9cf 100644 --- a/src/f1/f1lib.h +++ b/src/f1/f1lib.h @@ -24,6 +24,13 @@ enum err_cont no_err = 1 }; +typedef struct _prot_s +{ + const char* tipo; + const char* num; + int anno; +} prot_s; + class TFppro : public TObject { struct keys_s @@ -31,11 +38,9 @@ class TFppro : public TObject TString prginvio; TString headerfatt; TString bodyfatt; - }; -private: + } _keys; + SSimple_query* _db; - keys_s _keys; - bool _guess; bool _keys_setted; bool _is_set; TString _fppro_query; @@ -60,9 +65,14 @@ public: // Setters bool set_query(); TFppro& set_keys(TToken_string& keys); - TFppro& set_keys(keys_s keys); + TFppro& set_keys(const keys_s& keys); bool associa_mov(int numreg) const; + const char* get_tipoprot() const; + const char* get_numprot() const; + const char* get_annoprot() const; + const char* get_dataoraric() const; + const char* get_tipodoc() const; TFppro(); TFppro(TToken_string& keys) : TFppro() { set_keys(keys); } @@ -70,20 +80,23 @@ public: class TProtocollo : TObject { - int _year{}; TString _tipoprot; TString _progres; + int _year{}; public: TProtocollo() = default; - TProtocollo(const int year, const char* tipoprot, const char* progres): _year(year), _tipoprot(tipoprot), _progres(progres) { } + TProtocollo(const int year, const char* tipoprot, const char* progres) : _tipoprot(tipoprot), _progres(progres), _year(year) { } - void set(TProtocollo prot); + void set(const TProtocollo& prot); void sset(const char* prot); - TString& get_prot() const; - int get_year() const { return _year; } - TString& get_tipoprot() { return _tipoprot; } - TString& get_progres() { return _progres; } + TString& get_prot() const; + prot_s get_prot(); + + int get_year() const { return _year; } + TString& get_tipoprot() { return _tipoprot; } + TString& get_progres() { return _progres; } + static TString& prot_in(int year, const char* tipoprot, const char* progres); diff --git a/src/f9/f90100.cpp b/src/f9/f90100.cpp index 09657e014..275d271c5 100644 --- a/src/f9/f90100.cpp +++ b/src/f9/f90100.cpp @@ -1,14 +1,19 @@ #include #include "applicat.h" -#include "f90100a.h" #include "lffiles.h" #include "isam.h" #include "mov.h" #include "f1lib.h" #include "../fp/fplib.h" #include "urldefid.h" -#include "f90100.h" #include "progind.h" +#include "f90100.h" +#include "f901tab.h" +#include "f90100c.h" +#include "f90100b.h" + +#define PROVA_DBG +#undef PROVA_DBG SSimple_query& db() { @@ -28,9 +33,6 @@ SSimple_query& db() TEstrai_mask::TEstrai_mask() : TMask("Estrazione", 1, 60, 10), _dirty(true) { add_button_tool(DLG_ELABORA, "Estrai", TOOL_ELABORA); - //add_button_tool(DLG_FINDREC, "Diagnostica", TOOL_PERMISSIONS); - //add_button_tool(DLG_NULL, "", 0); - //add_button_tool(DLG_EDIT, "Reset", TOOL_EDIT); add_button_tool(DLG_NULL, "", 0); add_button_tool(DLG_QUIT, "Esci", TOOL_QUIT); @@ -43,28 +45,26 @@ TEstrai_mask::TEstrai_mask() : TMask("Estrazione", 1, 60, 10), _dirty(true) add_list(ES_TIPODOC, 0, "Tipi documento", 33, 4, 1, "", "A|V|C", "Acquisti|Vendite|Corrispettivi"); TMask::set_handler(DLG_ELABORA, estrai_handler); - //TMask::set_handler(DLG_FINDREC, diagnostica_handler); - //TMask::set_handler(DLG_EDIT, enable_handler); TMask::set_handler(ES_DATAINI, dataini_handler); TMask::set_handler(ES_DATAEND, dataend_handler); - //TMask::enable(DLG_ELABORA, false); - //TMask::enable(DLG_EDIT, false); - TDate dt(TODAY); dt.set_day(1); dt.set_month(1); -#ifdef DBG - dt.set_year(2017); -#endif set(ES_DATAINI, dt); - set(ES_DATAEND, TDate(TODAY)); + set(ES_DATAEND, today); } bool TEstrai_mask::estrai_handler(TMask_field& f, unsigned short key) { - auto& msk = (TEstrai_mask&)f.mask(); // this - descr_msk().run(); - msk._descr.cut(0) << descr_msk().get(DES_TEXT); - app().estrai(); + auto& msk = (TEstrai_mask&)f.mask(); // this + TF9_app::descr_msk().run(); + msk._descr.cut(0) << TF9_app::descr_msk().get(DES_TEXT); + if (app().estrai()) + message_box("Estrazione avvenuta con successo!"); + else + { + app().segna_in_errore(); + warning_box("L'estrazione non e' stata completata. Controllare il log degli errori."); + } return true; } @@ -110,19 +110,6 @@ bool TEstrai_mask::dataend_handler(TMask_field& f, unsigned short key) return true; } -TMask& TEstrai_mask::descr_msk() -{ - static TMask* m = nullptr; - if(m == nullptr) - { - m = new TMask("Estrazione", 1, 60, 5); - m->add_button_tool(DLG_OK, "Conferma", TOOL_OK); - m->add_groupbox(DES_GROUP, 0, "Inserire descrizione estrazione:", 1, 0, 59, 3, ""); - m->add_string(DES_TEXT, 0, "Descrizione", 4, 1, 250, "", 40); - } - return *m; -} - //////////////////////////////////////////////////////// // TMonitor_mask //////////////////////////////////////////////////////// @@ -145,7 +132,8 @@ bool TMonitor_mask::save_conf_handler(TMask_field& f, unsigned short key) void TMonitor_mask::controllo_errori() { - + TControllo_mask controllo; + controllo.run(); } bool TMonitor_mask::on_key(const KEY key) @@ -185,6 +173,11 @@ void TMonitor_mask::open_win_conf() const m->run(); } +void TMonitor_mask::disable_controllo_err() +{ + disable(DLG_FINDREC); +} + bool TMonitor_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) { switch (o.dlg()) @@ -195,7 +188,10 @@ bool TMonitor_mask::on_field_event(TOperable_field& o, TField_event e, long joll break; case DLG_ELABORA: if (e == fe_button) + { + enable_page(1, false); open_win_estr(); + } break; case DLG_CONFIG: if (e == fe_button) @@ -204,6 +200,16 @@ bool TMonitor_mask::on_field_event(TOperable_field& o, TField_event e, long joll case DLG_FINDREC: if (e == fe_button) controllo_errori(); + break; + case DLG_RECALC: + app().fill(); + break; + case B_SHOWESCL: + if(e == fe_button) + { + app().open_esclusi(); + } + break; default: break; } return true; @@ -213,6 +219,218 @@ bool TMonitor_mask::on_field_event(TOperable_field& o, TField_event e, long joll // TF9_app //////////////////////////////////////////////////////// +// Estrazione esclusi + +bool TF9_app::select_escl_notify(TSheet_field& s, int row, KEY key) +{ + TMask_field& field = s; + const TMask& mask = field.mask(); + TSheet_field& sf = mask.sfield(S_ESCL); + sf.hide(); + FOR_EACH_SHEET_ROW(sf, nr, riga) + { + if (*riga->get(0) == 'X') + riga->add("", 0); + } + sf.force_update(); + sf.show(); + return true; +} + +bool TF9_app::controllo_escl_handler(TMask_field& field, KEY key) +{ + // open controllo + TControllo_mask controllo(true); + controllo.run(); + return true; +} + +bool TF9_app::year_handler(TMask_field& field, KEY key) +{ + if (key == K_TAB) + { + const int year = real(field.get()).integer(); + if (year <= 2001 || year >= 2100) + { + error_box("Anno non corretto"); + field.mask().set(501, today.year()); + } + } + return true; +} + +int TF9_app::estrai_single(TToken_string& row, char flagprov, char tipodoc) +{ + const int numreg = row.get_int(cid2index(F_NUMREG)); + const char tipo = flagprov; + TLocalisamfile mov(LF_MOV); + mov.put(MOV_NUMREG, numreg); + mov.read(); + _head.flag_prov = flagprov == 'P'; + _head.dal = mov.get(MOV_DATAREG); + _head.al = _head.dal; + _head.tipo_doc = tipodoc; + + _head.cod_soc = _ambiente; + // X indica che e' un'estrazione di un escluso + _head.id_estr.cut(0) << today.date2ansi() << _estr_msk->get(ES_FLAGPROV) << "X" << next_estr_today(tipo); + descr_msk().run(); + _head.descr = descr_msk().get(DES_TEXT); + _head.user = user(); + _head.addr_cart = _addr_doc; + + TString err; + _head.stato_estr = prepara_movimenti_escl(get_tipoiva(), numreg, err); + const bool ok = esporta(); + + if (!ok) + { + error_box(db().sq_get_text_error(false)); + return -99; + } + else + { + _esclusi.clear(); + _esclusi.insert(_esclusi.end(), row); + if (_head.stato_estr == D_GEST_ERR) + { + warning_box("Attenzione l'estrazione ha prodotto degli errori. \nControllare e correggere eventuali problemi \npremendo il pulsante 'Controllo Estr.'"); + _msk->enable(DLG_FINDREC); + return -2; + } + if (_head.stato_estr == D_GEST_OK) + { + _msk->disable_controllo_err(); + return estrazione_iva(true) ? 1 : false; + } + return -3; + } +} + +void TF9_app::open_esclusi() +{ + /* Prima chiedo quale mese e anno visualizzare + */ + // FINESTRA + static TMask* ym_msk = nullptr; + if (ym_msk == nullptr) + { + ym_msk = new TMask("Mostra esclusi", 1, 20, 10); + ym_msk->add_button_tool(DLG_OK, "Conferma", TOOL_OK); + ym_msk->add_button_tool(DLG_NULL, "", 0); + ym_msk->add_button_tool(DLG_QUIT, "Esci", TOOL_QUIT); + ym_msk->add_number(501, 0, "Anno", 1, 1, 4); + ym_msk->add_list(502, 0, "Mese", 1, 2, 8, "", "01|02|03|04|05|06|07|08|09|10|11|12", "Gennaio|Febbraio|Marzo|Aprile|Maggio|Giugno|Luglio|Agosto|Settembre|Ottobre|Novembre|Dicembre"); + ym_msk->add_list(503, 0, "Fino al", 1, 3, 9, "", " |01|02|03|04|05|06|07|08|09|10|11|12", " |Gennaio|Febbraio|Marzo|Aprile|Maggio|Giugno|Luglio|Agosto|Settembre|Ottobre|Novembre|Dicembre"); + ym_msk->add_list(504, 0, "Flag Provvisorio", 1, 4, 1, "", "P|D", "Provvisorio|Definitivo"); + ym_msk->add_list(505, 0, "Tipo doc.", 1, 5, 1, "", "A|V", "Acquisti|Vendite"); + ym_msk->set(501, today.year()); + ym_msk->set_handler(501, year_handler); + } + ym_msk->run(); + if (ym_msk->last_key() == K_QUIT) + return; + + _flagprov_escl = ym_msk->get(504)[0]; + _tipodoc_escl = ym_msk->get(505)[0]; + + // Caricamento esclusi + /* LOADING DI QUEL MESE E ANNO + */ + vector esclusi; + const int anno = ym_msk->get_int(501); + const int mese = ym_msk->get_int(502); + const int to_m = ym_msk->get_int(503); + TLocalisamfile movs(LF_MOV); + movs.setkey(2); + const TDate from(1, mese, anno); + TDate to(from); + if (to_m != 0) + to.set_month(to_m); + to.set_end_month(); + + movs.put(MOV_DATAREG, from); + movs.read(); + if(movs.get_date(MOV_DATAREG) >= from && movs.get_date(MOV_DATAREG) <= to) + { + for(bool ok = true; ok && movs.get_date(MOV_DATAREG) <= to; ok = movs.next() == NOERR) + { + TToken_string stato(movs.get(MOV_ELABF9)); + if(stato.items() == 3 && stato.get(2)[0] == 'X') + { + TToken_string m("", '|'); + m.add("", 0); + m.add(movs.get_int(MOV_NUMREG)); + m.add(movs.get_date(MOV_DATAREG)); + m.add(movs.get_date(MOV_DATADOC)); + m.add(movs.get(MOV_CODCAUS)); + m.add(movs.get(MOV_MESELIQ)); + m.add(movs.get(MOV_NUMDOC)); + const real imptot = movs.get_real(MOV_TOTDOC) + movs.get_real(MOV_RITFIS) + movs.get_real(MOV_RITSOC); + m.add(imptot); + m.add(movs.get_int(MOV_CODCF)); + TLocalisamfile clifo(LF_CLIFO); + TString ragsoc; ragsoc = clifo.get(CLI_RAGSOC); + m.add(ragsoc); + m.add(movs.get(MOV_PROTIVA)); + m.add(movs.get(MOV_DESCR)); + esclusi.insert(esclusi.end(), m); + } + } + } + + if(esclusi.empty()) + { + warning_box("Non ci sono movimenti esclusi da mostrare"); + return; + } + + static TMask* escl_msk = nullptr; + if (escl_msk == nullptr) + { + escl_msk = new TMask("f90100c.msk"); + ((TSheet_field&)escl_msk->field(S_ESCL)).set_notify(select_escl_notify); // handler sheet per selezione singola + escl_msk->set_handler(DLG_FINDREC, controllo_escl_handler); + escl_msk->field(DLG_FINDREC).disable(); + } + + TSheet_field& sf = escl_msk->sfield(S_ESCL); + sf.reset(); + for(auto it = esclusi.begin(); it != esclusi.end(); ++it) + sf.row(-1) = *it; + + while(escl_msk->run() == K_ENTER) + { + // Prendo la riga selezionata (e controllo che sia selezionato qualcosa) + bool flag = false; + FOR_EACH_SHEET_ROW(sf, nr, row) + { + if((*row)[0] == 'X') + { + if(estrai_single(*row, _flagprov_escl, _tipodoc_escl) == -2) // Attivo pulsante controllo estr + escl_msk->field(DLG_FINDREC).enable(); + flag = true; + break; + } + } + if (!flag) + message_box("Selezionare almeno un movimento"); + } +} + +TMask& TF9_app::descr_msk() +{ + static TMask* m = nullptr; + if (m == nullptr) + { + m = new TMask("Estrazione", 1, 60, 5); + m->add_button_tool(DLG_OK, "Conferma", TOOL_OK); + m->add_groupbox(DES_GROUP, 0, "Inserire descrizione estrazione:", 1, 0, 59, 3, ""); + m->add_string(DES_TEXT, 0, "Descrizione", 4, 1, 250, "", 40); + } + return *m; +} + void TF9_app::edit_wa() const { TString query; @@ -230,7 +448,6 @@ void TF9_app::load() mov.setkey(2); mov.put(MOV_DATAREG, dataini); - int items = 0; for (bool ok = mov.read(); ok && mov.get_date(MOV_DATAREG) <= dataend; ok = mov.next() == NOERR) items++; @@ -240,14 +457,20 @@ void TF9_app::load() mov.zero(); mov.setkey(2); mov.put(MOV_DATAREG, dataini); + const TipoIVA tipo = tipodoc == 'V' ? iva_vendite : iva_acquisti; + TLocalisamfile clifo(LF_CLIFO); + // Prendo tutti i movimenti a partire da una data e li carico tutti fino alla data finale + _movs.clear(); for (bool ok = mov.read(); ok && mov.get_date(MOV_DATAREG) <= dataend; ok = mov.next() == NOERR) { if (!progr.add_status()) break; - const TipoIVA tipo = tipodoc == 'V' ? iva_vendite : iva_acquisti; + TToken_string elab_f9(mov.get(MOV_ELABF9)); + // Se definitivo controllo il flag di stampato REGST - if (mov.get_bool(MOV_REGST) != flagpro && mov.get(MOV_NUMDOC).full() && TCausale(mov.get(MOV_CODCAUS)).reg().iva() == tipo) + if (mov.get_bool(MOV_REGST) != flagpro && mov.get(MOV_NUMDOC).full() && TCausale(mov.get(MOV_CODCAUS)).reg().iva() == tipo + && (elab_f9.items() == 3 && elab_f9.get(2)[0] != 'X' || elab_f9.empty())) // Controllo che non sia escluso { TToken_string t("", '|'); t.add(""); @@ -257,6 +480,13 @@ void TF9_app::load() t.add(mov.get(MOV_CODCAUS)); t.add(mov.get(MOV_MESELIQ)); t.add(mov.get(MOV_NUMDOC)); + const real tot = mov.get_real(MOV_TOTDOC) + mov.get_real(MOV_RITFIS) + mov.get_real(MOV_RITSOC); + t.add(tot); + t.add(mov.get(MOV_CODCF)); + clifo.zero(); + clifo.put(CLI_TIPOCF, "F"); + clifo.put(CLI_CODCF, mov.get(MOV_CODCF)); + t.add(clifo.read() == NOERR ? clifo.get(CLI_RAGSOC) : " "); t.add(mov.get(MOV_PROTIVA)); t.add(mov.get(MOV_DESCR)); _movs.insert(_movs.end(), t); @@ -277,19 +507,19 @@ const char* TF9_app::traduci_stato(const TString& cod) if (cod == "01") stato << "in diagnostica"; // Deprecated else if (cod == "02") - stato << "err. diagnostica"; + stato << "errore diagnostica gestionale"; else if (cod == "03") - stato << "diagnostica ok"; + stato << "diagnostica gestionale passata"; else if (cod == "04") - stato << "controllo WA"; + stato << "controllo WebApp"; else if (cod == "05") - stato << "err. diagn. WA"; + stato << "errore diagnostica WebApp"; else if (cod == "06") - stato << "diagn. WA OK"; + stato << "diagnostica WebApp passata"; else if (cod == "07") - stato << "in elab. sost."; + stato << "in elaborazione da sostitutiva"; else if (cod == "08") - stato << "err. diag. sost."; + stato << "errore diagnostica da sostitutiva"; else if (cod == "09") stato << "Archiviato"; } @@ -328,12 +558,12 @@ void TF9_app::fill() row.add(db().sq_get(DRD_UTENTE)); row.add(traduci_stato(db().sq_get(DRD_STATO))); row.add(db().sq_get(DRD_DESC)); - if(TDate(row.get(cid2index(F_DATAESTR))) == TDate(TODAY)) + if(TDate(row.get(cid2index(F_DATAESTR))) == today) { if (TString(row.get(cid2index(F_PROV_B))) == "X") - _last_estr_p = real(TString(row.get(cid2index(F_IDESTR))).ltrim(9)).integer(); + _last_estr_p = real(TString(row.get(cid2index(F_IDESTR))).ltrim(10)).integer(); else - _last_estr_d = real(TString(row.get(cid2index(F_IDESTR))).ltrim(9)).integer(); + _last_estr_d = real(TString(row.get(cid2index(F_IDESTR))).ltrim(10)).integer(); } } sf.force_update(); @@ -365,15 +595,18 @@ state_fppro TF9_app::check_fppro(int numreg) const return not_fa; } -// Controlla lo stato delle fatture e per le fatt. acquisto non collegate a fppro cerca di agganciarle -const char * TF9_app::check_stato(TipoIVA tipo) +/** Controlla lo stato delle fatture + * per le fatt. acquisto non collegate a fppro cerca di agganciarle + */ +const char * TF9_app::prepara_movimenti(TipoIVA tipo) { bool ok = true; if (tipo == iva_acquisti) { + // Controlli per le fatture di acquisto prepara_movimenti TProgress_monitor bar(_movs.size(), "Controllo stato movimenti di acquisto"); - // Controlli per le fatture di acquisto + for (auto it = _movs.begin(); it != _movs.end(); ++it) { if (!bar.add_status()) @@ -381,7 +614,7 @@ const char * TF9_app::check_stato(TipoIVA tipo) TToken_string& row = *it; const int numreg = row.get_int(cid2index(F_NUMREG)); - switch (app().check_fppro(numreg)) + switch (check_fppro(numreg)) { case guessed: ok &= fppro_db().associa_mov(numreg); @@ -391,31 +624,120 @@ const char * TF9_app::check_stato(TipoIVA tipo) break; case not_fa: + row.add("Non fattura", cid2index(F_DESCRERR)); case reg_with_err: + row.add("Registrazione con errori", cid2index(F_DESCRERR)); case no_guessed: ok &= false; row.add("X", 0); // Mi segno il movimento che ha un problema + row.add("Non associato a fattura elettr.; abbinamanto automatico non riuscito. Abbinare manualmente, o escludere", cid2index(F_DESCRERR)); default: break; } } } - else if (tipo == iva_vendite) { + else if (tipo == iva_vendite) + { + // Controlli per le fatture di vendita + TProgress_monitor bar(_movs.size(), "Controllo stato movimenti di vendita"); for (auto it = _movs.begin(); it != _movs.end(); ++it) { - // Controlli per le fatture di vendita + if (!bar.add_status()) + break; + TToken_string& row = *it; + TString numreg(row.get(1)); + TLocalisamfile mov(LF_MOV); + mov.put(MOV_NUMREG, numreg); + mov.read(); + // Controllo che abbia il riferimento al documento originale generatore del movimento + if (mov.get(MOV_DPROVV).empty() || mov.get(MOV_DANNO).empty() || mov.get(MOV_DCODNUM).empty() || mov.get(MOV_DNDOC).empty()) + { + row.add("X", 0); + row.add("Movimento non collegato a un documento originale. Impossibile estrarre. Escludere?", cid2index(F_DESCRERR)); + ok &= false; + } + else if(!is_doc_xml(mov)) // Quindi controllo che sia un documento xml, se no lo metto in errore e te lo escludi a mano se e' da escludere + { + row.add("X", 0); + row.add("Movimento collegato a un documento senza fatturazione elettronica. Escludere?", cid2index(F_DESCRERR)); + ok &= false; + } } } - return ok ? D_GEST_OK : D_GEST_ERR; } +// todo: Codice ripetuto andrebbe accorpata con la precedente +const char * TF9_app::prepara_movimenti_escl(TipoIVA tipo, int numreg, TString& err) const +{ + bool ok = true; + if (tipo == iva_acquisti) + { + // Controlli per le fatture di acquisto prepara_movimenti + switch (check_fppro(numreg)) + { + case guessed: + ok &= fppro_db().associa_mov(numreg); + //row.add(fppro_db().get_keys_fppro()); + case correct: + ok &= true; + break; + + case not_fa: + err << "Non fattura"; + case reg_with_err: + err << "Registrazione con errori"; + case no_guessed: + ok &= false; + err.cut(0) << "Non associato a fattura elettr.; abbinamanto automatico non riuscito. Abbinare manualmente."; + default: break; + } + } + else if (tipo == iva_vendite) + { + // Controlli per le fatture di vendita + TLocalisamfile mov(LF_MOV); + mov.put(MOV_NUMREG, numreg); + mov.read(); + // Controllo che abbia il riferimento al documento originale generatore del movimento + if (mov.get(MOV_DPROVV).empty() || mov.get(MOV_DANNO).empty() || mov.get(MOV_DCODNUM).empty() || mov.get(MOV_DNDOC).empty()) + { + err << "Movimento non collegato a un documento originale. Impossibile estrarre."; + ok &= false; + } + else if (!is_doc_xml(mov)) // Quindi controllo che sia un documento xml, se no lo metto in errore e te lo escludi a mano se e' da escludere + { + err << "Movimento collegato a un documento senza fatturazione elettronica."; + ok &= false; + } + } + return ok ? D_GEST_OK : D_GEST_ERR; +} + +bool TF9_app::is_doc_xml(const TLocalisamfile& mov) +{ + const char provv = mov.get(MOV_DPROVV)[0]; + const int anno = mov.get_int(MOV_DANNO); + const TString& codnum = mov.get(MOV_DCODNUM); + const int numdoc = mov.get_int(MOV_DNDOC); + + const TDocumento doc(provv, anno, codnum, numdoc); + TString hfatt(20), bfatt(50), query; + if(chiave_paf(doc, hfatt, bfatt)) + { + query << "SELECT * FROM PAF0100F WHERE P1_KEYHEADERFATT = '" << hfatt << "' AND P1_KEYBODYFATT = '" << bfatt << "';"; + fp_db().sq_set_exec(query); + return fp_db().sq_items() > 0; + } + return false; +} + TString TF9_app::next_estr_today(const char tipo) const { - char estr[] = {0,0,0,0,0,0,0,0,0,0}; + char estr[] = {0,0,0,0,0,0,0,0,0}; if(tipo == 'P') - sprintf_s(estr, 10, "%09d", _last_estr_p + 1); + sprintf_s(estr, 9, "%08d", _last_estr_p + 1); else - sprintf_s(estr, 10, "%09d", _last_estr_d + 1); + sprintf_s(estr, 9, "%08d", _last_estr_d + 1); return estr; } @@ -425,15 +747,19 @@ bool TF9_app::check_periodo_def(const drd& head) // Controllo se ci sono estrazioni (definitive) che si sovrappongono di periodo (con lo stesso tipo) e che non siano in stato di errore // Nel caso di stato di errore e' invece possibile la ri-estrazione query << "SELECT *\nFROM F9DRD00K\n" << - "WHERE '" << head.dal.date2ansi() << "' =< " << DRD_DATAA << " AND '" << head.al.date2ansi() << "' >= " << DRD_DATADA << " AND " << - DRD_FLAG_PD << " = 'D' AND\n F9RIDAS <> '02' AND F9RIDAS <> '05' AND F9RIDAS <> '08' AND " << DRD_TIPODOC << " = '" << head.tipo_doc << "';"; + "WHERE '" << head.dal.date2ansi() << "' =< " DRD_DATAA " AND '" << head.al.date2ansi() << "' >= " DRD_DATADA " AND " + DRD_FLAG_PD " = 'D' AND\n F9RIDAS <> '02' AND F9RIDAS <> '05' AND F9RIDAS <> '08' AND " DRD_TIPODOC " = '" << head.tipo_doc << "';"; db().sq_set_exec(query); return db().sq_items() == 0; } bool TF9_app::esporta() { +#ifndef PROVA_DBG const bool ok = new_extr(); +#else + const bool ok = true; +#endif fill(); return ok; } @@ -441,9 +767,9 @@ bool TF9_app::esporta() TString& TF9_app::drd_attr() { static TString attr; - attr.cut(0) << DRD_CODSOC << ", " << DRD_ID_EST << ", " << DRD_FLAG_PD << ", " << DRD_DESC << - ", " << DRD_TIPODOC << ", " << DRD_DATADA << ", " << DRD_DATAA << ", " << DRD_UTENTE << ", " << DRD_TIME << ", " << - DRD_STATO << ", " << DRD_PERC; + attr.cut(0) << DRD_CODSOC ", " DRD_ID_EST ", " DRD_FLAG_PD ", " DRD_DESC + ", " DRD_TIPODOC ", " DRD_DATADA ", " DRD_DATAA ", " DRD_UTENTE ", " DRD_TIME ", " + DRD_STATO ", " DRD_PERC; return attr; } @@ -455,10 +781,10 @@ TString& TF9_app::drd_tovalues() const _head.stato_estr << "', '" << _head.addr_cart << "'"; } -auto TF9_app::new_extr() -> bool +bool TF9_app::new_extr() const { TString query; - query << "INSERT INTO " << F9_DRD << " ( " << drd_attr() << " ) \nVALUES ( " << drd_tovalues() << " );"; + query << "INSERT INTO " F9_DRD " ( " << drd_attr() << " ) \nVALUES ( " << drd_tovalues() << " );"; bool ok = db().sq_set_exec(query); ok = ok && db().sq_commit(); return ok; @@ -466,7 +792,7 @@ auto TF9_app::new_extr() -> bool int TF9_app::estrai() { - // Acquisisco i movimenti + // Carico i movimenti load(); if (_movs.empty()) @@ -478,8 +804,8 @@ int TF9_app::estrai() const char tipo = _estr_msk->get(ES_FLAGPROV)[0]; _head.flag_prov = is_provviso(); _head.dal = get_dataini(); - _head.al = get_dataend(); - _head.tipo_doc = get_tipodoc(); + _head.al = get_dataend(); + _head.tipo_doc = get_tipodoc(); if(!_head.flag_prov) // Se estrazione definitiva controllo il periodo che non si sovrapponga alle altre estrazioni def. { if (!check_periodo_def(_head)) @@ -488,23 +814,167 @@ int TF9_app::estrai() return -1; } } - _head.cod_soc = _ambiente; - _head.id_estr.cut(0) << TDate(TODAY).date2ansi() << _estr_msk->get(ES_FLAGPROV) << next_estr_today(tipo); - _head.descr = get_descr(); + _head.cod_soc = _ambiente; + _head.id_estr.cut(0) << today.date2ansi() << _estr_msk->get(ES_FLAGPROV) << "N" << next_estr_today(tipo); + _head.descr = get_descr(); _head.user = user(); - _head.flag_prov = is_provviso(); - _head.addr_cart = _addr_doc; - - _head.stato_estr = check_stato(get_tipoiva()); + _head.addr_cart = _addr_doc; + _head.stato_estr = prepara_movimenti(get_tipoiva()); const bool ok = esporta(); - if (_head.stato_estr) - warning_box("Attenzione l'estrazione ha prodotto degli errori. \nControllare e correggere eventuali problemi \npremendo il pulsante 'Controllo Estr.'"); - _msk->enable(DLG_FINDREC, ok); - return ok ? 1 : false; + if (!ok) + error_box(db().sq_get_text_error(false)); + else + { + if (_head.stato_estr == D_GEST_ERR) + { + warning_box("Attenzione l'estrazione ha prodotto degli errori. \nControllare e correggere eventuali problemi \npremendo il pulsante 'Controllo Estr.'"); + _msk->enable(DLG_FINDREC); + } + else if (_head.stato_estr == D_GEST_OK) + { + _msk->disable_controllo_err(); + return estrazione_iva() ? 1 : false; + } + } + return -2; } +const char* check_str(const TString& str) +{ + static TString n_str; n_str.cut(0) << str; + n_str.replace("'", "\'\'"); + n_str.replace(" ", " "); + return (const char*)n_str; +} + +bool TF9_app::estrazione_iva(bool escluso) +{ + bool stato = true; + TString& codsoc = _ambiente; + TString query; + vector& movs = escluso ? _esclusi : _movs; + + TProgress_monitor bar(movs.size(), "Estrazione dati IVA"); + for(auto it = movs.begin(); it != movs.end(); ++it) + { + if (!bar.add_status()) + break; + + TLocalisamfile mov(LF_MOV); mov.put(MOV_NUMREG, it->get(1)); mov.read(); + TLocalisamfile cli(LF_CLIFO); + TString statopaiv; statopaiv << cli.get(CLI_STATOPAIV); + TString idfisc; + TString numdoc; numdoc << (mov.get(MOV_NUMDOCEXT).full() ? mov.get(MOV_NUMDOCEXT) : mov.get(MOV_NUMDOC)); + if (statopaiv == "IT" || statopaiv.empty()) + idfisc << "IT" << cli.get(CLI_PAIV); + else + idfisc << statopaiv << cli.get(CLI_COFI); + cli.put(CLI_TIPOCF, mov.get(MOV_TIPO)); + cli.put(CLI_CODCF, mov.get(MOV_CODCF)); + cli.read(); + + query.cut(0) << "INSERT INTO " F9_IVA " (\n" + IVA_CODSOC ", " IVA_IDLAN ", " IVA_FLAG_PD ",\n" + IVA_ANNOES ", " IVA_GIVA ", " IVA_TIPOG ",\n" + IVA_DOCXML ", " IVA_TIPOCF ", " IVA_CODCF ",\n" + IVA_RAGSOC ", " IVA_IDFISC ", " IVA_PIVA ",\n" + IVA_CODFIS ", " IVA_CATDOC ", " IVA_CAUSSOS ",\n" + IVA_NUMDOC ", " IVA_DATADOC ", " IVA_SEZIVA ",\n" + IVA_TIPOREG ", " IVA_NPROT ", " IVA_DATPROT; + /*if(is_autofattura(mov)) + { + query << ",\n" + IVA_FORNOR ", " IVA_REGOR ", " IVA_NUMOR ", " IVA_DATAOR; + }*/ + query << ",\n" + IVA_CLASDOC ", " IVA_USERELA ", " IVA_TIMEELA; + if (_head.tipo_doc == 'A') + { + query << ",\n" + IVA_TIPPROT ", " IVA_NUMPROT ", " IVA_ANNPROT ", " IVA_TIMERIC; + } + const long datadoc = mov.get_date(MOV_DATADOC).date2ansi(); + const long datareg = mov.get_date(MOV_DATAREG).date2ansi(); + ; + + const TString& name_reg = TRegistro(TCausale(mov.get(MOV_CODCAUS)).reg()).name(); + query << "\n)\n" << + "VALUES (\n" << + "'" << codsoc << "', '" << _head.id_estr << "', '" << _head.flag_prov << "',\n" << + "'" << mov.get(MOV_ANNOES) << "', '" << _head.tipo_doc << "', '" << name_reg << "',\n" << + "'" << 'S' << "', '" << mov.get(MOV_TIPO) << "', '" << mov.get(MOV_CODCF) << "',\n" << + "'" << check_str(cli.get(CLI_RAGSOC)) << "', '" << idfisc << "', '" << cli.get(CLI_PAIV) << "',\n" << + "'" << cli.get(CLI_COFI) << "', '" << categoria_doc() << "', '" << caus_sos(mov, get_tipoiva()) << "',\n" << + "'" << numdoc << "', '" << datadoc << "', '" << mov.get(MOV_REG) << "',\n" << + "'" << "" << "', '" << mov.get(MOV_PROTIVA) << "', '" << datareg << "'"; + //if (is_autofattura(mov)) + //{ + // query << ",\n" << + // "'" << "" << "', '" << "" << "', '" << "N ORI" << "', '" << "20010101" << "'"; + //} + query << ",\n" << + "'" << (_head.tipo_doc == 'A' ? "FTA" : "FTV") << "', '" << user() << "', " << "GETDATE()"; + if (_head.tipo_doc == 'A') + { + TToken_string keys(mov.get(MOV_KEYFPPRO), ';'); + fppro_db().set_keys(keys); + query << ",\n" << + "'" << fppro_db().get_tipoprot() << "', '" << fppro_db().get_numprot() << "', '" << fppro_db().get_annoprot() << "', '" << fppro_db().get_dataoraric() << "'"; + } + query << "\n)"; + const bool ok = db().sq_set_exec(query); + if(!ok) + { + ofstream fout; + fout.open("f9exp_err.txt"); + fout << query << endl; + fout << db().sq_get_string_error() << endl; + fout << db().sq_get_text_error() << endl << endl; + } + stato &= ok; + } + return stato; +} + +const char* TF9_app::categoria_doc() +{ + return ""; // todo: +} + +const char* TF9_app::caus_sos(const TLocalisamfile& mov, TipoIVA acquisti) +{ + if (acquisti == iva_acquisti) + { + TToken_string keys(mov.get(MOV_KEYFPPRO)); + fppro_db().set_keys(keys); + return fppro_db().get_tipodoc(); + } + if (acquisti == iva_vendite) + { + const TDocumento doc(mov.get(MOV_DPROVV)[0], mov.get_int(MOV_DANNO), mov.get(MOV_DCODNUM), mov.get_int(MOV_DNDOC)); + static TString tipo_doc_sdi; + return tipo_doc_sdi = doc.tipo().tipo_doc_sdi(); + } + return ""; +} + +bool TF9_app::is_autofattura(const TLocalisamfile& mov) +{ + return TCausale(mov.get(MOV_CODCAUS)).tipo_doc() == "AF"; +} + +void TF9_app::segna_in_errore() const +{ + TString query; + query << "UPDATE " F9_DRD "\n" + "SET " DRD_STATO " = '" D_GEST_ERR "'\n" + "WHERE " DRD_ID_EST " = '" << _head.id_estr << "'\n"; + db().sq_set_exec(query); +} + + void TF9_app::main_loop() { _msk = new TMonitor_mask(); @@ -529,4 +999,274 @@ int f90100(int argc, char* argv[]) TF9_app app; app.run(argc, argv, TR("Configurazione FP")); return 0; +} + +///////////////////////////////////////////// +// TControllo_mask +///////////////////////////////////////////// + +void TControllo_mask::fill() const +{ + TSheet_field& sf = sfield(S_CONTROLLO); + sf.hide(); + sf.destroy(); + vector& movs = !_esclusi ? app()._movs : app()._esclusi; + + for (auto it = movs.begin(); it != movs.end(); ++it) + { + TToken_string& row = sf.row(-1); + if (it->get(0)[0] == 'X') + { + row = *it; + row[0] = (char&)" "; + if (!_esclusi && app().get_tipoiva() == iva_acquisti || _esclusi && app().get_tipoiva_escl() == iva_acquisti) + row.add('N', cid2index(F_CESCLUDI)); + else + row.add('Y', cid2index(F_CESCLUDI)); + } + } + sf.force_update(); + sf.show(); + + // Fill fppro sheet + if (!_esclusi && app().get_tipoiva() == iva_acquisti || _esclusi && app().get_tipoiva_escl() == iva_acquisti) + fill_fppro_sheet(); +} + +void TControllo_mask::fill_fppro_sheet() const +{ + TSheet_field& sf = sfield(S_FPPRO); + sf.hide(); + sf.destroy(); + const char* order; + switch (_ordin) + { + default: + case 'D': order = "P7_DATA"; break; + case 'N': order = "P7_NUMERO"; break; + case 'F': order = "FORNITORE"; break; + case 'R': order = "P2_ANADENOMIN"; break; + case 'P': order = "P2_FISCIVACOD"; break; + } + TString query; + query << "SELECT PQ_KEYPRGINVIO AS KEYPRGINVIO, PQ_KEYHEADERFATT AS KEYHEADERFATT, PQ_KEYBODYFATT AS KEYBODYFATT,\n" << + "PZ_TIPODOC AS TIPODOC, P7_DATA AS DATA, P7_NUMERO AS NUMDOC, PQ_IMPTOTDOC AS IMPTOTDOC,\n" << + "CASE\n" << + "WHEN PZ_CLIFOR <> '' THEN CAST(PZ_CLIFOR AS NUMERIC(10, 0))\n" << + "WHEN PZ_CLIFOR = '' THEN 0\n" << + "END AS FORNITORE, " << + "P2_ANADENOMIN AS RAGSOC, P2_FISCIVAPAESE AS STATOPIVA, P2_FISCIVACOD AS PIVA FROM PAA2700F\n" << + "JOIN PAA0700F ON PQ_KEYPRGINVIO = P7_KEYPRGINVIO AND PQ_KEYHEADERFATT = P7_KEYHEADERFATT AND PQ_KEYBODYFATT = P7_KEYBODYFATT\n" << + "JOIN PAA0200F ON PQ_KEYPRGINVIO = P2_KEYPRGINVIO AND PQ_KEYHEADERFATT = P2_KEYHEADERFATT AND PQ_KEYBODYFATT = P2_KEYBODYFATT\n" << + "JOIN FPPRO00F ON PQ_KEYPRGINVIO = PZ_KEYPRGINVIO AND PQ_KEYHEADERFATT = PZ_KEYHEADERFATT AND PQ_KEYBODYFATT = PZ_KEYBODYFATT\n" << + "WHERE PZ_NUMREGCONT = '0' AND PZ_DATAREGCONT = '2001-01-01'\n" << + "ORDER BY " << order << " " << (_verso == 'A' ? "ASC" : "DESC") << "\n"; + fp_db().sq_set_exec(query, false); + + for (bool ok = fp_db().sq_next(); ok; ok = fp_db().sq_next()) + { + TToken_string& row = sf.row(-1); + row.add(fp_db().sq_get("TIPODOC"), 1); + row.add(fp_db().sq_get_date("DATA")); + row.add(fp_db().sq_get("NUMDOC")); + row.add(fp_db().sq_get("IMPTOTDOC")); + row.add(fp_db().sq_get("FORNITORE")); + row.add(fp_db().sq_get("RAGSOC")); + row.add(fp_db().sq_get("STATOPIVA")); + row.add(fp_db().sq_get("PIVA")); + row.add(fp_db().sq_get("KEYPRGINVIO") << ";" << fp_db().sq_get("KEYHEADERFATT") << ";" << fp_db().sq_get("KEYBODYFATT")); + } + sf.force_update(); + sf.show(); +} + +TMask& TControllo_mask::get_win_order() +{ + static TMask* m = nullptr; + + if (m == nullptr) + { + m = new TMask("Configurazione Archiviazione Sostitutiva", 1, 60, 10); + // TOOLBAR + m->add_button_tool(DLG_OK, "Conferma", TOOL_OK); + m->add_button_tool(DLG_NULL, "", 0); + m->add_button_tool(DLG_QUIT, "Esci", TOOL_QUIT); + + // Ordinatori + m->add_radio(F_ORDER, 0, "Ordina per:", 1, 0, 59, "D|N|F|R|P", "DATA|NUMDOC|FORNITORE|RAGSOC|PIVA", "Z"); + m->add_radio(F_VERSO, 0, "Verso:", 1, 3, 59, "A|D", "Crescente|Decrescente", "Z"); + + //m->set_handler(DLG_OK, save_conf_handler); + _ordin = ini_get_string(CONFIG_DITTA, PAR_MOD, "ORDINAM", "D")[0]; + _verso = ini_get_string(CONFIG_DITTA, PAR_MOD, "VERSO", "A")[0]; + m->set(F_ORDER, &_ordin); + m->set(F_VERSO, &_verso); + + /*m->set(CF_CODSOC, ini_get_string(CONFIG_DITTA, PAR_MOD, AMBIENTE_F9)); + m->set(CF_ADDRDOC, ini_get_string(CONFIG_DITTA, PAR_MOD, ADDRCART_F9));*/ + } + return *m; +} + +void TControllo_mask::open_win_order() +{ + TMask& m = get_win_order(); + m.run(); + _ordin = m.get(F_ORDER)[0]; + _verso = m.get(F_VERSO)[0]; + ini_set_string(CONFIG_DITTA, PAR_MOD, "ORDINAM", &_ordin); + ini_set_string(CONFIG_DITTA, PAR_MOD, "VERSO", &_verso); +} + +TToken_string* TControllo_mask::selected_mov() +{ + TSheet_field& movs = sfield(S_CONTROLLO); + FOR_EACH_SHEET_ROW(movs, nr, row) + { + if (row->get(0)[0] == 'X') + { + _selected_mov = nr; + return row; + } + } + return nullptr; +} + +TToken_string* TControllo_mask::selected_fat() const +{ + TSheet_field& fppro = sfield(S_FPPRO); + FOR_EACH_SHEET_ROW(fppro, nr, row) + { + if (row->get(0)[0] == 'X') + return row; + } + return nullptr; +} + +void TControllo_mask::associa() +{ + TToken_string* mov_sel = selected_mov(); + TToken_string* fat_sel = selected_fat(); + if (mov_sel == nullptr || fat_sel == nullptr) + { + warning_box("Selezionare prima un movimento e una fattura elettronica."); + return; + } + TToken_string keys(fat_sel->get(cid2index(F_FPROKEYS)), ';'); + fppro_db().set_keys(keys); + const bool ok = fppro_db().associa_mov(mov_sel->get_int(cid2index(F_CNUMREG))); + if (ok) + { + auto it = app()._movs.begin(); + it += _selected_mov; + it->add(" ", 0); + } +} + +void TControllo_mask::selfatt(TOperable_field& o, const long jolly) const +{ + const TMask& mask = *this; + TSheet_field* sf; + if (jolly == 2) // Sheet controllo + sf = &mask.sfield(S_CONTROLLO); + else + sf = &mask.sfield(S_FPPRO); + sf->hide(); + FOR_EACH_SHEET_ROW(*sf, nr, row) + { + if (*row->get(0) == 'X') + row->add("", 0); + } + sf->force_update(); + sf->show(); +} + +void TControllo_mask::conferma_esclusi() const +{ + const TMask& mask = *this; + TSheet_field& sf = mask.sfield(S_CONTROLLO); + sf.hide(); + FOR_EACH_SHEET_ROW(sf, nr, row) + { + TLocalisamfile movs(LF_MOV); + movs.put(MOV_NUMREG, row->get_int(cid2index(F_CNUMREG))); + movs.read(); + if (*row->get(12) == 'Y') + { + const TDate today(TODAY); + TToken_string stato("", '|'); + stato.add("", 0); + stato.add(today.date2ansi()); + stato.add("X"); + movs.put(MOV_ELABF9, stato); + movs.rewrite(); + row->add("X", 13); + } + else + { + if (movs.get(MOV_ELABF9).full()) + { + movs.put(MOV_ELABF9, ""); + row->add("", 13); + movs.rewrite(); + } + } + } + sf.force_update(); + sf.show(); +} + +bool TControllo_mask::on_field_event(TOperable_field& o, TField_event e, long jolly) +{ + switch (o.dlg()) + { + case B_ORDER: + if (e == fe_button) + { + open_win_order(); + fill_fppro_sheet(); + } + break; + case B_ASSOC: + if (e == fe_button) + { + associa(); + fill(); // Ricarico gli sheet + } + break; + case B_ESCL: + if (e == fe_button) + conferma_esclusi(); + break; + case B_SELESCL: + if (e == fe_button) + { + _sel_esclusi = !_sel_esclusi; + field(B_ASSOC).enable(!_sel_esclusi); + field(B_ESCL).enable(_sel_esclusi); + sfield(S_CONTROLLO).enable_column(cid2index(F_CESCLUDI), _sel_esclusi); + sfield(S_CONTROLLO).force_update(); + } + break; + case S_CONTROLLO: + if (e == fe_init) + sfield(S_CONTROLLO).enable_column(cid2index(F_CESCLUDI), false); + break; + case F_CSEL: + if (e == fe_modify) + selfatt(o, jolly); + break; + default: break; + } + return true; +} + +TControllo_mask::TControllo_mask(bool esclusi) : TAutomask("f90100b"), _ordin('D'), _verso('A'), _selected_mov(0), _sel_esclusi(false) +{ + field(B_ESCL).disable(); + get_win_order(); + _esclusi = esclusi; + + // Fill controllo sheet + fill(); } \ No newline at end of file diff --git a/src/f9/f90100.h b/src/f9/f90100.h new file mode 100644 index 000000000..a45fe94b1 --- /dev/null +++ b/src/f9/f90100.h @@ -0,0 +1,183 @@ +#pragma once +#include "applicat.h" +#include "f90100a.h" +#include + +#define PAR_MOD "F9" +#define AMBIENTE_F9 "CODSOC" // Codice ambiente (codsoc) +#define ADDRCART_F9 "ADDDOC" // Indirizzo documenti cartacei + +TDate today(TODAY); + +enum state_fppro +{ + correct = 1, + reg_with_err = -1, + not_fa = -10, // Non e' fattura acquisti + guessed = 100, + no_guessed = 0 +}; + +struct drd +{ + TString cod_soc; + TString id_estr; + bool flag_prov{ true }; + TString descr; + char tipo_doc{ 'A' }; + TDate dal; + TDate al; + TString user; + TString timestamp; + TString4 stato_estr{ "01" }; + TString addr_cart; +}; + +SSimple_query& db(); + +class TEstrai_mask : public TMask +{ + TString _descr; + + void enable_fields(bool en = true); + + static bool estrai_handler(TMask_field& f, unsigned short key); + static bool enable_handler(TMask_field& f, unsigned short key); + static bool dataini_handler(TMask_field& f, unsigned short key); + static bool dataend_handler(TMask_field& f, unsigned short key); +public: + TString& get_descr() { return _descr; } + TEstrai_mask(); +}; + +class TEstrai_mask; +class TMonitor_mask; +class TControllo_mask; +class TF9_app : public TSkeleton_application +{ + //friend class TEstrai_mask; + friend class TMonitor_mask; + friend class TControllo_mask; + drd _head; + TEstrai_mask* _estr_msk; + TMonitor_mask* _msk; + //TControllo_mask* _controllo_msk; + vector _movs; + vector _esclusi; // Vettore con i movimenti esclusi + TToken_string _mov_escl; + int _tot_movs; + TString _ambiente; // Codice ambiente (codsoc) + TString _addr_doc; // Indirizzo documenti cartacei + int _last_estr_p; + int _last_estr_d; + char _tipodoc_escl; + char _flagprov_escl; + + static const char* traduci_stato(const TString& cod); + + state_fppro check_fppro(int numreg) const; + const char* prepara_movimenti(TipoIVA tipo); + const char* prepara_movimenti_escl(TipoIVA tipo, int numreg, TString& err) const; + static bool is_doc_xml(const TLocalisamfile& mov); + static bool check_periodo_def(const drd& head); + + static TString& drd_attr(); + TString& drd_tovalues() const; + + TString next_estr_today(char tipo) const; + bool esporta(); + bool new_extr() const; + + TDate get_dataini() const { return _estr_msk->get_date(ES_DATAINI); } + TDate get_dataend() const { return _estr_msk->get_date(ES_DATAEND); } + char get_tipodoc() const { return _estr_msk->get(ES_TIPODOC)[0]; } + char get_tipodoc_escl() const { return _tipodoc_escl; } + TipoIVA get_tipoiva() const { return get_tipodoc() == 'V' ? iva_vendite : iva_acquisti; } + TipoIVA get_tipoiva_escl() const { return get_tipodoc_escl() == 'V' ? iva_vendite : iva_acquisti; } + TString& get_descr() const { return _estr_msk->get_descr(); } + bool is_provviso() const { return _estr_msk->get(ES_FLAGPROV)[0] == 'P'; } + + void fill(); + void load(); + +public: + const TString& get_ambiente() const { return _ambiente; }; + const TString& get_addr_doc() const { return _addr_doc; }; + + void set_ambiente(const char* cod) { _ambiente.cut(0) << cod; }; + void set_addr_doc(const char* add) { _addr_doc.cut(0) << add; }; + + void run_estr_msk() const { _estr_msk->run(); } + + static TMask& descr_msk(); + + // Estrazione esclusi + static bool select_escl_notify(TSheet_field& s, int row, KEY key); + static bool controllo_escl_handler(TMask_field& field, KEY key); + static bool year_handler(TMask_field& field, KEY key); + void open_esclusi(); + + void edit_wa() const; + int estrai(); // Estrazione per pacchetti "normali" + int estrai_single(TToken_string& row, char flagprov, char tipodoc); // Estrazione singole per esclusi + bool estrazione_iva(bool escluso = false); // Estrazione dati IVA sia per pacch. normali che per esclusi + void segna_in_errore() const; + + static const char* categoria_doc(); + static const char* caus_sos(const TLocalisamfile& mov, TipoIVA acquisti); + static bool is_autofattura(const TLocalisamfile& mov); + + void main_loop() override; + TF9_app() : _estr_msk(nullptr), _msk(nullptr), _mov_escl("", '|'), _tot_movs(0), _ambiente(""), _addr_doc(""), _last_estr_p(0), _last_estr_d(0), + _tipodoc_escl('A'), _flagprov_escl('P') { } +}; +TF9_app& app(); + +class TMonitor_mask : public TAutomask +{ + vector _fppro; + + static bool save_conf_handler(TMask_field& f, unsigned short key); + + static void controllo_errori(); + // Riempie sheet per visualizzare le estrazioni + bool on_key(KEY key) override; + static void open_win_estr(); + void open_win_conf() const; + + bool on_field_event(TOperable_field& o, TField_event e, long jolly) override; + +public: + void disable_controllo_err(); + TMonitor_mask() : TAutomask("f90100a") + { + disable(DLG_FINDREC); + } +}; + +class TControllo_mask : public TAutomask +{ + char _ordin; + char _verso; + int _selected_mov; + bool _sel_esclusi; + bool _esclusi; + + void fill() const; + void fill_fppro_sheet() const; + TMask& get_win_order(); + void open_win_order(); + + TToken_string* selected_mov(); + TToken_string* selected_fat() const; + + // Gestisce la selezione multipla negli sheet di controllo movimenti + void selfatt(TOperable_field& o, long jolly) const; + void conferma_esclusi() const; + void associa(); + + bool on_field_event(TOperable_field& o, TField_event e, long jolly) override; + +public: + TControllo_mask(bool esclusi = false); +}; \ No newline at end of file diff --git a/src/f9/f90100a.h b/src/f9/f90100a.h index f7cd830d1..4dcbe1ffd 100644 --- a/src/f9/f90100a.h +++ b/src/f9/f90100a.h @@ -1,29 +1,35 @@ // Sheet Pacchetti gia' elaborati -#define S_ELAB 201 -#define F_TEXT 202 +#define S_ELAB 201 +#define F_TEXT 202 +#define B_SHOWESCL 203 -#define F_ARCH_B 101 -#define F_IDESTR 102 -#define F_DATAESTR 103 -#define F_PROV_B 104 -#define F_TIPODOC 105 -#define F_DATADAL 106 -#define F_DATAAL 107 -#define F_USER 108 -#define F_STATESTR 109 -#define F_DESCR_E 110 - -// Campi del vettore _movs -#define F_SEL 101 -#define F_NUMREG 102 -#define F_DATAREG 103 -#define F_DATADOC 104 -#define F_CODCAUS 105 -#define F_MESELIQ 106 -#define F_NUMDOC 107 -#define F_PROTIVA 108 -#define F_DESCR 109 +#define F_ARCH_B 101 +#define F_IDESTR 102 +#define F_DATAESTR 103 +#define F_PROV_B 104 +#define F_TIPODOC 105 +#define F_DATADAL 106 +#define F_DATAAL 107 +#define F_USER 108 +#define F_STATESTR 109 +#define F_DESCR_E 110 +// Campi del vettore _movs per promemoria +#define F_SEL 101 +#define F_NUMREG 102 +#define F_DATAREG 103 +#define F_DATADOC 104 +#define F_CODCAUS 105 +#define F_MESELIQ 106 +#define F_NUMDOC 107 +#define F_IMPTOTDOC 108 +#define F_FORN 109 +#define F_RAGSOC 110 +#define F_PROTIVA 111 +#define F_DESCR 112 +#define F_ESCLUDI 113 +#define F_ESCLUSO 114 +#define F_DESCRERR 115 // Campi maschera finestra runtime estrazione #define ES_DATAINI 501 @@ -34,11 +40,17 @@ #define ES_FLAGGROUP 506 #define ES_TIPOGROUP 507 -// +// Campi maschera configurazione #define CF_CODGROUP 501 #define CF_CODSOC 502 #define CF_ADDRGROUP 503 #define CF_ADDRDOC 504 +// Campi maschera descrizione estrazione #define DES_TEXT 501 -#define DES_GROUP 502 \ No newline at end of file +#define DES_GROUP 502 + +// Campi maschera esclusi +#define ESC_BESTR 501 +#define ESC_BEXIT 502 +#define ESC_SSHEE 503 \ No newline at end of file diff --git a/src/f9/f90100a.uml b/src/f9/f90100a.uml index ad5178f42..0bb6ff4dc 100644 --- a/src/f9/f90100a.uml +++ b/src/f9/f90100a.uml @@ -10,23 +10,42 @@ END BUTTON DLG_ELABORA 2 2 BEGIN - PROMPT 1 1 "Estrazione" + PROMPT 1 2 "Estrazione" PICTURE TOOL_ELABORA FLAGS "" END BUTTON DLG_CONFIG 2 2 BEGIN - PROMPT 1 1 "Configurazione" + PROMPT 1 3 "Configurazione" PICTURE TOOL_CONFIG FLAGS "" END BUTTON DLG_FINDREC 2 2 BEGIN - PROMPT 1 1 "Controllo Estr." + PROMPT 1 4 "Controllo Estr." PICTURE TOOL_PERMISSIONS - FLAGS "" + FLAGS "D" +END + +BUTTON DLG_RECALC +BEGIN + PROMPT 1 5 "Ricarica" + PICTURE TOOL_CONVERT + FLAS "" +END + +BUTTON DLG_NULL 2 2 +BEGIN + PROMPT 1 8 "" + PICTURE 0 +END + +BUTTON B_SHOWESCL 2 2 +BEGIN + PROMPT 1 8 "Mostra esclusi" + PICTURE TOOL_PERMISSIONS END #include @@ -50,14 +69,12 @@ BEGIN ITEM "dal@8" ITEM "al@8" ITEM "Utente@8" - ITEM "Stato estrazione@11" + ITEM "Stato estrazione@22" ITEM "Descrizione@50" END - ENDPAGE ENDMASK - PAGE "Pacchetti" -1 -1 78 13 BOOLEAN F_ARCH_B @@ -114,7 +131,7 @@ BEGIN FLAGS "D" END -STRING F_STATESTR 16 +STRING F_STATESTR 33 BEGIN PROMPT 1 1 "" FLAGS "D" @@ -136,21 +153,5 @@ BEGIN MESSAGE EXIT,K_QUIT PICTURE TOOL_QUIT END - ENPAGE -ENDMASK - -PAGE "Elenco di controllo" -1 -1 78 13 - -SPREADSHEET S_ELAB 60 10 -BEGIN - PROMPT 0 2 "Movimenti da controllare" - ITEM " " - ITEM "DATA " - ITEM "NDOCS " - ITEM "PERIOD_DA" - ITEM "PERIOD_A " -END - -ENDPAGE ENDMASK \ No newline at end of file diff --git a/src/f9/f90100b.h b/src/f9/f90100b.h new file mode 100644 index 000000000..ad10777a3 --- /dev/null +++ b/src/f9/f90100b.h @@ -0,0 +1,42 @@ +// Maschera controllo errori in comune con monitor e esclusi +// Sheet Pacchetti gia' elaborati +#define B_ORDER 201 +#define B_ASSOC 202 +#define B_SELESCL 203 +#define B_ESCL 204 + +// Sheet movimenti da controllare +#define S_CONTROLLO 205 +#define S_FPPRO 206 + +// Cambi maschera ordinamento sheet FPPRO +#define F_ORDER 301 +#define F_VERSO 302 + +#define F_CSEL 101 +#define F_CNUMREG 102 +#define F_CDATAREG 103 +#define F_CDATADOC 104 +#define F_CCODCAUS 105 +#define F_CMESELIQ 106 +#define F_CNUMDOC 107 +#define F_CIMPTOTDOC 108 +#define F_CFORN 109 +#define F_CRAGSOC 110 +#define F_CPROTIVA 111 +#define F_CDESCR 112 +#define F_CESCLUDI 113 +#define F_CESCLUSO 114 +#define F_CDESCRERR 115 + +// Sheet fatture FPPRO da associare +#define F_FSEL 101 +#define F_FTIPODOC 102 +#define F_FDATA 103 +#define F_FNUMDOC 104 +#define F_FIMPTOTDOC 105 +#define F_FFORNITORE 106 +#define F_FRAGSOC 107 +#define F_FSTATOPIVA 108 +#define F_FPIVA 109 +#define F_FPROKEYS 110 \ No newline at end of file diff --git a/src/f9/f90100b.uml b/src/f9/f90100b.uml new file mode 100644 index 000000000..c5c7d20c9 --- /dev/null +++ b/src/f9/f90100b.uml @@ -0,0 +1,263 @@ +#include "f90100b.h" + +TOOLBAR "topbar" 0 0 0 2 + +BUTTON B_ORDER 2 2 +BEGIN + PROMPT 1 5 "Ordinamento" + PICTURE TOOL_PERMISSIONS + FLAGS "" +END + +BUTTON B_ASSOC 2 2 +BEGIN + PROMPT 1 6 "Associa mov." + PICTURE TOOL_PERMISSIONS + FLAGS "" +END + +BUTTON B_SELESCL 2 2 +BEGIN + PROMPT 1 8 "Sel. esclusi" + PICTURE TOOL_PERMISSIONS + FLAGS "" +END + +BUTTON B_ESCL 2 2 +BEGIN + PROMPT 1 7 "Conf. esclusi" + PICTURE TOOL_PERMISSIONS + FLAGS "" +END + +BUTTON DLG_NULL 2 2 +BEGIN + PROMPT 1 8 "" + PICTURE 0 +END + +#include +ENDPAGE + +PAGE "Elenco di controllo" -1 -1 78 13 + +SPREADSHEET S_CONTROLLO -1 10 +BEGIN + PROMPT 0 0 "Movimenti da controllare" + ITEM " " + ITEM "NUMREG@8" + ITEM "DATAREG@8" + ITEM "DATADOC@8" + ITEM "CODCAUS@8" + ITEM "MESELIQ@8" + ITEM "NUMDOC@8" + ITEM "IMPTOTDOC@8" + ITEM "FORNITORE@8" + ITEM "RAGSOC@8" + ITEM "PROTIVA@8" + ITEM "DESCR@8" + ITEM "ESCLUDI@4" + ITEM "ESCLUSO@5" + ITEM "DESCR ERR" +END + +SPREADSHEET S_FPPRO -1 -1 +BEGIN + PROMPT 0 11 "Movimenti da controllare" + ITEM " " + ITEM "TIPODOC" + ITEM "DATA@8" + ITEM "NUMDOC@12" + ITEM "IMPTOTDOC@9" + ITEM "FORNITORE@6" + ITEM "RAGSOC@20" + ITEM "STATOPIVA" + ITEM "PIVA@8" + ITEM "@1" +END + +ENDPAGE +ENDMASK + + + + +PAGE "Controllo" -1 -1 78 13 + +BOOLEAN F_CSEL +BEGIN + PROMPT 1 1 "" +END + +NUMERIC F_CNUMREG 7 +BEGIN + PROMPT 1 1 "" +END + +DATA F_CDATAREG +BEGIN + PROMPT 1 1 "" +END + +DATA F_CDATADOC +BEGIN + PROMPT 1 1 "" +END + +STRING F_CCODCAUS 3 +BEGIN + PROMPT 1 1 "" +END + +NUMERIC F_CMESELIQ 2 +BEGIN + PROMPT 1 1 "" +END + +STRING F_CNUMDOC 50 +BEGIN + PROMPT 1 1 "" +END + +NUMERIC F_CIMPTOTDOC 15 2 +BEGIN + PROMPT 1 1 "" +END + +NUMERIC F_CFORN 6 +BEGIN + PROMPT 1 1 "" +END + +STRING F_CRAGSOC 80 +BEGIN + PROMPT 1 1 "" +END + +NUMERIC F_CPROTIVA 6 +BEGIN + PROMPT 1 1 "" +END + +STRING F_CDESCR 50 +BEGIN + PROMPT 1 1 "" +END + +LIST F_CESCLUDI 2 +BEGIN + PROMPT 41 2 "Escludi" + ITEM "N|NO" + ITEM "Y|SI" +END + +BOLEAN F_CESCLUSO +BEGIN + PROMPT 1 1 "ESCLUSO" + FLAG "D" +END + +STRING F_CDESCRERR 110 +BEGIN + PROMPT 1 1 "DESCRIZIONE ERRORE" + FLAG "D" +END +ENDPAGE + +TOOLBAR "topbar" 0 0 0 2 + +BUTTON DLG_NULL 2 2 +BEGIN + PROMPT -1 0 "" + PICTURE 0 +END + +BUTTON DLG_QUIT 2 2 +BEGIN + PROMPT 3 1 "Fine" + MESSAGE EXIT,K_QUIT + PICTURE TOOL_QUIT +END +ENPAGE +ENDMASK + +PAGE "Passive" -1 -1 78 13 + +BOOLEAN F_FSEL +BEGIN + PROMPT 1 1 "" +END + +STRING F_FTIPODOC 4 +BEGIN + PROMPT 1 1 " " + FLAGS "D" +END + +DATA F_FDATA +BEGIN + PROMPT 1 1 " " + FLAGS "D" +END + +STRING F_FNUMDOC 20 +BEGIN + PROMPT 1 1 " " + FLAGS "D" +END + +NUMERIC F_FIMPTOTDOC 15 2 +BEGIN + PROMPT 1 1 " " + FLAGS "D" +END + +NUMERIC F_FFORNITORE 6 +BEGIN + PROMPT 1 1 " " + FLAGS "D" +END + +STRING F_FRAGSOC 80 +BEGIN + PROMPT 1 1 " " + FLAGS "D" +END + +STRING F_FSTATOPIVA 2 +BEGIN + PROMPT 1 1 " " + FLAGS "D" +END + +STRING F_FPIVA 15 +BEGIN + PROMPT 1 1 " " + FLAGS "D" +END + +STRING F_FPROKEYS 80 +BEGIN + PROMPT 1 1 " " + FLAGS "D" +END + +ENDPAGE + +TOOLBAR "topbar" 0 0 0 2 + +BUTTON DLG_NULL 2 2 +BEGIN + PROMPT -1 0 "" + PICTURE 0 +END + +BUTTON DLG_QUIT 2 2 +BEGIN + PROMPT 3 1 "Fine" + MESSAGE EXIT,K_QUIT + PICTURE TOOL_QUIT +END + +ENPAGE +ENDMASK \ No newline at end of file diff --git a/src/f9/f90100c.h b/src/f9/f90100c.h new file mode 100644 index 000000000..b12660432 --- /dev/null +++ b/src/f9/f90100c.h @@ -0,0 +1,16 @@ +#define S_ESCL 201 +#define F_ETEXT 202 + +// Elenco movimenti esclusi +#define F_SEL 101 +#define F_NUMREG 102 +#define F_DATAREG 103 +#define F_DATADOC 104 +#define F_CODCAUS 105 +#define F_MESELIQ 106 +#define F_NUMDOC 107 +#define F_IMPTOTDOC 108 +#define F_FORN 109 +#define F_RAGSOC 110 +#define F_PROTIVA 111 +#define F_DESCR 112 \ No newline at end of file diff --git a/src/f9/f90100c.uml b/src/f9/f90100c.uml new file mode 100644 index 000000000..a560d7367 --- /dev/null +++ b/src/f9/f90100c.uml @@ -0,0 +1,145 @@ +#include "f90100c.h" + +TOOLBAR "topbar" 0 0 0 2 + +BUTTON DLG_OK 2 2 +BEGIN + PROMPT 1 1 "Estrai" + PICTURE TOOL_ELABORA +END + +BUTTON DLG_NULL 2 +BEGIN + PROMPT 1 2 "" + PICTURE 0 +END + +BUTTON DLG_FINDREC 2 2 +BEGIN + PROMPT 1 4 "Controllo Estr." + PICTURE TOOL_PERMISSIONS + FLAGS "" +END + +#include +ENDPAGE + +PAGE "Esclusi" 0 2 0 0 + +TEXT F_ETEXT +BEGIN + PROMPT 0 0 "@BMovimenti esclusi dalle precedenti estrazioni:" +END + +SPREADSHEET S_ESCL -1 10 +BEGIN + PROMPT 0 1 "Movimenti da controllare" + ITEM " " + ITEM "NUMREG@8" + ITEM "DATAREG@8" + ITEM "DATADOC@8" + ITEM "CODCAUS@8" + ITEM "MESELIQ@8" + ITEM "NUMDOC@8" + ITEM "IMPTOTDOC@8" + ITEM "FORNITORE@8" + ITEM "RAGSOC@8" + ITEM "PROTIVA@8" + ITEM "DESCR@8" +END +ENDPAGE +ENDMASK + + +PAGE "Mov Esclusi" -1 -1 78 13 + +BOOLEAN F_SEL +BEGIN + PROMPT 1 1 "" +END + +NUMERIC F_NUMREG 7 +BEGIN + PROMPT 1 1 "" + FLAGS "D" +END + +DATA F_DATAREG +BEGIN + PROMPT 1 1 "" + FLAGS "D" +END + +DATA F_DATADOC +BEGIN + PROMPT 1 1 "" + FLAGS "D" +END + +STRING F_CODCAUS 3 +BEGIN + PROMPT 1 1 "" + FLAGS "D" +END + +NUMERIC F_MESELIQ 2 +BEGIN + PROMPT 1 1 "" + FLAGS "D" +END + +STRING F_NUMDOC 50 +BEGIN + PROMPT 1 1 "" + FLAGS "D" +END + +NUMERIC F_IMPTOTDOC 15 2 +BEGIN + PROMPT 1 1 "" + FLAGS "D" +END + +NUMERIC F_FORN 6 +BEGIN + PROMPT 1 1 "" + FLAGS "D" +END + +STRING F_RAGSOC 80 +BEGIN + PROMPT 1 1 "" + FLAGS "D" +END + +NUMERIC F_PROTIVA 6 +BEGIN + PROMPT 1 1 "" + FLAGS "D" +END + +STRING F_DESCR 50 +BEGIN + PROMPT 1 1 "" + FLAGS "D" +END + +ENDPAGE + +TOOLBAR "topbar" 0 0 0 2 + +BUTTON DLG_NULL 2 2 +BEGIN + PROMPT -1 0 "" + PICTURE 0 +END + +BUTTON DLG_QUIT 2 2 +BEGIN + PROMPT 3 1 "Fine" + MESSAGE EXIT,K_QUIT + PICTURE TOOL_QUIT +END + +ENPAGE +ENDMASK \ No newline at end of file diff --git a/src/f9/f90101.cpp b/src/f9/f90101.cpp deleted file mode 100644 index f4a76d1c4..000000000 --- a/src/f9/f90101.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "f90101.h" - -TF9_fp& f9_db() -{ - static TF9_fp* f9 = nullptr; - - if (f9 == nullptr) - { - f9 = new TF9_fp(); - } - - return *f9; -} - -TF9_fp::f9_tab TF9_fp::name2tab(TString& name) -{ - if (name == "F9DRD00K") - return f9_drd; - if(name == "F9DRT00K") - return f9_drt; - if(name == "F9IVA00K") - return f9_iva; - return f9_drd; -} - -const char* TF9_fp::tab2name(f9_tab tab) -{ - if (tab == f9_drd) - return "F9DRD00K"; - if (tab == f9_drt) - return "F9DRT00K"; - if (tab == f9_iva) - return "F9IVA00K"; - return "F9DRD00K"; -} - -void TF9_fp::set_tab(f9_tab tab) -{ - _tab = tab; -} diff --git a/src/f9/f90101.h b/src/f9/f90101.h deleted file mode 100644 index 891266b4d..000000000 --- a/src/f9/f90101.h +++ /dev/null @@ -1,37 +0,0 @@ -#ifndef _F90101H_ -#define _F90101H_ -#include "object.h" -#include "strings.h" -#include "f901tab.h" - - - - - -class TF9_fp : public TObject -{ - enum f9_tab - { - f9_drd, // Driver estrazione giornale iva - f9_drt, // Driver categorie documentali - f9_iva // File documenti estratti dal giornale iva - }; - - f9_tab _tab; - TToken_string* _f9_drd; //F9RCSOC - -public: - static f9_tab name2tab(TString& name); - static const char* tab2name(f9_tab tab); - - void set_tab(f9_tab tab); - void set_codsoc(TString& codsoc); - - - - TF9_fp() : _tab(f9_drd) { _f9_drd = new TToken_string("", '|'); } -}; - -TF9_fp& f9_db(); - -#endif \ No newline at end of file diff --git a/src/f9/f901tab.h b/src/f9/f901tab.h index 67c0c2b20..ef4523d6e 100644 --- a/src/f9/f901tab.h +++ b/src/f9/f901tab.h @@ -1,98 +1,98 @@ #pragma once -#define F9_WA "F9WA00K" -#define F9_DRD "F9DRD00K" -#define F9_IVA "F9IVA00K" -#define F9_DRT "F9DRT00K" +#define F9_WA "F9WA00K" +#define F9_DRD "F9DRD00K" +#define F9_IVA "F9IVA00K" +#define F9_DRT "F9DRT00K" // FILE DRD : DRIVER ESTRAZIONE GIORNALE IVA -#define DRD_CODSOC "F9RCSOC" // A(10) [K] -#define DRD_ID_EST "F9RIDES" // A(18) [K] -#define DRD_FLAG_PD "F9RFPDE" // A(1) [K] - { P | D } - Flag provvisorio/definitivo -#define DRD_DESC "F9RDDES" // A(256) - Descrizione estrazione -#define DRD_TIPODOC "F9RFTDC" // A(1) - { A | V | C } - Tipi documenti (A=Acquisti, V=Vendite, C=Corrispettivo) -#define DRD_DATADA "F9RUESD" // D - Data estrazione da -#define DRD_DATAA "F9RUESA" // D - Data estrazione a -#define DRD_UTENTE "F9RUTEE" // A(10) - Utente estrazione -#define DRD_TIME "F9RUHES" // T - Data e ora estrazione -#define DRD_STATO "F9RIDAS" // A(2) - { 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 } - Stato estrazione documenti +#define DRD_CODSOC "F9RCSOC" // A(10) [K] +#define DRD_ID_EST "F9RIDES" // A(18) [K] +#define DRD_FLAG_PD "F9RFPDE" // A(1) [K] - { P | D } - Flag provvisorio/definitivo +#define DRD_DESC "F9RDDES" // A(256) - Descrizione estrazione +#define DRD_TIPODOC "F9RFTDC" // A(1) - { A | V | C } - Tipi documenti (A=Acquisti, V=Vendite, C=Corrispettivo) +#define DRD_DATADA "F9RUESD" // D - Data estrazione da +#define DRD_DATAA "F9RUESA" // D - Data estrazione a +#define DRD_UTENTE "F9RUTEE" // A(10) - Utente estrazione +#define DRD_TIME "F9RUHES" // T - Data e ora estrazione +#define DRD_STATO "F9RIDAS" // A(2) - { 01 | 02 | 03 | 04 | 05 | 06 | 07 | 08 | 09 } - Stato estrazione documenti // Stati ///////////////// -#define IN_DIAGN "01" // 01 = in diagnostica -#define D_GEST_ERR "02" // 02 = errore diagnostica gestionale -#define D_GEST_OK "03" // 03 = diagnostica gestionale ok, -#define WA_CONTROL "04" // 04 = in controllo webapp, -#define D_WA_ERR "05" // 05 = errore diagnostica webapp, -#define D_WA_OK "06" // 06 = diagnostica webapp ok (se provvisorio si ferma qui) -#define ELAB_SOS "07" // 07 = elaborazione presso sostitutiva -#define D_ERR_SOS "08" // 08 = errore diagnostica sostitutiva -#define ELAB_COMPL "09" // 09 = Pacchetto archiviazione acquisito +#define IN_DIAGN "01" // 01 = in diagnostica +#define D_GEST_ERR "02" // 02 = errore diagnostica gestionale +#define D_GEST_OK "03" // 03 = diagnostica gestionale ok, +#define WA_CONTROL "04" // 04 = in controllo webapp, +#define D_WA_ERR "05" // 05 = errore diagnostica webapp, +#define D_WA_OK "06" // 06 = diagnostica webapp ok (se provvisorio si ferma qui) +#define ELAB_SOS "07" // 07 = elaborazione presso sostitutiva +#define D_ERR_SOS "08" // 08 = errore diagnostica sostitutiva +#define ELAB_COMPL "09" // 09 = Pacchetto archiviazione acquisito ////////////////////////// -#define DRD_PERC "F9RPCDC" // A(256) - Perc. copia doc. cartacei WA +#define DRD_PERC "F9RPCDC" // A(256) - Perc. copia doc. cartacei WA // FILE IVA : DOCUMENTI ESTRATTI DAL GIORNALE IVA -#define IVA_CODSOC "F9ICSOC" // A(10) [K] - Codice società -#define IVA_IDLAN "F9IIDLA" // A(18) [K] - ID UNIVOCO DI LANCIO -#define IVA_FLAG_PD "F9IFPDE" // A(1) [K] - Flag Provvisorio / Definitivo -#define IVA_ANNOES "F9IAFES" // A(4) - Anno Fiscale / Esercizio -#define IVA_GIVA "F9IGIVA" // A(1) - { A | V | C } - GG.iva vendite / acq (A=Acquisti, V=Vendite, C=Corrispettivo) -#define IVA_TIPOG "F9ITPGI" // A(10) [K] - Tipo giornale -#define IVA_DOCXML "F9IDXML" // A(1) - { S | N } - Documento xml (S=Si, N=No) -#define IVA_TIPOCF "F9ITCFO" // A(1) - { C | F } - Tipo cliente / fornitore (C=Cliente, F=Fornitore) -#define IVA_CODCF "F9ICCFO" // A(10) - Codice cliente / fornitore (In caso di autofattura mettere fornitore originale) -#define IVA_RAGSOC "F9IDRSO" // A(60) - Ragione sociale -#define IVA_IDFISC "F9IIDFI" // A(30) - {Codice ISO + { PIVA (x ita) | CF (x est)}} ID fiscale -#define IVA_PIVA "F9IPIVA" // A(28) - Partiva Iva -#define IVA_CODFIS "F9ICFIS" // A(16) - Codice fiscale -#define IVA_CATDOC "F9ICADO" // A(10) - Categoria documento -#define IVA_CAUSSOS "F9ICSOS" // A(6) - Causale per sostitutiva(da tabella f9drt) (tipo documento fattura (TD01,TD02,TD03 ecc)) -#define IVA_NUMDOC "F9INDOC" // A(20) - Numero Documento -#define IVA_DATADOC "F9IUDOC" // D - Data Documento -#define IVA_SELIVA "F9ISIVA" // A(10) [K] - sezionale iva -#define IVA_TIPOREG "F9ICREG" // A(6) [K] - Tipo registrazione -#define IVA_NPROT "F9INPRI" // A(20) [K] - n.protocollo iva -#define IVA_DATPROT "F9IUPRI" // D [K] - data protocollo iva -#define IVA_FORNOR "F9IFOOA" // A(10) - fornitore originale fattura -#define IVA_REGOR "F9ITROT" // A(6) - tipo registrazione originale(TR) -#define IVA_NUMOR "F9INRRO" // A(20) - n.registrazione originale -#define IVA_DATAOR "F9IURGO" // D - data registrazione originale -#define IVA_CLASDOC "F9ICLDF" // A(10) - classe documentale FTV (in base al tipo documento da F9DRT00K) -#define IVA_NOMF1 "F9INMF1" // A(100) - nome file DOC (Nome fattura cartacea) -#define IVA_CLASAN1 "F9ICLDN" // A(10) - classe documentale(annesso 1) (in base al tipo documento da F9DRA00K) -#define IVA_NOMF2 "F9INMF2" // A(100) - nome file 1 -#define IVA_CLASAN2 "F9ICLDA" // A(10) - classe documentale(annesso 2) -#define IVA_NOMF3 "F9INMF3" // A(100) - nome file 2 (Nome documento (senza percorso)) -#define IVA_CLASAN4 "F9ICLD4" // A(10) - classe documentale(annesso 3) -#define IVA_NOMF4 "F9INMF4" // A(100) - nome file 3 -#define IVA_CLASAN5 "F9ICLD5" // A(10) - classe documentale(annesso 4) -#define IVA_NOMF5 "F9INMF5" // A(100) - nome file 4 -#define IVA_CLASAN6 "F9ICLD6" // A(10) - classe documentale(annesso 5) -#define IVA_NOMF6 "F9INMF6" // A(100) - nome file 5 -#define IVA_CLASAN7 "F9ICLD7" // A(10) - classe documentale(annesso 6) -#define IVA_NOMF7 "F9INMF7" // A(100) - nome file 6 -#define IVA_CLASAN8 "F9ICLD8" // A(10) - classe documentale(annesso 7) -#define IVA_NOMF8 "F9INMF8" // A(100) - nome file 7 -#define IVA_CLASAN9 "F9ICLD9" // A(10) - classe documentale(annesso 8) -#define IVA_NOMF9 "F9INMF9" // A(100) - nome file 8 -#define IVA_CLASA10 "F9ICL10" // A(10) - classe documentale(annesso 9) -#define IVA_NOMF10 "F9INM10" // A(100) - nome file 9 -#define IVA_USERELA "F9IUTEE" // A(10) - Utente elaborazione -#define IVA_TIMEELA "F9IUHEL" // D - Data e ora elaborazione -#define IVA_TIMEWEB "F9IUHEW" // D - Data e ora elaborazione WEBAPP -#define IVA_DESCDOC "F9IDDES" // A(30) - Descrizione documento -#define IVA_TIPPROT "F9ITPRT" // A(2) - Tipo protocollo ricezione -#define IVA_NUMPROT "F9IAPRT" // I(4) - Numero protocollo ricezione -#define IVA_ANNPROT "F9INPRT" // I(10) - Anno protocollo ricezione -#define IVA_TIMERIC "F9IURIC" // D - Data/ora ricezione fattura +#define IVA_CODSOC "F9ICSOC" // A(10) [K] - Codice società +#define IVA_IDLAN "F9IIDLA" // A(18) [K] - ID UNIVOCO DI LANCIO +#define IVA_FLAG_PD "F9IFPDE" // A(1) [K] - Flag Provvisorio / Definitivo +#define IVA_ANNOES "F9IAFES" // A(4) - Anno Fiscale / Esercizio +#define IVA_GIVA "F9IGIVA" // A(1) - { A | V | C } - GG.iva vendite / acq (A=Acquisti, V=Vendite, C=Corrispettivo) +#define IVA_TIPOG "F9ITPGI" // A(10) [K] - Tipo giornale +#define IVA_DOCXML "F9IDXML" // A(1) - { S | N } - Documento xml (S=Si, N=No) +#define IVA_TIPOCF "F9ITCFO" // A(1) - { C | F } - Tipo cliente / fornitore (C=Cliente, F=Fornitore) +#define IVA_CODCF "F9ICCFO" // A(10) - Codice cliente / fornitore (In caso di is_autofattura mettere fornitore originale) +#define IVA_RAGSOC "F9IDRSO" // A(60) - Ragione sociale +#define IVA_IDFISC "F9IIDFI" // A(30) - {Codice ISO + { PIVA (x ita) | CF (x est)}} ID fiscale +#define IVA_PIVA "F9IPIVA" // A(28) - Partiva Iva +#define IVA_CODFIS "F9ICFIS" // A(16) - Codice fiscale +#define IVA_CATDOC "F9ICADO" // A(10) - Categoria documento +#define IVA_CAUSSOS "F9ICSOS" // A(6) - Causale per sostitutiva(da tabella f9drt) (tipo documento fattura (TD01,TD02,TD03 ecc)) +#define IVA_NUMDOC "F9INDOC" // A(20) - Numero Documento +#define IVA_DATADOC "F9IUDOC" // D - Data Documento +#define IVA_SEZIVA "F9ISIVA" // A(10) [K] - sezionale iva +#define IVA_TIPOREG "F9ICREG" // A(6) [K] - Tipo registrazione +#define IVA_NPROT "F9INPRI" // A(20) [K] - n.protocollo iva +#define IVA_DATPROT "F9IUPRI" // D [K] - data protocollo iva +#define IVA_FORNOR "F9IFOOA" // A(10) - fornitore originale fattura +#define IVA_REGOR "F9ITROT" // A(6) - tipo registrazione originale(TR) +#define IVA_NUMOR "F9INRRO" // A(20) - n.registrazione originale +#define IVA_DATAOR "F9IURGO" // D - data registrazione originale +#define IVA_CLASDOC "F9ICLDF" // A(10) - classe documentale FTV (in base al tipo documento da F9DRT00K) +#define IVA_NOMF1 "F9INMF1" // A(100) - nome file DOC (Nome fattura cartacea) +#define IVA_CLASAN1 "F9ICLDN" // A(10) - classe documentale(annesso 1) (in base al tipo documento da F9DRA00K) +#define IVA_NOMF2 "F9INMF2" // A(100) - nome file 1 +#define IVA_CLASAN2 "F9ICLDA" // A(10) - classe documentale(annesso 2) +#define IVA_NOMF3 "F9INMF3" // A(100) - nome file 2 (Nome documento (senza percorso)) +#define IVA_CLASAN4 "F9ICLD4" // A(10) - classe documentale(annesso 3) +#define IVA_NOMF4 "F9INMF4" // A(100) - nome file 3 +#define IVA_CLASAN5 "F9ICLD5" // A(10) - classe documentale(annesso 4) +#define IVA_NOMF5 "F9INMF5" // A(100) - nome file 4 +#define IVA_CLASAN6 "F9ICLD6" // A(10) - classe documentale(annesso 5) +#define IVA_NOMF6 "F9INMF6" // A(100) - nome file 5 +#define IVA_CLASAN7 "F9ICLD7" // A(10) - classe documentale(annesso 6) +#define IVA_NOMF7 "F9INMF7" // A(100) - nome file 6 +#define IVA_CLASAN8 "F9ICLD8" // A(10) - classe documentale(annesso 7) +#define IVA_NOMF8 "F9INMF8" // A(100) - nome file 7 +#define IVA_CLASAN9 "F9ICLD9" // A(10) - classe documentale(annesso 8) +#define IVA_NOMF9 "F9INMF9" // A(100) - nome file 8 +#define IVA_CLASA10 "F9ICL10" // A(10) - classe documentale(annesso 9) +#define IVA_NOMF10 "F9INM10" // A(100) - nome file 9 +#define IVA_USERELA "F9IUTEE" // A(10) - Utente elaborazione +#define IVA_TIMEELA "F9IUHEL" // D - Data e ora elaborazione +#define IVA_TIMEWEB "F9IUHEW" // D - Data e ora elaborazione WEBAPP +#define IVA_DESCDOC "F9IDDES" // A(30) - Descrizione documento +#define IVA_TIPPROT "F9ITPRT" // A(2) - Tipo protocollo ricezione +#define IVA_NUMPROT "F9IAPRT" // I(4) - Numero protocollo ricezione +#define IVA_ANNPROT "F9INPRT" // I(10) - Anno protocollo ricezione +#define IVA_TIMERIC "F9IURIC" // D - Data/ora ricezione fattura // FILE DRT : TABELLA CATEGORIE DOCUMENTALI -#define DRT_CODSOC "F9TCSOC" // A(10) [K] - COD.SOCIETÀ -#define DRT_CATDOC "F9TCADO" // A(10) [K] - Categoria documento -#define DRT_DESCR "F9TDES" // A(30) - Descrizione documento -#define DRT_CLASSO "F9TCLDC" // A(10) - classe documentale sostitutiva -#define DRT_CAUSSO "F9TCSOS" // A(6) - causale per sostitutiva(TD01…) -#define DRT_CAUSCON "F9TCAU" // A(6) - causale contabile -#define DRT_TIPOCAU "F9TTCAU" // A(6) - tipo causale contabile -#define DRT_TIMOMOV "F9TTMOV" // A(6) - tipo movimento contabile -#define DRT_OPCEE "F9TFCEE" // A(6) - operatore CEE +#define DRT_CODSOC "F9TCSOC" // A(10) [K] - COD.SOCIETÀ +#define DRT_CATDOC "F9TCADO" // A(10) [K] - Categoria documento +#define DRT_DESCR "F9TDES" // A(30) - Descrizione documento +#define DRT_CLASSO "F9TCLDC" // A(10) - classe documentale sostitutiva +#define DRT_CAUSSO "F9TCSOS" // A(6) - causale per sostitutiva(TD01…) +#define DRT_CAUSCON "F9TCAU" // A(6) - causale contabile +#define DRT_TIPOCAU "F9TTCAU" // A(6) - tipo causale contabile +#define DRT_TIMOMOV "F9TTMOV" // A(6) - tipo movimento contabile +#define DRT_OPCEE "F9TFCEE" // A(6) - operatore CEE diff --git a/src/include/mov.h b/src/include/mov.h index 433a5f9c5..326dfc52d 100755 --- a/src/include/mov.h +++ b/src/include/mov.h @@ -58,8 +58,8 @@ #define MOV_TNUMREG "TNUMREG" #define MOV_IVALIQ "IVALIQ" #define MOV_KEYFPPRO "KEYFPPRO" -#define MOV_DATAELABF9 "DATAELABF9" #define MOV_MOVCOLL "MOVCOLL" +#define MOV_ELABF9 "ELABF9" #define NUMREG_PROVVISORIO 999999L From 15067b02a1d6a22bcc6d2f005a981accdb2c78a6 Mon Sep 17 00:00:00 2001 From: Simone Palacino Date: Tue, 10 Sep 2019 17:42:05 +0200 Subject: [PATCH 2/2] Patch level : 12.0 no-patch Files correlati : build Commento : modificati file progetto f9 --- build/f90.vcxproj | 5 +++++ build/f90.vcxproj.filters | 15 +++++++++++++++ 2 files changed, 20 insertions(+) diff --git a/build/f90.vcxproj b/build/f90.vcxproj index b951d2da4..33ebcbec1 100644 --- a/build/f90.vcxproj +++ b/build/f90.vcxproj @@ -189,11 +189,16 @@ + + + + + diff --git a/build/f90.vcxproj.filters b/build/f90.vcxproj.filters index f2627b09c..4fcb60805 100644 --- a/build/f90.vcxproj.filters +++ b/build/f90.vcxproj.filters @@ -30,6 +30,15 @@ Headers + + Headers + + + Headers + + + Headers + @@ -43,5 +52,11 @@ Masks + + Masks + + + Masks + \ No newline at end of file