diff --git a/ca/ca3300.cpp b/ca/ca3300.cpp index 80a6ac1cc..79c5903f1 100755 --- a/ca/ca3300.cpp +++ b/ca/ca3300.cpp @@ -1,7 +1,9 @@ #include #include +#include #include +#include #include "movana.h" #include "pconana.h" #include "rmovana.h" @@ -409,22 +411,32 @@ TReport_bilancio_verifica::TReport_bilancio_verifica(const char* name) // TRecordset_sezioni_contapposte //////////////////////////////////////////////////////// +struct TSaldo_contrapposto : public TObject +{ + TString _conto; + TImporto _saldo; +}; + class TRecordset_sezioni_contrapposte : public TRecordset { char _tipo_piano; TAnal_bill _filter; TDate _da_data, _a_data; - int _tipimov; + word _tipimov; bool _movimentati, _nonnulli; - TString_array _attivita, _passivita, _costi, _ricavi; + TArray _attivita, _passivita, _costi, _ricavi; // Elenco di saldi contrapposti TRecnotype _pos; - TRecordset_column_info _info[4]; - protected: TRecnotype items_ap() const; TRecnotype items_cr() const; + virtual const TVariant& get_fld(const TArray& a, int r, const char* field) const; + + TArray& conti(int indbil); + void add_conto(const TString& b, const TImporto& i, TArray& a, int n = -1); + void add_conto(int indbil, const TString& b); + void calcola_totali(); public: virtual TRecnotype items() const; @@ -434,11 +446,12 @@ public: virtual unsigned int columns() const; virtual const TRecordset_column_info& column_info(unsigned int column) const; - virtual const TVariant& get(unsigned int column) const; + virtual const TVariant& get(unsigned int column) const { return NULL_VARIANT; } virtual const TVariant& get(const char* field) const; void set_filter(char piano, const char* costo, const char* commessa, const char* fase, const TDate& dal, const TDate& al, word tipimov, bool movimentati, bool nonnulli); + char tipo_piano() const { return _tipo_piano; } TRecordset_sezioni_contrapposte(char tipo_piano) : _tipo_piano(tipo_piano) { } }; @@ -470,8 +483,8 @@ void TRecordset_sezioni_contrapposte::set_filter(char piano, const char* costo, _a_data = al; _tipimov = tipimov; - _movimentati = movimentati; - _nonnulli = nonnulli; + _movimentati = false; // movimentati; + _nonnulli = false; // nonnulli; _filter.reset(); _filter.set_costo(costo); @@ -479,48 +492,250 @@ void TRecordset_sezioni_contrapposte::set_filter(char piano, const char* costo, _filter.set_fase(fase); } +TArray& TRecordset_sezioni_contrapposte::conti(int indbil) +{ + TArray* ptar = NULL; + switch (indbil) + { + case 1: ptar = &_attivita; break; + case 2: ptar = &_passivita; break; + case 3: ptar = &_costi; break; + case 4: ptar = &_ricavi; break; + default: CHECKD(0, "Indicatore di bilancio errato:", indbil); break; + } + return *ptar; +} + +void TRecordset_sezioni_contrapposte::add_conto(const TString& b, const TImporto& i, + TArray& a, int n) +{ + TSaldo_contrapposto* sc = new TSaldo_contrapposto; + sc->_conto = b; + sc->_saldo = i; + if (n < 0) + a.add(sc); + else + a.insert(sc, n); +} + +void TRecordset_sezioni_contrapposte::add_conto(int indbil, const TString& b) +{ + if (indbil >= 1 && indbil <= 4) + { + TAnal_bill bill(_filter); + bill.set_conto(b); + const TSaldanal& sa = ca_saldo(bill, _da_data, _a_data, _tipimov); + if (!sa._fin.is_zero()) + { + TArray& a = conti(indbil); + add_conto(b, sa._fin, a); + } + } +} + +void TRecordset_sezioni_contrapposte::calcola_totali() +{ + const int logicnum = _tipo_piano == 'A' ? LF_PCONANA : LF_PCON; + const TMultilevel_code_info& info = ca_multilevel_code_info(logicnum); + const int break_level = info.levels()-1; + + int maxlen[4]; // I livelli intermedi sono al massimo 3 ma facciamo conto pari + for (int level = 0; level < break_level; level++) + maxlen[level] = info.total_len(level); + + // Scandisce tutti i 4 array dei conti + for (int indbil = 1; indbil <= 4; indbil++) + { + TArray& a = conti(indbil); + if (!a.empty()) + { + TImporto totale[4]; // Totali dei 3 livelli intermedi (4 per fare conto pari) + TString80 last_conto; + + // Inserisci sentinella per far scattare il cambio del conto sull'ultimo record + a.insert(new TSaldo_contrapposto, 0); + for (int i = a.last(); i >= 0; i--) + { + const TSaldo_contrapposto& sc = (const TSaldo_contrapposto&)a[i]; + if (last_conto.not_empty()) + { + for (int level = break_level-1; level >= 0; level--) + { + const int cut = maxlen[level]; + if (sc._conto.compare(last_conto, cut) != 0) + { + const TString& intermedio = last_conto.left(cut); + add_conto(intermedio, totale[level], a, i+1); + totale[level].reset(); + } + else + break; + } + } + last_conto = sc._conto; + for (int l = 0; l < break_level; l++) + totale[l] += sc._saldo; + } + a.destroy(0, true); // Elimina sentinella + } + } +} void TRecordset_sezioni_contrapposte::requery() { - TPconana_recordset pconana(_tipo_piano); - pconana.set_filter(_tipo_piano, NULL, NULL, _filter.costo(), _filter.commessa(), _filter.fase(), - _da_data, _a_data, _tipimov, _movimentati, _nonnulli); + // Crea recordset del piano dei conti appropriato + TString query = "USE PCON"; + if (_tipo_piano == 'A') + query << "ANA"; + TISAM_recordset pconana(query); - int indicatore_bilancio = 1; + TProgind pi(pconana.items(), TR("Elaborazione conti"), true, true); + + TString80 conto; + int indicatore_bilancio = 0; + + const TMultilevel_code_info& info = ca_multilevel_code_info(LF_PCONANA); + const int maxlen = info.total_len(4); // Calcola lunghezza livello massimo dei conti + + // Scandisce il piano dei conti considerando solo quelli di livello piu' basso for (TRecnotype i = 0; pconana.move_to(i); i++) { - const int ib = pconana.get(PCONANA_INDBIL).as_int(); - if (ib >= 1 && ib <= 4) - indicatore_bilancio = ib; + pi.addstatus(1); + if (pi.iscancelled()) + break; - const TString& conto = pconana.get(PCONANA_CODCONTO).as_string(); - switch (indicatore_bilancio) + if (_tipo_piano == 'C') { - case 1: _attivita.add(conto); break; - case 2: _passivita.add(conto); break; - case 3: _costi.add(conto); break; - case 4: _ricavi.add(conto); break; - default: break; + const int g = pconana.get(PCN_GRUPPO).as_int(); + const int c = pconana.get(PCN_CONTO).as_int(); + const long s = pconana.get(PCN_SOTTOCONTO).as_int(); + const TBill b(g, c, s); + if (s == 0 || !b.is_analitico()) + continue; // Ignora tutti i gruppi e conti, ignora sottoconti non analitici + conto = b.string(0x8); + indicatore_bilancio = b.indicatore_bilancio(); } + else + { + conto = pconana.get(PCONANA_CODCONTO).as_string(); + if (conto.len() < maxlen) // Ignora conti intermedi + continue; + + // Ricerca l'indicatore di bilancio sui livelli precedenti + indicatore_bilancio = 0; + for (int l = info.levels()-2; l >= 0 && indicatore_bilancio <= 0; l--) + { + const TString& k = conto.left(info.total_len(l)); // Costruisce codice conto intermedio + indicatore_bilancio = atoi(cache().get(LF_PCONANA, k, PCONANA_INDBIL)); + } + } + add_conto(indicatore_bilancio, conto); } + + calcola_totali(); // Aggiungi i gruppi e conti intermedi coi loro totali + move_to(0); } unsigned int TRecordset_sezioni_contrapposte::columns() const -{ return 4; } +{ return 9; } const TRecordset_column_info& TRecordset_sezioni_contrapposte::column_info(unsigned int column) const { - return _info[column]; + return *(TRecordset_column_info*)NULL; } -const TVariant& TRecordset_sezioni_contrapposte::get(unsigned int column) const +const TVariant& TRecordset_sezioni_contrapposte::get_fld(const TArray& a, int r, const char* field) const { - return NULL_VARIANT; + TVariant& var = get_tmp_var(); + if (r >= 0 && r < a.items()) + { + const TFixed_string fld(field); + const TSaldo_contrapposto& sc = (const TSaldo_contrapposto&)a[r]; + if (fld == "CONTO") + var = sc._conto; else + if (fld == "DESCR") + { + const TString& conto = sc._conto; + if (tipo_piano() == 'C') + { + TToken_string k; + k.add(conto.mid(0,3)); + k.add(conto.mid(3,3)); + k.add(conto.mid(6,6)); + var = cache().get(LF_PCON, k, PCN_DESCR); + } + else + var = cache().get(LF_PCONANA, conto, PCONANA_DESCR); + } else + if (fld == "SALDO") + { + var = sc._saldo.valore(); + } else + if (fld == "SEZIONE") + { + if (sc._saldo.is_zero()) + var = EMPTY_STRING; + else + { + const char sez[2] = { sc._saldo.sezione(), '\0' }; + var = sez; + } + } + } + else + var = EMPTY_STRING; + return var; } const TVariant& TRecordset_sezioni_contrapposte::get(const char* field) const { + const TFixed_string fld(field); + if (*field == '#') + { + if (fld == "#CMSCDC") + { + const TMultilevel_code_info& info = ca_multilevel_code_info(LF_FASI); + switch (info.parent()) + { + case LF_CDC : return get_tmp_var() = _filter.costo(); + case LF_COMMESSE: return get_tmp_var() = _filter.commessa(); + default : return NULL_VARIANT; + } + } + if (fld == "#COSTO") + return get_tmp_var() = _filter.costo(); + if (fld == "#COMMESSA") + return get_tmp_var() = _filter.commessa(); + if (fld == "#FASE") + return get_tmp_var() = _filter.fase(); + } + else + { + if (fld == "SEZIONE") + return get_tmp_var() = _pos < items_ap() ? "AP" : "CR"; + + const bool left = fld.starts_with("LEFT:"); + if (_pos < items_ap()) + { + if (left) + return get_fld(_attivita, _pos, field+5); + else + return get_fld(_passivita, _pos, field+6); + } + else + { + const TRecnotype pos = _pos - items_ap(); + if (pos < items_cr()) + { + if (left) + return get_fld(_costi, pos, field+5); + else + return get_fld(_ricavi, pos, field+6); + } + } + return get_tmp_var() = EMPTY_STRING; + } return NULL_VARIANT; } @@ -531,7 +746,8 @@ const TVariant& TRecordset_sezioni_contrapposte::get(const char* field) const class TReport_bilancio_sezioni_contrapposte : public TAnal_report { protected: - virtual bool TReport_bilancio_sezioni_contrapposte::set_recordset(const TString& sql); + virtual bool set_recordset(const TString& sql); + virtual void msg_format_conto(TVariant_stack& stack); public: void set_filter(const TMask& msk, int row); @@ -544,6 +760,15 @@ bool TReport_bilancio_sezioni_contrapposte::set_recordset(const TString& /* sql return TReport::set_recordset(rset); } +void TReport_bilancio_sezioni_contrapposte::msg_format_conto(TVariant_stack& stack) +{ + const TRecordset_sezioni_contrapposte* rset = (TRecordset_sezioni_contrapposte*)recordset(); + if (rset->tipo_piano() == 'C') + msg_format(LF_PCON, stack); + else + msg_format(LF_PCONANA, stack); +} + void TReport_bilancio_sezioni_contrapposte::set_filter(const TMask& m, int row) { TDate dal = m.get(F_DATADA); @@ -611,8 +836,7 @@ void TPrint_bilancio_ca::bilancio_a_sezioni_contrapposte(TMask& mask) { TReport_bilancio_sezioni_contrapposte rep(mask.get(F_REPORT)); - TSheet_field& sf = mask.sfield(F_RIGHE); - const int rows = sf.items(); + const int rows = mask.sfield(F_RIGHE).items(); TReport_book book; for (int i = 0; i < rows; i++) { @@ -625,6 +849,7 @@ void TPrint_bilancio_ca::bilancio_a_sezioni_contrapposte(TMask& mask) void TPrint_bilancio_ca::bilancio_di_verifica(TMask& mask) { TReport_bilancio_verifica rep(mask.get(F_REPORT)); + const int rows = mask.sfield(F_RIGHE).items(); TReport_book book; for (int i = 0; i < rows; i++) diff --git a/ca/ca3300a.rep b/ca/ca3300a.rep index 936749af9..db791e838 100755 --- a/ca/ca3300a.rep +++ b/ca/ca3300a.rep @@ -1,34 +1,323 @@ - - Stampa mastrini contabilta' analitica - + + Bilancio normale di verifica +
+ - #SYSTEM.RAGSOC - - - -
-
-
- CODCONTO - - -
-
-
-
- + #SYSTEM.DATE - + #REPORT.PAGE + + + #COSTO + + + MESSAGE ISAMREAD,CDC,CODCOSTO=#COSTO,DESCRIZ + + + + #COMMESSA + + + MESSAGE ISAMREAD,COMMESSE,CODCMS=#COMMESSA,DESCRIZ + + + + #FASE + + + MESSAGE ISAMREAD,FASI,CODCMSFAS=#CMSCDC!CODFASE=#FASE,DESCRIZ + + + + + + + + + + + + + +
+
+ + + +
+
+ CODCONTO:2!="" + CODCONTO:1 + "CODCONTO:1" @ +"F2.101" ! +"DESCR:1" @ +"F2.102" ! + +"F2" AZZERA_TOTALI + +
+
+ CODCONTO:3!="" + CODCONTO:2 + "CODCONTO:2" @ +"F3.101" ! +"DESCR:2" @ +"F3.102" ! + +"F3" AZZERA_TOTALI +
+
+ CODCONTO:4 != "" + CODCONTO:3 + "CODCONTO:3" @ +"F4.101" ! \ Copia il codice conto nel footer +"DESCR:3" @ +"F4.102" ! + +"F4" AZZERA_TOTALI +
+
+
+ + CODCONTO + CA_FORMAT_CONTO + + + DESCR + + + SALDO:INI_DAREP + MESSAGE ADD,F2.103|ADD,F3.103|ADD,F4.103 + + + + SALDO:INI_AVEREP + MESSAGE ADD,F2.104|ADD,F3.104|ADD,F4.104 + + + SALDO:MOV_DAREP + MESSAGE ADD,F2.105|ADD,F3.105|ADD,F4.105 + + + SALDO:MOV_AVEREP + MESSAGE ADD,F2.106|ADD,F3.106|ADD,F4.106 + + + SALDO:FIN_DAREP + MESSAGE ADD,F2.107|ADD,F3.107|ADD,F4.107 + + + SALDO:FIN_AVEREP + MESSAGE ADD,F2.108|ADD,F3.108|ADD,F4.108 + + + SALDO:INI_DAREC + MESSAGE ADD,F2.103|ADD,F3.103|ADD,F4.103 + + + + SALDO:INI_AVEREC + MESSAGE ADD,F2.104|ADD,F3.104|ADD,F4.104 + + + SALDO:MOV_DAREC + MESSAGE ADD,F2.105|ADD,F3.105|ADD,F4.105 + + + SALDO:MOV_AVEREC + MESSAGE ADD,F2.106|ADD,F3.106|ADD,F4.106 + + + SALDO:FIN_DAREC + MESSAGE ADD,F2.107|ADD,F3.107|ADD,F4.107 + + + SALDO:FIN_AVEREC + MESSAGE ADD,F2.108|ADD,F3.108|ADD,F4.108 + + + #103 + #203 + 303 DARE_AVERE + MESSAGE ADD,F2.303|ADD,F3.303|ADD,F4.303 + + + + #104 + #204 + MESSAGE ADD,F2.304|ADD,F3.304|ADD,F4.304 + + + #105 + #205 + 305 DARE_AVERE + MESSAGE ADD,F2.305|ADD,F3.305|ADD,F4.305 + + + #106 + #206 + MESSAGE ADD,F2.306|ADD,F3.306|ADD,F4.306 + + + #107 + #207 + 307 DARE_AVERE + MESSAGE ADD,F2.307|ADD,F3.307|ADD,F4.307 + + + #108 + #208 + MESSAGE ADD,F2.308|ADD,F3.308|ADD,F4.308 + +
+
-
- USE RMOVANA -JOIN PCONANA INTO CODCONTO==CODCONTO +
+ #101 != "" + + + CA_FORMAT_CONTO + + + + 103 DARE_AVERE + + + + + + 107 DARE_AVERE + + + + 103 DARE_AVERE + + + + + + 107 DARE_AVERE + + + + 103 DARE_AVERE + + + + + + 107 DARE_AVERE + + +
+
+ #101 != "" + + + CA_FORMAT_CONTO + + + + 103 DARE_AVERE + + + + + + 107 DARE_AVERE + + + + 103 DARE_AVERE + + + + + + 107 DARE_AVERE + + + + 103 DARE_AVERE + + + + + + 107 DARE_AVERE + + +
+
+ #101 != "" + + + CA_FORMAT_CONTO + + + + 103 DARE_AVERE + + + + + + 107 DARE_AVERE + + + + 103 DARE_AVERE + + + + + + 107 DARE_AVERE + + + + 103 DARE_AVERE + + + + + + 107 DARE_AVERE + + +
+ USE PCONANA + : AZZERA_TOTALI ( ID_SEC - ) +109 103 DO + DUP \ Duplica codice sezione + "." + \ Aggiunge punto + I + \ Aggiunge codice campo + 0 SWAP ! \ Lo azzera +LOOP +DROP +; + +: DARE_AVERE ( ID_DARE -- ) +VARIABLE _DARE +VARIABLE _AVERE +DUP +_DARE ! +1 + _AVERE ! + +_DARE @ @ \ DARE +_AVERE @ @ \ AVERE +- \ DARE-AVERE +DUP +0 C; IF \ Se negativo + -1 * \ Cambia segno + _AVERE @ ! \ Setta AVERE + 0 _DARE @ ! \ Azzera DARE +ELSE + _DARE @ ! \ Setta DARE + 0 _AVERE @ ! \ Azzera AVERE +THEN +; + \ No newline at end of file diff --git a/ca/ca3700.cpp b/ca/ca3700.cpp index 36dd6bc18..83641776d 100755 --- a/ca/ca3700.cpp +++ b/ca/ca3700.cpp @@ -636,7 +636,7 @@ void TPrint_rendiconto_ca_recordset::salva_rmovana(const TRectype& rmovana, cons const TRectype* babbo = riga.find_original_rdoc(); //cerca il doc padre della riga doc attuale if (babbo != NULL) //se trova il doc padre.. { - const TString8 babbo_codnum = babbo->get(RDOC_CODNUM); + const TString4 babbo_codnum = babbo->get(RDOC_CODNUM); const int anno = babbo->get_int(RDOC_ANNO); const long ndoc = babbo->get_long(RDOC_NDOC); riferimento << babbo_codnum << '-' << anno << '-' << ndoc; diff --git a/ca/calib02.cpp b/ca/calib02.cpp index 8b412d3a7..8cb9ed4a4 100755 --- a/ca/calib02.cpp +++ b/ca/calib02.cpp @@ -20,9 +20,9 @@ const TVariant& TPconana_recordset::get(const char* field) const { const TFixed_string column_name(field); - if (*column_name == '#') + if (column_name[0] == '#') { - if (strcmp(column_name, "#CMSCDC") == 0) + if (column_name == "#CMSCDC") { const TMultilevel_code_info& info = ca_multilevel_code_info(LF_FASI); switch (info.parent()) @@ -32,25 +32,26 @@ const TVariant& TPconana_recordset::get(const char* field) const default : return NULL_VARIANT; } } - if (strcmp(column_name, "#COSTO") == 0) + if (column_name == "#COSTO") return get_tmp_var() = _bill.costo(); - if (strcmp(column_name, "#COMMESSA") == 0) + if (column_name == "#COMMESSA") return get_tmp_var() = _bill.commessa(); - if (strcmp(column_name, "#FASE") == 0) + if (column_name == "#FASE") return get_tmp_var() = _bill.fase(); } else { - if (column_name.compare(PCONANA_CODCONTO, 8) == 0) + const TRectype& curr = relation()->curr(); + if (column_name.starts_with(PCONANA_CODCONTO)) { TString80 str; if (_tipo == 'C') { - const TBill b(relation()->curr()); + const TBill b(curr); str = b.string(0x8); } else - str = TISAM_recordset::get(PCONANA_CODCONTO).as_string(); + str = curr.get(PCONANA_CODCONTO); if (column_name[8] == ':') { @@ -60,12 +61,12 @@ const TVariant& TPconana_recordset::get(const char* field) const } return get_tmp_var() = str; } - if (column_name.compare(PCONANA_DESCR, 5) == 0) + if (column_name.starts_with(PCONANA_DESCR)) { TString80 str; if (_tipo == 'C') { - TBill b(relation()->curr()); + TBill b(curr); if (column_name[5] == ':') { if (column_name[6] == '1') @@ -81,19 +82,43 @@ const TVariant& TPconana_recordset::get(const char* field) const { const TMultilevel_code_info& info = ca_multilevel_code_info(LF_PCONANA); const int level = column_name[6] - '1'; - str = TISAM_recordset::get(PCONANA_CODCONTO).as_string(); + str = curr.get(PCONANA_CODCONTO); str.cut(info.total_len(level)); str = cache().get(LF_PCONANA, str, PCONANA_DESCR); } else - str = TISAM_recordset::get(PCONANA_DESCR).as_string(); + str = curr.get(PCONANA_DESCR); } return get_tmp_var() = str; } - - if (column_name.compare("SALDO:", 6) == 0) + if (column_name == PCONANA_INDBIL) { - TString16 sub_field = column_name+6; + long ib = curr.get_int(PCONANA_INDBIL); + if (ib == 0) + { + if (_tipo == 'C') + { + TBill b(curr); + ib = b.indicatore_bilancio(); + } + else + { + const TString80 conto = curr.get(PCONANA_CODCONTO); + const TMultilevel_code_info& info = ca_multilevel_code_info(LF_PCONANA); + for (int i = info.levels()-2; i >= 0 && ib <= 0; i--) + { + const TString& k = conto.left(info.total_len(i)); + const TRectype& pca = cache().get(LF_PCONANA, conto); + ib = pca.get_long(PCONANA_INDBIL); + } + } + } + return get_tmp_var() = ib; + } + + if (column_name.starts_with("SALDO:")) + { + TString16 sub_field = column_name.mid(6); const char last = sub_field.right(1)[0]; int tipimov = 0; switch (last) @@ -108,27 +133,27 @@ const TVariant& TPconana_recordset::get(const char* field) const const TSaldanal& s = ca_saldo(_bill, _dal, _al, tipimov); TVariant& var = get_tmp_var(); - if (strcmp(sub_field, "INI_DARE") == 0) + if (sub_field == "INI_DARE") { var = s._ini.sezione() == 'D' ? s._ini.valore() : ZERO; } else - if (strcmp(sub_field, "INI_AVERE") == 0) + if (sub_field == "INI_AVERE") { var = s._ini.sezione() == 'A' ? s._ini.valore() : ZERO; } else - if (strcmp(sub_field, "MOV_DARE") == 0) + if (sub_field == "MOV_DARE") { var = s._dare.valore(); } else - if (strcmp(sub_field, "MOV_AVERE") == 0) + if (sub_field == "MOV_AVERE") { var = s._avere.valore(); } else - if (strcmp(sub_field, "FIN_DARE") == 0) + if (sub_field == "FIN_DARE") { var = s._fin.sezione() == 'D' ? s._fin.valore() : ZERO; } else - if (strcmp(sub_field, "FIN_AVERE") == 0) + if (sub_field == "FIN_AVERE") { var = s._fin.sezione() == 'A' ? s._fin.valore() : ZERO; } @@ -471,14 +496,14 @@ class TRiclassify_cache : public TCache protected: virtual TObject* key2obj(const char* key); - void extract(const char* conto, TString_array& conti) const; + void extract(const TString& conto, TString_array& conti) const; public: const TString_array& conti(const TString& conto); TRiclassify_cache(); }; -void TRiclassify_cache::extract(const char* conto, TString_array& conti) const +void TRiclassify_cache::extract(const TString& conto, TString_array& conti) const { TRecord_array table(conto, LF_PANAPDC); for (int r = table.last_row(); r > 0; r = table.pred_row(r)) @@ -810,7 +835,7 @@ TObject* TSaldi_cache::key2obj(const char* key) const TDate dal = tok.get(4); // Le get precedenti avvengono in ordine inverso! const TDate al = tok.get(); const int tipo = tok.get_int(); - s->_movimentato = saldi(bill, dal, al, tipo, *s); + saldi(bill, dal, al, tipo, *s); return s; } diff --git a/ca/calib02.h b/ca/calib02.h index 93bdd71f9..1af3b7a41 100755 --- a/ca/calib02.h +++ b/ca/calib02.h @@ -107,12 +107,12 @@ protected: // protected is safer virtual bool execute_usr_word(unsigned int opcode, TVariant_stack& stack); virtual bool use_mask() { return false;} - void msg_format(int logicnum, TVariant_stack& stack); - void msg_format_costo (TVariant_stack& stack); - void msg_format_commessa (TVariant_stack& stack); - void msg_format_fase (TVariant_stack& stack); - void msg_format_conto (TVariant_stack& stack); - void msg_format_commessa_costo(TVariant_stack& stack); + virtual void msg_format(int logicnum, TVariant_stack& stack); + virtual void msg_format_costo (TVariant_stack& stack); + virtual void msg_format_commessa (TVariant_stack& stack); + virtual void msg_format_fase (TVariant_stack& stack); + virtual void msg_format_conto (TVariant_stack& stack); + virtual void msg_format_commessa_costo(TVariant_stack& stack); public: // meglio pubic? };