From e82c0ef7b30d6a14320d0abbba0c5f0b5342209f Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 14 Mar 2003 15:13:36 +0000 Subject: [PATCH] Patch level : 20.424 Files correlati : cg1.exe cg3.exe Ricompilazione Demo : [ ] Commento : Aggiunto supporto per le lingue a cg1.exe e cg3.exe git-svn-id: svn://10.65.10.50/trunk@10914 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/CGP3.URL | 4 - cg/cg0.url | 3 - cg/cg1.url | 3 - cg/cg1303.cpp | 3 +- cg/cg1303.h | 6 +- cg/cg1304.cpp | 16 +- cg/cg1304.h | 50 ++- cg/cg1306.h | 6 +- cg/cg1307.cpp | 3 +- cg/cg1500.cpp | 26 +- cg/cg2.url | 19 -- cg/cg3.h | 2 - cg/cg3.url | 34 -- cg/cg3100.cpp | 646 +++++++++++++++-------------------- cg/cg3200.cpp | 911 +++++++++++++++++-------------------------------- cg/cg3300.cpp | 333 ++++++++---------- cg/cg3300.h | 23 +- cg/cg3300a.uml | 4 +- cg/cg3301.cpp | 269 +++++---------- cg/cg3400.cpp | 318 ++++++----------- cg/cg3400a.uml | 5 +- cg/cg3500.cpp | 129 +++---- cg/cg3600.cpp | 66 ++-- cg/cg3700.cpp | 116 +++---- cg/cg4.url | 4 - cg/cg5.url | 4 - cg/cg6.url | 3 - cg/cgp0.url | 4 - cg/cgp1.url | 4 - cg/cgp2.url | 4 - cg/trasfer.xls | Bin 97792 -> 6 bytes 31 files changed, 1098 insertions(+), 1920 deletions(-) delete mode 100755 cg/CGP3.URL delete mode 100755 cg/cg0.url delete mode 100755 cg/cg1.url delete mode 100755 cg/cg2.url delete mode 100755 cg/cg3.url delete mode 100755 cg/cg4.url delete mode 100755 cg/cg5.url delete mode 100755 cg/cg6.url delete mode 100755 cg/cgp0.url delete mode 100755 cg/cgp1.url delete mode 100755 cg/cgp2.url diff --git a/cg/CGP3.URL b/cg/CGP3.URL deleted file mode 100755 index d5ad6b499..000000000 --- a/cg/CGP3.URL +++ /dev/null @@ -1,4 +0,0 @@ -#include - -MENU TASK_MENUBAR - SUBMENU MENU_FILE "~File" diff --git a/cg/cg0.url b/cg/cg0.url deleted file mode 100755 index 1aa8af7fb..000000000 --- a/cg/cg0.url +++ /dev/null @@ -1,3 +0,0 @@ -#include - -#include diff --git a/cg/cg1.url b/cg/cg1.url deleted file mode 100755 index 1aa8af7fb..000000000 --- a/cg/cg1.url +++ /dev/null @@ -1,3 +0,0 @@ -#include - -#include diff --git a/cg/cg1303.cpp b/cg/cg1303.cpp index 72d155957..7086e2e35 100755 --- a/cg/cg1303.cpp +++ b/cg/cg1303.cpp @@ -19,7 +19,8 @@ HIDDEN bool filtra_mov(const TRelation* r) { const TRectype& mov = r->curr(); const int annoiva = mov.get_int(MOV_ANNOIVA); - const TString& reg = mov.get(MOV_REG); + const TString16 reg = mov.get(MOV_REG); + TAgg_nprot& a = app(); return a.anno() == annoiva && a.reg() == reg; } diff --git a/cg/cg1303.h b/cg/cg1303.h index b5d7f8897..baf50db78 100755 --- a/cg/cg1303.h +++ b/cg/cg1303.h @@ -2,13 +2,11 @@ class TAgg_nprot : public TSkeleton_application { - int _anno; TString16 _reg; + int _anno; -protected: +public: virtual void main_loop(); - -public: int anno() const { return _anno; } const TString& reg() const { return _reg; } diff --git a/cg/cg1304.cpp b/cg/cg1304.cpp index ce693c11f..d1e5de2af 100755 --- a/cg/cg1304.cpp +++ b/cg/cg1304.cpp @@ -12,22 +12,17 @@ HIDDEN TAgg_codatt& app() { return (TAgg_codatt&) main_app(); } bool TAgg_codatt::create() { - TApplication::create(); - - _tab = new TLocalisamfile(LF_TAB); - - dispatch_e_menu (BAR_ITEM(1)); - return TRUE; + open_files(LF_TAB, 0); + + return TSkeleton_application::create(); } bool TAgg_codatt::destroy() { - delete _tab; - - return TApplication::destroy(); + return TSkeleton_application::destroy(); } -bool TAgg_codatt::menu(MENU_TAG m) +void TAgg_codatt::main_loop() { TProgind* pri; TMask msk("cg1300c"); @@ -64,7 +59,6 @@ bool TAgg_codatt::menu(MENU_TAG m) delete pri; message_box(TR("Aggiornamento codice attivita' completato")); } - return FALSE; } void TAgg_codatt::cancella_rec() diff --git a/cg/cg1304.h b/cg/cg1304.h index da7778ff2..4909479d9 100755 --- a/cg/cg1304.h +++ b/cg/cg1304.h @@ -1,27 +1,25 @@ -#include -#include -#include -#include -#include -#include -#include -#include - -class TAgg_codatt : public TApplication -{ - TLocalisamfile* _tab; - TString16 _da, _a; - int _anno; - bool _pass; - -public: - virtual bool create(); - virtual bool destroy(); - virtual bool menu(MENU_TAG m); - - void cancella_rec(); - void aggiorna_att(const char*); - - TAgg_codatt() : _da(""), _a(""), _anno(0) {}; - virtual ~TAgg_codatt() {}; +#include +#include +#include +#include +#include +#include +#include +#include + +class TAgg_codatt : public TSkeleton_application +{ + TString16 _da, _a; + int _anno; + bool _pass; + +public: + virtual bool create(); + virtual bool destroy(); + virtual void main_loop(); + + void cancella_rec(); + void aggiorna_att(const char*); + TAgg_codatt() : _da(""), _a(""), _anno(0) {}; + virtual ~TAgg_codatt() {}; }; \ No newline at end of file diff --git a/cg/cg1306.h b/cg/cg1306.h index 200f8ec99..f555669b0 100755 --- a/cg/cg1306.h +++ b/cg/cg1306.h @@ -5,13 +5,11 @@ #include #include -class TAgg_datacomp : public TApplication +class TAgg_datacomp : public TSkeleton_application { void aggiorna_datacomp(); public: - virtual bool create(); - virtual bool destroy(); - virtual bool menu(MENU_TAG m); + virtual void main_loop(); TAgg_datacomp() {}; virtual ~TAgg_datacomp() {}; diff --git a/cg/cg1307.cpp b/cg/cg1307.cpp index 904306eb3..823ffd28d 100755 --- a/cg/cg1307.cpp +++ b/cg/cg1307.cpp @@ -28,7 +28,7 @@ const char* const APPNAME = TR("Righe prima nota errate"); class TElimina_zoppi : public TSkeleton_application { - TArray _files; +// TArray _files; TArray _decoders; protected: @@ -44,6 +44,7 @@ protected: static bool select_handler(TMask_field& f, KEY k); protected: + const char* decode(int num, const char* key, const char* field); virtual void main_loop(); }; diff --git a/cg/cg1500.cpp b/cg/cg1500.cpp index 62eb467f8..e27ee62d6 100755 --- a/cg/cg1500.cpp +++ b/cg/cg1500.cpp @@ -3577,27 +3577,23 @@ TDate TStampa_bilanci::UltimaData(int g, int c, long s, int anno) // Guy: E tu chi sei? const char* TStampa_bilanci::DescrizioneConto(int g, int c, long s, char tipocf) { - TString80 ragsoc; + static TString80 ragsoc; const char* desc = NULL; - TLocalisamfile pconti(LF_PCON); - TLocalisamfile clifo (LF_CLIFO); - pconti.zero(); - pconti.put(PCN_GRUPPO, g); + TString80 key; key << g; if (c != 0) - pconti.put(PCN_CONTO, c); + key << "|" << c ; if (s != 0) - pconti.put(PCN_SOTTOCONTO, s); - pconti.read(); - if (pconti.good()) + key << "|" << s; + const TRectype & pconti = cache().get(LF_PCON, key); + if (!pconti.empty()) _tmp = pconti.get(PCN_DESCR); else { - clifo.setkey(1); //occorre settare la chiave 1, anche se di solito e' di default, poiche' nella create il file clifo e' stato aperto con la chiave 3 - clifo.zero(); - clifo.put(CLI_CODCF, s); - clifo.put(CLI_TIPOCF,tipocf); - if (clifo.read() == NOERR) + key.format("%c|%ld", tipocf, s); + const TRectype & clifo = cache().get(LF_CLIFO, key); + + if (!clifo.empty()) { char tipoa = clifo.get_char("TIPOAPER"); if (tipoa == 'F') //persona fisica @@ -3617,8 +3613,10 @@ const char* TStampa_bilanci::DescrizioneConto(int g, int c, long s, char tipocf) } else _tmp = ""; + } return _tmp; + } bool TStampa_bilanci::user_create() diff --git a/cg/cg2.url b/cg/cg2.url deleted file mode 100755 index 443d0d3c4..000000000 --- a/cg/cg2.url +++ /dev/null @@ -1,19 +0,0 @@ -#include - -// Prima nota - -#include - SUBMENU M_FONT "~Opzioni" - -MENU M_FONT - ITEM MENU_ITEM(1) "~Colori righe" - -// Gestione movimenti provvisori - -MENUBAR MENU_BAR(1) - -MENU MENU_BAR(1) - SUBMENU M_FILE "~File" - SUBMENU M_HELP "~Help" - - diff --git a/cg/cg3.h b/cg/cg3.h index 0bbd58192..95075e40c 100755 --- a/cg/cg3.h +++ b/cg/cg3.h @@ -9,8 +9,6 @@ #define extern #endif -extern TString256 TMP; - #ifdef __MAIN__ #undef extern #endif diff --git a/cg/cg3.url b/cg/cg3.url deleted file mode 100755 index 99896b202..000000000 --- a/cg/cg3.url +++ /dev/null @@ -1,34 +0,0 @@ -#include - -#include - - -/* ---------------------------------------------------- - * cg3 -2 - * ---------------------------------------------------- */ - -MENUBAR MENU_BAR(2) - -MENU MENU_BAR(2) - SUBMENU M_FILE "~File" - ITEM BAR_ITEM(1) "~Scelta parametri" - ITEM BAR_ITEM(2) "~Ricalcolo" - ITEM BAR_ITEM(3) "~Disco" - -/* ---------------------------------------------------- - * cg3 -5 - * - * cg3600.cpp Mastrini a video - * ---------------------------------------------------- */ -MENUBAR MENU_BAR(5) - -MENU MENU_BAR(5) - SUBMENU M_FILE "~File" - SUBMENU M_FONT "~Opzioni" - SUBMENU M_HELP "~Help" - -MENU M_FONT - ITEM MENU_ITEM(1) "~Colori righe" - - - diff --git a/cg/cg3100.cpp b/cg/cg3100.cpp index 57a8819c2..d584dc574 100755 --- a/cg/cg3100.cpp +++ b/cg/cg3100.cpp @@ -36,33 +36,33 @@ bool annoes_handler(TMask_field&, KEY); bool data_inizio (TMask_field&, KEY); bool data_fine (TMask_field&, KEY); -HIDDEN const char* err_msg[] = {"La data operazione non appartiene a nessun esercizio", - "Anno IVA non compatibile con data operazione", - "Data operazione successiva all'esercizio di competenza", - "Movimento con competenza anno precedente", - "La data di competenza non appartiene a nessun esercizio", - "Data competenza incompatibile con data operazione", - "Esercizio incompatibile con data competenza", - "Codice causale non presente in tabella", - "Codice causale sospeso", - "Nella causale e' stato attivato il segnale non va in allegato", - "Tipo documento non corrisponde a quello indicato in causale", - "Tipo documento non presente in tabella", - "Codice registro non corrisponde a quello indicato in causale", - "Codice registro non presente in tabella", - "Codice registro sospeso", - "Tipo registro incompatibile con tipo documento", - "Non indicato codice cliente/fornitore", - "Tipo cliente/fornitore non compatibile con tipo registro", - "Codice cliente/fornitore sospeso", - "Nel cliente/fornitore e' stato attivato il segnale: non va in allegato", - "Indicato codice C/F per allegato che richiama se stesso", - "Indicato codice C/F per allegato sospeso", - "C/F per allegato riporta un altro C/F per allegato", - "Indicato codice C/F per allegato con segnale: non va in allegato", - "Indicato codice C/F per allegato non presente in anagrafica", - "Codice cliente/fornitore non presente in anagrafica", - "Movimento con data competenza diversa da data operazione"}; +HIDDEN const char* err_msg[] = {TR("La data operazione non appartiene a nessun esercizio"), + TR("Anno IVA non compatibile con data operazione"), + TR("Data operazione successiva all'esercizio di competenza"), + TR("Movimento con competenza anno precedente"), + TR("La data di competenza non appartiene a nessun esercizio"), + TR("Data competenza incompatibile con data operazione"), + TR("Esercizio incompatibile con data competenza"), + TR("Codice causale non presente in tabella"), + TR("Codice causale sospeso"), + TR("Nella causale e' stato attivato il segnale non va in allegato"), + TR("Tipo documento non corrisponde a quello indicato in causale"), + TR("Tipo documento non presente in tabella"), + TR("Codice registro non corrisponde a quello indicato in causale"), + TR("Codice registro non presente in tabella"), + TR("Codice registro sospeso"), + TR("Tipo registro incompatibile con tipo documento"), + TR("Non indicato codice cliente/fornitore"), + TR("Tipo cliente/fornitore non compatibile con tipo registro"), + TR("Codice cliente/fornitore sospeso"), + TR("Nel cliente/fornitore e' stato attivato il segnale: non va in allegato"), + TR("Indicato codice C/F per allegato che richiama se stesso"), + TR("Indicato codice C/F per allegato sospeso"), + TR("C/F per allegato riporta un altro C/F per allegato"), + TR("Indicato codice C/F per allegato con segnale: non va in allegato"), + TR("Indicato codice C/F per allegato non presente in anagrafica"), + TR("Codice cliente/fornitore non presente in anagrafica"), + TR("Movimento con data competenza diversa da data operazione")}; class TListaMov_application : public TPrintapp { @@ -76,7 +76,6 @@ class TListaMov_application : public TPrintapp TRigaiva_array _c; TTable * _tabiva, * _tabtpd, * _tabreg, * _tabes; - TLocalisamfile * _caus,* _comuni,* _rmoviva, * _clifo, * _pcon, * _attiv, *_nditte, *_saldi; TRelation * _relmov1,* _relmov2,* _relmov3; TCursor * _curr1, * _curr2, * _curr3; TBit_array _err; @@ -193,7 +192,7 @@ bool data_inizio(TMask_field& f, KEY k) { if (data < inizio) { - f.error_box("La data indicata non deve essere inferiore alla data di inizio esercizio"); + f.error_box(TR("La data indicata non deve essere inferiore alla data di inizio esercizio")); return FALSE; } } @@ -219,7 +218,7 @@ bool data_fine(TMask_field& f, KEY k) if ( dataini.ok() && datafin.ok() ) if (dataini > datafin) { - f.error_box("La data iniziale non deve essere superiore alla data finale"); + f.error_box(TR("La data iniziale non deve essere superiore alla data finale")); return FALSE; } @@ -232,7 +231,7 @@ bool data_fine(TMask_field& f, KEY k) { if (datafin > fine) { - f.error_box("La data indicata non deve essere superiore alla data di fine esercizio successivo, oppure, in caso questo non esista, dell'esercizio indicato"); + f.error_box(TR("La data indicata non deve essere superiore alla data di fine esercizio successivo, oppure, in caso questo non esista, dell'esercizio indicato")); return FALSE; } } @@ -277,55 +276,47 @@ bool TListaMov_application::RicercaDoc(const char * tipo) void TListaMov_application::compila_clifo() { - _clifo->setkey(1); - _clifo->zero(); - _clifo->put(CLI_TIPOCF,_tipo_elenco); - _clifo->put(CLI_CODCF,_codcf); - _clifo->read(); - if (_clifo->bad()) - _clifo->zero(); - else + TToken_string key; + key.add(_tipo_elenco); + key.add(_codcf); + const TRectype & clifo = cache().get(LF_CLIFO, key); + + char tipoa = clifo.get_char("TIPOAPER"); + _alleg = clifo.get_int(CLI_ALLEG); + _statocf = clifo.get(CLI_STATOCF); + _comcf = clifo.get(CLI_COMCF); + _ragsoc = clifo.get(CLI_RAGSOC); + if (tipoa == 'F') { - char tipoa = _clifo->curr().get_char("TIPOAPER"); - _alleg = _clifo->curr().get_int(CLI_ALLEG); - _statocf = _clifo->curr().get(CLI_STATOCF); - _comcf = _clifo->curr().get(CLI_COMCF); - _ragsoc = _clifo->curr().get(CLI_RAGSOC); - if (tipoa == 'F') - { - TString80 cognome, nome; - cognome = _ragsoc.mid(0,30); - nome = _ragsoc.mid(30,20); - cognome.trim(); nome.trim(); - _ragsoc = cognome; - _ragsoc << " " << nome; - } - _indcf = _clifo->curr().get(CLI_INDCF); - _civcf = _clifo->curr().get(CLI_CIVCF); - _paiv = _clifo->curr().get(CLI_PAIV); - _capcf = _clifo->curr().get(CLI_CAPCF); - _dencom = _clifo->curr().get(CLI_LOCCF); - _cofi = _clifo->curr().get(CLI_COFI); - _codalleg = _clifo->curr().get_long(CLI_CODALLEG); + TString80 cognome, nome; + cognome = _ragsoc.mid(0,30); + nome = _ragsoc.mid(30,20); + cognome.trim(); nome.trim(); + _ragsoc = cognome; + _ragsoc << " " << nome; } + _indcf = clifo.get(CLI_INDCF); + _civcf = clifo.get(CLI_CIVCF); + _paiv = clifo.get(CLI_PAIV); + _capcf = clifo.get(CLI_CAPCF); + _dencom = clifo.get(CLI_LOCCF); + _cofi = clifo.get(CLI_COFI); + _codalleg = clifo.get_long(CLI_CODALLEG); } void TListaMov_application::compila_comuni() { - _comuni->setkey(1); - _comuni->zero(); - _comuni->put(COM_STATO,_statocf); - _comuni->put(COM_COM,_comcf); - _comuni->read(); - if (_comuni->bad()) - _comuni->curr().zero(); + TToken_string key; + key.add(_statocf); + key.add(_comcf); + const TRectype & comuni = cache().get(LF_COMUNI, key); //modifica del 26/04/1995 - _dencom = _comuni->get(COM_DENCOM); + _dencom = comuni.get(COM_DENCOM); if (!_dencom.empty()) _app = "Com"; else _app = "Loc"; //fine modifica - _provcom = _comuni->get(COM_PROVCOM); + _provcom = comuni.get(COM_PROVCOM); } const int AllegClifo (int gruppo, int conto, long sottoconto) @@ -350,83 +341,55 @@ const int AllegClifo (int gruppo, int conto, long sottoconto) const char * DescrConto (long gruppo, long conto, long sottoconto, const char* tipocf) { - TString80 ragsoc; - const char* desc = NULL; - TLocalisamfile pcon (LF_PCON); - TLocalisamfile clifo(LF_CLIFO); + TString key(30); + TString & tmp = get_tmp_string(50); - pcon.setkey(1); - pcon.zero(); - pcon.put(PCN_GRUPPO, gruppo); + key << gruppo; if (conto != 0) - pcon.put(PCN_CONTO, conto); + key << '|' << conto; if (sottoconto != 0) - pcon.put(PCN_SOTTOCONTO,sottoconto); - pcon.read(); - if (pcon.good()) - TMP = pcon.curr().get(PCN_DESCR); - else + key << '|' << sottoconto; + tmp = cache().get(LF_PCON, key, PCN_DESCR); + + if (tmp.empty()) { - clifo.setkey(1); - clifo.zero(); - clifo.put(CLI_CODCF, sottoconto); - clifo.put(CLI_TIPOCF,tipocf); - if (clifo.read() == NOERR) + key.format("%s|%ld",tipocf , sottoconto); + + const TRectype & clifo = cache().get(LF_CLIFO, key); + if (!clifo.empty()) { char tipoa = clifo.get_char("TIPOAPER"); if (tipoa == 'F') //persona fisica { - TString80 cognome, nome; - ragsoc = clifo.get("RAGSOC"); - cognome = ragsoc.mid(0,30); - nome = ragsoc.mid(30,20); - cognome.trim(); nome.trim(); - ragsoc = cognome; - ragsoc << " " << nome; - desc = ragsoc; + const TString & ragsoc = clifo.get("RAGSOC"); + + tmp = ragsoc.mid(0,30); + tmp.trim(); + tmp << ' ' << ragsoc.mid(30); } else - desc = clifo.get("RAGSOC"); - TMP = desc; + tmp = clifo.get("RAGSOC"); } - else - TMP = ""; } - return TMP; + return tmp; } bool CausAlleg (const char * cod) { - TLocalisamfile caus(LF_CAUSALI); - bool allegb; - - caus.setkey(1); - caus.zero(); - caus.put(CAU_CODCAUS,cod); - caus.read(); - if (caus.bad()) - caus.zero(); - allegb = caus.get_bool(CAU_ALLEG); + const TRectype & caus = cache().get(LF_CAUSALI, cod); + const bool allegb = caus.get_bool(CAU_ALLEG); return allegb; } const char * TipoAttivita (const char * attreg, long codice_ditta) { - TLocalisamfile attiv(LF_ATTIV); + TToken_string key; + key.add(codice_ditta); + key.add(attreg); + const TRectype & attiv = cache().get(LF_ATTIV, key); - attiv.setkey(1); - attiv.zero(); - attiv.put(ATT_CODDITTA, codice_ditta); - attiv.put(ATT_CODATT, attreg); - - attiv.read(); - if (attiv.good()) - TMP = attiv.curr().get(ATT_TIPOATT); - else - TMP = ""; - - return TMP; + return attiv.get(ATT_TIPOATT); } const TString& TListaMov_application::SimboloValuta(const char* cod) @@ -441,26 +404,18 @@ const TString& TListaMov_application::DescrDoc(const char* tipo) const char * AttivitaRegistro (const char * cod, int anno) { - TTable tab_reg("REG"); - TString16 codtab; codtab.format ("%04d%-3s", anno, cod); - - tab_reg.zero(); + TString16 key; + + key.format ("%04d%-3s", anno, cod); - tab_reg.put("CODTAB", codtab); - tab_reg.read(); - - if (tab_reg.good()) - TMP = tab_reg.get("S8"); - else - TMP = ""; - - return TMP; + return cache().get("REG", key, "S8"); } int CodiceRegistro (const char* cod, int anno) { TString16 codtab; codtab.format("%4d%-3s", anno, cod); const TString& tipo_reg = cache().get("REG", codtab, "I0"); + return atoi(tipo_reg); } @@ -612,75 +567,72 @@ void TListaMov_application::stampa_errori_rmov() _nr++; if (anno != _annoeser || datareg != _datareg) - set_row(_nr++, "@11gUno o piu' campi non sono costanti nella riga dell' operazione"); + set_row(_nr++, FR("@11gUno o piu' campi non sono costanti nella riga dell' operazione")); if (sez != 'D' && sez != 'A') - set_row(_nr++, "@11gIndicato tipo movimento Dare/Avere errato"); + set_row(_nr++, FR("@11gIndicato tipo movimento Dare/Avere errato")); if (tc.empty()) - set_row(_nr++, "@11gNon presente codice gruppo/conto/sottoconto"); + set_row(_nr++, FR("@11gNon presente codice gruppo/conto/sottoconto")); if (!tc.ok()) - set_row(_nr++, "@11gCodice gruppo/conto/sottoconto non corrisponde ad un sottoconto"); + set_row(_nr++, FR("@11gCodice gruppo/conto/sottoconto non corrisponde ad un sottoconto")); - TRectype pc (_pcon->curr()); + TRectype pc (LF_PCON); tc.set(gruppo,0,0l); if (!tc.read(pc)) g = TRUE; tc.set(gruppo,conto,0l); if (!tc.read(pc)) - set_row(_nr++, "@11gCodice gruppo/conto/sottoconto non presente in Piano dei Conti"); + set_row(_nr++, FR("@11gCodice gruppo/conto/sottoconto non presente in Piano dei Conti")); else { t = pc.get_char(PCN_TMCF); if (t != tipo) - set_row(_nr++, "@11gIl tipo C/F indicato non corrisponde a quello presente su Piano dei Conti"); + set_row(_nr++, FR("@11gIl tipo C/F indicato non corrisponde a quello presente su Piano dei Conti")); else { tc.set(gruppo,conto,sottoconto); if (t != 'C' && t != 'F') { if (!tc.read(pc) || g ) - set_row(_nr++, "@11gCodice gruppo/conto/sottoconto non presente in Piano dei Conti"); + set_row(_nr++, FR("@11gCodice gruppo/conto/sottoconto non presente in Piano dei Conti")); else { bool sosp = tc.sospeso(); if (sosp) - set_row(_nr++, "@11gCodice gruppo/conto/sottoconto sospeso in Piano dei Conti"); + set_row(_nr++, FR("@11gCodice gruppo/conto/sottoconto sospeso in Piano dei Conti")); } } else { - TLocalisamfile clifo(LF_CLIFO); - clifo.setkey(1); - clifo.zero(); - clifo.put(CLI_CODCF, sottoconto); - clifo.put(CLI_TIPOCF,t); - if (clifo.read() == NOERR) + TToken_string key; + key.add(t); + key.add(sottoconto); + const TRectype & clifo = cache().get(LF_CLIFO, key); + + if (!clifo.empty()) { bool sosp = clifo.get_bool(CLI_SOSPESO); if (sosp) - set_row(_nr++, "@11gCodice C/F sospeso in Anagrafica"); + set_row(_nr++, FR("@11gCodice C/F sospeso in Anagrafica")); } - else set_row(_nr++, "@11gCodice C/F non presente in Anagrafica"); + else set_row(_nr++, FR("@11gCodice C/F non presente in Anagrafica")); if (_registro.not_empty()) //se su mov e' indicato il codice registro { TRegistro rg (_registro, _ae); const int tiporeg = rg.tipo(); if ((tiporeg == 1 && t != 'C') || (tiporeg == 2 && t != 'F')) - set_row(_nr++, "@11gTipo C/F non compatibile con tipo registro"); + set_row(_nr++, FR("@11gTipo C/F non compatibile con tipo registro")); } } } } - TLocalisamfile saldi(LF_SALDI); - saldi.setkey(1); - saldi.zero(); - saldi.put(SLD_ANNOES,anno); - saldi.put(SLD_GRUPPO,gruppo); - saldi.put(SLD_CONTO, conto); - saldi.put(SLD_SOTTOCONTO,sottoconto); - saldi.put(SLD_FLSCA, ""); + TString key(30); - if (saldi.read() != NOERR) - set_row(_nr++, "@11gCodice gruppo/conto/sottoconto non presente in Saldi p.d.c."); + key.format("%d||%d|%d|%ld", anno, gruppo, conto, sottoconto); + + const TRectype & saldi = cache().get(LF_SALDI, key); + + if (saldi.empty()) + set_row(_nr++, FR("@11gCodice gruppo/conto/sottoconto non presente in Saldi p.d.c.")); if (gruppoc != 0 || contoc != 0 || sottocontoc != 0l) stampa_errori_contropartita(gruppoc, contoc, sottocontoc, tipoc); @@ -691,13 +643,13 @@ void TListaMov_application::stampa_errori_contropartita(int gruppo, int conto, l bool g = FALSE; TBill tc; - TRectype pc (_pcon->curr()); + TRectype pc (LF_PCON); tc.set(gruppo,0,0l); if (!tc.read(pc)) g = TRUE; tc.set(gruppo,conto,0l); if (!tc.read(pc)) - set_row(_nr++, "@11gCodice gruppo/conto/sottoconto di contropartita non presente in Piano dei Conti"); + set_row(_nr++, FR("@11gCodice gruppo/conto/sottoconto di contropartita non presente in Piano dei Conti")); else { //t = pc.get_char(PCN_TMCF); @@ -705,28 +657,28 @@ void TListaMov_application::stampa_errori_contropartita(int gruppo, int conto, l if (t != 'C' && t != 'F') { if (!tc.read(pc) || g ) - set_row(_nr++, "@11gCodice gruppo/conto/sottoconto di contropartita non presente in Piano dei Conti"); + set_row(_nr++, FR("@11gCodice gruppo/conto/sottoconto di contropartita non presente in Piano dei Conti")); else { bool sosp = tc.sospeso(); if (sosp) - set_row(_nr++, "@11gCodice gruppo/conto/sottoconto di contropartita sospeso in Piano dei Conti"); + set_row(_nr++, FR("@11gCodice gruppo/conto/sottoconto di contropartita sospeso in Piano dei Conti")); } } else if (sottoconto != 0l) { - TLocalisamfile clifo(LF_CLIFO); - clifo.setkey(1); - clifo.zero(); - clifo.put(CLI_CODCF, sottoconto); - clifo.put(CLI_TIPOCF,t); - if (clifo.read() == NOERR) + TToken_string key; + key.add(t); + key.add(sottoconto); + const TRectype & clifo = cache().get(LF_CLIFO, key); + + if (!clifo.empty()) { bool sosp = clifo.get_bool(CLI_SOSPESO); if (sosp) - set_row(_nr++, "@11gCodice C/F di contropartita sospeso in Anagrafica"); + set_row(_nr++, FR("@11gCodice C/F di contropartita sospeso in Anagrafica")); } - else set_row(_nr++, "@11gCodice C/F di contropartita non presente in Anagrafica"); + else set_row(_nr++, FR("@11gCodice C/F di contropartita non presente in Anagrafica")); } } } @@ -742,25 +694,25 @@ void TListaMov_application::stampa_errori_iva(int* nr, const char* cod, const in int allf = tab_iva.get_int("S8"); bool s = tab_iva.get_bool("B2"); if (s) - set_row(++(*nr), "@11gCodice IVA sospeso"); + set_row(++(*nr), FR("@11gCodice IVA sospeso")); if (_stampa_mess_alleg_iva) if (allc == 0 || allf == 0) - set_row(++(*nr), "@11gSul Codice IVA non e' stato indicato un valore per allegato"); + set_row(++(*nr), FR("@11gSul Codice IVA non e' stato indicato un valore per allegato")); } else - set_row(++(*nr), "@11gCodice IVA non presente in tabella"); + set_row(++(*nr), FR("@11gCodice IVA non presente in tabella")); if (tipodet == 1 || tipodet == 3 || tipodet == 5 || tipodet == 9) if (_tiporegistro != 2) - set_row(++(*nr), "@11gCodice di indetraibilita' errato"); + set_row(++(*nr), FR("@11gCodice di indetraibilita' errato")); if (_tiporegistro == 1) if (tipocr != 0 && tipocr != 1 && tipocr != 4 && tipocr != 9) - set_row(++(*nr), "@11gTipo costo/ricavo non valido"); + set_row(++(*nr), FR("@11gTipo costo/ricavo non valido")); if (_tiporegistro == 2) if (tipocr != 0 && tipocr != 1 && tipocr != 2 && tipocr != 3 && tipocr != 5 && tipocr != 8 && tipocr != 9) - set_row(++(*nr), "@11gTipo costo/ricavo non valido"); + set_row(++(*nr), FR("@11gTipo costo/ricavo non valido")); } void TListaMov_application::stampa_errori_mov() @@ -845,11 +797,11 @@ void TListaMov_application::set_page(int file, int count) { _n = 1; set_row (_n++,""); - set_row (_n, "Operazione n. @14g@7n", FLD(LF_MOV,MOV_NUMREG)); - set_row (_n, "@22gdel@26g@d",FLD(LF_MOV,MOV_DATAREG)); + set_row (_n, FR("Operazione n. @14g@7n"), FLD(LF_MOV,MOV_NUMREG)); + set_row (_n, FR("@22gdel@26g@d"),FLD(LF_MOV,MOV_DATAREG)); set_row (_n, "@37g@36s",FLD(LF_MOV,MOV_DESCR)); - set_row (_n, "@75gdoc. @7s",FLD(LF_MOV,MOV_NUMDOC)); - set_row (_n, "@88gdel@92g@d", FLD(LF_MOV,MOV_DATADOC)); + set_row (_n, FR("@75gdoc. @7s"),FLD(LF_MOV,MOV_NUMDOC)); + set_row (_n, FR("@88gdel@92g@d"), FLD(LF_MOV,MOV_DATADOC)); int annoese = current_cursor()->curr(LF_MOV).get_int(MOV_ANNOES); TDate data = current_cursor()->curr(LF_MOV).get_date(MOV_DATAREG); TDate dcomp = current_cursor()->curr(LF_MOV).get_date(MOV_DATACOMP); @@ -862,17 +814,11 @@ void TListaMov_application::set_page(int file, int count) int ae = esc.date2esc(data); if ( (tipo == 1) || (tipo == 2) ) { - set_row (_n, "@103greg @3s",FLD(LF_MOV,MOV_REG)); - set_row (_n, "@111gpr @5n",FLD(LF_MOV,MOV_PROTIVA)); + set_row (_n, FR("@103greg @3s"),FLD(LF_MOV,MOV_REG)); + set_row (_n, FR("@111gpr @5n"),FLD(LF_MOV,MOV_PROTIVA)); } else if (_provvis == 2 && prov >= ' ') - set_row (_n, "@103gMov.Provvisorio"); - //15/12/1995 - /* - if (ae != annoese) - if (_annoes == 0) //se non indicato l'anno nella maschera - set_row (_n, "@120gcomp @4n", FLD(LF_MOV,MOV_ANNOES)); - */ + set_row (_n, FR("@103gMov.Provvisorio")); if (data != dcomp) set_row (_n, "@119gc.%s", (const char*)dcomp.string(brief, '-')); //fine @@ -889,25 +835,22 @@ void TListaMov_application::stampa_intestazione() { set_row (1,""); if (_tipo_elenco == "C") - set_row (2, "@bCliente@8g@6n", FLD(LF_MOV,MOV_CODCF)); + set_row (2, FR("@bCliente@8g@6n"), FLD(LF_MOV,MOV_CODCF)); else - set_row (2, "@bFornitore@10g@6n", FLD(LF_MOV,MOV_CODCF)); + set_row (2, FR("@bFornitore@10g@6n"), FLD(LF_MOV,MOV_CODCF)); set_row (2, "@b@18g#.35t", &_ragsoc); - //set_row (2, "@b@54gInd #.29t", &_indcf); - //set_row (2, "@b@84g#.10t", &_civcf); - set_row (2, "@b@54gInd #-.29t #-.10t", &_indcf, &_civcf); - set_row (2, "@b@98gP.I. #11t", &_paiv); + set_row (2, FR("@b@54gInd #-.29t #-.10t"), &_indcf, &_civcf); + set_row (2, FR("@b@98gP.I. #11t"), &_paiv); if (_alleg == 0) - set_row (2, "@b@121gAllegato SI"); + set_row (2, FR("@b@121gAllegato SI")); else - set_row (2, "@b@121gAllegato NO"); - set_row (3, "@b@54gCap #5t", &_capcf); + set_row (2, FR("@b@121gAllegato NO")); + set_row (3, FR("@b@54gCap #5t"), &_capcf); set_row (3,"@b@64g%s #-.20t Pr #-.5t", (const char*)_app, &_dencom, &_provcom); - //set_row (3,"@b@89gPr #-.5t", &_provcom); - set_row (3, "@b@98gC.F. #-16t", &_cofi); + set_row (3, FR("@b@98gC.F. #-16t"), &_cofi); if (_alleg == 0) - set_row (3, "@b@120gRifer@126g#6d", &_codalleg); + set_row (3, FR("@b@120gRifer@126g#6d"), &_codalleg); } bool TListaMov_application::preprocess_page(int file,int counter) @@ -969,16 +912,13 @@ bool TListaMov_application::preprocess_page(int file,int counter) a.put(MOV_REG, _registro_fin); if ((fl.curr() >= da) && (fl.curr() <= a)) - { - _caus->setkey(1); - _caus->curr().put(CAU_CODCAUS,_causale); - _caus->read(); - if (_caus->bad()) - _caus->curr().zero(); - _reg_causale = _caus->curr().get(CAU_REG); - _descr_causale = _caus->curr().get(CAU_DESCR); - _alleg_causale = _caus->curr().get_bool(CAU_ALLEG); - _tipodocumento = _caus->curr().get(CAU_TIPODOC); + { + const TRectype & caus = cache().get(LF_CAUSALI, _causale); + + _reg_causale = caus.get(CAU_REG); + _descr_causale = caus.get(CAU_DESCR); + _alleg_causale = caus.get_bool(CAU_ALLEG); + _tipodocumento = caus.get(CAU_TIPODOC); if (_controllo_mov_errati == 1 || _controllo_mov_errati == 2) { @@ -1074,14 +1014,11 @@ bool TListaMov_application::preprocess_page(int file,int counter) if ((fl->curr() >= da) && (fl->curr() <= a)) { - _caus->setkey(1); - _caus->curr().put(CAU_CODCAUS,_causale); - _caus->read(); - if (_caus->bad()) - _caus->curr().zero(); - _descr_causale = _caus->curr().get(CAU_DESCR); - _alleg_causale = _caus->curr().get_bool(CAU_ALLEG); - _tipodocumento = _caus->curr().get(CAU_TIPODOC); + const TRectype & caus = cache().get(LF_CAUSALI, _causale); + + _descr_causale = caus.get(CAU_DESCR); + _alleg_causale = caus.get_bool(CAU_ALLEG); + _tipodocumento = caus.get(CAU_TIPODOC); _tiporegistro = CodiceRegistro (_registro, _anno); @@ -1205,13 +1142,13 @@ bool TListaMov_application::preprocess_page(int file,int counter) int gruppo = current_cursor()->curr(LF_RMOV).get_int(RMV_GRUPPO); int conto = current_cursor()->curr(LF_RMOV).get_int(RMV_CONTO); - _pcon->zero(); - _pcon->put("GRUPPO",gruppo); - _pcon->put("CONTO", conto); - _pcon->put("SOTTOCONTO", 0L); + TToken_string key; + key.add(gruppo); + key.add(conto); + key.add(""); + const TRectype & pcon = cache().get(LF_PCON, key); - if (_pcon->read() == NOERR) - _ricser = _pcon->get_int("RICSER"); + _ricser = pcon.get_int("RICSER"); _simbolo = SimboloValuta(_codval); _allegb = CausAlleg(_codcaus); @@ -1295,11 +1232,11 @@ void TListaMov_application::print_intra(int& rr) const TCurrency cl(mov.get_real(MOV_CORRLIRE)); str = cl.string(TRUE); str.right_just(19); - set_row(rr,"Corrispettivo@14g%s", (const char*)str); + set_row(rr,FR("Corrispettivo@14g%s"), (const char*)str); const TCurrency cv(corrval, codval); str = cv.string(TRUE); str.right_just(19); - set_row(rr,"@34gCorr.in valuta@49g%s", (const char*)str); + set_row(rr,FR("@34gCorr.in valuta@49g%s"), (const char*)str); set_row(rr,"@70g%-3s", (const char*)codval); } @@ -1330,8 +1267,6 @@ print_action TListaMov_application::postprocess_page(int file,int count) if (_registro.not_empty() && _mov_di_sola_iva) { compila_clifo(); - // set_row(++r, "@1g%3s %-.19s@25g%-35s %6ld %-50s", (const char*)_causale, (const char*)_descr_causale, - // (const char*) _descr_doc, _codcf, (const char*)_ragsoc); set_row(++r, "@1g%3s %-50s %6ld %-50s", (const char*)_causale, (const char*)_descr_causale, _codcf, (const char*)_ragsoc); } if ( _scelta_stampa == 0 && _stampa_parte_iva ) @@ -1341,18 +1276,18 @@ print_action TListaMov_application::postprocess_page(int file,int count) TRigaiva& riga = (TRigaiva&)_c[j]; //r = j+1; r++; - set_row(r, "Imponibile@11g%r", &riga._imponibile); - set_row(r, "@31gImposta@38g%r", &riga._imposta); - set_row(r, "@58gCodice Iva@69g%3s", (const char*)riga._codiva); + set_row(r, FR("Imponibile@11g%r"), &riga._imponibile); + set_row(r, FR("@31gImposta@38g%r"), &riga._imposta); + set_row(r, FR("@58gCodice Iva@69g%3s"), (const char*)riga._codiva); switch (riga._tipodet) { - case 0 : set_row(r, "@76gDetraibile"); + case 0 : set_row(r, FR("@76gDetraibile")); break; - case 1 : set_row(r, "@76gIndetraibile su op.es."); + case 1 : set_row(r, FR("@76gIndetraibile su op.es.")); break; - case 3 : set_row(r, "@76gPassaggi interni"); + case 3 : set_row(r, FR("@76gPassaggi interni")); break; - case 9 : set_row(r, "@76gIndetraibile art.19"); + case 9 : set_row(r, FR("@76gIndetraibile art.19")); break; default: break; } @@ -1361,19 +1296,19 @@ print_action TListaMov_application::postprocess_page(int file,int count) { const int meseliq = current_cursor()->file(LF_MOV).get_int(MOV_MESELIQ); if (meseliq > 0) // Stampa il mese liquidazione - set_row(r," Mese liq. %2d", meseliq); + set_row(r,FR(" Mese liq. %2d"), meseliq); } if (riga._intra) - set_row(r, "@111gOper.intrac."); + set_row(r, FR("@111gOper.intrac.")); if (_controllo_mov_errati != 3) if (!_esiste_riga_iva && ! _nonesiste_riga_iva) stampa_errori_iva(&r, riga._codiva, riga._tipodet, riga._tipocr); } print_intra(r); if (_esiste_riga_iva) - set_row(++r, "@11gPresenti righe IVA in una registrazione senza IVA"); + set_row(++r, FR("@11gPresenti righe IVA in una registrazione senza IVA")); if (_nonesiste_riga_iva) - set_row(++r, "@11gNon presente alcuna riga IVA in una registrazione con IVA"); + set_row(++r, FR("@11gNon presente alcuna riga IVA in una registrazione con IVA")); _c.destroy(); } if (r > 0) @@ -1381,7 +1316,7 @@ print_action TListaMov_application::postprocess_page(int file,int count) TRecnotype pos, items; bool FINITO = FALSE; if ((_scelta_stampa == 0)&&(_controllo_mov_errati != 3)&&(_tot_dare != _tot_avere)) - set_row(n++, "@11gIl movimento risulta sbilanciato"); + set_row(n++, FR("@11gIl movimento risulta sbilanciato")); pos = current_cursor()->pos(); items = current_cursor()->items(); @@ -1413,7 +1348,7 @@ print_action TListaMov_application::postprocess_page(int file,int count) { if (( _scelta_stampa == 0 && _controllo_mov_errati != 1 && _decidi == 2) || (_scelta_stampa == 1 && _decidi == 2)) { - set_row(n, "@b@60gTotali del giorno %s", _datareg.string()); + set_row(n, FR("@b@60gTotali del giorno %s"), _datareg.string()); set_row(n++, "@b@90g%r %r", &_tot_dare_giornaliero, &_tot_avere_giornaliero); _tot_avere_giornaliero = 0; _tot_dare_giornaliero = 0; @@ -1421,7 +1356,7 @@ print_action TListaMov_application::postprocess_page(int file,int count) if ((_scelta_stampa == 0 && _controllo_mov_errati != 1 && FINITO) || (_scelta_stampa == 1 && FINITO)) { set_row(n++,""); - set_row(n, "@b@60gTotale generale"); + set_row(n, FR("@b@60gTotale generale")); set_row(n++, "@b@90g%r %r", &_tot_dare_generale, &_tot_avere_generale); } } @@ -1473,9 +1408,9 @@ break; TString blank = ""; set_row(rr++,(const char*)blank); if ((_tipo_elenco == "C")||(_tipo_elenco == "c")) - set_row(rr++, "@bTotali Cliente@18gDocumenti Totale documenti@47gAllegati:@63gImponibile@82gImposta@95gop. esenti@110gop. non imp."); + set_row(rr++, FR("@bTotali Cliente@18gDocumenti Totale documenti@47gAllegati:@63gImponibile@82gImposta@95gop. esenti@110gop. non imp.")); else - set_row(rr++, "@bTotali Fornitore@18gDocumenti Totale documenti@49gAllegati:@63gImponibile@82gImposta@95gop. esenti@110gop. non imp."); + set_row(rr++, FR("@bTotali Fornitore@18gDocumenti Totale documenti@49gAllegati:@63gImponibile@82gImposta@95gop. esenti@110gop. non imp.")); set_row(rr, "@b@18g%9d", _documenti); set_row(rr, "@b@28g%r", &_totdocumenti); set_row(rr, "@b@56g%r", &_totimponibile); @@ -1567,11 +1502,12 @@ bool TListaMov_application::segnala_errori_primariga() if (_causale.not_empty()) //se indicata la causale { - if (_caus->curr().empty()) + const TRectype & caus = cache().get(LF_CAUSALI, _causale); + if (caus.empty()) _err.set(7); else { - bool sos = _caus->curr().get_bool(CAU_SOSPESO); + bool sos = caus.get_bool(CAU_SOSPESO); if (sos) _err.set(8); if (_stampa_mess_alleg_iva && _alleg_causale) @@ -1579,11 +1515,6 @@ bool TListaMov_application::segnala_errori_primariga() } if (_tipodoc != _tipodocumento) _err.set(10); - /* - if (_tipodoc != "") - if (!RicercaDoc(_tipodoc)) - _err.set(11); - */ if (_registro != _reg_causale) _err.set(12); @@ -1620,12 +1551,12 @@ bool TListaMov_application::segnala_errori_primariga() if ((tipo == 1 && _tipo_elenco != "C") || (tipo == 2 && _tipo_elenco != "F")) _err.set(17); - TLocalisamfile clifo(LF_CLIFO); - clifo.setkey(1); - clifo.zero(); - clifo.put(CLI_CODCF, _codcf); - clifo.put(CLI_TIPOCF,_tipo_elenco); - if (clifo.read() == NOERR) + TToken_string key; + key.add(_tipo_elenco); + key.add(_codcf); + const TRectype & clifo = cache().get(LF_CLIFO, key); + + if (!clifo.empty()) { bool sosp = clifo.get_bool(CLI_SOSPESO); if (sosp) @@ -1641,10 +1572,11 @@ bool TListaMov_application::segnala_errori_primariga() { if (calleg == _codcf) _err.set(20); - clifo.zero(); - clifo.put(CLI_CODCF, calleg); - clifo.put(CLI_TIPOCF,_tipo_elenco); - if (clifo.read() == NOERR) + TToken_string key; + key.add(_tipo_elenco); + key.add(calleg); + const TRectype & clifo = cache().get(LF_CLIFO, key); + if (!clifo.empty()) { bool sospall = clifo.get_bool(CLI_SOSPESO); long codall = clifo.get_long(CLI_CODALLEG); @@ -1675,7 +1607,7 @@ bool TListaMov_application::segnala_errori_primariga() bool TListaMov_application::contropartita(int gruppo, int conto, long sottoconto, char t) { TBill tc; - TRectype pc (_pcon->curr()); + TRectype pc (LF_PCON); tc.set(gruppo,0,0l); if (!tc.read(pc)) return TRUE; @@ -1697,12 +1629,12 @@ bool TListaMov_application::contropartita(int gruppo, int conto, long sottoconto } else if (sottoconto != 0l) { - TLocalisamfile clifo(LF_CLIFO); - clifo.setkey(1); - clifo.zero(); - clifo.put(CLI_CODCF, sottoconto); - clifo.put(CLI_TIPOCF,t); - if (clifo.read() == NOERR) + TToken_string key; + key.add(t); + key.add(sottoconto); + const TRectype & clifo = cache().get(LF_CLIFO, key); + + if (!clifo.empty()) { bool sosp = clifo.get_bool(CLI_SOSPESO); if (sosp) @@ -1784,7 +1716,7 @@ bool TListaMov_application::segnala_errori_ogniriga() rmov.readat(nrec); return TRUE; } - TRectype pc (_pcon->curr()); + TRectype pc (LF_PCON); tc.set(gruppo,0,0l); if (!tc.read(pc)) @@ -1824,12 +1756,12 @@ bool TListaMov_application::segnala_errori_ogniriga() } else { - TLocalisamfile clifo(LF_CLIFO); - clifo.setkey(1); - clifo.zero(); - clifo.put(CLI_CODCF, sottoconto); - clifo.put(CLI_TIPOCF,t); - if (clifo.read() == NOERR) + TToken_string key; + key.add(t); + key.add(sottoconto); + const TRectype & clifo = cache().get(LF_CLIFO, key); + + if (!clifo.empty()) { bool sosp = clifo.get_bool(CLI_SOSPESO); if (sosp) @@ -2089,7 +2021,6 @@ void TListaMov_application::imposta_parametri_stampa(const TMask& msk) _codice_fin = atol(msk.get(F_CODICEFIN1)); } - // _relmov->add(LF_MOV, "NUMREG=NUMREG",1, LF_RMOVIVA,100); //creo un alias per il file LF_MOV if (tipo == "E") { _tipo_ini = "C"; @@ -2226,14 +2157,8 @@ bool TListaMov_application::user_create() _curr3 = new TCursor (_relmov3, "", 3); _cur3 = add_cursor (_curr3); - _caus = new TLocalisamfile(LF_CAUSALI); - _clifo = new TLocalisamfile(LF_CLIFO); - _comuni = new TLocalisamfile(LF_COMUNI); - _attiv = new TLocalisamfile(LF_ATTIV); - _pcon = new TLocalisamfile(LF_PCON); - _saldi = new TLocalisamfile(LF_SALDI); - _rmoviva = new TLocalisamfile(LF_RMOVIVA); - _nditte = new TLocalisamfile(LF_NDITTE); + open_files(LF_TAB, LF_TABCOM, LF_CAUSALI, LF_CLIFO, LF_COMUNI, LF_ATTIV, + LF_PCON, LF_SALDI, LF_RMOVIVA, LF_NDITTE, 0); _tabiva = new TTable(TAB_IVA); _tabtpd = new TTable(TAB_TPD); _tabreg = new TTable("REG"); @@ -2247,17 +2172,10 @@ bool TListaMov_application::user_destroy() // releasev e arrmask delete _relmov1; delete _relmov2; delete _relmov3; - delete _clifo; - delete _caus; - delete _pcon; - delete _attiv; - delete _comuni; delete _tabiva; delete _tabreg; delete _tabtpd; delete _tabes; - delete _rmoviva; - delete _saldi; return TRUE; @@ -2416,44 +2334,32 @@ void TListaMov_application::set_cdc_header(int& soh) if (_fsc.not_empty()) { const TString& desc_fsc = cache().get("FSC", _fsc, "S0"); - set_header(++soh, "@bCommessa %s %s - Fase %s %s", + set_header(++soh, FR("@bCommessa %s %s - Fase %s %s"), (const char*)_cdc, (const char*)desc_cdc, (const char*)_fsc, (const char*)desc_fsc); } else - set_header(++soh, "@bCommessa %s %s", (const char*)_cdc, (const char*)desc_cdc); + set_header(++soh, FR("@bCommessa %s %s"), (const char*)_cdc, (const char*)desc_cdc); } - /* - if (_cdc.not_empty()) - { - TString str; - str.cut(0) << "@bCommessa " << _cdc << " - " << cache().get("CMS", _cdc, "S0"); - set_header(++soh, str); - } - */ } void TListaMov_application::preprocess_header() { int soh; // riga d'inizio dell'intestazione - TString sep(132); - TString ragsoc(50); - TLocalisamfile nditte(LF_NDITTE); - - nditte.zero(); - nditte.put(NDT_CODDITTA, get_firm()); - if (nditte.read() == NOERR) - ragsoc = nditte.get(NDT_RAGSOC); + + TString sep(132); + TString key; key.format("%d", get_firm()); + const TString & ragsoc = cache().get(LF_NDITTE, key, NDT_RAGSOC); reset_header(); soh=1; - sep << "Ditta " << get_firm(); + sep << TR("Ditta ") << get_firm(); sep << " " << ragsoc; sep.left_just(132); set_header (soh++, (const char*) sep); - sep.cut(0) << "Data @> Pag. @#"; + sep.cut(0) << FR("Data @> Pag. @#"); sep.right_just(122); switch (_tipo_lista) @@ -2461,155 +2367,155 @@ void TListaMov_application::preprocess_header() case movimenti: if (_scelta_stampa == 0) { - sep.overwrite ("Lista movimenti"); + sep.overwrite (TR("Lista movimenti")); set_header (soh++, (const char*)sep); if (_decidi == 2) // se _decidi e' 1 _annoes e' sempre uguale a zero { if (_annoes != 0) { - set_header (soh, "Cod. eserc.%d", _annoes); + set_header (soh, FR("Cod. eserc.%d"), _annoes); if (_flags & ST_DATA) { - set_header (soh, "@16gda@19g%s",_data_ini.string()); - set_header (soh, "@30ga@32g%s",_data_fin.string()); + set_header (soh, FR("@16gda@19g%s"),_data_ini.string()); + set_header (soh, FR("@30ga@32g%s"),_data_fin.string()); } } else // _annoes == 0 if (_flags & ST_DATA) { - set_header (soh, "Dalla data@11g%s",_data_ini.string()); + set_header (soh, FR("Dalla data@11g%s"),_data_ini.string()); if (_data_fin.ok()) - set_header (soh, "@23galla data@33g%s",_data_fin.string()); + set_header (soh, FR("@23galla data@33g%s"),_data_fin.string()); } else - set_header (soh, "Completa in ordine di data"); + set_header (soh, TR("Completa in ordine di data")); } else if (_flags & ST_NUMERO) { - set_header (soh, "dal numero@12g%ld", _numreg_ini); + set_header (soh, FR("dal numero@12g%ld"), _numreg_ini); if (_numreg_fin != 0) - set_header (soh, "@20gal numero@30g%ld", _numreg_fin); + set_header (soh, FR("@20gal numero@30g%ld"), _numreg_fin); } else - set_header (soh, "Completa in ordine di numero"); + set_header (soh, TR("Completa in ordine di numero")); if (_flags & ST_CAUSALE) { - set_header (soh, "@46gdalla causale@60g%s",(const char*)_causale_ini); - set_header (soh++, "@64galla causale@77g%s",(const char*)_causale_fin); + set_header (soh, FR("@46gdalla causale@60g%s"),(const char*)_causale_ini); + set_header (soh++, FR("@64galla causale@77g%s"),(const char*)_causale_fin); } else - set_header (soh++, " tutte le causali"); + set_header (soh++, TR(" tutte le causali")); if (_flags & ST_REGISTRO) { - set_header (soh, "dal registro %s",(const char*)_registro_ini); - set_header (soh, "@17gal registro %s",(const char*)_registro_fin); + set_header (soh, FR("dal registro %s"),(const char*)_registro_ini); + set_header (soh, FR("@17gal registro %s"),(const char*)_registro_fin); } else - set_header (soh, "tutti i registri"); + set_header (soh, TR("tutti i registri")); if (_flags & ST_DATI_IVA) - set_header (soh, "@34gstampa dati iva"); + set_header (soh, FR("@34gstampa dati iva")); if (_flags & ST_CONTROLLO) - set_header (soh, "@50g(controllo movimenti)"); + set_header (soh, FR("@50g(controllo movimenti)")); else if (_flags & ST_SOLO_MOVERR) - set_header (soh, "@50g(solo movimenti errati)"); - else set_header (soh, "@50g(senza controllo movimenti)"); + set_header (soh, FR("@50g(solo movimenti errati)")); + else set_header (soh, FR("@50g(senza controllo movimenti)")); if (_flags & ST_MESS_ALLEG) { if (_flags & ST_ANNO_COMP) - set_header (soh, "@78gcon messaggi: data competenza, allegato iva"); + set_header (soh, FR("@78gcon messaggi: data competenza, allegato iva")); else - set_header (soh, "@78gcon messaggio: allegato iva"); + set_header (soh, FR("@78gcon messaggio: allegato iva")); } else if (_flags & ST_ANNO_COMP) { if (_flags & ST_MESS_ALLEG) - set_header (soh, "@78gcon messaggi: data competenza, allegato iva"); + set_header (soh, FR("@78gcon messaggi: data competenza, allegato iva")); else - set_header (soh, "@78gcon messaggio: data competenza"); + set_header (soh, FR("@78gcon messaggio: data competenza")); } set_cdc_header(soh); sep.fill('_'); set_header (++soh, (const char *) sep); - set_header (++soh, "Rg Cod Causale@30gDescrizione@56gCodice conto@71gDescrizione conto@103gDare@120gAvere@130gSB"); + set_header (++soh, FR("Rg Cod Causale@30gDescrizione@56gCodice conto@71gDescrizione conto@103gDare@120gAvere@130gSB")); } else { - sep.overwrite ("Lista movimenti di sola prima nota"); + sep.overwrite (TR("Lista movimenti di sola prima nota")); set_header (soh++, (const char*)sep); if (_decidi == 2) { if (_annoes != 0) { - set_header (soh, "Cod. comp. %d", _annoes); + set_header (soh, FR("Cod. comp. %d"), _annoes); if (_flags & ST_DATA) { - set_header (soh, "@16gda@19g%s", (const char*)_data_ini.string()); - set_header (soh, "@30ga@32g%s", (const char*)_data_fin.string()); + set_header (soh, FR("@16gda@19g%s"), (const char*)_data_ini.string()); + set_header (soh, FR("@30ga@32g%s"), (const char*)_data_fin.string()); } } else if (_flags & ST_DATA) { - set_header (soh, "Dalla data@11g%s", (const char*)_data_ini.string()); - set_header (soh, "@23galla data@33g%s", (const char*)_data_fin.string()); + set_header (soh, FR("Dalla data@11g%s"), (const char*)_data_ini.string()); + set_header (soh, FR("@23galla data@33g%s"), (const char*)_data_fin.string()); } else - set_header (soh, "Completa in ordine di data"); + set_header (soh, TR("Completa in ordine di data")); } else if (_flags & ST_NUMERO) { - set_header (soh, "@46gdal numero@57g%ld", _numreg_ini); - set_header (soh, "@65gal numero@75g%ld", _numreg_fin); + set_header (soh, FR("@46gdal numero@57g%ld"), _numreg_ini); + set_header (soh, FR("@65gal numero@75g%ld"), _numreg_fin); } else - set_header (soh, "@46gCompleta in ordine di numero"); + set_header (soh, FR("@46gCompleta in ordine di numero")); if (_flags & ST_CAUSALE) { - set_header(soh, "@86gdalla causale@100g%3s",(const char*)_causale_ini); - set_header(soh++,"@104galla causale@117g%3s",(const char*)_causale_fin); + set_header(soh, FR("@86gdalla causale@100g%3s"),(const char*)_causale_ini); + set_header(soh++,FR("@104galla causale@117g%3s"),(const char*)_causale_fin); } else - set_header (soh++, "@86gtutte le causali"); + set_header (soh++, TR("@86gtutte le causali")); set_cdc_header(soh); soh++; sep.fill('_'); set_header (soh++, (const char *) sep); - set_header (soh, "Rg Cod Causale@30gDescrizione@56gCodice conto@71gDescrizione conto@103gDare@120gAvere@130gSB"); + set_header (soh, FR("Rg Cod Causale@30gDescrizione@56gCodice conto@71gDescrizione conto@103gDare@120gAvere@130gSB")); } break; case fatture: - sep.overwrite ("Lista fatture"); + sep.overwrite (TR("Lista fatture")); set_header (soh, (const char*)sep); if (_annoes != 0) { - set_header (soh, "@15gCod. comp %d", _annoes); + set_header (soh, FR("@15gCod. comp %d"), _annoes); if (_flags & ST_DATA) { - set_header (soh, "@30gdalla data@41g%s", (const char*)_data_ini.string()); - set_header (soh, "@52galla data@62g%s", (const char*)_data_fin.string()); + set_header (soh, FR("@30gdalla data@41g%s"), (const char*)_data_ini.string()); + set_header (soh, FR("@52galla data@62g%s"), (const char*)_data_fin.string()); } } else if (_flags & ST_DATA) { - set_header (soh, "@15gdalla data %s", (const char*)_data_ini.string()); - set_header (soh, "@37galla data %s", (const char*)_data_fin.string()); + set_header (soh, FR("@15gdalla data %s"), (const char*)_data_ini.string()); + set_header (soh, FR("@37galla data %s"), (const char*)_data_fin.string()); } else - set_header (soh, "@15gcompleta in ordine di data"); + set_header (soh, TR("@15gcompleta in ordine di data")); if (_flags & ST_CODICE) { - set_header (soh, "@74gdal codice %ld", _codice_ini); - set_header (soh, "@92gal codice %ld", _codice_fin); + set_header (soh, FR("@74gdal codice %ld"), _codice_ini); + set_header (soh, FR("@92gal codice %ld"), _codice_fin); } set_cdc_header(soh); sep.fill('_'); set_header (++soh, (const char *) sep); - set_header (++soh, "Numero Data Cod Prot. M Documento@48gCod Tp @75gTotale@101gCd Tp T O@129gNo"); - set_header (++soh, "Regis. Operaz. Reg Num. L Data@41gNumero@48gCau Dc @55gDescrizione@75gDocumento@90gImponibile@101gIv Det A I@121gImposta@129gAll"); + set_header (++soh, FR("Numero Data Cod Prot. M Documento@48gCod Tp @75gTotale@101gCd Tp T O@129gNo")); + set_header (++soh, FR("Regis. Operaz. Reg Num. L Data@41gNumero@48gCau Dc @55gDescrizione@75gDocumento@90gImponibile@101gIv Det A I@121gImposta@129gAll")); break; default: @@ -2634,10 +2540,10 @@ int cg3100(int argc, char* argv[]) switch (tipo) { case 'C': - title = "Lista fatture clienti/fornitori"; + title = TR("Lista fatture clienti/fornitori"); break; default: - title = "Lista movimenti"; + title = TR("Lista movimenti"); break; } a.run(argc, argv, title); diff --git a/cg/cg3200.cpp b/cg/cg3200.cpp index 68f2dd543..0ee2cdb94 100755 --- a/cg/cg3200.cpp +++ b/cg/cg3200.cpp @@ -84,12 +84,6 @@ class TMastrini_application : public TPrintapp TRelation* _rel; TMask* _msk; TTable* _tabivd, * _tabtpd, * _tabreg; - TLocalisamfile* _mov; - TLocalisamfile* _nditte; - TLocalisamfile* _unloc; - TLocalisamfile* _comuni; - TLocalisamfile* _clifo; - TLocalisamfile* _caus; TSaldo* _sld; TParagraph_string* _d18,* _d22,* _d30; TArray _riga, _lista; @@ -142,8 +136,6 @@ class TMastrini_application : public TPrintapp real _totale_commessa_dare, _totale_commessa_avere, _saldo_commessa; - TConfig* _collins; - protected: virtual bool user_create() ; virtual bool user_destroy(); @@ -166,7 +158,6 @@ protected: bool show_cdc(); public: - //TDate _inizioEs,_fineEs; int date2esc(const TDate& d); void ricerca_clifo(); @@ -176,14 +167,11 @@ public: void calcola_progressivi(bool finali = FALSE); void calcola_progressivi_al(const TDate& data); - void stampa_progressivi(); int stampa_progressivi(int start_riga); - void stampa_progre_riporto(); int stampa_progre_riporto(int start_riga); void documenti_iva(); void ricerca_regiva(); void descrizione_causale(); - void saldi_zero(); int crea_intestazione(int riga); void crea_intestazione(); void fai_stampa132(); @@ -210,22 +198,12 @@ public: void setta_riga (int r, const TString& riga); int righe_rimaste_da_stampare(); - const char* trans(const char* italian); - TMastrini_application() {} virtual ~TMastrini_application() {} }; inline TMastrini_application& app() { return (TMastrini_application&)main_app(); } -const char* TMastrini_application::trans(const char* italian) -{ - TString80 key(italian); - key.replace(' ', '_'); - const TString& str = _collins->get(key, NULL, -1, italian); - return str; -} - int TMastrini_application::righe_rimaste_da_stampare() { int righe_rimaste = 0; @@ -316,7 +294,6 @@ bool TMastrini_application::sottoc_handler_ini(TMask_field& f, KEY key) { const TMask& m = f.mask(); const short id = f.dlg(); - bool warning = FALSE; const int gruppo = m.get_int(F_GRUPPOINI); const int conto = m.get_int(F_CONTOINI_CONTO); @@ -326,70 +303,47 @@ bool TMastrini_application::sottoc_handler_ini(TMask_field& f, KEY key) if ( key == K_ENTER ) { if (sottoconto != 0 && conto == 0) - return f.warning_box("Manca il CONTO"); + return f.warning_box(TR("Manca il CONTO")); if (conto != 0 && gruppo == 0) - return f.warning_box("Manca il GRUPPO"); + return f.warning_box(TR("Manca il GRUPPO")); } if (key == K_TAB && m.is_running()) { - TString ds; if (id == F_SOTTOCINI_CONTO && (gruppo != 0 || conto != 0 || sottoconto != 0L)) { - TLocalisamfile pconti(LF_PCON); - pconti.zero(); - pconti.put(PCN_GRUPPO, gruppo) ; - pconti.put(PCN_CONTO, conto); - pconti.put(PCN_SOTTOCONTO, sottoconto); - pconti.setkey(1); - pconti.read(_isequal, _nolock); - if (pconti.good()) - { - ds = pconti.get(PCN_DESCR); - warning = FALSE; - } - else - { - ds = ""; - warning = TRUE; - } + TString16 key; + + key.format("%d|%d|%ld", gruppo, conto, sottoconto); + const TRectype & pconti = cache().get(LF_PCON, key); + + if (pconti.empty()) + return f.warning_box(TR("Sottoconto inesistente")); + + const TString & ds = pconti.get(PCN_DESCR); f.mask().set(F_DESCRINI_CONTO, ds); f.mask().set(F_DESCRINI_CLIENTE, ds); f.mask().set(F_DESCRINI_FORN, ds); - if (warning) - return f.warning_box("Sottoconto inesistente"); } else if (id == F_SOTTOCINI_CLIENTE || id == F_SOTTOCINI_FORN) { - TString rs; char tipo = id == F_SOTTOCINI_CLIENTE ? 'C' : 'F'; - TLocalisamfile clifo (LF_CLIFO); if (sottoconto != 0) { - clifo.zero(); - clifo.put(CLI_TIPOCF,tipo); - clifo.put(CLI_CODCF, sottoconto) ; - clifo.setkey(1); - if (clifo.read(_isequal, _nolock) == NOERR) - { - rs = clifo.get(CLI_RAGSOC); - warning = FALSE; - } - else - { - rs = ""; - warning = TRUE; - } + TString16 key; + key.format("%c|%ld", tipo, sottoconto); + const TRectype & clifo = cache().get(LF_CLIFO, key); + if (clifo.empty()) + return f.warning_box(TR("Anagrafica inesistente")); + const TString & rs = clifo.get(CLI_RAGSOC); f.mask().set(F_DESCRINI_CLIENTE, rs); f.mask().set(F_DESCRINI_FORN, rs); - if (warning) - return f.warning_box("Anagrafica inesistente"); } } } @@ -403,7 +357,6 @@ bool TMastrini_application::sottoc_handler_fine(TMask_field& f, KEY key) const short id = f.dlg(); TString ds; TString80 rs; - bool warning; const int gruppo = m.get_int(F_GRUPPOFINE); const int conto = m.get_int(F_CONTOFINE_CONTO); @@ -413,10 +366,10 @@ bool TMastrini_application::sottoc_handler_fine(TMask_field& f, KEY key) if ( key == K_ENTER ) { if (sottoconto != 0 && conto == 0) - return f.warning_box("Manca il CONTO"); + return f.warning_box(TR("Manca il CONTO")); if (conto != 0 && gruppo == 0) - return f.warning_box("Manca il GRUPPO"); + return f.warning_box(TR("Manca il GRUPPO")); if (!app().check_ordine(f,key)) return FALSE; @@ -426,58 +379,41 @@ bool TMastrini_application::sottoc_handler_fine(TMask_field& f, KEY key) { if (id == F_SOTTOCFINE_CONTO && (gruppo != 0 || conto != 0 || sottoconto != 0L)) { - TLocalisamfile pconti (LF_PCON); - pconti.zero(); - pconti.put(PCN_GRUPPO, gruppo) ; - pconti.put(PCN_CONTO, conto); - pconti.put(PCN_SOTTOCONTO, sottoconto); - pconti.setkey(1); - pconti.read(_isequal, _nolock); - if (pconti.good()) - { - ds = pconti.get(PCN_DESCR); - warning = FALSE; - } - else - { - ds = ""; - warning = TRUE; - } + TString16 key; + + key.format("%d|%d|%ld", gruppo, conto, sottoconto); + + const TRectype & pconti = cache().get(LF_PCON, key); + + if (pconti.empty()) + return f.warning_box(TR("Sottoconto inesistente")); + const TString & ds = pconti.get(PCN_DESCR); f.mask().set(F_DESCRFINE_CONTO, ds); f.mask().set(F_DESCRFINE_CLIENTE, ds); f.mask().set(F_DESCRFINE_FORN, ds); - if (warning) - return f.warning_box("Sottoconto inesistente"); } else if (id == F_SOTTOCFINE_CLIENTE || id == F_SOTTOCFINE_FORN) { char tipo = id == F_SOTTOCFINE_CLIENTE ? 'C' : 'F'; - TLocalisamfile clifo (LF_CLIFO); if (sottoconto != 0) { - clifo.zero(); - clifo.put(CLI_TIPOCF,tipo); - clifo.put(CLI_CODCF, sottoconto) ; - clifo.setkey(1); - if (clifo.read(_isequal, _nolock) == NOERR) - { - rs = clifo.get(CLI_RAGSOC); - warning = FALSE; - } - else - { - rs = ""; - warning = TRUE; - } + TString16 key; + + key.format("%c|%ld", tipo, sottoconto); + + const TRectype & clifo = cache().get(LF_CLIFO, key); + + if (clifo.empty()) + return f.warning_box(TR("Anagrafica inesistente")); - f.mask().set(F_DESCRFINE_CLIENTE, rs); + const TString & rs = clifo.get(CLI_RAGSOC); + + f.mask().set(F_DESCRFINE_CLIENTE, rs); f.mask().set(F_DESCRFINE_FORN, rs); - if (warning) - return f.warning_box("Anagrafica inesistente"); } } } @@ -496,7 +432,7 @@ bool TMastrini_application::gruppo_hnd (TMask_field& f, KEY k) int gruppoi = f.mask().get_int(F_GRUPPOINI); if (gruppoi > gruppof) - return f.error_box("Il gruppo di partenza deve essere inferiore o uguale al gruppo di arrivo"); + return f.error_box(TR("Il gruppo di partenza deve essere inferiore o uguale al gruppo di arrivo")); } return TRUE; @@ -514,51 +450,40 @@ bool TMastrini_application::contoi_hnd (TMask_field& f, KEY k) if (k == K_TAB && f.focusdirty() && f.mask().is_running()) { TMask& m = f.mask(); - TLocalisamfile pconti (LF_PCON); - TString ds; - const short id = f.dlg(); - const int gruppo = m.get_int(F_GRUPPOINI); - const int conto = m.get_int(id); + const short id = f.dlg(); + const int gruppo = m.get_int(F_GRUPPOINI); + const int conto = m.get_int(id); + - if (gruppo != 0 && conto != 0 && m.field(F_DESCRINI_CONTO).empty()) + if (gruppo != 0 && conto != 0) { - bool warning; - const char tipomsk = m.get(F_TIPOCF_INI)[0]; - - pconti.zero(); - pconti.put(PCN_GRUPPO, gruppo) ; - pconti.put(PCN_CONTO, conto); - pconti.setkey(1); - pconti.read(_isequal, _nolock); - if (pconti.good()) + + TString key(20); + + key.format("%d|%d|", gruppo, conto); + + const TRectype & pconti = cache().get(LF_PCON, key); + + if (!pconti.empty()) { char tipo = pconti.get_char(PCN_TMCF); if (tipomsk != tipo) - return f.warning_box("Conto inesistente"); + return f.warning_box(TR("Conto inesistente")); + } - ds = pconti.get(PCN_DESCR); - warning = FALSE; - } - else - { - ds = ""; - warning = TRUE; - } - - m.set(F_DESCRINI_CLIENTE, ds); + const TString & ds = pconti.get(PCN_DESCR); + + m.set(F_DESCRINI_CLIENTE, ds); m.set(F_DESCRINI_FORN, ds); m.set(F_DESCRINI_CONTO, ds); - if (warning) - return f.warning_box("Conto inesistente"); } else { - ds = ""; - m.set(F_DESCRINI_CLIENTE, ds); - m.set(F_DESCRINI_FORN, ds); - m.set(F_DESCRINI_CONTO, ds); + m.set(F_DESCRINI_CLIENTE, ""); + m.set(F_DESCRINI_FORN, ""); + m.set(F_DESCRINI_CONTO, ""); } } @@ -588,55 +513,43 @@ bool TMastrini_application::contof_hnd (TMask_field& f, KEY k) int contoi = m.get_int(F_CONTOINI_CONTO); if (contoi > contof) - return f.error_box("Il conto di partenza deve essere inferiore o uguale al conto di arrivo"); + return f.error_box(TR("Il conto di partenza deve essere inferiore o uguale al conto di arrivo")); } if (k == K_TAB && f.focusdirty() && f.mask().is_running()) { - TLocalisamfile pconti (LF_PCON); TString ds; int gruppo = m.get_int(F_GRUPPOFINE); int conto = m.get_int(id); if (gruppo != 0 && conto != 0 && m.field(F_DESCRFINE_CONTO).empty()) { - bool warning; + char tipomsk = f.mask().get(F_TIPOCF_FINE)[0]; - char tipomsk = m.get(F_TIPOCF_FINE)[0]; - - pconti.zero(); - pconti.put(PCN_GRUPPO, gruppo) ; - pconti.put(PCN_CONTO, conto); - pconti.setkey(1); - pconti.read(_isequal, _nolock); - if (pconti.good()) - { - char tipo = pconti.get_char(PCN_TMCF); - if (tipomsk != tipo) - return f.warning_box("Conto inesistente"); + TString16 key; + key.format("%d|%d|", gruppo, conto); + + const TRectype & pconti = cache().get(LF_PCON, key); + + if (pconti.empty()) + return f.warning_box(TR("Sottoconto inesistente")); + char tipo = pconti.get_char(PCN_TMCF); + if (tipomsk != tipo) + return f.warning_box(TR("Conto inesistente")); + - ds = pconti.get(PCN_DESCR); - warning = FALSE; - } - else - { - ds = ""; - warning = TRUE; - } + const TString & ds = pconti.get(PCN_DESCR); m.set(F_DESCRFINE_CLIENTE, ds); m.set(F_DESCRFINE_FORN, ds); m.set(F_DESCRFINE_CONTO, ds); - if (warning) - return f.warning_box("Conto inesistente"); } else { - ds = ""; - f.mask().set(F_DESCRFINE_CLIENTE, ds); - f.mask().set(F_DESCRFINE_FORN, ds); - f.mask().set(F_DESCRFINE_CONTO, ds); + f.mask().set(F_DESCRFINE_CLIENTE, ""); + f.mask().set(F_DESCRFINE_FORN, ""); + f.mask().set(F_DESCRFINE_CONTO, ""); } } @@ -665,7 +578,7 @@ bool TMastrini_application::check_ordine(TMask_field& f, KEY k) long sottoci = f.mask().get_long(F_SOTTOCINI_CONTO); if (sottoci > sottocf) - return f.error_box("Il sottoconto di partenza deve essere inferiore o uguale al sottoconto di arrivo"); + return f.error_box(TR("Il sottoconto di partenza deve essere inferiore o uguale al sottoconto di arrivo")); return TRUE; } @@ -736,8 +649,11 @@ bool TMastrini_application::almeno_un_record() const int annoes = rmov.get_int (RMV_ANNOES); const long numreg = rmov.get_long(RMV_NUMREG); - const TDate datacomp = mov.get(MOV_DATACOMP); - const TString16 provvis = mov.get(MOV_PROVVIS); + const TRectype & mov = cache().get(LF_MOV, numreg); + + const TDate datacomp = (mov.get(MOV_DATACOMP)); + const TString16 provvis (mov.get(MOV_PROVVIS)); + TDate datareg; if (_annomsk == 0) @@ -779,7 +695,7 @@ bool TMastrini_application::data_inizio(TMask_field& f, KEY k) { if (data < app()._data_inizioese || data > app()._data_finese) { - f.error_box("La data non appartiene all'esercizio indicato"); + f.error_box(TR("La data non appartiene all'esercizio indicato")); return FALSE; } else @@ -789,10 +705,10 @@ bool TMastrini_application::data_inizio(TMask_field& f, KEY k) else { if (data == botime) - return f.error_box("La data deve essere obbligatoriamente indicata"); + return f.error_box(TR("La data deve essere obbligatoriamente indicata")); if (app().date2esc(data) == 0) - return f.error_box("La data indicata non appartiene ad alcun esercizio"); + return f.error_box(TR("La data indicata non appartiene ad alcun esercizio")); else app()._data_ini = data; } @@ -820,7 +736,7 @@ bool TMastrini_application::data_fine(TMask_field& f, KEY k) { if (data < app()._data_inizioese || data > app()._data_finese) { - f.error_box("La data non appartiene all'esercizio indicato"); + f.error_box(TR("La data non appartiene all'esercizio indicato")); return FALSE; } else @@ -830,26 +746,18 @@ bool TMastrini_application::data_fine(TMask_field& f, KEY k) else { if (data == botime) - return f.error_box("La data deve essere obbligatoriamente indicata"); + return f.error_box(TR("La data deve essere obbligatoriamente indicata")); app()._anno_ghost = app().date2esc(data_ini); if (app()._anno_ghost == 0) - return f.error_box("La data indicata non appartiene ad alcun esercizio"); - //app()._inizioes = app()._inizioEs; - - //if (data < app()._inizioEs || data > app()._fineEs) - //{ - // f.error_box("La data non appartiene all'esercizio indicato"); - // return FALSE; - //} - //else + return f.error_box(TR("La data indicata non appartiene ad alcun esercizio")); app()._data_fine = data; } if (data < data_ini) { - f.error_box("La data finale non puo' essere inferiore alla data di partenza"); + f.error_box(TR("La data finale non puo' essere inferiore alla data di partenza")); return FALSE; } @@ -858,52 +766,6 @@ bool TMastrini_application::data_fine(TMask_field& f, KEY k) return TRUE; } -void TMastrini_application::saldi_zero() -{ - TLocalisamfile& rmov = current_cursor()->file(LF_RMOV); - real saldo_dare, saldo_avere; - long record; - - saldo_dare = saldo_avere = 0.0; - - if (current_cursor()->is_first_match(LF_RMOV)) - { - record = rmov.recno(); - - while (!rmov.eof()) - { - long numreg = rmov.get_long(RMV_NUMREG); - _mov->setkey(1); - _mov->curr().zero(); - _mov->curr().put(MOV_NUMREG,numreg); - _mov->read(); - if (_mov->bad()) - _mov->zero(); - char provvis = _mov->curr().get_char(MOV_PROVVIS); - int gruppo = atoi(rmov.get(RMV_GRUPPO)); - int conto = atoi(rmov.get(RMV_CONTO)); - long sottoc = atol(rmov.get(RMV_SOTTOCONTO)); - - if ((gruppo == _gruppo)&&(conto == _conto)&&(sottoc == _sottoc)) - { - if (_stampa_mov_prov || provvis <= ' ') - { - char sezione = rmov.curr().get(RMV_SEZIONE)[0]; - real importo = rmov.curr().get_real(RMV_IMPORTO); - if (sezione == 'D') - saldo_dare += importo; - else - saldo_avere += importo; - } - } - else break; - rmov.next(); - } - rmov.readat(record); - } - _totale_saldo = saldo_dare - saldo_avere; -} - void TMastrini_application::fai_stampa132() { if (_nummast == 1 || _nummast == 3) @@ -1100,12 +962,10 @@ void TMastrini_application::stampa_totali_commessa() { if (_cdc.not_empty()) { -// _rw = 1; { _saldo_commessa = _totale_commessa_dare - _totale_commessa_avere; -// set_row (++_rw,"@32g@b%s", trans("TOTALI COMMESSA")); - set_row (_rw,"@32g@b%s", trans("PROGRESSIVI COMMESSA")); + set_row (_rw,"@32g@b%s", TR("PROGRESSIVI COMMESSA")); if (_numcarat == 1) { @@ -1137,19 +997,19 @@ void TMastrini_application::stampa_totali132() _saldo_periodo = _totale_periodo_dare - _totale_periodo_avere; _saldo_progre = _totprogre_dare - _totprogre_avere; _saldo_progre_al = _totprogre_dare_al - _totprogre_avere_al; - set_row (_rw,"@32g%s", trans("TOTALI PERIODO")); + set_row (_rw,"@32g%s", TR("TOTALI PERIODO")); set_row (_rw,"@66g%r", &_saldo_periodo); set_row (_rw,"@83g%r", &_totale_periodo_dare); set_row (_rw++,"@100g%r", &_totale_periodo_avere); - set_row (_rw,"@32g%s", trans("TOTALI PROGRESSIVI")); + set_row (_rw,"@32g%s", TR("TOTALI PROGRESSIVI")); set_row (_rw,"@66g%r", &_saldo_progre); set_row (_rw,"@83g%r", &_totprogre_dare); set_row (_rw++,"@100g%r", &_totprogre_avere); if (_stampaprogre) //Progressivi attuali { - set_row (_rw,"@32g%s %s", trans("TOTALI PROGRESSIVI AL"), _ultima_data_reg.string()); + set_row (_rw,"@32g%s %s", TR("TOTALI PROGRESSIVI AL"), _ultima_data_reg.string()); set_row (_rw,"@66g%r", &_saldo_progre_al); set_row (_rw,"@83g%r", &_totprogre_dare_al); set_row (_rw,"@100g%r", &_totprogre_avere_al); @@ -1162,8 +1022,9 @@ void TMastrini_application::stampa_totali132() const char* TMastrini_application::real2str(const real& r) const { - real2currency(TMP, r); - return TMP; + TString & str = get_tmp_string(30); + real2currency(str, r); + return str; } void TMastrini_application::carica_array_totali132() @@ -1193,7 +1054,7 @@ void TMastrini_application::carica_array_totali132() r = ""; r.add("@32g%s@66g%s@83g%s@100g%s"); - r.add(trans("TOTALI PERIODO")); + r.add(TR("TOTALI PERIODO")); r.add(real2str(_saldo_periodo)); r.add(real2str(_totale_periodo_dare)); r.add(real2str(_totale_periodo_avere)); @@ -1201,7 +1062,7 @@ void TMastrini_application::carica_array_totali132() r = ""; r.add("@32g%s@66g%s@83g%s@100g%s"); - r.add(trans("TOTALI PROGRESSIVI")); + r.add(TR("TOTALI PROGRESSIVI")); r.add(real2str(_saldo_progre)); r.add(real2str(_totprogre_dare)); r.add(real2str(_totprogre_avere)); @@ -1211,7 +1072,7 @@ void TMastrini_application::carica_array_totali132() if (_stampaprogre) //Progressivi attuali { r.add("@32g%s@55g%s@66g%s@83g%s@100g%s"); - r.add(trans("TOTALI PROGRESSIVI AL")); + r.add(TR("TOTALI PROGRESSIVI AL")); r.add(_ultima_data_reg.string()); r.add(real2str(_saldo_progre_al)); r.add(real2str(_totprogre_dare_al)); @@ -1331,10 +1192,10 @@ void TMastrini_application::stampa_totali198() _totprogre_dare=_progredare+_totale_periodo_dare; _totprogre_avere=_progreavere+_totale_periodo_avere; - set_row (++_rw,"@32g%s@100g%r", trans("TOTALI PERIODO"), &_totale_periodo_dare); + set_row (++_rw,"@32g%s@100g%r", TR("TOTALI PERIODO"), &_totale_periodo_dare); set_row (_rw,"@117g%r", &_totale_periodo_avere); - set_row (++_rw,"@32g%s@100g%r", trans("TOTALI PROGRESSIVI"), &_totprogre_dare); + set_row (++_rw,"@32g%s@100g%r", TR("TOTALI PROGRESSIVI"), &_totprogre_dare); set_row (_rw,"@117g%r", &_totprogre_avere); set_row (_rw,"@135g%r", &_saldo_progressivi); if (!_stampa_des_contro) @@ -1342,7 +1203,7 @@ void TMastrini_application::stampa_totali198() if (_stampaprogre) //Progressivi attuali { _saldo_progre_al = _totprogre_dare_al - _totprogre_avere_al; - set_row(++_rw,"@32g%s@55g%s", trans("TOTALI PROGRESSIVI AL"), _ultima_data_reg.string()); + set_row(++_rw,"@32g%s@55g%s", TR("TOTALI PROGRESSIVI AL"), _ultima_data_reg.string()); set_row (_rw,"@100g%r", &_totprogre_dare_al); set_row (_rw,"@117g%r", &_totprogre_avere_al); if (!_stampa_des_contro) @@ -1381,7 +1242,7 @@ void TMastrini_application::carica_array_totali198() r.add("@32g%s@100g%s@117g%s"); else r.add("@32g%s@100g%s@117g%s@151g%s"); - r.add(trans("TOTALI PERIODO")); + r.add(TR("TOTALI PERIODO")); r.add(real2str(_totale_periodo_dare)); r.add(real2str(_totale_periodo_avere)); r.add(real2str(_saldo_movimenti)); @@ -1392,7 +1253,7 @@ void TMastrini_application::carica_array_totali198() r.add("@32g%s@100g%s@117g%s"); else r.add("@32g%s@100g%s@117g%s@135g%s"); - r.add(trans("TOTALI PROGRESSIVI")); + r.add(TR("TOTALI PROGRESSIVI")); r.add(real2str(_totprogre_dare)); r.add(real2str(_totprogre_avere)); r.add(real2str(_saldo_progressivi)); @@ -1403,7 +1264,7 @@ void TMastrini_application::carica_array_totali198() { _saldo_progre_al = _totprogre_dare_al - _totprogre_avere_al; r.add("@32g%s@55g%s@100g%s@117g%s@135g%s"); - r.add(trans("TOTALI PROGRESSIVI AL")); + r.add(TR("TOTALI PROGRESSIVI AL")); r.add(_ultima_data_reg.string()); r.add(real2str(_totprogre_dare_al)); r.add(real2str(_totprogre_avere_al)); @@ -1586,12 +1447,9 @@ bool TMastrini_application::preprocess_page(int file, int counter) _saldo_progre_prec = ZERO; if (_tipostampa == 2) { -// saldi_zero(); calcola_progressivi(TRUE); _totale_saldo = _saldo_progre_prec; } -// else -// _totale_saldo = 1.0; if ((_tipostampa == 1) || (_tipostampa == 2)) { @@ -1684,15 +1542,12 @@ bool TMastrini_application::preprocess_page(int file, int counter) _importo = rmov.get_real(RMV_IMPORTO); _importo_str = real2str(_importo); - _mov->setkey(1); - _mov->curr().zero(); - _mov->put(MOV_NUMREG,_numreg); - _mov->read(); - if (_mov->bad()) - _mov->zero(); - _annoes = _mov->get_int(MOV_ANNOES); - _regiva = _mov->get(MOV_REG); - _annoiva = _mov->get_int(MOV_ANNOIVA); + const TRectype & mov = cache().get(LF_MOV, _numreg); + + _annoes = mov.get_int(MOV_ANNOES); + _regiva = mov.get(MOV_REG); + _annoiva = mov.get_int(MOV_ANNOIVA); + // Controlla se saldo e' diverso da 0 @@ -1702,17 +1557,20 @@ bool TMastrini_application::preprocess_page(int file, int counter) if (_annomsk == 0) { - _datareg = _mov->curr().get(MOV_DATAREG); + _datareg = mov.get(MOV_DATAREG); + _datareg_stampa = _datareg; } else if (_annomsk != 0) { - _datareg = _mov->get(MOV_DATACOMP); - _datareg_stampa = _mov->get(MOV_DATAREG); + _datareg = mov.get(MOV_DATACOMP); + _datareg_stampa = mov.get(MOV_DATAREG); } - provvis = _mov->get(MOV_PROVVIS); + + provvis = mov.get(MOV_PROVVIS); + _dataregs = _datareg_stampa.string(); @@ -1734,8 +1592,9 @@ bool TMastrini_application::preprocess_page(int file, int counter) else set_row(_rw, "@195gP"); - _codcaus = _mov->get(MOV_CODCAUS); - _tipodoc = _mov->get(MOV_TIPODOC); + _codcaus = mov.get(MOV_CODCAUS); + _tipodoc = mov.get(MOV_TIPODOC); + if (_stampatotiva && (_tmcf == 'C' || _tmcf == 'F')) { if (_tipodoc != "") @@ -1746,12 +1605,15 @@ bool TMastrini_application::preprocess_page(int file, int counter) _ddociva_len = _descrdociva.len(); } } - _datadoc = _mov->get(MOV_DATADOC); + _datadoc = (mov.get(MOV_DATADOC)); + _datadocs = _datadoc.string(); - _numdoc = _mov->get(MOV_NUMDOC); + _numdoc = mov.get(MOV_NUMDOC); + descrizione_causale(); - _descrizionemov = _mov->get(MOV_DESCR); - _numgio = _mov->get_long(MOV_NUMGIO); + _descrizionemov = mov.get(MOV_DESCR); + _numgio = atol(mov.get(MOV_NUMGIO)); + _descrizione = rmov.get(RMV_DESCR); @@ -1814,8 +1676,6 @@ bool TMastrini_application::preprocess_page(int file, int counter) } else if (_descrizionemov == "") { - //set_row (1,"@46g%.23s", (const char*) _descrcaus); - //set_row (1,"@70g%.30s", (const char*) _descrizione); *_d22 = (const char*) _descrcaus; set_row(_rw, "@46g#a", _d22); set_row(_rw, "@70g#a", _d30); @@ -1824,8 +1684,6 @@ bool TMastrini_application::preprocess_page(int file, int counter) else if (_descrizione == "") if (_descrizionemov.not_empty()) { - //set_row (1,"@46g%.23s", (const char*) _descrcaus); - //set_row (1,"@70g%.30s", (const char*) _descrizionemov); *_d30 = (const char*) _descrizionemov; *_d22 = (const char*) _descrcaus; set_row (_rw,"@46g#a", _d22); @@ -2081,13 +1939,13 @@ bool TMastrini_application::preprocess_page(int file, int counter) TString avere (real2str(dep_avere)); if (_numcarat == 1) { - set_row (_rw,"@32gA RIPORTO@83g%s", (const char*) dare); + set_row (_rw,FR("@32gA RIPORTO@83g%s"), (const char*) dare); set_row (_rw,"@100g%s", (const char*) avere); } else if (_numcarat == 2) { - set_row (_rw,"@32gA RIPORTO@100g%s", (const char*) dare); + set_row (_rw,FR("@32gA RIPORTO@100g%s"), (const char*) dare); set_row (_rw,"@117g%s", (const char*) avere); } } @@ -2099,10 +1957,9 @@ bool TMastrini_application::preprocess_page(int file, int counter) return TRUE; } _rw--; -// return TRUE; } //_riga.destroy(); - } //if (_nummast == 2) + } if (_print_cdc) { @@ -2166,7 +2023,7 @@ bool TMastrini_application::preprocess_page(int file, int counter) if (_numcarat == 2) { ricerca_regiva(); - _protiva = atol(_mov->curr().get(MOV_PROTIVA)); + _protiva = mov.get_long(MOV_PROTIVA); if (_protiva != 0) set_row (_rw,"@191g%5d", _protiva); @@ -2205,7 +2062,7 @@ bool TMastrini_application::preprocess_page(int file, int counter) else { ricerca_regiva(); - _protiva = atol(_mov->curr().get(MOV_PROTIVA)); + _protiva = atol(mov.get(MOV_PROTIVA)); if (_protiva != 0) set_row (_rw,"@127g%5d", _protiva); } @@ -2451,13 +2308,9 @@ void TMastrini_application::stampa_totaliiva() // sull'archivio CAUS.dta void TMastrini_application::descrizione_causale() { - _caus->setkey(1); - _caus->curr().zero(); - _caus->curr().put(CAU_CODCAUS, _codcaus); - _caus->read(); - if (_caus->bad()) - _caus->zero(); - _descrcaus = _caus->curr().get(CAU_DESCR); + const TRectype & caus = cache().get(LF_CAUSALI, _codcaus); + + _descrcaus = caus.get(CAU_DESCR); } // Ricerca sulla tabella dei tipi documento, la descrizione e la natura del @@ -2797,13 +2650,13 @@ void TMastrini_application::preprocess_footer() TString avere (real2str(dep_avere)); if (_numcarat == 1) { - set_footer (2,"@32gA RIPORTO@83g%s", (const char*) dare); + set_footer (2,FR("@32gA RIPORTO@83g%s"), (const char*) dare); set_footer (2,"@100g%s", (const char*) avere); } else if (_numcarat == 2) { - set_footer (2,"@32gA RIPORTO@100g%s", (const char*) dare); + set_footer (2,FR("@32gA RIPORTO@100g%s"), (const char*) dare); set_footer (2,"@117g%s", (const char*) avere); } } @@ -2812,16 +2665,12 @@ void TMastrini_application::preprocess_footer() void TMastrini_application::conto(int gruppo, int conto, bool no_contropartita) { - TLocalisamfile pconti(LF_PCON); + TString16 key; + + key.format("%d|%d|", gruppo, conto); + + const TRectype & pconti = cache().get(LF_PCON, key); - pconti.setkey(1); - pconti.zero(); - pconti.put(PCN_GRUPPO, gruppo); - pconti.put(PCN_CONTO , conto); - pconti.read(); - if (pconti.bad()) - pconti.zero(); - if (no_contropartita) { _indbil = pconti.get_int(PCN_INDBIL); @@ -2835,20 +2684,19 @@ void TMastrini_application::ricerca_dati_ditta() { long app; - _nditte->setkey(1); - _nditte->curr().zero(); - _nditte->curr().put(NDT_CODDITTA,_codice_ditta); - _nditte->read(); - app=_nditte->curr().get_long(NDT_CODDITTA); - _ragsoc=_nditte->curr().get(NDT_RAGSOC); + const TRectype & nditte = cache().get(LF_NDITTE, _codice_ditta); + + app = nditte.get_long(NDT_CODDITTA); + _ragsoc = nditte.get(NDT_RAGSOC); - _unloc->setkey(1); - _unloc->curr().zero(); - _unloc->curr().put(ULC_CODDITTA,app); - _unloc->curr().put(ULC_CODULC,"1"); - _unloc->read(); - _indulc=_unloc->curr().get(ULC_INDULC); - _civulc=_unloc->curr().get(ULC_CIVULC); + TString16 key; + + key.format("%ld|1", app); + + const TRectype & unloc = cache().get(LF_UNLOC, key); + + _indulc= unloc.get(ULC_INDULC); + _civulc= unloc.get(ULC_CIVULC); int len = _indulc.len(); if (len <= 31) { @@ -2862,23 +2710,14 @@ void TMastrini_application::ricerca_dati_ditta() _indulc = _indulc.mid(0,31); _indulc << " " << _civulc.mid(0,5); } - _capulc=_unloc->curr().get(ULC_CAPULC); - _comulc=_unloc->curr().get(ULC_COMULC); + _capulc= unloc.get(ULC_CAPULC); + _comulc= unloc.get(ULC_COMULC); - _comuni->setkey(1); - _comuni->zero(); - _comuni->put(COM_COM,_comulc); - _comuni->read(); - if (_comuni->good()) - { - _com=_comuni->get(COM_DENCOM); - _prov=_comuni->get(COM_PROVCOM); - } - else - { - _com=""; - _prov=""; - } + key.format("|%s", (const char *) _comulc); + const TRectype & comuni = cache().get(LF_COMUNI, key); + + _com = comuni.get(COM_DENCOM); + _prov = comuni.get(COM_PROVCOM); } // Crea l'intestazione per la stampa a 132 e a 198 caratteri @@ -2928,7 +2767,7 @@ void TMastrini_application::crea_intestazione() if (_nummast != 3 || _pagina != np) { - set_header (1, "@0g%s@6g%5ld", trans("DITTA"), _codice_ditta); + set_header (1, "@0g%s@6g%5ld", TR("DITTA"), _codice_ditta); set_header (1, "@12g%-.45s", (const char*) _ragsoc); set_header (1, "@59g%s", (const char*) _indulc); //set_header (1, "@86g%-.9s", (const char*) _civulc); @@ -2943,18 +2782,18 @@ void TMastrini_application::crea_intestazione() if (_fsc.not_empty()) { const TString& desc_fsc = cache().get("FSC", _fsc, "S0"); - set_header(2, "@bCommessa %s %s - Fase %s %s", + set_header(2, FR("@bCommessa %s %s - Fase %s %s"), (const char*)_cdc, (const char*)desc_cdc, (const char*)_fsc, (const char*)desc_fsc); } else - set_header(2, "@bCommessa %s %s", (const char*)_cdc, (const char*)desc_cdc); + set_header(2, FR("@bCommessa %s %s"), (const char*)_cdc, (const char*)desc_cdc); } if (_nummast == 3) - set_header (3, "@0g%s@12g@b%3d %3d %6ld", trans("Sottoconto"), _gruppo, _conto, _sottoc); + set_header (3, "@0g%s@12g@b%3d %3d %6ld", TR("Sottoconto"), _gruppo, _conto, _sottoc); else - set_header (3, "@0g%s@12g%3d %3d %6ld", trans("Sottoconto"), _gruppo, _conto, _sottoc); + set_header (3, "@0g%s@12g%3d %3d %6ld", TR("Sottoconto"), _gruppo, _conto, _sottoc); switch(_tmcf) { @@ -2979,17 +2818,17 @@ void TMastrini_application::crea_intestazione() sep.fill('_'); //Stampa 132 - (sep(132)) set_header (6, (const char *) sep); set_header (7,"%s@19g%s@117g%s@132g%s", - trans("Operazione"), trans("Documento"), trans("Contro"), trans("A")); + TR("Operazione"), TR("Documento"), TR("Contro"), TR("A")); if (_stampa_mov_prov) set_header(7,"@130gM"); - set_header (8, trans("Data")); + set_header (8, TR("Data")); if (_stampanum < 3) - set_header (8,"@11g%s", trans("Numero")); + set_header (8,"@11g%s", TR("Numero")); set_header (8,"@19g%s@30g%s@38g%s@61g%s@95g%s@111g%s@117g%s@127g%s@132g%s", - trans("Data"), trans("Numero"), trans("Cod.Causale"), trans("Descrizione"), - trans("Dare"), trans("Avere"), trans("Partita"), trans("Prot."), trans("C")); + TR("Data"), TR("Numero"), TR("Cod.Causale"), TR("Descrizione"), + TR("Dare"), TR("Avere"), TR("Partita"), TR("Prot."), TR("C")); if (_stampa_mov_prov) - set_header(8,"@130g%s", trans("P")); + set_header(8,"@130g%s", TR("P")); sep.fill('_'); set_header (9, (const char *) sep); } @@ -3000,38 +2839,36 @@ void TMastrini_application::crea_intestazione() if (_stampa_des_contro) { set_header (7,"%s@23g%s@183g%s@190g%s@197g%s", - trans("Operazione"), trans("Documento"), - trans("Reg"), trans("Numero"), trans("A")); + TR("Operazione"), TR("Documento"), + TR("Reg"), TR("Numero"), TR("A")); } else { set_header (7,"%s@23g%s@169g%s@183g%s@190g%s@197g%s", - trans("Operazione"), trans("Documento"), trans("Contro"), - trans("Reg"), trans("Numero"), trans("A")); + TR("Operazione"), TR("Documento"), TR("Contro"), + TR("Reg"), TR("Numero"), TR("A")); } if (_stampa_mov_prov) - set_header(7,"@195g%s", trans("M")); - set_header (8,trans("Data")); + set_header(7,"@195g%s", TR("M")); + set_header (8,TR("Data")); if (_stampanum < 3) - set_header (8,"@11g%s", trans("Numero")); + set_header (8,"@11g%s", TR("Numero")); if (_stampa_des_contro) { set_header (8,"@23g%s@34g%s@42g%s@70g%s@112g%s@127g%s@135g%s@183g%s@189g%s@197g%s", - trans("Data"), trans("Numero"), trans("Cod.Causale"), trans("Descrizione"), trans("Dare"), trans("Avere"), - trans("Contropartita"), trans("Iva"), - trans("Protoc."), trans("C")); + TR("Data"), TR("Numero"), TR("Cod.Causale"), TR("Descrizione"), TR("Dare"), TR("Avere"), + TR("Contropartita"), TR("Iva"), TR("Protoc."), TR("C")); } else { set_header (8,"@23g%s@34g%s@42g%s@70g%s@112g%s@127g%s@135g%s@152g%s@169g%s@183g%s@189g%s@197g%s", - trans("Data"), trans("Numero"), trans("Cod.Causale"), trans("Descrizione"), trans("Dare"), trans("Avere"), - trans("Saldo progre."), trans("Saldo movim."), trans("Partita"), trans("Iva"), - trans("Protoc."), trans("C")); + TR("Data"), TR("Numero"), TR("Cod.Causale"), TR("Descrizione"), TR("Dare"), TR("Avere"), + TR("Saldo progre."), TR("Saldo movim."), TR("Partita"), TR("Iva"), TR("Protoc."), TR("C")); } if (_stampa_mov_prov) - set_header(8,"@195g%s", trans("P")); + set_header(8,"@195g%s", TR("P")); sep1.fill('_'); set_header (9,"@0g%s", (const char*)sep1); } @@ -3043,13 +2880,13 @@ void TMastrini_application::crea_intestazione() { if (_numcarat == 1) { - set_header (10,"@42g%s@66g%s", trans("PROGRESSIVI PRECEDENTI"), real2str(_saldo_progre_prec)); + set_header (10,"@42g%s@66g%s", TR("PROGRESSIVI PRECEDENTI"), real2str(_saldo_progre_prec)); set_header (10,"@83g%s", real2str(_progredare)); set_header (10,"@100g%s", real2str(_progreavere)); } if (_numcarat == 2) { - set_header (10,"@70g%s@100g%s", trans("PROGRESSIVI PRECEDENTI"), real2str(_progredare)); + set_header (10,"@70g%s@100g%s", TR("PROGRESSIVI PRECEDENTI"), real2str(_progredare)); set_header (10,"@117g%s", real2str(_progreavere)); if (!_stampa_des_contro) set_header (10,"@135g%s", real2str(_saldo_progre_prec)); @@ -3073,12 +2910,12 @@ void TMastrini_application::crea_intestazione() { if (_numcarat == 1) { - set_header (10,"@32g%s@83g%s", trans("A RIPORTO"), real2str(dep_dare)); + set_header (10,"@32g%s@83g%s", TR("A RIPORTO"), real2str(dep_dare)); set_header (10,"@100g%s", real2str(dep_avere)); } else { - set_header (10,"@32g%s@100g%s", trans("A RIPORTO"), real2str(dep_dare)); + set_header (10,"@32g%s@100g%s", TR("A RIPORTO"), real2str(dep_dare)); set_header (10,"@117g%s", real2str(dep_avere)); } } @@ -3128,12 +2965,12 @@ int TMastrini_application::crea_intestazione(int start_riga) { if (_numcarat == 1) { - sep << "Pag. @#"; + sep << FR("Pag. @#"); set_row(r,"@126g%s", (const char*) sep); } else if (_numcarat == 2) { - sep << "Pagina @#"; + sep << FR("Pagina @#"); set_row(r,"@190g%s", (const char*) sep); } } @@ -3141,13 +2978,13 @@ int TMastrini_application::crea_intestazione(int start_riga) else { if (_numcarat == 1) - set_row(r,"@126g%s %2d", trans("Pag."), _numero_pag++); + set_row(r,"@126g%s %2d", TR("Pag."), _numero_pag++); else if (_numcarat == 2) - set_row(r,"@190g%s %2d", trans("Pagina"),_numero_pag++); + set_row(r,"@190g%s %2d", TR("Pagina"),_numero_pag++); } if (_nummast != 3 || _pagina != np) { - set_row (r, "@0g%s@6g%5ld", trans("DITTA"), _codice_ditta); + set_row (r, "@0g%s@6g%5ld", TR("DITTA"), _codice_ditta); set_row (r, "@12g%-45s", (const char*) _ragsoc); set_row (r, "@59g%s", (const char*) _indulc); //set_row (r, "@86g%-9s", (const char*) _civulc); @@ -3157,9 +2994,9 @@ int TMastrini_application::crea_intestazione(int start_riga) r += 2; } if (_nummast == 3) - set_row (r, "@0g%s@12g@b%3d %3d %6ld", trans("Sottoconto"), _gruppo, _conto, _sottoc); + set_row (r, "@0g%s@12g@b%3d %3d %6ld", TR("Sottoconto"), _gruppo, _conto, _sottoc); else - set_row (r, "@0g%s@12g%3d %3d %6ld", trans("Sottoconto"), _gruppo, _conto, _sottoc); + set_row (r, "@0g%s@12g%3d %3d %6ld", TR("Sottoconto"), _gruppo, _conto, _sottoc); if (_tmcf == 'C') _tipo_mask = 1; @@ -3185,14 +3022,13 @@ int TMastrini_application::crea_intestazione(int start_riga) { sep.fill('_'); //Stampa 132 - (sep(132)) set_row (r++,"@0g%s", (const char *) sep); - set_row (r++,"%s@19g%s@117g%s@131g%s", - trans("Operazione"), trans("Documento"), trans("Contro"), trans("A")); + set_row (r++,"%s@19g%s@117g%s@131g%s", TR("Operazione"), TR("Documento"), TR("Contro"), TR("A")); if (_stampa_mov_prov) - set_header(r-1,"@130g%s", trans("M")); - set_row (r, trans("Data")); + set_header(r-1,"@130g%s", TR("M")); + set_row (r, TR("Data")); if (_stampanum < 3) - set_row (r,"@11g%s", trans("Numero")); - set_row (r++,"@19gData@30gNumero@38gCod.Causale@61gDescrizione@95gDare@111gAvere@117gPartita@131gC"); + set_row (r,"@11g%s", TR("Numero")); + set_row (r++,FR("@19gData@30gNumero@38gCod.Causale@61gDescrizione@95gDare@111gAvere@117gPartita@131gC")); if (_stampa_mov_prov) set_header(r-1,"@130gP"); sep.fill('_'); @@ -3203,19 +3039,19 @@ int TMastrini_application::crea_intestazione(int start_riga) sep1.fill('_'); //Stampa 198 - (sep1(198)) set_row (r++,"@0g%s", (const char*)sep1); if (_stampa_des_contro) - set_row (r++,"Operazione@23gDocumento@183gReg@190gNumero@197gA"); + set_row (r++,FR("Operazione@23gDocumento@183gReg@190gNumero@197gA")); else - set_row (r++,"Operazione@23gDocumento@169gContro@183gReg@190gNumero@197gA"); + set_row (r++,FR("Operazione@23gDocumento@169gContro@183gReg@190gNumero@197gA")); if (_stampa_mov_prov) set_row(r-1,"@195gM"); set_row (r,"Data"); if (_stampanum < 3) set_row (r,"@11gnumero"); - set_row (r,"@23gData@34gNumero@42gCod.Causale@70gDescrizione@112gDare@127gAvere"); + set_row (r,FR("@23gData@34gNumero@42gCod.Causale@70gDescrizione@112gDare@127gAvere")); if (_stampa_des_contro) - set_row (r++,"@135gContropartita@183gIva@189gProtoc.@197gC"); + set_row (r++,FR("@135gContropartita@183gIva@189gProtoc.@197gC")); else - set_row (r++,"@135gSaldo progre.@152gSaldo movim.@169gPartita@183gIva@189gProtoc.@197gC"); + set_row (r++,FR("@135gSaldo progre.@152gSaldo movim.@169gPartita@183gIva@189gProtoc.@197gC")); if (_stampa_mov_prov) set_row (r-1,"@195gP"); sep1.fill('_'); @@ -3225,59 +3061,6 @@ int TMastrini_application::crea_intestazione(int start_riga) return r; } -void TMastrini_application::stampa_progre_riporto() -{ - TString sep(132),sep1(198); - - if (_nummast == 1 || _nummast == 3) - _rw = 1; - - if (_stampa_progressivi_si) - { - stampa_progressivi(); - _riporto_dare = _progredare; - _riporto_avere = _progreavere; - _stampa_progressivi_si = FALSE; - } - else - { - _riporto_dare += _riporto_parziale_dare; - _riporto_avere += _riporto_parziale_avere; - - real dep_dare,dep_avere,imp_d,imp_a; - imp_d = _sezione == "D" ? _importo : ZERO; - imp_a = _sezione == "A" ? _importo : ZERO; - dep_dare = _stampato ? _riporto_dare : _riporto_dare - imp_d; - dep_avere = _stampato ? _riporto_avere : _riporto_avere - imp_a; - - if (_nummast != 3 || dep_dare != ZERO || dep_avere != 0) - { - if (_numcarat == 1) - { - set_row (_rw,"@32g%s@83g%r", trans("A RIPORTO"), &dep_dare); - set_row (_rw++,"@100g%r",&dep_avere); - } - if (_numcarat == 2) - { - set_row (_rw,"@32g%s@100g%r", trans("A RIPORTO"), &dep_dare); - set_row (_rw++,"@117g%r", &dep_avere); - } - } - _riporto_parziale_dare = ZERO; - _riporto_parziale_avere = ZERO; - } - if (_numcarat == 1) - { - sep =""; - set_row(_rw,"@0g%s",(const char*)sep); - } - else - { - sep1 =""; - set_row(_rw,"@0g%s",(const char*)sep1); - } -} - int TMastrini_application::stampa_progre_riporto(int start_riga) { TString sep(132),sep1(198); @@ -3305,12 +3088,12 @@ int TMastrini_application::stampa_progre_riporto(int start_riga) { if (_numcarat == 1) { - set_row (r,"@32g%s@83g%r", trans("A RIPORTO"), &dep_dare); + set_row (r,"@32g%s@83g%r", TR("A RIPORTO"), &dep_dare); set_row (r++,"@100g%r", &dep_avere); } if (_numcarat == 2) { - set_row (r,"@32g%s@100g%r", trans("A RIPORTO"), &dep_dare); + set_row (r,"@32g%s@100g%r", TR("A RIPORTO"), &dep_dare); set_row (r++,"@117g%r", &dep_avere); } } @@ -3365,10 +3148,12 @@ void TMastrini_application::calcola_progressivi_al(const TDate& data_fin) const real importo = rmov.get(RMV_IMPORTO); long numreg = rmov.get_long(RMV_NUMREG); - const TDate datacomp = mov.get(MOV_DATACOMP); - TDate data; - - const TString16 provvis = mov.get(MOV_PROVVIS); + const TRectype & mov = cache().get(LF_MOV, numreg); + const TDate datacomp = (mov.get(MOV_DATACOMP)); + TDate data; + const TString16 provvis (mov.get(MOV_PROVVIS)); + + if (_stampa_mov_prov || (!_stampa_mov_prov && provvis.blank())) { if (_annomsk == 0) @@ -3540,39 +3325,19 @@ void TMastrini_application::calcola_progressivi(bool finali) } } -void TMastrini_application::stampa_progressivi() -{ - if (_nummast == 1 || _nummast == 3) - _rw = 1; - - if (_numcarat == 1) - { - set_row (_rw,"@42gPROGRESSIVI PRECEDENTI@66g%r", &_saldo_progre_prec); - set_row (_rw,"@83g%r", &_progredare); - set_row (_rw++,"@100g%r", &_progreavere); - } - else - { - set_row (_rw,"@70gPROGRESSIVI PRECEDENTI@100g%r", &_progredare); - set_row (_rw,"@117g%r", &_progreavere); - if (!_stampa_des_contro) - set_row (_rw++,"@135g%r", &_saldo_progre_prec); - } -} - int TMastrini_application::stampa_progressivi(int start_riga) { int r = start_riga; if (_numcarat == 1) { - set_row (r,"@42gPROGRESSIVI PRECEDENTI@66g%r", &_saldo_progre_prec); + set_row (r,FR("@42gPROGRESSIVI PRECEDENTI@66g%r"), &_saldo_progre_prec); set_row (r,"@83g%r", &_progredare); set_row (r++,"@100g%r", &_progreavere); } else { - set_row (r,"@70gPROGRESSIVI PRECEDENTI@100g%r", &_progredare); + set_row (r,FR("@70gPROGRESSIVI PRECEDENTI@100g%r"), &_progredare); set_row (r,"@117g%r", &_progreavere); if (!_stampa_des_contro) set_row (r++,"@135g%r", &_saldo_progre_prec); @@ -3586,21 +3351,17 @@ int TMastrini_application::stampa_progressivi(int start_riga) void TMastrini_application::ricerca_clifo() { TString ragsoc,paiv,cofi,indcf,capcf,ptel,tel,statocf,comcf,dencom,provcom,dep; - TLocalisamfile clifo(LF_CLIFO); - TLocalisamfile pconti(LF_PCON); TString16 dataini,datafine; TString descriz,descriz2; int numrivd; indcf = ""; - clifo.setkey(1); - clifo.zero(); - clifo.put(CLI_TIPOCF, _tmcf); - clifo.put(CLI_CODCF, _sottoc); - clifo.read(); - if (clifo.bad()) - clifo.zero(); + TString16 key; + + key.format("%c|%ld", _tmcf, _sottoc); + + const TRectype & clifo = cache().get(LF_CLIFO, key); TConto tc (_gruppo,_conto,_sottoc,_tmcf); ragsoc = tc.descrizione(); @@ -3615,28 +3376,23 @@ void TMastrini_application::ricerca_clifo() statocf = clifo.get(CLI_STATOCF); comcf = clifo.get(CLI_COMCF); - _comuni->setkey(1); - _comuni->zero(); - _comuni->put(COM_STATO, statocf); - _comuni->put(COM_COM, comcf); - _comuni->read(); - if (_comuni->good()) + key.format("%s|%s", (const char *) statocf, (const char *) comcf); + const TRectype & comuni = cache().get(LF_COMUNI, key); + + if (!comuni.empty()) { - dencom = _comuni->get(COM_DENCOM); - provcom = _comuni->get(COM_PROVCOM); + dencom = comuni.get(COM_DENCOM); + provcom = comuni.get(COM_PROVCOM); } else { - //dencom=""; dencom = clifo.get(CLI_LOCCF); provcom=""; } - - pconti.setkey(1); - pconti.zero(); - pconti.put(PCN_GRUPPO, _gruppo); - pconti.put(PCN_CONTO, _conto); - pconti.read(); + + key.format("%d|%d|", _gruppo, _conto); + + const TRectype & pconti = cache().get(LF_PCON, key); _sezivd = pconti.get_char(PCN_SEZIVD); _lettivd = pconti.get_char(PCN_LETTIVD); numrivd = pconti.get_int(PCN_NUMRIVD); @@ -3662,9 +3418,9 @@ void TMastrini_application::ricerca_clifo() set_header(3,"@59g%-.30s",(const char*) descrizione_conto()); set_header(3, "@91g%-.41s",(const char*) ragsoc); if (_nummast == 3) - set_header(4, "@r%s@8g@b%c", trans("Classe"), _lettivd); + set_header(4, "@r%s@8g@b%c", TR("Classe"), _lettivd); else - set_header(4, "%s@8g%c", trans("Classe") , _lettivd); + set_header(4, "%s@8g%c", TR("Classe") , _lettivd); set_header(4, "@10g%-8s", (const char*) _numrivd); if (_numivd != 0) set_header(4, "@19g%2d", _numivd); @@ -3683,12 +3439,12 @@ void TMastrini_application::ricerca_clifo() { if (_nummast == 3) { - set_header (5, "@rPeriodo@10g@b%s", (const char*) dataini); + set_header (5, FR("@rPeriodo@10g@b%s"), (const char*) dataini); set_header (5, "@22g@b%s@r", (const char*) datafine); } else { - set_header (5, "Periodo@10g%s", (const char*) dataini); + set_header (5, FR("Periodo@10g%s"), (const char*) dataini); set_header (5, "@22g%s", (const char*) datafine); } } @@ -3696,18 +3452,18 @@ void TMastrini_application::ricerca_clifo() { if (_nummast == 3) { - set_header (5, "@rComp. da@9g@b%s", (const char*) dataini); + set_header (5, FR("@rComp. da@9g@b%s"), (const char*) dataini); set_header (5, "@20g@ra@22g@b%s@r", (const char*) datafine); } else { - set_header (5, "Comp. da@9g%s", (const char*) dataini); + set_header (5, FR("Comp. da@9g%s"), (const char*) dataini); set_header (5, "@20ga@22g%s", (const char*) datafine); } } - set_header (5, "@33gP.I.@37g%-11s",(const char*) paiv); - set_header (5, "@49gCF@52g%-16s",(const char*) cofi); + set_header (5, FR("@33gP.I.@37g%-11s"),(const char*) paiv); + set_header (5, FR("@49gCF@52g%-16s"),(const char*) cofi); set_header (5, "@66g%-.25s",(const char*) indcf); set_header (5, "@95g%-5s",(const char*) capcf); set_header (5, "@101g%-.24s",(const char*) dencom); @@ -3724,8 +3480,6 @@ void TMastrini_application::ricerca_clifo() int TMastrini_application::ricerca_clifo(int start) { TString ragsoc,paiv,cofi,indcf,capcf,ptel,tel,statocf,comcf,dencom,provcom,dep; - TLocalisamfile clifo(LF_CLIFO); - TLocalisamfile pconti(LF_PCON); TString16 dataini,datafine; TString descriz,descriz2; int numrivd; @@ -3733,13 +3487,11 @@ int TMastrini_application::ricerca_clifo(int start) indcf = ""; - clifo.setkey(1); - clifo.zero(); - clifo.put(CLI_TIPOCF, _tmcf); - clifo.put(CLI_CODCF, _sottoc); - clifo.read(); - if (clifo.bad()) - clifo.zero(); + TString16 key; + + key.format("%c|%ld", _tmcf, _sottoc); + + const TRectype & clifo = cache().get(LF_CLIFO, key); TConto tc (_gruppo,_conto,_sottoc,_tmcf); ragsoc = tc.descrizione(); @@ -3754,28 +3506,24 @@ int TMastrini_application::ricerca_clifo(int start) statocf = clifo.get(CLI_STATOCF); comcf = clifo.get(CLI_COMCF); - _comuni->setkey(1); - _comuni->zero(); - _comuni->put(COM_STATO, statocf); - _comuni->put(COM_COM, comcf); - _comuni->read(); - if (_comuni->good()) + key.format("%s|%s", (const char *) statocf, (const char *) comcf); + + const TRectype & comuni = cache().get(LF_COMUNI, key); + + if (!comuni.empty()) { - dencom = _comuni->get(COM_DENCOM); - provcom = _comuni->get(COM_PROVCOM); + dencom = comuni.get(COM_DENCOM); + provcom = comuni.get(COM_PROVCOM); } else { - //dencom=""; dencom=clifo.get(CLI_LOCCF); provcom=""; } - pconti.setkey(1); - pconti.zero(); - pconti.put(PCN_GRUPPO, _gruppo); - pconti.put(PCN_CONTO, _conto); - pconti.read(); + key.format("%d|%d|", _gruppo, _conto); + + const TRectype & pconti = cache().get(LF_PCON, key); _sezivd = pconti.get_char(PCN_SEZIVD); _lettivd = pconti.get_char(PCN_LETTIVD); numrivd = pconti.get_int(PCN_NUMRIVD); @@ -3801,9 +3549,9 @@ int TMastrini_application::ricerca_clifo(int start) set_row (r,"@59g%-30s",(const char*) descrizione_conto()); set_row(r++, "@91g%-30s",(const char*) ragsoc); if (_nummast == 3) - set_row(r, "@r%s@8g@b%c", trans("Classe"), _lettivd); + set_row(r, "@r%s@8g@b%c", TR("Classe"), _lettivd); else - set_row(r, "%s@8g%c", trans("Classe"), _lettivd); + set_row(r, "%s@8g%c", TR("Classe"), _lettivd); set_row(r, "@10g%-8s", (const char*) _numrivd); if (_numivd != 0) set_row(r, "@19g%2d", _numivd); @@ -3822,12 +3570,12 @@ int TMastrini_application::ricerca_clifo(int start) { if (_nummast == 3) { - set_row (r, "@r%s@10g@b%s", trans("Periodo"), (const char*) dataini); + set_row (r, "@r%s@10g@b%s", TR("Periodo"), (const char*) dataini); set_row (r, "@22g%s@r", (const char*) datafine); } else { - set_row (r, "%s@10g%s", trans("Periodo"), (const char*) dataini); + set_row (r, "%s@10g%s", TR("Periodo"), (const char*) dataini); set_row (r, "@22g%s", (const char*) datafine); } } @@ -3835,19 +3583,19 @@ int TMastrini_application::ricerca_clifo(int start) { if (_nummast == 3) { - set_row (r, "@r%s@9g@b%s", trans("Comp.dal"), (const char*) dataini); - set_row (r, "@20g@r%s@22g@b%s@r", trans("al"), (const char*) datafine); + set_row (r, "@r%s@9g@b%s", TR("Comp.dal"), (const char*) dataini); + set_row (r, "@20g@r%s@22g@b%s@r", TR("al"), (const char*) datafine); } else { - set_row (r, "%s@9g%s", trans("Comp.dal"), (const char*) dataini); - set_row (r, "@20g%s@22g%s", trans("al"), (const char*) datafine); + set_row (r, "%s@9g%s", TR("Comp.dal"), (const char*) dataini); + set_row (r, "@20g%s@22g%s", TR("al"), (const char*) datafine); } } - set_row (r, "@33gP.I.@37g%-11s",(const char*) paiv); - set_row (r, "@49gCF@52g%-16s",(const char*) cofi); - set_row (r, "@66g%-.25s",(const char*) indcf); + set_row (r, FR("@33gP.I.@37g%-11s"),(const char*) paiv); + set_row (r, FR("@49gCF@52g%-16s"),(const char*) cofi); + set_row (r, "@66g%-.25s",(const char*) indcf); set_row (r, "@95g%-5s",(const char*) capcf); set_row (r, "@101g%-.24s",(const char*) dencom); set_row (r, "@126g%-5s",(const char*) provcom); @@ -3867,15 +3615,14 @@ int TMastrini_application::ricerca_clifo(int start) void TMastrini_application::ricerca_classe_IV(bool scelta) { - TLocalisamfile pconti(LF_PCON); + TString16 key; - pconti.setkey(1); - pconti.zero(); - pconti.put(PCN_GRUPPO, _gruppo); - pconti.put(PCN_CONTO, _conto); - if (scelta) - pconti.put(PCN_SOTTOCONTO, _sottoc); - pconti.read(); + if (scelta) + key.format("%d|%d|%ld", _gruppo, _conto, _sottoc); + else + key.format("%d|%d|", _gruppo, _conto); + + const TRectype & pconti = cache().get(LF_PCON, key); _sezivd = pconti.get_char(PCN_SEZIVD); _lettivd = pconti.get_char(PCN_LETTIVD); _numrivd_int = pconti.get_int (PCN_NUMRIVD); @@ -3912,9 +3659,9 @@ void TMastrini_application::ricerca_gruppo() set_header(3,"@91g%-.41s",(const char*) descrizione_sottoconto()); if (_nummast == 3) - set_header(4, "@0g@r%s@12g@b%c", trans("Classe"), _lettivd); + set_header(4, "@0g@r%s@12g@b%c", TR("Classe"), _lettivd); else - set_header(4, "@0g%s@12g%c", trans("Classe"), _lettivd); + set_header(4, "@0g%s@12g%c", TR("Classe"), _lettivd); set_header(4, "@14g%-8s",(const char*) _numrivd); if (_numivd != 0) set_header(4, "@23g%d", _numivd); @@ -3933,12 +3680,12 @@ void TMastrini_application::ricerca_gruppo() { if (_nummast == 3) { - set_header (5, "@r%s@12g@b%s", trans("Periodo"), (const char*) dataini); + set_header (5, "@r%s@12g@b%s", TR("Periodo"), (const char*) dataini); set_header (5, "@24g@b%s@r", (const char*) datafine); } else { - set_header (5, "%s@12g%s", trans("Periodo"), (const char*) dataini); + set_header (5, "%s@12g%s", TR("Periodo"), (const char*) dataini); set_header (5, "@24g%s", (const char*) datafine); } } @@ -3946,12 +3693,12 @@ void TMastrini_application::ricerca_gruppo() { if (_nummast == 3) { - set_header (5, "@r%s@23g@b%s", trans("Periodo di competenza"), (const char*) dataini); + set_header (5, "@r%s@23g@b%s", TR("Periodo di competenza"), (const char*) dataini); set_header (5, "@35g%s@r", (const char*) datafine); } else { - set_header (5, "%s@23g%s", trans("Periodo di competenza"), (const char*) dataini); + set_header (5, "%s@23g%s", TR("Periodo di competenza"), (const char*) dataini); set_header (5, "@35g%s", (const char*) datafine); } } @@ -3987,9 +3734,9 @@ int TMastrini_application::ricerca_gruppo(int start) set_row(r++,"@91g%-.41s",(const char*) descrizione_sottoconto()); if (_nummast == 3) - set_row(r, "@0g@r%s@12g@b%c", trans("Classe"), _lettivd); + set_row(r, "@0g@r%s@12g@b%c", TR("Classe"), _lettivd); else - set_row(r, "@0g%s@12g%c", trans("Classe"), _lettivd); + set_row(r, "@0g%s@12g%c", TR("Classe"), _lettivd); set_row(r, "@14g%-8s",(const char*) _numrivd); if (_numivd != 0) set_row(r, "@23g%d", _numivd); @@ -4008,12 +3755,12 @@ int TMastrini_application::ricerca_gruppo(int start) { if (_nummast == 3) { - set_row (r, "@r%s@12g@b%s", trans("Periodo"), (const char*) dataini); + set_row (r, "@r%s@12g@b%s", TR("Periodo"), (const char*) dataini); set_row (r, "@24g%s@r", (const char*) datafine); } else { - set_row (r, "%s@12g%s", trans("Periodo"), (const char*) dataini); + set_row (r, "%s@12g%s", TR("Periodo"), (const char*) dataini); set_row (r, "@24g%s", (const char*) datafine); } } @@ -4021,7 +3768,7 @@ int TMastrini_application::ricerca_gruppo(int start) { if (_nummast == 3) { - set_row (r, "@r%s@23g@b%s", trans("Periodo di competenza"), (const char*) dataini); + set_row (r, "@r%s@23g@b%s", TR("Periodo di competenza"), (const char*) dataini); set_row (r, "@35g%s@r", (const char*) datafine); if (_cdc.not_empty()) @@ -4030,17 +3777,17 @@ int TMastrini_application::ricerca_gruppo(int start) if (_fsc.not_empty()) { const TString& desc_fsc = cache().get("FSC", _fsc, "S0"); - set_row(++r, "@bCommessa %s %s - Fase %s %s", + set_row(++r, FR("@bCommessa %s %s - Fase %s %s"), (const char*)_cdc, (const char*)desc_cdc, (const char*)_fsc, (const char*)desc_fsc); } else - set_row(++r, "@bCommessa %s %s", (const char*)_cdc, (const char*)desc_cdc); + set_row(++r, FR("@bCommessa %s %s"), (const char*)_cdc, (const char*)desc_cdc); } } else { - set_row (r, "%s@23g%s", trans("Periodo di competenza"), (const char*) dataini); + set_row (r, "%s@23g%s", TR("Periodo di competenza"), (const char*) dataini); set_row (r, "@35g%s", (const char*) datafine); } } @@ -4049,76 +3796,50 @@ int TMastrini_application::ricerca_gruppo(int start) const char* TMastrini_application::descrizione_classe(char sezione, char lettera, int numr, int numero) { - TTable tabivd(TAB_IVD); - TString dep,dep2; + TString16 key; - tabivd.zero(); if (numr == 0 && numero == 0) - dep = format("%c%c",sezione,lettera); + key.format("%c%c",sezione,lettera); else if (numero == 0) + key.format("%c%c%04d",sezione, lettera, numr); + else { if (numr != 0) - dep = format("%1c%1c%04d",sezione, lettera, numr); + key.format("%c%c%04d%02d",sezione, lettera, numr,numero); else - dep = format("%c%c ",sezione,lettera); - } - else - { - if (numr != 0) - dep = format("%1c%1c%04d%02d",sezione, lettera, numr,numero); - else - dep = format("%c%c %02d",sezione,lettera,numero); - } + key.format("%c%c %02d",sezione,lettera,numero); + } - tabivd.put("CODTAB", dep); - tabivd.read(); - dep2 = tabivd.get("CODTAB"); - if (dep == dep2) - TMP = tabivd.get("S0"); - else - TMP = ""; - return TMP; + return cache().get("%IVD", key, "S0"); } //Ricerca la descrizione relativa al gruppo da stampare const char* TMastrini_application::descrizione_gruppo() { - TLocalisamfile pconti(LF_PCON); + TString16 key; + key.format("%d", _gruppo); - pconti.zero(); - pconti.put(PCN_GRUPPO,_gruppo); - if (pconti.read() != NOERR) pconti.zero(); - TMP = pconti.get(PCN_DESCR); - return TMP; + return cache().get(LF_PCON, key, PCN_DESCR); } // Ricerca la descrizione relativa al conto da stampare const char* TMastrini_application::descrizione_conto() { - TLocalisamfile pconti(LF_PCON); + TString16 key; + key.format("%d|%d", _gruppo, _conto); - pconti.zero(); - pconti.put(PCN_GRUPPO,_gruppo); - pconti.put(PCN_CONTO,_conto); - if (pconti.read() != NOERR) pconti.zero(); - TMP = pconti.get(PCN_DESCR); - return TMP; + return cache().get(LF_PCON, key, PCN_DESCR); } const char* TMastrini_application::descrizione_sottoconto() { - TLocalisamfile pconti(LF_PCON); + TString16 key; + key.format("%d|%d|%ld", _gruppo, _conto, _sottoc); - pconti.zero(); - pconti.put(PCN_GRUPPO, _gruppo); - pconti.put(PCN_CONTO, _conto); - pconti.put(PCN_SOTTOCONTO, _sottoc); - if (pconti.read() != NOERR) pconti.zero(); - TMP = pconti.get(PCN_DESCR); - return TMP; + return cache().get(LF_PCON, key, PCN_DESCR); } // Funzione per settare tutti gli handlers della maschera principale @@ -4212,14 +3933,10 @@ bool TMastrini_application::user_create() _rel->add("FSC", "CODTAB==FASCMS", 1, LF_RMOV, 502); _cur1=add_cursor(new TCursor(_rel,"FLSCA=\" \"",2)); + open_files(LF_TAB, LF_TABCOM,LF_NDITTE, LF_UNLOC, LF_COMUNI, LF_MOV, + LF_CLIFO, LF_CAUSALI, 0); _cur2=add_cursor(new TSorted_cursor(_rel,"DESCR","FLSCA=\" \"",2)); - _nditte = new TLocalisamfile (LF_NDITTE); - _unloc = new TLocalisamfile (LF_UNLOC); - _comuni = new TLocalisamfile (LF_COMUNI); - _mov = new TLocalisamfile (LF_MOV); - _clifo = new TLocalisamfile (LF_CLIFO); - _caus = new TLocalisamfile (LF_CAUSALI); _tabivd = new TTable (TAB_IVD); _tabtpd = new TTable (TAB_TPD); _tabreg = new TTable (TAB_REG); @@ -4240,10 +3957,6 @@ bool TMastrini_application::user_create() _gia_stampata_intestazione = FALSE; - _collins = new TConfig("cg3200.ini", "Main"); - const TString& language = _collins->get("Language"); - _collins->set_paragraph(language); - return TRUE; } @@ -4251,12 +3964,6 @@ bool TMastrini_application::user_destroy() { delete _msk; delete _rel; - delete _mov; - delete _nditte; - delete _unloc; - delete _comuni; - delete _clifo; - delete _caus; delete _tabivd; delete _tabtpd; delete _tabreg; @@ -4265,14 +3972,12 @@ bool TMastrini_application::user_destroy() delete _d22; delete _d30; - delete _collins; - return TRUE; } int cg3200(int argc, char* argv[]) { TMastrini_application a; - a.run(argc, argv, "Stampa Mastrini"); + a.run(argc, argv, TR("Stampa Mastrini")); return 0; } \ No newline at end of file diff --git a/cg/cg3300.cpp b/cg/cg3300.cpp index 658881087..997d305f6 100755 --- a/cg/cg3300.cpp +++ b/cg/cg3300.cpp @@ -7,6 +7,7 @@ #include #include #include +#include #include #include #include @@ -54,9 +55,6 @@ class TStampa_allegati : public TPrintapp TSort* _sort; - TLocalisamfile * _nditte, * _alleg, * _clifo; - TTable * _tpd, * _attiv; - TDate _data_stampa; int _anno_stampa; stampe _tipo_stampa; @@ -109,8 +107,8 @@ public: void calcola(); - bool da_sommare(); - bool buono(); + bool da_sommare(const TRectype & alleg); + bool buono(const TRectype & alleg); bool lo_devo_stampare(char tipo, long codice); @@ -132,7 +130,6 @@ public: TPrintrow * get_record_fine_volume (bool) ; long cerca_codice_all(char tipo, long codcf) ; - const char * decodifica_desc_att (const TString & codatt); bool corrispettivo (const char * tipodoc); TStampa_allegati () {} @@ -169,59 +166,29 @@ const char* filler (int size) long TStampa_allegati::cerca_codice_all(char tipo, long codcf) { - TLocalisamfile& clifo = *_clifo; + TString16 key; + + key.format("%c|%ld", tipo, codcf); - clifo.zero(); - clifo.put (CLI_TIPOCF, tipo); - clifo.put (CLI_CODCF, codcf); - clifo.read(); + const TRectype & clifo = cache().get(LF_CLIFO, key); - if (clifo.good()) - { - long codice_all = clifo.get_long (CLI_CODALLEG); - return codice_all; - } + if (!clifo.empty()) + return clifo.get_long (CLI_CODALLEG); return 0L; } -const char * TStampa_allegati::decodifica_desc_att (const TString & codatt) -{ - TTable& attivita = * _attiv; - - attivita.zero(); - attivita.put ("CODTAB", codatt); - - attivita.read(); - - if (attivita.bad()) - attivita.zero(); - - TMP = attivita.get ("S0"); - - return TMP; -} - bool TStampa_allegati::corrispettivo (const char * tipodoc) { - TTable& tpd = * _tpd; TString natura_doc; bool corrisp; - tpd.zero(); - tpd.put ("CODTAB", tipodoc); - tpd.read(); - if (tpd.bad()) - tpd.zero(); + const TRectype & tpd = cache().get("%TPD", tipodoc); natura_doc = tpd.get("I0"); corrisp = tpd.get_bool ("B0"); - if ((natura_doc == "1") || (natura_doc == "9")) - if (corrisp) - return TRUE; - - return FALSE; + return corrisp && (natura_doc == "1" || natura_doc == "9"); } // -------------------------------------------------------------------- @@ -253,11 +220,7 @@ void TStampa_allegati::init_sort() bool TStampa_allegati::user_create() { - _nditte = new TLocalisamfile (LF_NDITTE); - _alleg = new TLocalisamfile (LF_ALLEG); - _clifo = new TLocalisamfile (LF_CLIFO); - _tpd = new TTable ("%TPD"); - _attiv = new TTable ("%AIS"); + open_files(LF_TABCOM, LF_NDITTE, LF_ALLEG, LF_CLIFO, 0); _RecordSort = new SortRecord; _SortRecLen = _RecordSort->RecSize(); @@ -272,11 +235,6 @@ bool TStampa_allegati::user_create() bool TStampa_allegati::user_destroy() { - delete _alleg; - delete _clifo; - delete _nditte; - delete _tpd; delete _attiv; - // delete _sort; // Adesso e' nella postprocess_print() delete _RecordSort; delete _recb; @@ -441,11 +399,13 @@ void TStampa_allegati::pulisci_alleg (int anno_dic) for (cur = 0l; cur.pos() < items; ++cur) { prn.addstatus(1); - + + const bool immesso = curr.get_bool (ALL_IMMESSO); - if (immesso) - continue; + if (immesso) + continue; + curr.zero(ALL_IMPESC); curr.zero(ALL_IVAESC); curr.zero(ALL_NIESC); @@ -473,7 +433,6 @@ void TStampa_allegati::ricalcola(int anno_dic) char tipo; long codcf; int ndoc = 0; - bool immesso; bool vendite; real imponibile; real imposta; @@ -511,7 +470,7 @@ void TStampa_allegati::ricalcola(int anno_dic) const long items = cur.items(); cur.freeze(); - TString str; str.format("Ricalcolo anno %d...", anno_dic); + TString str; str.format(TR("Ricalcolo anno %d..."), anno_dic); TProgind pi(items, str, FALSE, TRUE); const TRectype& mov_curr = cur.curr(LF_MOV); @@ -563,6 +522,7 @@ void TStampa_allegati::ricalcola(int anno_dic) all_curr.put (ALL_ANNO, anno_dic); all_curr.put (ALL_TIPOCF, tipo); all_curr.put (ALL_CODCF, codcf); + all_curr.put (ALL_CODATT, reg.get("S8")); datareg = mov_curr.get_date (MOV_DATAREG); datadoc = mov_curr.get_date (MOV_DATADOC); @@ -590,21 +550,27 @@ void TStampa_allegati::ricalcola(int anno_dic) ndoc = 0; const TRectype& rmi = cur.curr(LF_RMOVIVA); + bool all_to_save = FALSE; while (cur.next_match (LF_RMOVIVA)) { - immesso = all.get_bool (ALL_IMMESSO); - if (immesso) continue; // scarta i record immessi - int err = all.read(); - if (err != NOERR) // aggiungo un record se non presente + + if (err == NOERR) // aggiungo un record se non presente + { + if (all_curr.get_bool (ALL_IMMESSO)) + continue; // scarta i record immessi + } + else { all_curr.zero(); all_curr.put (ALL_ANNO, anno_dic); all_curr.put (ALL_TIPOCF, tipo); all_curr.put (ALL_CODCF, codcf); + all_curr.put (ALL_CODATT, reg.get("S8")); err = all.write(); } + all_to_save = TRUE; imponibile = rmi.get_real (RMI_IMPONIBILE); imposta = rmi.get_real (RMI_IMPOSTA); @@ -659,19 +625,23 @@ void TStampa_allegati::ricalcola(int anno_dic) } } // while next_match() - all.rewrite(); + if (all_to_save) + all.rewrite(); } // for cur=0; ++cur cur.freeze(FALSE); } bool TStampa_allegati::lo_devo_stampare(char tipo, long codcf) { - _clifo->curr().zero(); - _clifo->curr().put (CLI_TIPOCF, tipo); - _clifo->curr().put (CLI_CODCF, codcf); - if (_clifo->read() == NOERR) + TString16 key ; + + key.format("%c|%ld", tipo, codcf); + + const TRectype & clifo = cache().get(LF_CLIFO, key); + + if (!clifo.empty()) { - const int codice_all = _clifo->curr().get_int(CLI_ALLEG); + const int codice_all = clifo.get_int(CLI_ALLEG); if ((codice_all == 0) || (codice_all == 3) || (codice_all == 4) ) return TRUE; else @@ -682,21 +652,21 @@ bool TStampa_allegati::lo_devo_stampare(char tipo, long codcf) } -bool TStampa_allegati::da_sommare() +bool TStampa_allegati::da_sommare(const TRectype & alleg) { TString tipocf2; long codcf2; int anno2; TString codatt_dett; TString comodo; - tipocf2 = _alleg->curr().get (ALL_TIPOCF); - codcf2 = _alleg->curr().get_long (ALL_CODCF); - anno2 = _alleg->curr().get_int(ALL_ANNO); - codatt_dett = _alleg->curr().get (ALL_CODATT); + tipocf2 = alleg.get (ALL_TIPOCF); + codcf2 = alleg.get_long (ALL_CODCF); + anno2 = alleg.get_int(ALL_ANNO); + codatt_dett = alleg.get (ALL_CODATT); if (_RecordSort->codcf_dett() == -1) { - _RecordSort->compila(_alleg); + _RecordSort->compila(alleg); return TRUE; // vuol dire che e' il primo => va messo nella struttura } @@ -727,54 +697,53 @@ bool TStampa_allegati::da_sommare() // // QUI COMPILO IL RECORD B PER I FORNITORI // -bool TStampa_allegati::buono() +bool TStampa_allegati::buono(const TRectype & alleg) { - const TRectype& curr = _alleg->curr(); - if (curr.empty()) - return FALSE; - - char tipo = curr.get_char(ALL_TIPOCF); - long codcf = curr.get_long(ALL_CODCF); + if (!alleg.empty()) + { + char tipo = alleg.get_char(ALL_TIPOCF); + long codcf = alleg.get_long(ALL_CODCF); // // Se stampo i clienti scarto chi non ha codcf = "C" // - if (_tipoa_richiesto != tipo) - return FALSE; + if (_tipoa_richiesto != tipo) + return FALSE; // -------------------------------------------------------------------- // GESTIONE RECORD B // -------------------------------------------------------------------- - if ((_tipo_stampa == fornitori) || (_tipo_stampa == modulo102)) - { - if (tipo == 'B') - { - _recb->compila(_alleg); - return FALSE; - } - } + if ((_tipo_stampa == fornitori) || (_tipo_stampa == modulo102)) + { + if (tipo == 'B') + { + _recb->compila(alleg); + return FALSE; + } + } - if (_ricerca_att != "") - { - // strcpy (_RecordSort->Strutt()->codatt_dett, _alleg->curr().get (ALL_CODATT)); - const TString& dep = curr.get (ALL_CODATT); - if (_ricerca_att != dep) - return FALSE; - } + if (_ricerca_att != "") + { + // strcpy (_RecordSort->Strutt()->codatt_dett, _alleg->curr().get (ALL_CODATT)); + const TString& dep = alleg.get (ALL_CODATT); + if (_ricerca_att != dep) + return FALSE; + } - if (_anno_stampa > 0) - { - int anno = curr.get_int(ALL_ANNO); - if (anno != _anno_stampa) - return FALSE; - } + if (_anno_stampa > 0) + { + const int anno = alleg.get_int(ALL_ANNO); + if (anno != _anno_stampa) + return FALSE; + } - // se la stampa e' di controllo e voglio tutti i clienti mov. stampo tutti - if ((_destinazione_stampa == controllo) && _stampa_tutti) - return TRUE; + // se la stampa e' di controllo e voglio tutti i clienti mov. stampo tutti + if ((_destinazione_stampa == controllo) && _stampa_tutti) + return TRUE; - if (!lo_devo_stampare(tipo, codcf)) - return FALSE; + if (!lo_devo_stampare(tipo, codcf)) + return FALSE; + } return TRUE; } @@ -799,71 +768,71 @@ void TStampa_allegati::calcola () _num_cf = 0; // contatore C/F - _nditte->zero(); - _nditte->put(NDT_CODDITTA, ditta_da); - for (int err = _nditte->read(_isgteq); err == NOERR; err = _nditte->next()) + TRelation relditte(LF_NDITTE); + TRectype from(relditte.curr()); + TRectype to(relditte.curr()); + + from.put(NDT_CODDITTA, ditta_da); + to.put(NDT_CODDITTA, ditta_a); + + TCursor ditte(&relditte, "", 1, &from, &to); + const long items = ditte.items(); + const TRectype & ditta = ditte.curr(); + + ditte.freeze(); + for (ditte = 0L; ditte.pos() < items; ++ditte) { - const long nuova_ditta = _nditte->get_long(NDT_CODDITTA); - if (nuova_ditta > ditta_a) - break; + const long nuova_ditta = ditta.get_long(NDT_CODDITTA); - if (!prefix().exist(nuova_ditta)) // TBC *** fv mi sembrava ci volesse - continue; - - set_firm(nuova_ditta); + if (prefix().exist(nuova_ditta)) // TBC *** fv mi sembrava ci volesse + { + set_firm(nuova_ditta); - if (_ricalcola) - ricalcola(_anno_stampa); + if (_ricalcola) + ricalcola(_anno_stampa); - // Legge i dati anagrafici del dichiarante - _RecordSort->fill_dati_anag_dic(_nditte); + // Legge i dati anagrafici del dichiarante + _RecordSort->fill_dati_anag_dic(ditta); - // --------------------------------------------------------------------- - // ELABORAZIONE ALLEGATI - // --------------------------------------------------------------------- - _alleg->zero(); - _alleg->put (ALL_ANNO, _anno_stampa); - _alleg->put (ALL_CODCF, _tipoa_richiesto); + // --------------------------------------------------------------------- + // ELABORAZIONE ALLEGATI + // --------------------------------------------------------------------- + TRelation relalleg(LF_ALLEG); + TRectype from(relalleg.curr()); - TProgind prnd(_alleg->items(), "Elaborazione allegati in corso...", FALSE, TRUE); + from.put (ALL_ANNO, _anno_stampa); + from.put (ALL_TIPOCF, _tipoa_richiesto); + if (_ricerca_att != "") + from.put(ALL_CODATT, _ricerca_att); + TCursor alleg(&relalleg, "", _distingui_att ? 1 : 2, &from, &from); + const long items = alleg.items(); + const TRectype & recalleg = alleg.curr(); - if (_ricerca_att != "") - _alleg->curr().put (ALL_CODATT, _ricerca_att); + alleg.freeze(); + + TProgind prnd(items, TR("Elaborazione allegati in corso..."), FALSE, TRUE); - if (_distingui_att) - _alleg->setkey (1); - else - _alleg->setkey (2); // non distinguo le attivita + for (alleg = 0L; alleg.pos() < items; ++alleg) + { + prnd.addstatus(1); - for (int err = _alleg->read(_isgteq); err == NOERR; err = _alleg->next()) - { - prnd.addstatus(1); - - if (buono()) - { - if (da_sommare ()) - _RecordSort->somma(_alleg->curr(), _tipo_stampa); // somma nella struttura - else - { - if (!_RecordSort->importo().is_zero()) - { - _sort->sort (_RecordSort->Strutt_str()); - _num_cf += 1; // incremento contatore numero di C/F - } - _t->incrementa_totali(_RecordSort->Strutt(), _tipo_stampa); - _RecordSort->compila(_alleg->curr()); - } - } // if buono() - } - // Sorta anche l'ultimo: BESTIA! - if (!_RecordSort->importo().is_zero()) - { - _sort->sort (_RecordSort->Strutt_str()); - _num_cf += 1; // incremento contatore numero di C/F - } - - // rimetto all'inizio il puntatore di _alleg dopo averlo scorso tutto una volta - _alleg->first(); + if (buono(recalleg)) + { + if (da_sommare (recalleg)) + _RecordSort->somma(recalleg, _tipo_stampa); // somma nella struttura + else + { + if (!_RecordSort->importo().is_zero()) + { + _sort->sort (_RecordSort->Strutt_str()); + _num_cf += 1; // incremento contatore numero di C/F + } + _t->incrementa_totali(_RecordSort->Strutt(), _tipo_stampa); + _RecordSort->compila(recalleg); + } + } // if buono() + } + } } // for su nditte // @@ -1163,7 +1132,7 @@ void TStampa_allegati::set_rows(int counter) bool TStampa_allegati::preprocess_page(int file,int counter) { static long codditta_curr; - static TFixed_string codatt_curr(" "); // Sono 5 spazi + static TString16 codatt_curr(" "); // Sono 5 spazi struct alleg_sort * buff = (struct alleg_sort *) _buff; int pagina_corrente = printer().getcurrentpage(); @@ -1409,25 +1378,6 @@ bool TStampa_allegati::intesta() return TRUE; } -/****************** - const char * TStampa_allegati::get_paiva_cf (const char * tipoa, long codcf) - { - TString dep; - - _clifo->setkey(1); - _clifo->first (); - _clifo->curr().zero(); - _clifo->curr().put (CLI_TIPOCF, tipoa); - _clifo->curr().put (CLI_CODCF, codcf); - _clifo->read(); - if (_clifo->good()) - dep = _clifo->curr().get(CLI_PAIV); - else - dep = ""; - return dep; - } - ******************/ - // ---------------------------------------------------------------------- // // STAMPA SU DISCO @@ -1972,14 +1922,14 @@ void TStampa_allegati::scrivi_coda_elenco_fornitori() segno[5] = ' '; if (_t->TotE8esc() < 0) - segno[8] = '-'; + segno[6] = '-'; else - segno[8] = ' '; + segno[6] = ' '; if (_t->TotE8esp() < 0) - segno[8] = '-'; + segno[7] = '-'; else - segno[8] = ' '; + segno[7] = ' '; if (_t->TotTotRigac() < 0) segno[8] = '-'; @@ -2228,8 +2178,7 @@ TPrintrow * TStampa_allegati::get_record_fine_volume (bool finito) int cg3300(int argc, char* argv[]) { TStampa_allegati a; - a.run(argc, argv, "Stampa Allegati"); + a.run(argc, argv, TR("Stampa Allegati")); return 0; } - diff --git a/cg/cg3300.h b/cg/cg3300.h index a39b6f240..e0b57684a 100755 --- a/cg/cg3300.h +++ b/cg/cg3300.h @@ -117,32 +117,23 @@ struct alleg_sort { }; class SortRecord { - TLocalisamfile * _clifo; - TLocalisamfile * _comuni; - TLocalisamfile * _anagfis; - TLocalisamfile * _anaggiu; - TLocalisamfile * _anag; - TTable * _attiv; - TTable * _tpd; struct alleg_sort * _all; protected: - TRectype& look_com(const char *); - long cerca_codice_all(char tipo, long codcf) ; + const TRectype & look_com(const char * cod); const char * decodifica_desc_att (const TString & codatt); - bool corrispettivo (const char * tipodoc); public: - void azzera_struttura(); - bool fill_dati_anag_dic (TLocalisamfile *); + void azzera_struttura(); + bool fill_dati_anag_dic (const TRectype & ditta); const char * fill_dati_dettaglio (const char * tipo, long codcf); const char * Strutt_str() { return (const char *) _all; } struct alleg_sort * Strutt() { return _all; } - void compila(const TRectype& alleg); - void somma (const TRectype& rec, stampe); + void compila(const TRectype& alleg); + void somma (const TRectype& rec, stampe); const real& importo() const { return _all->impesc; } - int RecSize () { return sizeof(struct alleg_sort); } - long codcf_dett() { return _all->codcf_dett; } + int RecSize () { return sizeof(struct alleg_sort); } + long codcf_dett() { return _all->codcf_dett; } const real& Impesc() { return _all->impesc; } SortRecord(); diff --git a/cg/cg3300a.uml b/cg/cg3300a.uml index 1440f1d83..17ac4c9e7 100755 --- a/cg/cg3300a.uml +++ b/cg/cg3300a.uml @@ -143,12 +143,12 @@ BEGIN VALIDATE F_A_DITTA>=F_DA_DITTA END -BUTTON DLG_OK 9 2 +BUTTON DLG_OK 10 2 BEGIN PROMPT -12 -1 "" END -BUTTON DLG_CANCEL 9 2 +BUTTON DLG_CANCEL 10 2 BEGIN PROMPT -22 -1 "" END diff --git a/cg/cg3301.cpp b/cg/cg3301.cpp index ca13f6bb9..5c8400e84 100755 --- a/cg/cg3301.cpp +++ b/cg/cg3301.cpp @@ -3,9 +3,10 @@ // classi di supporto per cg3300_application // -#include +#include +#include +#include #include -#include #include #include @@ -18,12 +19,6 @@ #include "cg3300.h" -const int CODTABLEN = 15; - -#define MAXSTR 128 -static char __tmp[MAXSTR]; -static TFixed_string tmp(__tmp, MAXSTR); - // // SortRecord // @@ -31,93 +26,27 @@ static TFixed_string tmp(__tmp, MAXSTR); SortRecord::SortRecord() { _all = new struct alleg_sort; - _clifo = new TLocalisamfile(LF_CLIFO); - _comuni = new TLocalisamfile(LF_COMUNI); - _anagfis = new TLocalisamfile(LF_ANAGFIS); - _anaggiu = new TLocalisamfile(LF_ANAGGIU); - _anag = new TLocalisamfile(LF_ANAG); - _attiv = new TTable("%AIS"); - _tpd = new TTable("%TPD"); azzera_struttura(); } SortRecord::~SortRecord() { - delete _clifo; delete _comuni; delete _attiv; delete _tpd; - delete _anagfis; delete _anaggiu; delete _anag; delete _all; } -long SortRecord::cerca_codice_all(char tipo, long codcf) -{ - TLocalisamfile& clifo = *_clifo; - - clifo.zero(); - clifo.put (CLI_TIPOCF, tipo); - clifo.put (CLI_CODCF, codcf); - clifo.read(); - - if (clifo.good()) - { - long codice_all = clifo.get_long (CLI_CODALLEG); - return codice_all; - } - - return 0L; -} - const char* SortRecord::decodifica_desc_att (const TString& codatt) + { - TTable& attivita = * _attiv; - - attivita.zero(); - attivita.put ("CODTAB", codatt); - - attivita.read(); - - if (attivita.bad()) - attivita.zero(); - - tmp = attivita.get ("S0"); - - return __tmp; + return cache().get("%AIS", codatt, "S0"); } -bool SortRecord::corrispettivo (const char * tipodoc) +const TRectype & SortRecord::look_com(const char * cod) { - TTable& tpd = * _tpd; - TString natura_doc; - bool corrisp; + TString16 key; + + key.format("|%s", cod); - tpd.zero(); - tpd.put ("CODTAB", tipodoc); - tpd.read(); - if (tpd.bad()) - tpd.zero(); - - natura_doc = tpd.get("I0"); - corrisp = tpd.get_bool ("B0"); - - if ((natura_doc == "1") || (natura_doc == "9")) - if (corrisp) - return TRUE; - - return FALSE; -} - -TRectype& SortRecord::look_com (const char * cod) -{ - TLocalisamfile& com = *_comuni; - - com.zero(); - com.put (COM_COM, cod); - - com.read(); - - if (com.bad()) - com.zero(); - - return com.curr(); + return cache().get(LF_COMUNI, key); } // @@ -130,54 +59,37 @@ TRectype& SortRecord::look_com (const char * cod) // const char * SortRecord::fill_dati_dettaglio (const char * tipocf, long codcf) { - TLocalisamfile& clifo = *_clifo; - static char _rag[51]; - TString tipop, cog, nom, rag; - TString indcf, comcf; - TString stato, paiva; + TString16 key; - clifo.zero(); - clifo.put (CLI_TIPOCF, tipocf); - clifo.put (CLI_CODCF, codcf); - clifo.read(); + key.format("%s|%ld", tipocf, codcf); + const TRectype & clifo = cache().get(LF_CLIFO, key); - if ((clifo.good())) + if (!clifo.empty()) { - tipop = clifo.get (CLI_TIPOPERS); - rag = clifo.get (CLI_RAGSOC); + TString indcf; - indcf = clifo.curr().get (CLI_INDCF); - indcf << ", " << clifo.curr().get (CLI_CIVCF); - comcf = clifo.curr().get (CLI_COMCF); - - TRectype dep = look_com ((const char *)comcf); - strcpy (_all->comune_dett , dep.get(COM_DENCOM)); - strcpy (_all->prov_dett , dep.get(COM_PROVCOM)); + indcf = clifo.get (CLI_INDCF); + indcf << ", " << clifo.get (CLI_CIVCF); + strcpy (_all->via_dett, indcf); + strcpy (_all->paiva_dett, clifo.get (CLI_PAIV)); + strcpy (_all->statopaiva_dett, clifo.get (CLI_STATOPAIV)); - strcpy (_all->via_dett , indcf); + const TRectype & dep = look_com ((const char *)clifo.get (CLI_COMCF)); - paiva = clifo.curr().get (CLI_PAIV); - stato = clifo.curr().get (CLI_STATOPAIV); + strcpy (_all->comune_dett, dep.get(COM_DENCOM)); + strcpy (_all->prov_dett, dep.get(COM_PROVCOM)); - strcpy (_all->paiva_dett , paiva); - strcpy (_all->statopaiva_dett , stato); - - strcpy (_all->ragsoc_dett , rag); - - if (tipop == "F") + const TString & rag = clifo.get (CLI_RAGSOC); + if (clifo.get (CLI_TIPOPERS) == "F") { - cog = rag.left(30); - nom = rag.mid (31); - strcpy (_all->cognome_dett , cog.trim()); - strcpy (_all->nome_dett , nom.trim()); - // - // N.B. - // Azzero la ragione sociale se persona fisica. - // - strcpy (_all->ragsoc_dett , "\0"); + strcpy (_all->cognome_dett, rag.left(30)); + strcpy (_all->nome_dett, rag.mid(30)); + strcpy (_all->ragsoc_dett, ""); } - strcpy (_rag, (const char*) rag); - return _rag; + else + strcpy (_all->ragsoc_dett, rag); + + return rag; } return NULL; } @@ -331,112 +243,83 @@ void SortRecord::compila(const TRectype& alleg) fill_dati_dettaglio (tipoa, codcf); } -bool SortRecord::fill_dati_anag_dic (TLocalisamfile * nditte) +bool SortRecord::fill_dati_anag_dic (const TRectype & ditta) { - TLocalisamfile& anagfis = *_anagfis; - TLocalisamfile& anaggiu = *_anaggiu; - TLocalisamfile& anag = *_anag; - TString codanagr; - TString tipoa; - TString comodo; + long codanagr; + TString tipoa; + TString str; - _all->codditta_dic = nditte->get_long(NDT_CODDITTA); - comodo = nditte->get(NDT_CODATTPREV); + _all->codditta_dic = ditta.get_long(NDT_CODDITTA); + str = ditta.get(NDT_CODATTPREV); - strcpy (_all->codatt_dic, comodo); - if (comodo.not_empty()) - comodo = decodifica_desc_att (comodo); + str = decodifica_desc_att (str); + if (str.not_empty()) + strcpy (_all->codatt_dic, str); - if (comodo.not_empty()) - strcpy (_all->attivita_dic, comodo); - else - strcpy (_all->attivita_dic, "\0"); + strcpy (_all->attivita_dic, str); - codanagr = nditte->curr().get(NDT_CODANAGR); - tipoa = nditte->curr().get(NDT_TIPOA); + codanagr = ditta.get_long(NDT_CODANAGR); + tipoa = ditta.get(NDT_TIPOA); strcpy (_all->tipopers_dic, tipoa); - anag.setkey(1); - anag.curr().zero(); - anag.curr().put (ANA_TIPOA, tipoa); - anag.curr().put (ANA_CODANAGR, codanagr); - if (anag.read() == NOERR) - { - strcpy (_all->paiva_dic, anag.curr().get (ANA_PAIV)); - strcpy (_all->ragsoc_dic , anag.curr().get(ANA_RAGSOC)); - strcpy (_all->comunefis_dic, anag.curr().get(ANA_COMRF)); - } - else - { - strcpy (_all->paiva_dic, "\0"); - strcpy (_all->ragsoc_dic , "\0"); - strcpy (_all->comunefis_dic, "\0"); - } + TString16 key; + + key.format("%s|%ld", (const char *) tipoa, codanagr); + + const TRectype & anag = cache().get(LF_ANAG, key); + + strcpy (_all->paiva_dic, anag.get (ANA_PAIV)); + strcpy (_all->ragsoc_dic , anag.get(ANA_RAGSOC)); + strcpy (_all->comunefis_dic, anag.get(ANA_COMRF)); if (_all->comunefis_dic[0] == '\0') { - strcpy (_all->comunefis_dic, anag.curr().get(ANF_COMRES)); + strcpy (_all->comunefis_dic, anag.get(ANF_COMRES)); - TRectype dep = look_com (_all->comunefis_dic); + const TRectype & dep = look_com (_all->comunefis_dic); strcpy (_all->comunefis_dic , dep.get(COM_DENCOM)); strcpy (_all->provfis_dic , dep.get(COM_PROVCOM)); - comodo = anag.curr().get(ANA_INDRES); - comodo.rtrim(); - comodo << " " << anag.curr().get (ANA_CIVRES); - strcpy (_all->viafis_dic , (const char *) comodo); + str = anag.get(ANA_INDRES); + str << " " << anag.get(ANA_CIVRES); + strcpy (_all->viafis_dic , (const char *) str); } else { - TRectype dep = look_com (_all->comunefis_dic); + const TRectype & dep = look_com (_all->comunefis_dic); strcpy (_all->comunefis_dic, dep.get(COM_DENCOM)); strcpy (_all->provfis_dic , dep.get(COM_PROVCOM)); - comodo = anag.curr().get(ANA_INDRF); - comodo.rtrim(); - comodo << " " << anag.curr().get (ANA_CIVRF); - - strcpy (_all->viafis_dic, comodo); + str = anag.get(ANA_INDRF); + str << " " << anag.get (ANA_CIVRF); + strcpy (_all->viafis_dic, str); } + key.format("%ld", codanagr); + if (tipoa[0] == 'F') { - TString cognome, nome; + str = _all->ragsoc_dic; + strcpy (_all->cognome_dic, str.left(30)); + strcpy (_all->nome_dic, str.mid(30)); - comodo = _all->ragsoc_dic; - cognome = comodo.sub(0,29); - cognome.trim(); - strcpy (_all->cognome_dic, cognome); - - comodo = _all->ragsoc_dic; - nome = comodo.mid(30); - nome.trim(); - strcpy (_all->nome_dic, nome); - - anagfis.setkey(1); - anagfis.curr().zero(); - anagfis.curr().put (ANF_CODANAGR, codanagr); - anagfis.read(); + const TRectype &anagfis = cache().get(LF_ANAGFIS, key); - _all->datana_dic = anagfis.curr().get_date(ANF_DATANASC); - strcpy (_all->sesso_dic , anagfis.curr().get(ANF_SESSO)); + _all->datana_dic = anagfis.get_date(ANF_DATANASC); + strcpy (_all->sesso_dic, anagfis.get(ANF_SESSO)); - TRectype dep = look_com (anagfis.curr().get(ANF_COMNASC)); + const TRectype & dep = look_com (anagfis.get(ANF_COMNASC)); strcpy (_all->comunena_dic, dep.get(COM_DENCOM)); - strcpy (_all->provna_dic , dep.get(COM_PROVCOM)); + strcpy (_all->provna_dic, dep.get(COM_PROVCOM)); } else if (tipoa[0] == 'G') { // Leggo natura giuridica dal anagrafe giuridiche - anaggiu.setkey(1); - anaggiu.curr().zero(); - anaggiu.curr().put (ANG_CODANAGR, codanagr); - if (anaggiu.read() == NOERR) - _all->natgiu_dic = anaggiu.curr().get_int (ANG_NATGIU); - else - _all->natgiu_dic = 0; + const TRectype &anaggiu = cache().get(LF_ANAGGIU, key); + + _all->natgiu_dic = anaggiu.get_int(ANG_NATGIU); } return TRUE; @@ -540,7 +423,7 @@ void Array_desc_campi::leggi_modulo (const char * file, const char *modulo) } } else - error_box("Impossibile trovare la sezione '%s' sul file '%s'", modulo, file); + error_box(FR("Impossibile trovare la sezione '%s' sul file '%s'"), modulo, file); } void Array_desc_campi::add(int r, const char* f) diff --git a/cg/cg3400.cpp b/cg/cg3400.cpp index 5bc17a679..a1d8e9e27 100755 --- a/cg/cg3400.cpp +++ b/cg/cg3400.cpp @@ -53,9 +53,6 @@ HIDDEN enum tipo_sospensione { nessuna, normale, vol_affari, liquidazione }; class TContoOccas : public TBill { TString16 _occfpi; - - TDecoder _clifoccas; - TDecoder _occas; TAssoc_array _desc; public: @@ -69,8 +66,6 @@ public: }; TContoOccas::TContoOccas() - : _occfpi(NULL), _clifoccas(LF_CLIFO, CLI_OCCAS), - _occas(LF_OCCAS, "RAGSOC") { } const TContoOccas& TContoOccas::set(int g, int c, long s, char t, const char* occfpi) @@ -85,9 +80,9 @@ const TString& TContoOccas::descrizione() if (_occfpi.not_empty()) { TString16 code; code << tipo() << '|' << sottoconto(); - bool really_occas = _clifoccas.decode(code).not_empty(); + bool really_occas = cache().get(LF_CLIFO, code, CLI_OCCAS).not_empty(); if (really_occas) - return _occas.decode(_occfpi); + return cache().get(LF_OCCAS, _occfpi, "RAGSOC"); } TString16 code; code.format("%c%03d%03d%06ld", @@ -167,12 +162,9 @@ public: TString16 _provfis, _cap, _occfpi; TString80 _cofi; - TLocalisamfile *_clifo,*_pconti,*_nditte,*_anag; - - TLocalisamfile* _attiv; // da togliere in futuro (?) + TTable *_tabreg; - TDecoder *_causali, *_tabiva; // Guy: saggia aggiunta public: virtual void preprocess_header(); @@ -217,7 +209,7 @@ public: int set_totali_pagina(int r); void get_dati_ditta (); - const char* get_descr_caus (const char * codcaus); + const TString& get_descr_caus (const char * codcaus); const TRectype& look_com (const char* cod, const char* stato = ""); const TString& get_codiva_des(const char* codiva); void update_totals (char sezione, real& importo); @@ -286,9 +278,9 @@ const TRectype& TStampa_giornale::look_com (const char* cod, const char* stato) return cache().get(LF_COMUNI, codice); } -const char* TStampa_giornale::get_descr_caus (const char * codcaus) +const TString & TStampa_giornale::get_descr_caus (const char * codcaus) { - return _causali->decode(codcaus); + return cache().get(LF_CAUSALI, codcaus).get("DESCR"); } void TStampa_giornale::get_dati_ditta () @@ -296,30 +288,25 @@ void TStampa_giornale::get_dati_ditta () TString16 codanagr; char tipoa; - _nditte->zero(); - _nditte->put(NDT_CODDITTA, get_firm()); - _nditte->read(); + const TRectype & nditte = cache().get(LF_NDITTE, get_firm()); - if (_nditte->bad()) _nditte->zero(); + _ragsoc = nditte.get(NDT_RAGSOC); + codanagr = nditte.get(NDT_CODANAGR); + tipoa = nditte.get_char(NDT_TIPOA); - _ragsoc = _nditte->get(NDT_RAGSOC); - codanagr = _nditte->curr().get(NDT_CODANAGR); - tipoa = _nditte->curr().get_char(NDT_TIPOA); + TToken_string key ; - _anag->setkey(1); - _anag->zero(); - _anag->put (ANA_TIPOA, tipoa); - _anag->put (ANA_CODANAGR, codanagr); - _anag->read(); - if (_anag->bad()) _anag->zero(); + key.add(tipoa); + key.add(codanagr); + const TRectype & anag = cache().get(LF_ANAG, key); - _cofi = _anag->get(ANA_COFI); - _paiva = _anag->get(ANA_PAIV); - _comunefis = _anag->get(ANA_COMRF); - _cap = _anag->get(ANA_CAPRF); + _cofi = anag.get(ANA_COFI); + _paiva = anag.get(ANA_PAIV); + _comunefis = anag.get(ANA_COMRF); + _cap = anag.get(ANA_CAPRF); if (_comunefis.empty()) - _comunefis = _anag->get(ANF_COMRES); + _comunefis = anag.get(ANF_COMRES); const TRectype& dep = look_com(_comunefis); _comunefis = dep.get(COM_DENCOM); @@ -329,15 +316,15 @@ void TStampa_giornale::get_dati_ditta () if (_comunefis.empty()) { - _viafis = _anag->get(ANA_INDRF); + _viafis = anag.get(ANA_INDRF); _viafis.rtrim(); - _viafis << ' ' << _anag->curr().get (ANA_CIVRF); + _viafis << " " << anag.get (ANA_CIVRF); } else { - _viafis = _anag->get(ANA_INDRES); + _viafis = anag.get(ANA_INDRES); _viafis.rtrim(); - _viafis << ' ' << _anag->get (ANA_CIVRES); + _viafis << " " << anag.get (ANA_CIVRES); } } @@ -352,15 +339,10 @@ bool TStampa_giornale::user_create() { _ae = 0; _ae_solare = 0; + open_files(LF_TABCOM, LF_TAB, LF_NDITTE, LF_ANAG, LF_COMUNI, LF_CLIFO, LF_PCON, LF_OCCAS, 0); _tabreg = new TTable ("REG"); - _tabiva = new TDecoder("%IVA"); - - _nditte = new TLocalisamfile(LF_NDITTE); - _anag = new TLocalisamfile (LF_ANAG); - _clifo = new TLocalisamfile(LF_CLIFO); - _pconti = new TLocalisamfile(LF_PCON); - _attiv = new TLocalisamfile(LF_ATTIV); // da togliere - _causali = new TDecoder(LF_CAUSALI, "DESCR"); + + _rel = new TRelation (LF_MOV); _rel->add (LF_RMOV, "NUMREG==NUMREG"); @@ -386,14 +368,7 @@ bool TStampa_giornale::user_destroy() delete _RecPartoDa; delete _RecArrivoA; - delete _clifo; delete _pconti; - delete _nditte; delete _anag; delete _tabreg; - delete _tabiva; - delete _causali; - - delete _attiv; // da togliere in futuro - return TRUE; } @@ -402,13 +377,10 @@ void TStampa_giornale::aggiorna_mov() TLocalisamfile& mov = _cur->file(LF_MOV); long nprog = _nprog_da + 1; -// const TRectype da(*_RecPartoDa); -// const TRectype a(*_RecArrivoA); -// _cur->setregion(da, a); _cur->setregion(*_RecPartoDa, *_RecArrivoA); const long items = _cur->items(); - TProgind prnd (items, "Aggiornamento movimenti ...", FALSE, TRUE); + TProgind prnd (items, TR("Aggiornamento movimenti ..."), FALSE, TRUE); for ((*_cur) = 0L; _cur->pos() < items; ++(*_cur)) { @@ -431,15 +403,13 @@ int TStampa_giornale::set_totali_giorno(const TDate& data, const int righeiva) const int SHIFT = 15; const int STACC = 51 + SHIFT; -// r = righeiva == 0 ? 1 : righeiva + 1; - // Se e' l'unico totale lo stampo anche se e' zero if (competenza_ec() || (_tot_avere_gg != ZERO || _tot_dare_gg != ZERO)) { TString80 td; real2currency(td, _tot_dare_gg); TString80 ta; real2currency(ta, _tot_avere_gg); - sprintf(dep, "@b@%dgTotale operazioni del %s @%dg%c %s @%dg%c @%dg%s", + sprintf(dep, FR("@b@%dgTotale operazioni del %s @%dg%c %s @%dg%c @%dg%s"), _stampa_width == 132 ? SCRITTA : DARE198-STACC, data.string(), _stampa_width == 132 ? TOTDARE132 : DARE198-2, @@ -460,7 +430,7 @@ int TStampa_giornale::set_totali_giorno(const TDate& data, const int righeiva) TString80 tdp; real2currency(tdp, _tot_dare_gg_ap); TString80 tap; real2currency(tap, _tot_avere_gg_ap); - sprintf (dep, "@b@%dgTotale operazioni del %s Anno precedente @%dg%c %s @%dg%c @%dg%s", + sprintf (dep, FR("@b@%dgTotale operazioni del %s Anno precedente @%dg%c %s @%dg%c @%dg%s"), _stampa_width == 132 ? SCRITTA : DARE198-STACC, data.string(), _stampa_width == 132 ? TOTDARE132 : DARE198-2, @@ -482,7 +452,7 @@ int TStampa_giornale::set_totali_giorno(const TDate& data, const int righeiva) void TStampa_giornale::postclose_print() { - if (_stampa_definitiva && yesno_box("La stampa e' corretta?")) + if (_stampa_definitiva && yesno_box(TR("La stampa e' corretta?"))) { const int ultima_fatta = _pagine_contate; aggiorna_mov(); @@ -518,10 +488,6 @@ void TStampa_giornale::preprocess_footer() // 2. Sono sull'ultima riga // -/* - const bool riporta = _forza_ariportare || - (!_gia_settato_ariportare && _cur->pos() < _cur->items()-1 ); -*/ const int riporta = _devo_riportare; if (riporta) @@ -533,8 +499,7 @@ void TStampa_giornale::preprocess_footer() riga.format ("@b@%dg%s@%dg%c %s @%dg%c @%dg%s", _stampa_width == 132 ? SCRITTA : DARE198-STUMB, -// (_nuovo_mese && !_forza_ariportare) ? "Totale progressivi generali " : "A riportare ", - "A riportare ", + TR("A riportare "), _stampa_width == 132 ? TOTDARE132 : DARE198, 'D', (const char *) dts, @@ -578,7 +543,7 @@ int TStampa_giornale::set_totali_pagina(int righe) real2currency(progr_dare, _tot_dare_progr); real2currency(progr_avere, _tot_avere_progr); riga = ""; - riga.format("@b@%dgTotale progressivi @%dg%c %s @%dg%c @%dg%s", + riga.format(FR("@b@%dgTotale progressivi @%dg%c %s @%dg%c @%dg%s"), _stampa_width == 132 ? SCRITTA : DARE198-STUMB, _stampa_width == 132 ? TOTDARE132 : DARE198-2, 'D', @@ -593,7 +558,7 @@ int TStampa_giornale::set_totali_pagina(int righe) if (ap) { - riga.format("@b@%dgTotale progressivi anno precedente @%dg%c %s @%dg%c @%dg%s", + riga.format(FR("@b@%dgTotale progressivi anno precedente @%dg%c %s @%dg%c @%dg%s"), _stampa_width == 132 ? SCRITTA : DARE198-STUMB, _stampa_width == 132 ? TOTDARE132 : DARE198-2, 'D', @@ -612,7 +577,7 @@ int TStampa_giornale::set_totali_pagina(int righe) real2currency(dts, _tot_dare_generale); real2currency(ats, _tot_avere_generale); - riga.format("@b@%dgTotale progressivi generali @%dg%c %s @%dg%c @%dg%s", + riga.format(FR("@b@%dgTotale progressivi generali @%dg%c %s @%dg%c @%dg%s"), _stampa_width == 132 ? SCRITTA : DARE198-STUMB, _stampa_width == 132 ? TOTDARE132 : DARE198-2, 'D', @@ -643,7 +608,7 @@ int TStampa_giornale::set_totali_pagina(int righe) // "Se il mese e' finito devo scrivere Totale progressivi generali // invece che A riportare" - riga.format ("@b@%dgTotale progressivi generali @%dg%c %s @%dg%c @%dg%s", + riga.format (FR("@b@%dgTotale progressivi generali @%dg%c %s @%dg%c @%dg%s"), _stampa_width == 132 ? SCRITTA : DARE198-STUMB, _stampa_width == 132 ? TOTDARE132 : DARE198-2, 'D', @@ -668,22 +633,22 @@ int TStampa_giornale::stampa_intestazione_ditta() riga.fill('-'); set_header(r, riga); - set_header (++r, "Ditta: %5ld %-.50s %.35s %.5s %.20s %.2s", + set_header (++r, FR("Ditta: %5ld %-.50s %.35s %.5s %.20s %.2s"), get_firm(), (const char *)_ragsoc, (const char *)_viafis, (const char *)_cap, (const char *)_comunefis, (const char *)_provfis); if (_stampa_definitiva) - intes.format ("Partita iva %s @24gCodice fiscale %s", + intes.format (FR("Partita iva %s @24gCodice fiscale %s"), (const char*)_paiva, (const char*)_cofi, _stampa_width == 132 ? 102 : 168 ); else - intes.format ("Partita iva %s @24gCodice fiscale %s @%dg%s @%dgData @>", + intes.format (FR("Partita iva %s @24gCodice fiscale %s @%dg%s @%dgData @>"), (const char*)_paiva, (const char*)_cofi, _stampa_width == 132 ? 102 : 168, - "LIBRO DI PROVA", + FR("LIBRO DI PROVA"), _stampa_width == 132 ? 117 : 183 ); @@ -705,9 +670,9 @@ int TStampa_giornale::set_headers() r += 2; if (_stampa_definitiva) - set_header(r++, "Codice libro: %s %s ",(const char *) _reg_cod, (const char *) _reg_descr); + set_header(r++, FR("Codice libro: %s %s "),(const char *) _reg_cod, (const char *) _reg_descr); else - set_header(r++, "Codice libro: %s %s @%dgdalla data: %s alla data: %s @%dgEsercizio: %04d", + set_header(r++, FR("Codice libro: %s %s @%dgdalla data: %s alla data: %s @%dgEsercizio: %04d"), (const char *) _reg_cod, (const char *) _reg_descr, _stampa_width == 132 ? 69 : 135, (const char *) data_da, (const char *) data_a, @@ -719,33 +684,32 @@ int TStampa_giornale::set_headers() set_header(r++, riga); if (_libro_cronologico) - set_header(r, "@59gCodice Conto"); + set_header(r, FR("@59gCodice Conto")); if (!_stampa_definitiva) { if (_stampa_width == 132) { set_header(r++, "@131gS"); - set_header(r, "@1gN.riga"); + set_header(r, FR("@1gN.riga")); } else { set_header(r++, "@197gS"); - set_header(r, "@1gN.riga"); + set_header(r, FR("@1gN.riga")); } } else if (_libro_cronologico) r++; // NON LASCIARE RIGHE IN BIANCO!! - // set_header(r, "@6gCod.Causale@34gDescrizione operazione"); - set_header(r, "@8gDescrizione operazione@36gCausale"); + set_header(r, FR("@8gDescrizione operazione@36gCausale")); if (_libro_cronologico) // POSCONTO = 74; - set_header(r, "@74gGeneralita' cliente/fornitore"); + set_header(r, FR("@74gGeneralita' cliente/fornitore")); else - set_header(r, "@59gCodice Conto"); + set_header(r, FR("@59gCodice Conto")); if (_stampa_width == 132) - set_header(r, "@120gImporto"); + set_header(r, FR("@120gImporto")); else - set_header(r, "@161gDare @184gAvere"); + set_header(r, FR("@161gDare @184gAvere")); if (!_stampa_definitiva) set_header(r, _stampa_width == 132 ? "@131gB" : "@197gB"); @@ -793,7 +757,7 @@ void TStampa_giornale::preprocess_header() TString80 avere; real2currency(avere, riporto_avere); TString256 riporto; - riporto.format("@b@%dgRiporto: @%dg%c %17s @%dg%c@%dg%17s", // prima erano %15s + riporto.format(FR("@b@%dgRiporto: @%dg%c %17s @%dg%c@%dg%17s"), // prima erano %15s _stampa_width == 132 ? SCRITTA : DARE198-11, _stampa_width == 132 ? TOTDARE132 : DARE198-2, _stampa_width == 132 ? 'D' : ' ', @@ -841,23 +805,6 @@ bool TStampa_giornale::preprocess_print(int file, int counter) return TRUE; } -/*** - bool TStampa_giornale::cancel_hook() - { - int ultima_fatta = printer().getcurrentpage() - 1; - // int stampate = ultima_fatta - _pagina_da + 1; - - if (yesno_box ("Interrompo la stampa ?")) - { - if (_stampa_definitiva) - aggiorna_tabreg (ultima_fatta, ultima_fatta); - return TRUE; - } - else - return FALSE; - } - ***/ - int TStampa_giornale::righe_rimaste() const { const TPrinter& p = printer(); @@ -872,16 +819,7 @@ void TStampa_giornale::fill_page(int righe_da_stampare, int righe_iva_settate) const TPrinter& p = printer(); TString256 rigas; -// int rrr = start_riga + righe_iva_settate + 1; int r = righe_da_stampare + 1; -// int rows_left = p.rows_left(); -/* if (rows_left <= 0) - { - rows_left = p.formlen() - (p.headersize()+1) - p.footersize(); - _forza_ariportare = TRUE; - } -*/ -// int r_l = p.rows_left() - start_riga - righe_iva_settate; int r_l = p.rows_left() - righe_da_stampare; if (r_l < 0) @@ -891,8 +829,6 @@ void TStampa_giornale::fill_page(int righe_da_stampare, int righe_iva_settate) if (r_l > 0) { rigas.fill('=', _stampa_width); -// rigas.cut(_stampa_width+1); -// set_row(rrr++, "%s", (const char*) rigas); set_row(r++, "%s", (const char*) rigas); int j=0; // Calcola una specie di coefficiente angolare @@ -1084,22 +1020,22 @@ void TStampa_giornale::set_rows (int file, int counter) if (_stampa_definitiva) { - set_row(r,"Operazione n. @b%-7ld@r", _nprog_mov); - set_row(r," del @b%s@r", (const char*)datareg_str); // XX/XX/XXXX - set_row(r," doc. n. @b%-7s@r",(const char*)numdoc); - set_row(r," del @b%s@r %-50s",(const char*)datadoc_str, + set_row(r,FR("Operazione n. @b%-7ld@r"), _nprog_mov); + set_row(r,FR(" del @b%s@r"), (const char*)datareg_str); // XX/XX/XXXX + set_row(r,FR(" doc. n. @b%-7s@r"),(const char*)numdoc); + set_row(r,FR(" del @b%s@r %-50s"),(const char*)datadoc_str, (const char*)mov_descr); } else { - set_row(r,"Operazione n. @b%-7ld@r", numreg); - set_row(r," del @b%s@r", (const char*) datareg_str); - set_row(r," doc. n. @b%-7s@r", (const char*) numdoc); - set_row(r," del @b%s@r %-50s", (const char*)datadoc_str,(const char*)mov_descr); + set_row(r,FR("Operazione n. @b%-7ld@r"), numreg); + set_row(r,FR(" del @b%s@r"), (const char*) datareg_str); + set_row(r,FR(" doc. n. @b%-7s@r"), (const char*) numdoc); + set_row(r,FR(" del @b%s@r %-50s"), (const char*)datadoc_str,(const char*)mov_descr); } if (_annoEsMov != _ae) - set_row(r," Comp. %04d", _annoEsMov); + set_row(r,FR(" Comp. %04d"), _annoEsMov); if (_MovGiaStampato && !_stampa_definitiva) { @@ -1111,9 +1047,9 @@ void TStampa_giornale::set_rows (int file, int counter) if (caus.not_empty()) { const char* desc_caus = get_descr_caus(caus); - set_row(r+1, "@36gCausale %3s %-50s", (const char*) caus, desc_caus); + set_row(r+1, FR("@36gCausale %3s %-50s"), (const char*) caus, desc_caus); if (_reg.not_empty()) - set_row(r+1, " (R.IVA @b%3s@r Prot. @b%ld@r) ", (const char*)_reg,protiva); + set_row(r+1, FR(" (R.IVA @b%3s@r Prot. @b%ld@r) "), (const char*)_reg,protiva); } } break; @@ -1319,7 +1255,7 @@ int TStampa_giornale::setta_righe_descr(TParagraph_string& str, enum descr des) const TString& TStampa_giornale::get_codiva_des(const char* codiva) { - return _tabiva->decode(codiva); + return cache().get("%IVA", codiva).get("S0"); } // NB @@ -1337,12 +1273,9 @@ int TStampa_giornale::setta_righe_iva() r = j+1; TString80 impon_str; real2currency(impon_str, riga._imponibile); TString80 impos_str; real2currency(impos_str, riga._imposta); -// set_row(r, " Imponibile@15g%15r", &riga._imponibile); -// set_row(r, "@31gImposta@39g%15r", &riga._imposta); - set_row(r, " Imponibile@15g%15s", (const char*)impon_str); - set_row(r, "@35gImposta@43g%15s", (const char*)impos_str); - // set_row(r, "@58gCod.Iva@68g%3s", (const char*)riga._codiva); - set_row(r, "@64gCod.Iva %3s", (const char*)riga._codiva); + set_row(r, FR(" Imponibile@15g%15s"), (const char*)impon_str); + set_row(r, FR("@35gImposta@43g%15s"), (const char*)impos_str); + set_row(r, FR("@64gCod.Iva %3s"), (const char*)riga._codiva); const TString& codiva_des = get_codiva_des(riga._codiva); const int tipoatt = riga._tipoatt; if (_stampa_width == 132) @@ -1355,16 +1288,16 @@ int TStampa_giornale::setta_righe_iva() switch (riga._tipodet) { case 0 : - rig << "Detraibile "; + rig << TR("Detraibile "); break; case 1 : - rig << "Indetraib. su op.es. "; + rig << TR("Indetraib. su op.es. "); break; case 3 : - rig << "Passaggi interni "; + rig << TR("Passaggi interni "); break; case 9 : - rig << "Indetraibile art.19 "; + rig << TR("Indetraibile art.19 "); break; default: break; } @@ -1372,14 +1305,14 @@ int TStampa_giornale::setta_righe_iva() const int meseliq = _cur->file(LF_MOV).get_int(MOV_MESELIQ); if (meseliq > 0) - set_row(r, " Mese liq. %2d", meseliq); + set_row(r, FR(" Mese liq. %2d"), meseliq); if (tipoatt != 0) { TRegistro reg(_reg, _anno_iva); const bool att_mista_ev = reg.attivita_mista(); if (att_mista_ev) - set_row(r, " Tipo attivita' %d", tipoatt); + set_row(r, FR(" Tipo attivita' %d"), tipoatt); } } _iva_array.destroy(); @@ -1394,11 +1327,11 @@ int TStampa_giornale::setta_righe_valuta(int r) { const TString16 codvali = current_cursor()->file(LF_MOV).get(MOV_CODVALI); const TCurrency cur(corrval, codvali); - set_row(++r,"@56gValuta %3s", (const char*)codvali); + set_row(++r,FR("@56gValuta %3s"), (const char*)codvali); if (_stampa_width == 132) - set_row(r,"@89gCorr.in valuta @109g%20v", &cur); + set_row(r,FR("@89gCorr.in valuta @109g%20v"), &cur); else - set_row(r,"@119gCorr.in valuta @171g%20v", &cur); + set_row(r,FR("@119gCorr.in valuta @171g%20v"), &cur); } return r; } @@ -1410,51 +1343,42 @@ int TStampa_giornale::setta_righe_indirizzo(char tipocf, long codcf,int rdes) { TString16 prov, comcf, capcf, civcf, statocf; TString80 viacf, comune; - bool really_occas = FALSE; char tipoa; long codanagr; char riga[256]; int r = rdes; - _clifo->zero(); - _clifo->put(CLI_CODCF, codcf); - _clifo->put(CLI_TIPOCF, tipocf); + TToken_string key; + key.add(tipocf); + key.add( codcf); - const bool clifo_ok = (_clifo->read() == NOERR); + const TRectype & clifo = cache().get(LF_CLIFO, key); - if (clifo_ok) really_occas = _clifo->get_bool(CLI_OCCAS); - - if (_occfpi.not_empty() && really_occas) // => e' un occasionale... + if (_occfpi.not_empty() && clifo.get_bool(CLI_OCCAS)) // => e' un occasionale... { - TLocalisamfile occ(LF_OCCAS); + const TRectype & occ = cache().get(LF_OCCAS, _occfpi); - occ.zero(); - occ.put(OCC_CFPI, _occfpi); - if (occ.read() != NOERR) occ.zero(); - - viacf = occ.get (OCC_INDIR); - civcf = occ.get (OCC_CIV); - capcf = occ.get (OCC_CAP); - comcf = occ.get (OCC_COM); + viacf = occ.get(OCC_INDIR); + civcf = occ.get(OCC_CIV); + capcf = occ.get(OCC_CAP); + comcf = occ.get(OCC_COM); } else { - // E' possibile cio' ? - if (!clifo_ok) return r; - - viacf = _clifo->get(CLI_INDCF); - civcf = _clifo->get(CLI_CIVCF); - comcf = _clifo->get(CLI_COMCF); - capcf = _clifo->get(CLI_CAPCF); - statocf = _clifo->get(CLI_STATOCF); - tipoa = _clifo->get_char(CLI_TIPOAPER); - codanagr = _clifo->get_long(CLI_CODANAGPER); + viacf = clifo.get(CLI_INDCF); + civcf = clifo.get(CLI_CIVCF); + comcf = clifo.get(CLI_COMCF); + capcf = clifo.get(CLI_CAPCF); + statocf = clifo.get(CLI_STATOCF); + tipoa = clifo.get_char(CLI_TIPOAPER); + codanagr = clifo.get_long(CLI_CODANAGPER); } const TRectype& rec = look_com (comcf, statocf); comune = rec.get(COM_DENCOM); prov = rec.get(COM_PROVCOM); - if (comcf.empty()) comune = _clifo->get(CLI_LOCCF); + if (comcf.empty()) + comune = clifo.get(CLI_LOCCF); if (viacf.not_empty()) { @@ -1483,12 +1407,12 @@ int TStampa_giornale::setta_righe_indirizzo(char tipocf, long codcf,int rdes) TString80 comna; TString16 datana, codcomna, provna, capna, statona; - datana = _clifo->get("DATANASC"); + datana = clifo.get("DATANASC"); if (datana.not_empty()) { - codcomna = _clifo->get("COMNASC"); - statona = _clifo->get("STATONASC"); + codcomna = clifo.get("COMNASC"); + statona = clifo.get("STATONASC"); const TRectype& dep = look_com (codcomna, statona); comna = dep.get(COM_DENCOM); @@ -1521,8 +1445,6 @@ void TStampa_giornale::aggiorna_tabreg(int partito_da, int stampate) if (_tabreg->good()) { - // _tabreg->put ("I8", (long)partito_da); // partito_da = -1 se stampa OK -// _tabreg->put ("I1", (long)_pagine_stampate + stampate); // pagine stampate _tabreg->put ("I1", (long)_pagina_da + stampate); // pagine stampate _tabreg->put ("I6", _nprog_mov); // ultimo numero di riga _tabreg->put ("R1", _tot_dare_generale); @@ -1556,7 +1478,7 @@ bool TStampa_giornale::controlla_mov_aep() const TRecnotype items = _cur->items(); _cur->freeze(); - TProgind pi(items, "Controllo movimenti esercizio precedente", FALSE, TRUE); + TProgind pi(items, TR("Controllo movimenti esercizio precedente"), FALSE, TRUE); bool gia_stampati = TRUE; for (*_cur = 0L ; _cur->pos() < items; ++(*_cur)) @@ -1567,9 +1489,9 @@ bool TStampa_giornale::controlla_mov_aep() } _cur->freeze(FALSE); if (!gia_stampati) - error_box("Impossibile proseguire con la stampa:\n" + error_box(TR("Impossibile proseguire con la stampa:\n" "Esistono movimenti nell'esercizio precedente\n" - "che non sono ancora stati stampati su bollato."); + "che non sono ancora stati stampati su bollato.")); return gia_stampati; } @@ -1585,7 +1507,6 @@ bool TStampa_giornale::leggi_tabreg(const char * reg_cod, int reg_anno) _pagine_stampate = _tabreg->get_int("I1"); _pagine_numerate = _tabreg->get_int("I2"); _stampa_num_pag = _tabreg->get_bool("S11"); - // _stampa_ok = _tabreg->get_int("I8"); _nprog_da = _tabreg->get_long ("I6"); _tot_dare = _tabreg->get_real ("R1"); _tot_avere = _tabreg->get_real ("R2"); @@ -1627,7 +1548,7 @@ bool TStampa_giornale::data_a_hndl (TMask_field& f, KEY k) TEsercizi_contabili esc; if (esc.date2esc(data_a) <= 0) - return f.error_box("La data non appartiene a nessun esercizio"); + return f.error_box(TR("La data non appartiene a nessun esercizio")); app()._ae_solare = data_a.year(); app()._ae = esc.date2esc(data_a); @@ -1648,9 +1569,9 @@ bool TStampa_giornale::data_a_hndl (TMask_field& f, KEY k) if (dtda.not_empty()) { if (data_da.year() != data_a.year()) - return f.warning_box("Le date specificate non appartengono allo stesso anno"); + return f.warning_box(TR("Le date specificate non appartengono allo stesso anno")); if (data_da > data_a) - return f.warning_box("La data di partenza non puo' essere maggiore della data finale"); + return f.warning_box(TR("La data di partenza non puo' essere maggiore della data finale")); } } } // if K_ENTER @@ -1671,7 +1592,7 @@ bool TStampa_giornale::data_da_hndl(TMask_field& f, KEY k) return TRUE; if (data_da.year() != data_a.year()) - return f.error_box("Le due date non appartengono allo stesso anno"); + return f.error_box(TR("Le due date non appartengono allo stesso anno")); } if (k == K_ENTER) @@ -1684,10 +1605,10 @@ bool TStampa_giornale::data_da_hndl(TMask_field& f, KEY k) // se la stampa e' di prova DALLA_DATA e' obbligatoria if (!definitiva && !data_da.ok()) - return f.warning_box("Manca la data di partenza"); + return f.warning_box(TR("Manca la data di partenza")); if (data_da.ok() && data_da > data_a) - return f.warning_box("La data di partenza non puo' essere maggiore della data finale"); + return f.warning_box(TR("La data di partenza non puo' essere maggiore della data finale")); } return TRUE; } @@ -1717,30 +1638,12 @@ bool TStampa_giornale::mask_a_cod_reg (TMask_field& f, KEY k) a._ae = esc.date2esc(data_a); //a._ae_solare; // Anno esercizio } - const TString16 reg_cod(f.get()); - - if (reg_cod.empty()) - { - if (k == K_TAB) // Magari ci ripassa e lo inserisce - return TRUE; - else // Se e' K_ENTER mi serve davvero - return f.error_box("Manca il codice registro"); - } - + const TString16 reg_cod(f.get()); bool reg_ok = a.leggi_tabreg(reg_cod, a._ae_solare); // Output da qui della descrizione del registro e dell'anno m.set(REG_DESC, a._reg_descr); - m.set(ANNO_ESER, a._ae_solare); - /* - // CHECKTYPE NORMAL abolito! (nella maschera non ho l'anno... - if (!reg_ok) - return f.warning_box("Registro inesistente"); - - if (app()._tipo != 5) - return f.warning_box("Il registro %s per l'anno %d non e' di tipo libro giornale", - (const char *) reg_cod, a._ae); - */ + m.set(ANNO_ESER, a._ae_solare); } return TRUE; } @@ -1776,7 +1679,7 @@ bool TStampa_giornale::mask_b_warning (TMask_field& f, KEY k) { if (k == K_SPACE) { - f.warning_box("Le modifiche a questi progressivi saranno scritte nel registro"); + f.warning_box(TR("Le modifiche a questi progressivi saranno scritte nel registro")); gia_detto = TRUE; return TRUE; } @@ -1865,7 +1768,7 @@ bool TStampa_giornale::init_cursor() if (_cur->items() == 0L) { _cur->setfilter(""); - return warning_box("Non ci sono movimenti da stampare nel periodo selezionato.\nLa stampa e' annullata"); + return warning_box(TR("Non ci sono movimenti da stampare nel periodo selezionato.\nLa stampa e' annullata")); } return TRUE; @@ -1955,7 +1858,6 @@ bool TStampa_giornale::set_print(int) int cg3400 (int argc, char * argv[]) { TStampa_giornale app; - app.run(argc, argv, "Stampa libro giornale"); + app.run(argc, argv, TR("Stampa libro giornale")); return TRUE; } - diff --git a/cg/cg3400a.uml b/cg/cg3400a.uml index fad1443e3..dd5403608 100755 --- a/cg/cg3400a.uml +++ b/cg/cg3400a.uml @@ -58,11 +58,8 @@ BEGIN OUTPUT ANNO_ESER CODTAB[1,4] OUTPUT CODREG CODTAB[5,7] OUTPUT REG_DESC S0 -// OUTPUT PAGINA_DA I1 -// OUTPUT DATA_DA D0 -// OUTPUT DATA_A D1 CHECKTYPE REQUIRED - WARNING "Registro inesistente" + WARNING "Registro assente" // VALIDATE ZEROFILL_FUNC 3 FLAGS "UZ" END diff --git a/cg/cg3500.cpp b/cg/cg3500.cpp index c6e22436f..585bc19b9 100755 --- a/cg/cg3500.cpp +++ b/cg/cg3500.cpp @@ -43,7 +43,6 @@ class TStampa_riepilogo : public TPrintapp { TProgind * _prog; TSaldi_list* _lista; - TLocalisamfile* _com, * _pcn, * _clifo, * _saldi, * _nditte,* _anag; TIsamtempfile * _tmp_saldi; tipo _tp; real _prg_dare,_prg_avere,_saldo_dare,_saldo_avere,_prg_dare_tot,_prg_avere_tot,_saldo_tot; @@ -101,13 +100,15 @@ bool TStampa_riepilogo::riepilogo() cp=-1; _udata_max = 0l; - for (_pcn->first(); !_pcn->eof(); _pcn->next()) + TLocalisamfile pcn(LF_PCON); + + for (pcn.first(); !pcn.eof(); pcn.next()) { _prog->addstatus(1); - g = _pcn->get_int (PCN_GRUPPO); - c = _pcn->get_int (PCN_CONTO); - s = _pcn->get_long(PCN_SOTTOCONTO); - tipo_conto = _pcn->get_char(PCN_TMCF); + g = pcn.get_int (PCN_GRUPPO); + c = pcn.get_int (PCN_CONTO); + s = pcn.get_long(PCN_SOTTOCONTO); + tipo_conto = pcn.get_char(PCN_TMCF); TConto conto (g,c,s,tipo_conto); @@ -129,13 +130,11 @@ bool TStampa_riepilogo::riepilogo() _tmp_saldi->put(SLD_PDARE,prg_conto_dare); _tmp_saldi->put(SLD_PAVERE,prg_conto_avere); if (saldo_conto > 0.00) //va stampato in Dare - _tmp_saldi->put(SLD_PDAREPRO,saldo_conto); // W96SALDI del 10-06-96 - //_tmp_saldi->put(SLD_PDARESCA,saldo_conto); + _tmp_saldi->put(SLD_PDAREPRO,saldo_conto); // W96SALDI del 10-06-96 else { saldo_conto = saldo_conto * (-1.00); - _tmp_saldi->put(SLD_PAVEREPRO,saldo_conto); // W96SALDI del 10-06-96 - //_tmp_saldi->put(SLD_PAVERESCA,saldo_conto); + _tmp_saldi->put(SLD_PAVEREPRO,saldo_conto); // W96SALDI del 10-06-96 } _tmp_saldi->write(); esiste_conto = TRUE; @@ -176,16 +175,16 @@ bool TStampa_riepilogo::riepilogo() if ( (tipo_conto == 'C') || (tipo_conto == 'F') ) //si tratta di un conto cliente/fornitore { _udata_max = 0l; - indbil = _pcn->get_int(PCN_INDBIL); + indbil = pcn.get_int(PCN_INDBIL); esiste_sc = ricerca_cf(conto,indbil,prg_conto_dare,prg_conto_avere); if (esiste_sc) { gp = conto.gruppo(); cp = conto.conto(); } - TRecnotype recnum = _pcn->recno(); - _pcn->next(); - if (_pcn->eof()) + TRecnotype recnum = pcn.recno(); + pcn.next(); + if (pcn.eof()) { saldo_conto = prg_conto_dare - prg_conto_avere; prg_gruppo_dare += prg_conto_dare; @@ -237,14 +236,14 @@ bool TStampa_riepilogo::riepilogo() _tmp_saldi->write(); } } - _pcn->readat(recnum); + pcn.readat(recnum); continue; } } if (conto.conto() == 0) - indbil = _pcn->get_int(PCN_INDBIL); + indbil = pcn.get_int(PCN_INDBIL); if ( (conto.conto() == 0) || (conto.sottoconto() == 0) ) //e' un gruppo o un conto { @@ -299,9 +298,9 @@ bool TStampa_riepilogo::riepilogo() cp = conto.conto(); } - TRecnotype recnum = _pcn->recno(); - _pcn->next(); - if (_pcn->eof()) + TRecnotype recnum = pcn.recno(); + pcn.next(); + if (pcn.eof()) { saldo_conto = prg_conto_dare - prg_conto_avere; prg_gruppo_dare += prg_conto_dare; @@ -352,7 +351,7 @@ bool TStampa_riepilogo::riepilogo() _tmp_saldi->write(); } } - _pcn->readat(recnum); + pcn.readat(recnum); } return TRUE; } @@ -727,7 +726,7 @@ void TStampa_riepilogo::setta_riga_conto() if (_scelta == 1) { set_row(r++,"%s",(const char*)riga); - set_row(r,"**** Totali conto %3d %3d",_gconto,_cconto); + set_row(r,FR("**** Totali conto %3d %3d"),_gconto,_cconto); set_row(r,"@27g%.25s@r",(const char*)_descrconto); } @@ -754,7 +753,7 @@ void TStampa_riepilogo::setta_riga_gruppo() if (_scelta == 2) if (_tp == fine) r = 3; else r = 2; - set_row(r,"**** TOTALI GRUPPO %3d",_ggruppo); + set_row(r,FR("**** TOTALI GRUPPO %3d"),_ggruppo); set_row(r,"@27g%.25s@r",(const char*)_descrgruppo); set_row(r++,"@53g%r@73g%r@93g%r@113g%r",&_prg_dare_gruppo,&_prg_avere_gruppo,&_saldo_dare_gruppo,&_saldo_avere_gruppo); set_row(r++,"%s",(const char*)riga); @@ -769,7 +768,7 @@ void TStampa_riepilogo::setta_riga_totale() const int r = _scelta == 1 ? 8 : 6; //17/11/1995 - set_row(r, "**** TOTALE GENERALE @53g%r@73g%r", &_prg_dare_tot, &_prg_avere_tot); + set_row(r, FR("**** TOTALE GENERALE @53g%r@73g%r"), &_prg_dare_tot, &_prg_avere_tot); // Guy: 10/01/97 errore MI6125 if (_saldo_tot != 0.0) @@ -811,24 +810,14 @@ TDate TStampa_riepilogo::UltimaData(int g, int c, long s) bool TStampa_riepilogo::user_create() { - _clifo = new TLocalisamfile(LF_CLIFO); - _com = new TLocalisamfile(LF_COMUNI); - _pcn = new TLocalisamfile(LF_PCON); - _saldi = new TLocalisamfile(LF_SALDI); - _nditte = new TLocalisamfile(LF_NDITTE); - _anag = new TLocalisamfile(LF_ANAG); + open_files(LF_CLIFO, LF_COMUNI, LF_PCON, LF_SALDI, LF_NDITTE, LF_ANAG, + LF_TABCOM, LF_TAB, 0); _tmp_saldi = NULL; return TRUE; } bool TStampa_riepilogo::user_destroy() { - delete _com; - delete _pcn; - delete _clifo; - delete _saldi; - delete _nditte; - delete _anag; delete _tmp_saldi; return TRUE; } @@ -842,7 +831,9 @@ bool TStampa_riepilogo::set_print(int) _scelta = m.get_int(F_STAMPA); _richiesta = m.get_int(F_RICHIESTA); _data = m.get(F_DATASTAMPA); - _prog = new TProgind(_pcn->items(), "Elaborazione in corso...", FALSE); + TLocalisamfile pcn(LF_PCON); + + _prog = new TProgind(pcn.items(), TR("Elaborazione in corso..."), FALSE); riepilogo(); @@ -852,40 +843,22 @@ bool TStampa_riepilogo::set_print(int) return FALSE; } -TRectype& cerca_com (const char * cod, TLocalisamfile *comuni) -{ - comuni->zero(); - comuni->put(COM_COM, cod); - comuni->read(); - if (comuni->bad()) - comuni->zero(); - - return comuni->curr(); -} - void TStampa_riepilogo::get_dati_ditta() { - TLocalisamfile nditte(LF_NDITTE); - TLocalisamfile anag(LF_ANAG); TString codanagr; TString tipoa; - nditte.zero(); - nditte.put(NDT_CODDITTA, get_firm()); - nditte.read(); - - if (nditte.bad()) nditte.zero(); + const TRectype & nditte = cache().get(LF_NDITTE, get_firm()); codanagr = nditte.get(NDT_CODANAGR); tipoa = nditte.get(NDT_TIPOA); _ragsoc = nditte.get(NDT_RAGSOC); - anag.setkey(1); - anag.zero(); - anag.put (ANA_TIPOA, tipoa); - anag.put (ANA_CODANAGR, codanagr); - anag.read(); - if (anag.bad()) anag.zero(); + TToken_string key; + key.add(tipoa); + key.add(codanagr); + + const TRectype & anag = cache().get(LF_ANAG, key); _cofi = anag.get(ANA_COFI); _paiva = anag.get(ANA_PAIV); @@ -894,11 +867,15 @@ void TStampa_riepilogo::get_dati_ditta() if (_comunefis.empty()) _comunefis = anag.get(ANA_COMRES); - TRectype dep = cerca_com (_comunefis, _com); + key.cut(0); + key.add(""); + key.add(_comunefis); - _comunefis = dep.get(COM_DENCOM); - _provfis = dep.get(COM_PROVCOM); - _cap = dep.get(COM_CAPCOM); + const TRectype & com = cache().get(LF_COMUNI, key); + + _comunefis = com.get(COM_DENCOM); + _provfis = com.get(COM_PROVCOM); + _cap = com.get(COM_CAPCOM); if (_comunefis.empty()) { _viafis = anag.get(ANA_INDRF); @@ -922,15 +899,15 @@ int TStampa_riepilogo::stampa_intestazione_ditta() get_dati_ditta(); codice_ditta << get_firm(); - set_header (r, "Ditta %s %s %s %s %s %s", (const char*)codice_ditta, + set_header (r, FR("Ditta %s %s %s %s %s %s"), (const char*)codice_ditta, (const char*)_ragsoc, (const char*)_viafis, (const char*)_cap, (const char*)_comunefis, (const char*)_provfis); r++; printer().setdate(_data); - riga = "Data @< Pag. @#"; + riga = FR("Data @< Pag. @#"); riga.right_just(127); - riga.overwrite (format ("Partita iva %s Codice fiscale %s", (const char*)_paiva, (const char*)_cofi)); + riga.overwrite (format (FR("Partita iva %s Codice fiscale %s"), (const char*)_paiva, (const char*)_cofi)); set_header (r, "%s", (const char*) riga); r++; @@ -946,19 +923,19 @@ void TStampa_riepilogo::preprocess_header() r++; if (_scelta == 1) //stampa riepilogo conti - set_header(r,"*** MASTRO DI CONTO ***"); - else set_header(r,"*** MASTRO DI GRUPPO ***"); - set_header(r,"@33gCod. esercizio %d", _annoese); + set_header(r,TR("*** MASTRO DI CONTO ***")); + else set_header(r,TR("*** MASTRO DI GRUPPO ***")); + set_header(r,FR("@33gCod. esercizio %d"), _annoese); if (_richiesta == 1) - set_header(r,"@70gPROGRESSIVI ATTUALI@114gSALDO ATTUALE"); - else set_header(r,"@70gPROG. MOV. ELIMINATI@110gSALDO MOV. ELIMINATI"); + set_header(r,FR("@70gPROGRESSIVI ATTUALI@114gSALDO ATTUALE")); + else set_header(r,FR("@70gPROG. MOV. ELIMINATI@110gSALDO MOV. ELIMINATI")); r++; r++; if (_scelta == 1) - set_header(r,"SOTTOC DESCRIZIONE"); - else set_header(r,"CONTO DESCRIZIONE"); - set_header(r++,"@40gDATA ULT.MOV@68gDARE@87gAVERE@108gDARE@127gAVERE"); + set_header(r,TR("SOTTOC DESCRIZIONE")); + else set_header(r,TR("CONTO DESCRIZIONE")); + set_header(r++,FR("@40gDATA ULT.MOV@68gDARE@87gAVERE@108gDARE@127gAVERE")); riga.fill('-'); set_header(r,"%s",(const char*)riga); r++; @@ -969,7 +946,7 @@ void TStampa_riepilogo::preprocess_header() int cg3500 (int argc, char* argv[]) { TStampa_riepilogo a; - a.run(argc, argv, "Stampa riepilogo gruppi/conti"); + a.run(argc, argv, TR("Stampa riepilogo gruppi/conti")); return 0; } diff --git a/cg/cg3600.cpp b/cg/cg3600.cpp index 7d6b23cf8..1e5d64716 100755 --- a/cg/cg3600.cpp +++ b/cg/cg3600.cpp @@ -360,20 +360,15 @@ bool TBalance::find(const TBill& b, int esercizio, { CHECK(b.sottoconto() > 0L, "Sottoconto mancante"); - TLocalisamfile saldi(LF_SALDI); - TRectype& curr = saldi.curr(); - curr.put(SLD_GRUPPO, b.gruppo()); - curr.put(SLD_CONTO, b.conto()); - curr.put(SLD_SOTTOCONTO, b.sottoconto()); - curr.put(SLD_ANNOES, esercizio); - curr.put(SLD_FLSCA, FALSE); - const bool ok = saldi.read() == NOERR; - if (ok) + TString key(30); + key.format("%d||%d|%d|%ld", esercizio, b.gruppo(), b.conto(), b.sottoconto()); + const TRectype & saldi = cache().get(LF_SALDI, key); + if (!saldi.empty()) { - si.set(curr.get_char(SLD_FLAGSALINI), curr.get_real(SLD_SALDO)); - da.set('D', curr.get_real(SLD_PDARE)); - av.set('A', curr.get_real(SLD_PAVERE)); - sf.set(curr.get_char(SLD_FLAGSALFIN), curr.get_real(SLD_SALDOFIN)); + si.set(saldi.get_char(SLD_FLAGSALINI), saldi.get_real(SLD_SALDO)); + da.set('D', saldi.get_real(SLD_PDARE)); + av.set('A', saldi.get_real(SLD_PAVERE)); + sf.set(saldi.get_char(SLD_FLAGSALFIN), saldi.get_real(SLD_SALDOFIN)); } else { @@ -761,7 +756,7 @@ void TMastrino::read(const TBill& conto, cur.freeze(); TString caption(80); - caption.format("Caricamento mastrino %03d.%03d.%06ld", + caption.format(FR("Caricamento mastrino %03d.%03d.%06ld"), _conto.gruppo(), _conto.conto(), _conto.sottoconto()); TProgind pi(totrows, caption, FALSE, TRUE); @@ -776,7 +771,7 @@ void TMastrino::read(const TBill& conto, if (sec > 0.0) { TString80 msg; - msg.format("%ld records at %ld rec/sec", num_rec, long(num_rec/sec)); + msg.format(FR("%ld records at %ld rec/sec"), num_rec, long(num_rec/sec)); pi.set_text(msg); } } @@ -2092,7 +2087,7 @@ bool TColor_mask::color_handler(TMask_field& f, KEY k) bool TColor_mask::reset_handler(TMask_field& f, KEY k) { - if (k == K_SPACE && f.yesno_box("Si desidera azzerare tutti i colori?")) + if (k == K_SPACE && f.yesno_box(TR("Si desidera azzerare tutti i colori?"))) { TColor_mask& m = (TColor_mask&) f.mask(); @@ -2136,7 +2131,7 @@ TColor_mask::TColor_mask(COLOR mb, COLOR mf, COLOR cb, COLOR cf) COLOR back, fore; type2colors(*c, back, fore); TToken_string& riga = s.row(-1); - riga << "Riga " << (*c == 'M' ? "mastrino" : "contropartita"); + riga << TR("Riga ") << (*c == 'M' ? TR("mastrino") : TR("contropartita")); s.set_back_and_fore_color(back, fore, row++); } } @@ -2389,7 +2384,7 @@ void TMastrini_grid::on_grid_button() TProgind* pi = NULL; if (total > 50) - pi = new TProgind(total, "Aggiornamento contropartite ...", FALSE, TRUE, 48); + pi = new TProgind(total, TR("Aggiornamento contropartite ..."), FALSE, TRUE, 48); else begin_wait(); @@ -2420,7 +2415,7 @@ void TMastrini_grid::on_grid_button() if (sec > 0.0) { TString80 msg; - msg.format("%ld records at %ld rec/sec", step, long(step/sec)); + msg.format(FR("%ld records at %ld rec/sec"), step, long(step/sec)); pi->set_text(msg); } } @@ -2466,7 +2461,7 @@ void TMastrini_grid::on_record_button(long rec) TMailbox mail; if (mail.next_s(MSG_LN) != NULL) { - if (yesno_box("Si desidera aggiornare il mastrino?")) + if (yesno_box(TR("Si desidera aggiornare il mastrino?"))) reread(); } } @@ -2682,8 +2677,8 @@ void TGrid_mask::handler(WINDOW win, EVENT* ep) xvt_res_free_menu_tree(menu); } #else - ASK_RESPONSE r = xvt_dm_post_ask("Annulla", "Ripristina", "Salva", - "Ordinamento delle colonne"); + ASK_RESPONSE r = xvt_dm_post_ask(TR("Annulla"), TR("Ripristina"), TR("Salva"), + TR("Ordinamento delle colonne")); if (r == RESP_2) sht.reset_columns_order(); if (r == RESP_2 || r == RESP_3) @@ -2762,7 +2757,7 @@ bool TQuery_mask::esercizio_handler(TMask_field& f, KEY k) else { if (anno > 0) - return error_box("Esercizio inesistente: %d", anno); + return error_box(FR("Esercizio inesistente: %d"), anno); } } return TRUE; @@ -2788,7 +2783,7 @@ bool TQuery_mask::data_handler(TMask_field& f, KEY k) if (f.empty()) { if (codice_esercizio == 0) - return error_box("E' necessario specificare almeno una data."); + return error_box(TR("E' necessario specificare almeno una data.")); return TRUE; } @@ -2797,12 +2792,12 @@ bool TQuery_mask::data_handler(TMask_field& f, KEY k) if (codice_esercizio != 0) { if (esercizio != codice_esercizio) - ok = error_box("La data deve appartenere all'esercizio %d", codice_esercizio); + ok = error_box(FR("La data deve appartenere all'esercizio %d"), codice_esercizio); } else { if (esercizio == 0) - ok = error_box("La data deve appartenere ad un esercizio contabile"); + ok = error_box(TR("La data deve appartenere ad un esercizio contabile")); } } return ok; @@ -2867,23 +2862,8 @@ protected: virtual void on_firm_change(); public: - void open_files(int logicnum, ...); -}; -void TMastrini_video::open_files(int logicnum, ...) -{ - va_list marker; - va_start(marker, logicnum); - while (logicnum > 0) - { - if (_file.objptr(logicnum)) - NFCHECK("File gia' aperto: %d", logicnum); - else - _file.add(new TLocalisamfile(logicnum), logicnum); - logicnum = va_arg(marker, int); - } - va_end(marker); -} +}; bool TMastrini_video::create() { @@ -2968,7 +2948,7 @@ bool TMastrini_video::menu(MENU_TAG mt) int cg3600(int argc, char* argv[]) { TMastrini_video mv; - mv.run(argc, argv, "Mastrini"); + mv.run(argc, argv, TR("Mastrini")); return 0; } diff --git a/cg/cg3700.cpp b/cg/cg3700.cpp index 9eecf928a..bfe8bed20 100755 --- a/cg/cg3700.cpp +++ b/cg/cg3700.cpp @@ -44,9 +44,6 @@ enum tipo_st class TLista_fatture : public TPrintapp { - TLocalisamfile *_nditte; // File delle ditte - TDecoder *_reg; - TDecoder *_iva; TRelation* _rel; // Relazione principale int _cur1, _cur2, @@ -120,11 +117,8 @@ inline TLista_fatture& app() { return (TLista_fatture&) main_app(); } int TLista_fatture::tiporeg(const TString& reg) { TString16 s; s.format("%4d%-3s",_date_from.year(),(const char*)reg); -// _reg->put("CODTAB",s); -// if (_reg->read() == NOERR) -// return _reg->get_int("I0"); -// return 0; - return atoi(_reg->decode(s)); + + return atoi(cache().get("REG", s).get("I0")); } bool TLista_fatture::filter_func1(const TRelation *r) @@ -184,9 +178,9 @@ bool TLista_fatture::date_handler(TMask_field& f, KEY key) if (key == K_ENTER && f.empty()) { if (f.dlg() == FLD_DATE_FROM) - return f.error_box("La data di inizio e' obbligatoria."); + return f.error_box(TR("La data di inizio e' obbligatoria.")); else - return f.error_box("La data di fine e' obbligatoria."); + return f.error_box(TR("La data di fine e' obbligatoria.")); } if ((key == K_TAB && f.focusdirty()) || key == K_ENTER) @@ -198,9 +192,9 @@ bool TLista_fatture::date_handler(TMask_field& f, KEY key) if (a.ok() && da.ok()) // Solo se sono entrambi compilati { if (da > a) - return f.error_box("La data di fine deve essere maggiore della data di inizio."); + return f.error_box(TR("La data di fine deve essere maggiore della data di inizio.")); if (da.year() != a.year()) - return f.error_box("Le date devono appartenere allo stesso anno."); + return f.error_box(TR("Le date devono appartenere allo stesso anno.")); } } return TRUE; @@ -227,11 +221,11 @@ bool TLista_fatture::mix_handler(TMask_field& f, KEY key) const long l1 = m.get_long(dlg1); const long l2 = m.get_long(dlg2); if (l1 != 0L && l2 != 0L && l1 < l2) - return f.error_box("Intervallo clienti/fornitori errato."); + return f.error_box(TR("Intervallo clienti/fornitori errato.")); return TRUE; } - const TString msg(dlg1 == FLD_TO_REG ? "Intervallo registri errato." : "Intervallo causali errato."); + const TString msg(dlg1 == FLD_TO_REG ? TR("Intervallo registri errato.") : TR("Intervallo causali errato.")); const TString s1(m.get(dlg1)); const TString s2(m.get(dlg2)); if (s1.not_empty() && s2.not_empty() && s1 < s2) @@ -369,13 +363,15 @@ void TLista_fatture::set_choice_limits(TMask& m) void TLista_fatture::build_ditte_sheet() { _ditte->destroy(); - for (_nditte->first(); _nditte->good(); _nditte->next()) + TLocalisamfile nditte(LF_NDITTE); + + for (nditte.first(); nditte.good(); nditte.next()) { TToken_string* d = new TToken_string(64); d->add(" "); - const long n = _nditte->get_long(NDT_CODDITTA); + const long n = nditte.get_long(NDT_CODDITTA); d->add(n); - d->add(_nditte->get(NDT_RAGSOC)); + d->add(nditte.get(NDT_RAGSOC)); const bool unselectable = !prefix().exist(n); @@ -405,10 +401,10 @@ bool TLista_fatture::preprocess_page(int file, int counter) if (new_det || new_cr) // Stampa totali parziali { const bool is_cr = _tipo == costo_ricavo; - TString256 s("TOTALE TIPO "); + TString256 s(TR("TOTALE TIPO ")); _pr.reset(); _pr.set_style(boldstyle); - s << (is_cr ? "COSTO/RICAVO " : "INDETRAIBILITA' "); + s << (is_cr ? TR("COSTO/RICAVO ") : TR("INDETRAIBILITA' ")); s << (is_cr ? _tipocrprec : _tipodetprec); _pr.put(s,42); if (_tp_doc != 0.0) @@ -491,10 +487,10 @@ print_action TLista_fatture::postprocess_print(int file, int counter) if (_tipo != intra) { const bool is_cr = _tipo == costo_ricavo; - TString256 s("TOTALE TIPO "); + TString256 s(TR("TOTALE TIPO ")); _pr.reset(); _pr.set_style(boldstyle); - s << (is_cr ? "COSTO/RICAVO " : "INDETRAIBILITA' "); + s << (is_cr ? TR("COSTO/RICAVO ") : TR("INDETRAIBILITA' ")); s << (is_cr ? _tipocrprec : _tipodetprec); _pr.put(s,42); if (_tp_doc != 0.0) @@ -508,7 +504,7 @@ print_action TLista_fatture::postprocess_print(int file, int counter) p.print(_pr); p.print(_pr); _pr.set_style(boldstyle); - _pr.put("TOTALE GENERALE :",42); + _pr.put(TR("TOTALE GENERALE :"),42); if (_tot_doc != 0.0) _pr.put(real2string(_tot_doc),73); if (_tot_imp != 0.0) @@ -528,10 +524,10 @@ print_action TLista_fatture::postprocess_print(int file, int counter) _pr.reset(); for (int i=0; i<3; i++) p.print(_pr); - _pr.put("Cod.@57gVENDITE@92gACQUISTI",1); + _pr.put(FR("Cod.@57gVENDITE@92gACQUISTI"),1); p.print(_pr); _pr.reset(); - _pr.put("IVA Descrizione@45gImponibile@66gImposta@82gImponibile@101gImposta",1); + _pr.put(FR("IVA Descrizione@45gImponibile@66gImposta@82gImponibile@101gImposta"),1); p.print(_pr); _pr.reset(); p.print(_pr); @@ -546,7 +542,7 @@ print_action TLista_fatture::postprocess_print(int file, int counter) if (cod == "~A19") { p.print(_pr); - _pr.put("Totale ",1); + _pr.put(TR("Totale "),1); if (tot1 != 0.0) _pr.put(real2string(tot1),40); if (tot2 != 0.0) @@ -558,12 +554,12 @@ print_action TLista_fatture::postprocess_print(int file, int counter) p.print(_pr); _pr.reset(); p.print(_pr); - des = "Totale acquisti indeducibili per ART.19"; + des = TR("Totale acquisti indeducibili per ART.19"); _pr.put(des,1); } else { - des = _iva->decode(cod); + des = cache().get("%IVA", cod).get("S0"); _pr.put(cod,1); _pr.put(des,6); } @@ -583,7 +579,7 @@ print_action TLista_fatture::postprocess_print(int file, int counter) _pr.reset(); } p.print(_pr); - _pr.put("Totale Generale IVA",1); + _pr.put(TR("Totale Generale IVA"),1); if (tot1 != 0.0) _pr.put(real2string(tot1),40); if (tot2 != 0.0) @@ -603,62 +599,58 @@ void TLista_fatture::set_the_header() const long firm = get_firm(); reset_header (); - _nditte->zero(); - _nditte->put(NDT_CODDITTA, firm); - _nditte->read(); - if (_nditte->bad()) - _nditte->zero(); + const TRectype & nditte = cache().get(LF_NDITTE, firm); TDate today(TODAY); TString s(132), rw(132); TString16 s1,s2; - s = _nditte->get(NDT_RAGSOC); + s = nditte.get(NDT_RAGSOC); s1 = _date_from.string(); s2 = _date_to.string(); char c[2]={'N','D'}; - set_header (soh++, "Ditta : %ld %s@100gData@106g%s @123gPag. @#", + set_header (soh++, FR("Ditta : %ld %s@100gData@106g%s @123gPag. @#"), firm, (const char *)s, (const char *)today); - s.format("Dalla data %s Alla data %s",(const char*)s1,(const char*)s2); + s.format(FR("Dalla data %s Alla data %s"),(const char*)s1,(const char*)s2); if (_tipo == indetraibile || _tipo == costo_ricavo) { - s << "@45g Dal fornitore "; + s << FR("@45g Dal fornitore "); if (_from_cf == 0L && _to_cf == 999999L) - s << " Al fornitore"; + s << TR(" Al fornitore"); else { s << _from_cf; - s << " Al fornitore "; + s << TR(" Al fornitore "); s << _to_cf; } - s << "@94g Dal registro "; + s << FR("@94g Dal registro "); if (_from_reg.empty() && _to_reg == "~~~") - s << " Al registro"; + s << TR(" Al registro"); else { s << _from_reg; - s << " Al registro "; + s << TR(" Al registro "); s << _to_reg; } if (_tipo == costo_ricavo) { - set_header(soh++,"@50gLISTA FATTURE PER TIPO COSTO/RICAVO"); + set_header(soh++,FR("@50gLISTA FATTURE PER TIPO COSTO/RICAVO")); strncpy(c,"CR",2); } else - set_header(soh++,"@50gLISTA FATTURE CON IVA INDETRAIBILE"); + set_header(soh++,FR("@50gLISTA FATTURE CON IVA INDETRAIBILE")); } else { - set_header(soh++,"@50gLISTA FATTURE INTRACOMUNITARIE"); - s << "@45g Dal c. causale "; + set_header(soh++,FR("@50gLISTA FATTURE INTRACOMUNITARIE")); + s << FR("@45g Dal c. causale "); if (_from_cau.empty() && _to_cau == "~~~") - s << " Al c. causale"; + s << TR(" Al c. causale"); else { s << _from_cau; - s << " Al codice causale "; + s << TR(" Al codice causale "); s << _to_cau; } } @@ -667,9 +659,9 @@ void TLista_fatture::set_the_header() rw.fill('-'); set_header(soh++, (const char *) rw); - set_header(soh++, "@12gNum@21gDocumento@63gCod.@68gM@70gTipo@106gCod@110g%c@128gNum.",c[0]); - set_header(soh++, "Data reg.@12gprot.@18gData@30gNumero@37gCodice@44gRagione sociale@63gReg.@68gL@70gDoc." - "@75gTot.documento@94gImponibile@106gIva@110g%c@118gImposta@128gReg.",c[1]); + set_header(soh++, FR("@12gNum@21gDocumento@63gCod.@68gM@70gTipo@106gCod@110g%c@128gNum."),c[0]); + set_header(soh++, FR("Data reg.@12gprot.@18gData@30gNumero@37gCodice@44gRagione sociale@63gReg.@68gL@70gDoc." + "@75gTot.documento@94gImponibile@106gIva@110g%c@118gImposta@128gReg."),c[1]); set_header(soh++, (const char *) rw); set_header(soh,""); @@ -717,12 +709,12 @@ bool TLista_fatture::set_print(int m) switch (_tipo) { case costo_ricavo: - msk.set_caption("Lista fatture per costo/ricavo"); - msk.field(FLD_FROM_FOR).set_prompt("Da cli./for. "); - msk.field(FLD_TO_FOR).set_prompt("A cli./for. "); + msk.set_caption(TR("Lista fatture per costo/ricavo")); + msk.field(FLD_FROM_FOR).set_prompt(TR("Da cli./for. ")); + msk.field(FLD_TO_FOR).set_prompt(TR("A cli./for. ")); break; case intra: - msk.set_caption("Lista fatture intracomunitarie"); + msk.set_caption(TR("Lista fatture intracomunitarie")); msk.hide(-1); msk.show(-2); break; @@ -821,11 +813,10 @@ bool TLista_fatture::user_create() break; } } - _ditte = new TArray_sheet(-1, -1, -4, -4, "Selezione Ditte", - "@1|Cod.@5R|Ragione Sociale@50"); - _nditte = new TLocalisamfile(LF_NDITTE); - _reg = new TDecoder("REG", "I0"); - _iva = new TDecoder("%IVA"); + _ditte = new TArray_sheet(-1, -1, -4, -4, TR("Selezione Ditte"), + HR("@1|Cod.@5R|Ragione Sociale@50")); + open_files(LF_NDITTE, LF_TAB, LF_TABCOM, 0); + _rel = new TRelation(LF_RMOVIVA); _rel->add(LF_MOV,"NUMREG==NUMREG"); _rel->add(LF_CAUSALI,"CODCAUS==CODCAUS",1,LF_MOV); // Relazione @@ -842,11 +833,8 @@ bool TLista_fatture::user_create() bool TLista_fatture::user_destroy() { - if (_nditte) delete _nditte; if (_ditte) delete _ditte; if (_rel) delete _rel; - if (_reg) delete _reg; - if (_iva) delete _iva; return TRUE; } @@ -857,7 +845,7 @@ bool TLista_fatture::user_destroy() int cg3700(int argc, char* argv[]) { TLista_fatture lf; - lf.run(argc, argv, "Lista fatture"); + lf.run(argc, argv, TR("Lista fatture")); return 0; } diff --git a/cg/cg4.url b/cg/cg4.url deleted file mode 100755 index 237219453..000000000 --- a/cg/cg4.url +++ /dev/null @@ -1,4 +0,0 @@ -#include -#include - - diff --git a/cg/cg5.url b/cg/cg5.url deleted file mode 100755 index f563b83f3..000000000 --- a/cg/cg5.url +++ /dev/null @@ -1,4 +0,0 @@ -#include - -#include - diff --git a/cg/cg6.url b/cg/cg6.url deleted file mode 100755 index 1aa8af7fb..000000000 --- a/cg/cg6.url +++ /dev/null @@ -1,3 +0,0 @@ -#include - -#include diff --git a/cg/cgp0.url b/cg/cgp0.url deleted file mode 100755 index 5b9a20a00..000000000 --- a/cg/cgp0.url +++ /dev/null @@ -1,4 +0,0 @@ -#include -#include - - diff --git a/cg/cgp1.url b/cg/cgp1.url deleted file mode 100755 index 5b9a20a00..000000000 --- a/cg/cgp1.url +++ /dev/null @@ -1,4 +0,0 @@ -#include -#include - - diff --git a/cg/cgp2.url b/cg/cgp2.url deleted file mode 100755 index 5b9a20a00..000000000 --- a/cg/cgp2.url +++ /dev/null @@ -1,4 +0,0 @@ -#include -#include - - diff --git a/cg/trasfer.xls b/cg/trasfer.xls index b54434cc535cf63eb492edb7a8c91982613a01b3..3599f1b0124b12a8187d85386a3d647e4bace67f 100755 GIT binary patch literal 6 Ncmca`Uhu)fjQ|bE1LFVy literal 97792 zcmeFa33yz`btYQfD3ag?0VKGH;&KUsB)EYfxQi6ojfEg2Yyv=Pv1FnNHo;avG=+th zWh-i1OUAKm$!jdhwrE>QEK9QGO|}y+u(Mf?J(836#n1EXG2&!iVtwFF_RI!+gYaXuoxEA1Ah^q|O z6}V>Ms=&1f*J50ixR&5rifb9J<+!fIwF1{wxK`p?g=;mgHMl%nYjIWKT8FC|*LqwV zaBaj@gKHD6&A7JU+KOu%u3B8%an<44fvXr&6)r;#G zuH(3Fz;z?8n{eHX>rJ?B!F4OHH{&{is}ENK*GXLcxK80p;yR6M0M{8@DO|VV`VCxz zxX$7l!j;B#4%h9thH;JH8pSn+>pZTv;JO3XTXEfq>utE+j_WR5cjIEcXYjWhZ%X4y z50nq#@349T8PohMMJvFo)F+B(%1imL5aa4!#Y+7R|K9)ezw9_4`Ff-T-!mq)L6uMH zUfyROMj=~1|4!#ErMPL=v52}gf|^f*tLIRoCl#ls^M>G_MIsvEn@H1i%jeUqXMSd( z<&2^HvuFwAeJg6=G!PA|lu^`wTGh9{JNMt3mqGuR@S0ztbH?QVwUF4^=P!TWm>h_p z_De9pllttw%dz-KdSEb>_D-d|!NmFWaN286^$({<(x*qg<~#b6gWm4iIwd4Dq)wmS zt)>Q*UfXjfnH;Uwk+x@qj8tMi#2S(MVL4wjlZg@mp$aTdkh_ zUj(Hn&EO3j@G|C0#{3u`9~a|485fU#_aajy{*kyx3Xzc+TzEic)HNwHUZ0$t9G4d+ zCS)J-CXp^O<8pi))AkFKGKJ}TVsb+M^rK&tUwrT%$_W`RmiK5SA(l`?iL9lKw@47osUXP_!4t0$~qu1sY}d{a@n$GiAh_w zqWqOBd!$%8DYuA8xpwWKys5HMV$zi@D{hll)(=Pw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