diff --git a/cg/cg0100a.uml b/cg/cg0100a.uml index 06d4cd8b8..94fcb94d4 100755 --- a/cg/cg0100a.uml +++ b/cg/cg0100a.uml @@ -297,7 +297,7 @@ BEGIN PROMPT 72 9 "" HELP "Codice del conto di sezione opposta secondo la IV direttiva CEE" FIELD LF_PCON->NUMIVDOPP - FLAGS "RZ" + FLAGS "Z" GROUP 1 2 4 7 COPY USE FLD_CM1_NUMIVD INPUT CODTAB[1,1] FLD_CM1_SEZIVDOPP diff --git a/cg/cg2100.cpp b/cg/cg2100.cpp index 9c905c890..d916ea5a6 100755 --- a/cg/cg2100.cpp +++ b/cg/cg2100.cpp @@ -292,6 +292,7 @@ bool TPrimanota_application::read_caus(const char* cod, int year) else { m->efield(F_CODPAG).enable(!nota_credito); + m->efield(F_DESPAG).enable(!nota_credito); TEdit_field& numrif = m->efield(F_NUMRIF); numrif.set_justify(iva == iva_acquisti ? _num_for : _num_cli); @@ -519,6 +520,7 @@ void TPrimanota_application::init_mask(TMask& m) m.enable(F_NUMRIF, _scad_free); m.enable(F_SOLAIVA, _scad_free); // Disabilita movimenti di sola IVA m.enable(F_CODPAG, _scad_free); // Disabilita codice pagamento + m.enable(F_DESPAG, _scad_free); // Disabilita descrizione pagamento m.enable(FS_RESET, _scad_free); // Disabilita tasto di reset if (!_scad_free) m.set(FS_RECALC, "", TRUE); // Disabilita ricalcolo automatico diff --git a/cg/cg3700.cpp b/cg/cg3700.cpp index 20b3091ff..bdfb4e698 100755 --- a/cg/cg3700.cpp +++ b/cg/cg3700.cpp @@ -23,11 +23,11 @@ class _Iva_item : public TObject { real _impv,_ivav,_impa,_ivaa; public: - real& impv() { return _impv;} // Imponibile ven. - real& ivav() { return _ivav;} // Iva ven. - real& impa() { return _impa;} // Imponibile acq. - real& ivaa() { return _ivaa;} // Iva acq. - void zero(){ _impv = 0.0; _ivav = 0.0; _impa = 0.0; _ivaa = 0.0; } + real& impv() { return _impv;} // Imponibile ven. + real& ivav() { return _ivav;} // Iva ven. + real& impa() { return _impa;} // Imponibile acq. + real& ivaa() { return _ivaa;} // Iva acq. + void zero() { _impv = _ivav = _impa = _ivaa = ZERO; } virtual TObject* dup() const { return new _Iva_item(*this); } _Iva_item() { zero(); } ~_Iva_item() {}; @@ -118,7 +118,7 @@ inline TLista_fatture& app() { return (TLista_fatture&) main_app(); } int TLista_fatture::tiporeg(const TString& reg) { TString8 s; s.format("%4d%-3s",_date_from.year(),(const char*)reg); - return atoi(cache().get("REG", s).get("I0")); + return atoi(cache().get("REG", s, "I0")); } bool TLista_fatture::filter_func1(const TRelation *r) diff --git a/cg/cg4600.cpp b/cg/cg4600.cpp index 100a361a5..9e0ef16d5 100755 --- a/cg/cg4600.cpp +++ b/cg/cg4600.cpp @@ -287,19 +287,20 @@ bool TApertura_chiusura::mask_distinti (TMask_field& f, KEY k) { if (k == K_ENTER) { - int idg = F_BILCHG; - int idc = F_BILCHC; - int ids = F_BILCHS; + const TMask& m = f.mask(); + short idg = F_BILCHG; + short idc = F_BILCHC; + short ids = F_BILCHS; for (int i = 0; i < 6; i++) { - const int g = f.mask().get_int(idg); - const int c = f.mask().get_int(idc); - const long s = f.mask().get_long(ids); + const int g = m.get_int(idg); + const int c = m.get_int(idc); + const long s = m.get_long(ids); - int idg1 = idg; - int idc1 = idc; - int ids1 = ids; + short idg1 = idg; + short idc1 = idc; + short ids1 = ids; for (int j = i+1; j < 7; j++) { @@ -307,9 +308,9 @@ bool TApertura_chiusura::mask_distinti (TMask_field& f, KEY k) idc1 += 3; ids1 += 3; - const int gruppo = f.mask().get_int(idg1); - const int conto = f.mask().get_int(idc1); - const long sottoc = f.mask().get_long(ids1); + const int gruppo = m.get_int(idg1); + const int conto = m.get_int(idc1); + const long sottoc = m.get_long(ids1); if ((g == gruppo)&&(c == conto)&&(s == sottoc)) return f.warning_box(FR("Il conto %d.%d.%ld non puo' essere ripetuto!"), gruppo, conto, sottoc); @@ -429,15 +430,13 @@ long TApertura_chiusura::ultima_registrazione() bool TApertura_chiusura::set() { - TMask m ("cg4600a"); + TMask m("cg4600a"); KEY tasto; int gbilch, cbilch , gproper, cproper, gbilap, cbilap, gutilp; int cutilp, gperdp, cperdp, gutile, cutile, gperde, cperde; long sbilch, sproper, sbilap, sutilp, sperdp, sutile, sperde; - - TConfig conf(CONFIG_DITTA); - + TConfig conf(CONFIG_DITTA, "cg"); m.set(F_CHIUSURA, conf.get("CoCaCh")); m.set(F_APERTURA, conf.get("CoCaAp")); @@ -446,8 +445,7 @@ bool TApertura_chiusura::set() // determina quello precedente const int anno_ch = _esc->pred(anno_ap); - const TDate fine = _esc->esercizio(anno_ch).fine(); //data fine es. precedente - + const TDate fine = anno_ch > 0 ? _esc->esercizio(anno_ch).fine() : botime; if (anno_ap == anno_ch) { anno_ap = 0;