diff --git a/cg/cg0400.cpp b/cg/cg0400.cpp index 907e334a0..7ac5adb0e 100755 --- a/cg/cg0400.cpp +++ b/cg/cg0400.cpp @@ -4,13 +4,13 @@ #include #include #include -#include +//#include #include #include "cg0.h" #include "cg0400.h" -#include "classpim.h" +#include "cgpim.h" #include #include @@ -202,7 +202,7 @@ const char* TProgressivi_iva::desc_iva(const TString& cod) else { TTable tab_iva("%IVA"); - TString codtab(format("%-4s", (const char*)cod)); + TString16 codtab; codtab.format("%-4s", (const char*)cod); tab_iva.zero(); tab_iva.put("CODTAB", codtab); @@ -1006,7 +1006,10 @@ int TProgressivi_iva::stampa_intestazione_ditta() r++; riga = "Data @< Pag. @#"; riga.right_just(127); - riga.overwrite (format ("Partita iva %s Codice fiscale %s", (const char*)_paiva, (const char*)_cofi)); + + TString80 dep; dep.format ("Partita iva %s Codice fiscale %s", + (const char*)_paiva, (const char*)_cofi); + riga.overwrite (dep); set_header (r, "%s", (const char*) riga); r+=3; diff --git a/cg/cg2100.cpp b/cg/cg2100.cpp index 993f71c6c..557741d5f 100755 --- a/cg/cg2100.cpp +++ b/cg/cg2100.cpp @@ -1,20 +1,17 @@ #include #include +#include #include #include #include -#include "pagament.h" +#include "cgpagame.h" #include "cg2100.h" #include "cg2102.h" #include "cg21sld.h" // Nomi dei campi -#include -#include -#include -#include #include #include diff --git a/cg/cg2101.cpp b/cg/cg2101.cpp index 79d20ebbd..d5ff60041 100755 --- a/cg/cg2101.cpp +++ b/cg/cg2101.cpp @@ -7,11 +7,6 @@ #include "cg2101.h" #include "cg2103.h" -#include -#include -#include -#include - /////////////////////////////////////////////////////////// // Movimento di prima nota /////////////////////////////////////////////////////////// diff --git a/cg/cg2101.h b/cg/cg2101.h index 0dd5bd6c3..41217f0b8 100755 --- a/cg/cg2101.h +++ b/cg/cg2101.h @@ -9,6 +9,19 @@ #include #endif +#ifndef __MOV_H +#include +#endif + +#ifndef __RMOV_H +#include +#endif + +#ifndef __RMOVIVA_H +#include +#endif + + #ifndef __CGLIB01_H class TRegistro; #endif diff --git a/cg/cg2102.cpp b/cg/cg2102.cpp index 77662ff0e..940e78f88 100755 --- a/cg/cg2102.cpp +++ b/cg/cg2102.cpp @@ -1,6 +1,6 @@ #include +#include #include -#include #include #include @@ -8,8 +8,6 @@ #include "cg2102.h" #include "cg21sld.h" -#include -#include #include /////////////////////////////////////////////////////////// diff --git a/cg/cg2102.h b/cg/cg2102.h index dc4dd85be..2ede10d7b 100755 --- a/cg/cg2102.h +++ b/cg/cg2102.h @@ -5,12 +5,12 @@ #include #endif -#ifndef __PAGAMENT_H -#include "pagament.h" +#ifndef __CGPAGAME_H +#include "cgpagame.h" #endif -#ifndef __SALDACON_H -#include "saldacon.h" +#ifndef __CGSALDAC_H +#include "cgsaldac.h" #endif #ifndef __CGLIB02_H diff --git a/cg/cg2104.cpp b/cg/cg2104.cpp index 772b1b581..d8d9bc9a0 100755 --- a/cg/cg2104.cpp +++ b/cg/cg2104.cpp @@ -3,19 +3,17 @@ // fv 24/8/94 // -------------------------------------------------------------------------- -#include "pagament.h" -#include "saldacon.h" -#include "utility.h" +#include +#include + +#include "cgpagame.h" +#include "cgsaldac.h" #include "cg2102.h" #include "cg2100.h" #include "cg21sld.h" #include -#include -#include -#include -#include #include TPagamento& TPrimanota_application::pagamento() const diff --git a/cg/cg2105.cpp b/cg/cg2105.cpp index ef99948be..fb83befd8 100755 --- a/cg/cg2105.cpp +++ b/cg/cg2105.cpp @@ -1,10 +1,11 @@ #include // Serve per DLG_NEWREC +#include #include // COlori righe #include "cg2100p.h" // Campi maschere partite e pagamenti #ifdef __EXTRA__ -#include "saldacon.h" +#include "cgsaldac.h" #include "sc0100p.h" #else #include "cg2100.h" // Campi maschere prima nota @@ -14,9 +15,6 @@ #include // Archivio causali #include // Archivio clienti/fornitori #include // Archivio movimenti di prima nota -#include // Archivio pagamenti -#include // Archivio partite -#include // Archivio scadenze /////////////////////////////////////////////////////////// // Definizione Maschera partite diff --git a/cg/cg2106.cpp b/cg/cg2106.cpp index 4d5c1f95e..7845f0df7 100755 --- a/cg/cg2106.cpp +++ b/cg/cg2106.cpp @@ -290,9 +290,6 @@ void TPrimanota_application::set_colors() // Gestione cambiamento prorata /////////////////////////////////////////////////////////// -#include -#include - bool TPrimanota_application::test_prorata() { if (iva() != iva_acquisti || !cgs().shown()) diff --git a/cg/cg2200.cpp b/cg/cg2200.cpp index ea019637a..980b2ae7d 100755 --- a/cg/cg2200.cpp +++ b/cg/cg2200.cpp @@ -10,9 +10,6 @@ #include "cglib02.h" #include -#include -#include -#include TString& add_plural(TString& s, long num, const char* name) { diff --git a/cg/cg6400.cpp b/cg/cg6400.cpp index f68f06ac5..7b2b98f3b 100755 --- a/cg/cg6400.cpp +++ b/cg/cg6400.cpp @@ -2,23 +2,21 @@ #include +#include #include -#include -#include #include #include #include -#include +#include #include #include #include -#include #include -#include "cglib04.h" #include "cg6400.h" -#include "saldacon.h" +#include "cglib04.h" +#include "cgsaldac.h" class TRic_archivi : public TApplication { @@ -36,7 +34,6 @@ class TRic_archivi : public TApplication TLocalisamfile* _scad; TLocalisamfile* _pagsca; TLocalisamfile* _tab; - TArchive _arc; TString80 TEMP; @@ -762,14 +759,14 @@ void TRic_archivi::ditta_ricevente() long TRic_archivi::leggi_tabella_tras() { - TString dep; + TString dep(16); long ditta = 0; bool agg_fatatt,agg_fatpas; TTable tab_tra ("%TRA"); tab_tra.zero(); - dep = format("%10s%05ld", (const char*) _nomeid, _dittainv); + dep.format("%10s%05ld", (const char*) _nomeid, _dittainv); tab_tra.put("CODTAB", (const char*) dep); if (tab_tra.read() == NOERR) { @@ -923,11 +920,11 @@ bool TRic_archivi::set_flag() void TRic_archivi::aggiorna_tabella() { - TString dep; + TString dep(16); TTable tab_tra ("%TRA"); tab_tra.zero(); - dep = format("%10s%05ld", (const char*) _nomeid, _dittainv); + dep.format("%10s%05ld", (const char*) _nomeid, _dittainv); tab_tra.put("CODTAB", (const char*) dep); if (tab_tra.read() == NOERR) { diff --git a/cg/cg6600.cpp b/cg/cg6600.cpp index 61cb95ab6..1f0e5e949 100755 --- a/cg/cg6600.cpp +++ b/cg/cg6600.cpp @@ -1,39 +1,32 @@ // Ricezione dati da sistema -#include -#include -#include -#include -#include +#include #include -#include -#include -#include +#include +#include #include -#include -#include #include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include +#include +#include -#include "cglib04.h" #include "cglib01.h" #include "cglib02.h" -#include "saldacon.h" +#include "cglib04.h" +#include "cgsaldac.h" #include "cg6600.h" +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + class TRic_tab : public TApplication { @@ -426,9 +419,9 @@ void TRic_tab::ricevi_causali(TString& key, char uselab) if (flag == 'N') { leggi_record_controllo(); - TString chiave; + TString16 chiave; chiave.format("%3s",(const char*) codcaus); - TString sigla (format("%c", uselab)); + TString16 sigla; sigla << uselab; str = _record.overwrite(sigla,240); str = _record.overwrite(chiave,241); _tras_file.write_control_rec(str,1024); @@ -462,9 +455,9 @@ void TRic_tab::ricevi_causali(TString& key, char uselab) } leggi_record_controllo(); - TString chiave; - chiave.format("%3s",(const char*) codcaus); - TString sigla (format("%c", uselab)); + TString16 chiave; + chiave.format("%3s", (const char*)codcaus); + TString16 sigla; sigla << uselab; str = _record.overwrite(sigla,240); str = _record.overwrite(chiave,241); _tras_file.write_control_rec(str,1024); @@ -505,9 +498,9 @@ void TRic_tab::scrivi_righe_causali(TString& codcaus, char uselab) _rcaus->write(); leggi_record_controllo(); - TString chiave; + TString16 chiave; chiave.format("%3s",(const char*) codcaus); - TString sigla (format("%c", uselab)); + TString16 sigla; sigla << uselab; str = _record.overwrite(sigla,240); str = _record.overwrite(chiave,241); _tras_file.write_control_rec(str,1024); @@ -548,9 +541,9 @@ void TRic_tab::ricevi_clifo(TString& key, char uselab) if (flag == 'N') { leggi_record_controllo(); - TString chiave; + TString16 chiave; chiave.format("%c%06ld", tipocf,codcf); - TString sigla (format("%c", uselab)); + TString16 sigla; sigla << uselab; str = _record.overwrite(sigla,240); str = _record.overwrite(chiave,241); _tras_file.write_control_rec(str,1024); @@ -597,9 +590,9 @@ void TRic_tab::ricevi_clifo(TString& key, char uselab) } leggi_record_controllo(); - TString chiave; + TString16 chiave; chiave.format("%c%06ld", tipocf, codcf); - TString sigla (format("%c", uselab)); + TString16 sigla; sigla << uselab; str = _record.overwrite(sigla,240); str = _record.overwrite(chiave,241); _tras_file.write_control_rec(str,1024); @@ -651,9 +644,9 @@ void TRic_tab::ricevi_pcon(TString& key, char uselab) if (flag == 'N') { leggi_record_controllo(); - TString chiave; + TString16 chiave; chiave.format("%03d%03d%06ld", g, c, s); - TString sigla (format("%c", uselab)); + TString16 sigla; sigla << uselab; str = _record.overwrite(sigla,240); str = _record.overwrite(chiave,241); _tras_file.write_control_rec(str,1024); @@ -701,9 +694,9 @@ void TRic_tab::ricevi_pcon(TString& key, char uselab) _pcon->write(); leggi_record_controllo(); - TString chiave; + TString16 chiave; chiave.format("%03d%03d%06ld", g, c, s); - TString sigla (format("%c", uselab)); + TString16 sigla; sigla << uselab; str = _record.overwrite(sigla,240); str = _record.overwrite(chiave,241); _tras_file.write_control_rec(str,1024); @@ -1095,9 +1088,9 @@ void TRic_tab::ricevi_movPN(TString& key, char uselab) } leggi_record_controllo(); - TString chiave; + TString16 chiave; chiave.format("%07ld", nreg); - TString sigla (format("%c", uselab)); + TString16 sigla; sigla << uselab; str = _record.overwrite(sigla,240); str = _record.overwrite(chiave,241); _tras_file.write_control_rec(str,1024); @@ -1130,7 +1123,7 @@ bool TRic_tab::occasionali(TString& ocfpi) } prog++; - chiave = format("%3s%13ld", (const char*) "RIC", prog); + chiave.format("%3s%13ld", (const char*) "RIC", prog); esiste = FALSE; ocfpi = chiave; @@ -1152,7 +1145,7 @@ bool TRic_tab::occasionali(TString& ocfpi) prog = atol(cfpi.mid(3,13)); } prog++; - chiave = format("%3s%13ld", (const char*) "RIC", prog); + chiave.format("%3s%13ld", (const char*) "RIC", prog); ocfpi = chiave; _occas->readat(rec); } @@ -1277,9 +1270,9 @@ void TRic_tab::ricevi_movIVA(TString& key, char uselab) } leggi_record_controllo(); - TString chiave; + TString16 chiave; chiave.format("%07ld", nreg); - TString sigla (format("%c", uselab)); + TString16 sigla; sigla << uselab; str = _record.overwrite(sigla,240); str = _record.overwrite(chiave,241); _tras_file.write_control_rec(str,1024); @@ -1556,7 +1549,7 @@ void TRic_tab::ricevi_movSC(TString& key, char uselab) leggi_record_controllo(); TString chiave; chiave.format("%c%03d%03d%06ld%04d%7s%04d", tipocf,gruppo,conto,codcf,anno,(const char*)numpart,nriga); - TString sigla (format("%c", uselab)); + TString16 sigla; sigla << uselab; str = _record.overwrite(sigla,240); str = _record.overwrite(chiave,241); _tras_file.write_control_rec(str,1024); diff --git a/cg/pagament.cpp b/cg/cgpagame.cpp similarity index 99% rename from cg/pagament.cpp rename to cg/cgpagame.cpp index 31706aa6a..39f2ee3b5 100755 --- a/cg/pagament.cpp +++ b/cg/cgpagame.cpp @@ -1,7 +1,9 @@ -#include +#include +#include #include -#include "pagament.h" +#include +#include "cgpagame.h" #include "cg2100.h" #include @@ -1588,6 +1590,8 @@ int TPagamento::remove(TTable& r) void TPagamento::set_rate_auto() { + TWait_cursor hourglass; + // vedi rate esistenti e tipo prima rata // deve fare riferimento ad un tipo pagamento esistente // e sensato @@ -1596,7 +1600,6 @@ void TPagamento::set_rate_auto() return; int first = _tpr > 3 ? 1 : 0; - main_app().begin_wait(); set_inizio(_datadoc); for (int v = 0; v < (in_valuta() ? 2 : 1); v++) @@ -1659,7 +1662,6 @@ void TPagamento::set_rate_auto() // risistema rate per scadenze fisse adjust_fixed_scad(); - main_app().end_wait(); } const real& TPagamento::importo_da_dividere(bool v) const @@ -1753,7 +1755,7 @@ void TPagamento::init_total(const real& ib, const real& im, const real& sp, bool void TPagamento::set_sheet(TSheet_field& sf, int sscad) { - main_app().begin_wait(); + TWait_cursor hourglass; if (_rate.items() == 0) { @@ -1830,8 +1832,6 @@ void TPagamento::set_sheet(TSheet_field& sf, int sscad) { sf.enable_cell(0, 1, abilita); // percentuale } - - main_app().end_wait(); } void TPagamento::adjust_fixed_scad() diff --git a/cg/pagament.h b/cg/cgpagame.h similarity index 98% rename from cg/pagament.h rename to cg/cgpagame.h index 68b0fea75..98ab2839c 100755 --- a/cg/pagament.h +++ b/cg/cgpagame.h @@ -1,16 +1,20 @@ -#ifndef __PAGAMENT_H -#define __PAGAMENT_H +#ifndef __CGPAGAME_H +#define __CGPAGAME_H + +#ifndef __DATE_H +#include +#endif + +#ifndef __REAL_H +#include +#endif #ifndef __MSKSHEET_H -#include -#endif - -#ifndef __RELATION_H -#include +class TSheet_field; #endif #ifndef __TABUTIL_H -#include +class TTable; #endif // Error codes for pagation diff --git a/cg/classpim.cpp b/cg/cgpim.cpp similarity index 99% rename from cg/classpim.cpp rename to cg/cgpim.cpp index 2d8ed2142..0ccff7e4f 100755 --- a/cg/classpim.cpp +++ b/cg/cgpim.cpp @@ -1,8 +1,10 @@ -// classpim.cpp -// funzione per classificare i PIM e sommare tutto cio' che contengono -#include "classpim.h" #include +#include + +// funzione per classificare i PIM e sommare tutto cio' che contengono +#include "cgpim.h" + bool classify_pim(TRectype& pimr, real& imp, real& iva, tiporec& t, bool tipost) { static int last_checked = -1; diff --git a/cg/classpim.h b/cg/cgpim.h similarity index 98% rename from cg/classpim.h rename to cg/cgpim.h index c8fb66c5f..6ef17d768 100755 --- a/cg/classpim.h +++ b/cg/cgpim.h @@ -1,11 +1,11 @@ // classpim.h // funzioni ed enum per classificare i pim -#ifndef __CLASSPIM_H -#define __CLASSPIM_H +#ifndef __CGPIM_H +#define __CGPIM_H #ifndef __ISAM_H -#include +class TRectype; #endif #ifndef __REAL_H diff --git a/cg/saldacon.cpp b/cg/cgsaldac.cpp similarity index 99% rename from cg/saldacon.cpp rename to cg/cgsaldac.cpp index f9989005e..7688b3468 100755 --- a/cg/saldacon.cpp +++ b/cg/cgsaldac.cpp @@ -2,12 +2,10 @@ #include #include -#include "saldacon.h" +#include "cgsaldac.h" #include #include -#include -#include /////////////////////////////////////////////////////////// // TTree_rectype diff --git a/cg/saldacon.h b/cg/cgsaldac.h similarity index 98% rename from cg/saldacon.h rename to cg/cgsaldac.h index fad6dce87..db5d08e6a 100755 --- a/cg/saldacon.h +++ b/cg/cgsaldac.h @@ -1,5 +1,5 @@ -#ifndef __SALDACON_H -#define __SALDACON_H +#ifndef __CGSALDAC_H +#define __CGSALDAC_H #ifndef __RECARRAY_H #include @@ -13,6 +13,15 @@ #include #endif +#ifndef __SCADENZE_H +#include +#endif + +#ifndef __PAGSCA_H +#include +#endif + + class TTree_rectype : public TRectype { protected: