diff --git a/cg/cg0500.cpp b/cg/cg0500.cpp index d1b9414cb..598262ca7 100755 --- a/cg/cg0500.cpp +++ b/cg/cg0500.cpp @@ -751,25 +751,22 @@ int TCaus_app::re_write(const TMask& m, bool re) for (int i = 0; i < ss().items(); i++) { TToken_string &riga = ss().row(i); - const char sezione = riga.get_char(1); - const char tipo_cf = riga.get_char(); - const int g = riga.get_int(); - + const int g = riga.get_int(); if (g > 0) { - const int row = i + 1 ; - TRectype & r = _rcaus_rec->row(row, TRUE); - const int c = riga.get_int(); - const long s = riga.get_long(); + TRectype & r = _rcaus_rec->row(i+1, TRUE); + const char sezione = riga.get_char(1); + const char tipo_cf = riga.get_char(); + const int c = riga.get_int(); + const long s = riga.get_long(); riga.get(); // Salta descrizione conto const TString80 coddesc(riga.get()); - + r.put (RCA_CODDESC, coddesc); r.put (RCA_SEZIONE, sezione); r.put (RCA_TIPOCF, tipo_cf); - r.put (RCA_GRUPPO , g); - r.put (RCA_CONTO , c); + r.put (RCA_GRUPPO, g); + r.put (RCA_CONTO, c); r.put (RCA_SOTTOCONTO, s); - r.put (RCA_CODDESC, coddesc); } } return _rcaus_rec->write(re); diff --git a/cg/cg2100k.uml b/cg/cg2100k.uml index c4ca72670..5fbe3a13d 100755 --- a/cg/cg2100k.uml +++ b/cg/cg2100k.uml @@ -9,7 +9,7 @@ END BUTTON 102 10 2 BEGIN - PROMPT -13 -1 "Azzera" + PROMPT -13 -1 "~Azzera" END BUTTON DLG_CANCEL 10 2 diff --git a/cg/cg2102.cpp b/cg/cg2102.cpp index ebfbfcc60..ebb1149e0 100755 --- a/cg/cg2102.cpp +++ b/cg/cg2102.cpp @@ -962,7 +962,7 @@ bool TPrimanota_application::descr_handler(TMask_field& f, KEY k) { TSheet_field& cg = app().cgs(); const TString80 old = cg.row(first).get(8); - if (old.blank) + if (old.blank()) { cg.row(first).add(f.get(), 8); cg.force_update(first); diff --git a/cg/cg2106.cpp b/cg/cg2106.cpp index 7845f0df7..4449b84e3 100755 --- a/cg/cg2106.cpp +++ b/cg/cg2106.cpp @@ -292,7 +292,7 @@ void TPrimanota_application::set_colors() bool TPrimanota_application::test_prorata() { - if (iva() != iva_acquisti || !cgs().shown()) + if (iva() != iva_acquisti || !cgs().shown() || _as400) return TRUE; bool esistono_righe_senza_tipo_detrazione = FALSE; @@ -301,7 +301,8 @@ bool TPrimanota_application::test_prorata() for (int r = 0; r < righe_iva.items(); r++) { TToken_string& row = righe_iva.row(r); - if (!row.empty_items()) + const real imposta = row.get(3); + if (!imposta.is_zero()) { const int tipodet = row.get_int(2); if (tipodet == 0) @@ -310,20 +311,17 @@ bool TPrimanota_application::test_prorata() break; } } - else - break; } bool ok = TRUE; if (esistono_righe_senza_tipo_detrazione) { const bool prorata100 = causale().reg().prorata() >= 100.0; - const bool esistono_righe_iva_detraibile = type2pos('D') >= 0; - + const bool esiste_riga_iva_detraibile = type2pos('D') >= 0; if (prorata100) - ok = !esistono_righe_iva_detraibile; + ok = !esiste_riga_iva_detraibile; else - ok = esistono_righe_iva_detraibile; + ok = esiste_riga_iva_detraibile; } return ok; @@ -331,11 +329,11 @@ bool TPrimanota_application::test_prorata() bool TPrimanota_application::aggiusta_prorata() { + TWait_cursor hourglass; + if (test_prorata()) return FALSE; - begin_wait(); - TRegistro& reg = causale().reg(); const real prorata_attuale = reg.prorata(); const real vecchio_prorata = prorata_attuale < 100.0 ? 100.0 : 0.0; @@ -364,7 +362,6 @@ bool TPrimanota_application::aggiusta_prorata() break; } - end_wait(); return TRUE; }