diff --git a/cg/cg4300.h b/cg/cg4300.h index 258151c61..7caefe48e 100755 --- a/cg/cg4300.h +++ b/cg/cg4300.h @@ -201,7 +201,8 @@ class TLiquidazione_app : public TPrint_application bool _calcall; // tutte le ditte nessuna esclusa bool _isbase; // stampa base di calcolo acconto bool _isfinal; // stampa definitiva (su registro bollato) - bool _isregis; // stampa per registro + bool _isregis; // stampa per registro + bool _isintr; // calcola interessi per trimestrali tbc _basecalc; // tipo base di calcolo acconto TString _freqviva; // frequenza versamenti (M|T} long _n_ditte; // numero ditte diff --git a/cg/cg4301.cpp b/cg/cg4301.cpp index 826ddb73a..3ee8ea858 100755 --- a/cg/cg4301.cpp +++ b/cg/cg4301.cpp @@ -152,6 +152,7 @@ bool TLiquidazione_app::update_firm(int month, bool recalc) TConfig cnf(CONFIG_DITTA, "cg"); _isdifferita = cnf.get_bool("GeLiDi") && _month != 13; + _isintr = !cnf.get_bool("InTrTr") && _freqviva != "M"; // controlla che il periodo corrente non sia l'inizio dell'attivita' // nel caso, differita va a FALSE TDate inatt(_nditte->lfile().get("DINIZIOATT")); @@ -1617,10 +1618,10 @@ void TLiquidazione_app::write_liq(int month, const char* codatts) /* * Interessi dovuti solo da trimestrali in periodica, - * Era anche non benzinari, smentito da Cinzia (MI0853) + * Era anche non benzinari, smentito da Cinzia (MI0853); + * Ora gestito esplicitamente nei parametri ditts */ - if (_freqviva == "T" && risultato.sign() > 0 && - month < 13 /* && !_isbenzinaro */) + if (_isintr && month < 13) { real interesse = interesse_trimestrale(_month); real ivi = risultato * (interesse / CENTO); diff --git a/cg/cg4304.cpp b/cg/cg4304.cpp index bb9330e4e..78580b5b3 100755 --- a/cg/cg4304.cpp +++ b/cg/cg4304.cpp @@ -417,10 +417,12 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt) continue; // se ha tutti gli importi nulli viene da un annullamento di - // progressivi esistenti + // progressivi esistenti (achtung fatture con scontrino) if (_pim->get_real("R0").is_zero() && _pim->get_real("R1").is_zero() && - _pim->get_real("R2").is_zero()) + _pim->get_real("R2").is_zero() && + _pim->get_real("R5").is_zero() && + _pim->get_real("R6").is_zero()) continue; if (strcmp((const char*)*_pim_codatt, att) == 0 && diff --git a/cg/cg5100a.h b/cg/cg5100a.h index 9fb0982e3..dc8260181 100755 --- a/cg/cg5100a.h +++ b/cg/cg5100a.h @@ -54,4 +54,5 @@ #define FLD_DCSPECE 153 #define FLD_DESLIN 154 #define FLD_DESLIC 155 -#define CHK_GEST74 156 \ No newline at end of file +#define CHK_GEST74 156 +#define CHK_INTRTR 157 \ No newline at end of file diff --git a/cg/cg5100a.uml b/cg/cg5100a.uml index d19e9900a..c77a4fbf0 100755 --- a/cg/cg5100a.uml +++ b/cg/cg5100a.uml @@ -700,7 +700,7 @@ BEGIN INPUT CODCAUS FLD_RRCCRI COPY DISPLAY FLD_COCACH OUTPUT FLD_RRCCRI CODCAUS - OUTPUT FLD_DRRCCRI DESCR + OUTPUT FLD_DRRCCRI DESCR CHECKTYPE NORMAL ADD RUN cg0 -4 FIELD RrCcRi @@ -709,7 +709,7 @@ END STRING FLD_DRRCCRI 50 48 BEGIN PROMPT 26 8 "" - HELP "Descrizione causale dei risconti per movimento di contabilita'" + HELP "Descrizione causale dei risconti per movimento di contabilita'" USE LF_CAUSALI KEY 2 INPUT DESCR FLD_DRRCCRI COPY DISPLAY FLD_DCOCACH @@ -718,6 +718,14 @@ BEGIN ADD RUN cg0 -4 END +BOOLEAN CHK_INTRTR +BEGIN + PROMPT 3 12 "Calcolare interessi per frequenza versamenti trimestrale" + HELP "Se selezionato, gli interessi non vengono calcolati" + FIELD InTrTr +END + + ENDPAGE ENDMASK diff --git a/cg/cg5500.cpp b/cg/cg5500.cpp index b35e52c96..70fd3b8be 100755 --- a/cg/cg5500.cpp +++ b/cg/cg5500.cpp @@ -362,11 +362,11 @@ bool Visliq_app::sel_mese_sh1 (TMask_field& f, KEY k) TMask& sm = sh.sheet_mask(); - sm.field(102).set(tt.get(2)); - sm.field(103).set(tt.get(3)); - sm.field(104).set(tt.get(4)); - sm.field(105).set(tt.get(5)); - sm.field(106).set(tt.get(6)); + sm.field(102).set(tt.get(1)); + sm.field(103).set(tt.get(2)); + sm.field(104).set(tt.get(3)); + sm.field(105).set(tt.get(4)); + sm.field(106).set(tt.get(5)); return TRUE; } @@ -796,6 +796,7 @@ void Visliq_app::recalc_liq_data(TViswin* vsw, real& rimb, real& rett, real& ver { // calcola interesse intr = risul * (itt/real(100.0)); + intr.ceil(); } // riaggiusta LIM @@ -1065,16 +1066,16 @@ void Visliq_app::read_general(TMask& m) if (sh.items() < i) tt = new TToken_string(80); else tt = &(sh.row(i-1)); - tt->add(itoname(i)); - tt->add(abs(_lim->get_real("R0")).string()); + tt->add(itoname(i),0); + tt->add(abs(_lim->get_real("R0")).string(),1); int sr0 = (_lim->get_real("R0")).sign(); int sr5 = (_lim->get_real("R5")).sign(); - tt->add(sr0 == 0 ? "" : (sr0 > 0 ? "D" : "C")); - tt->add(_lim->get_real("R1").string()); - tt->add(abs(_lim->get_real("R5")).string()); - tt->add(sr5 == 0 ? "" : (sr5 > 0 ? "D" : "C")); + tt->add(sr0 == 0 ? "" : (sr0 > 0 ? "D" : "C"),2); + tt->add(_lim->get_real("R1").string(),3); + tt->add(abs(_lim->get_real("R5")).string(),4); + tt->add(sr5 == 0 ? "" : (sr5 > 0 ? "D" : "C"),5); sh.row(i-1) = (*tt); } @@ -1124,12 +1125,12 @@ void Visliq_app::read_general(TMask& m) if (i == 12) nomemese << " acconto"; if (i == 13) nomemese << " saldo"; - tt->add(nomemese); // mese - tt->add(date[i-1].string()); // data vers. - tt->add(banche[i-1].get(0)); // azienda - tt->add(banche[i-1].get(1)); // dipendenza - tt->add(banche[i-1].get(2)); // concessionaria - tt->add(versamenti[i-1].string());// versamenti + tt->add(nomemese,0); // mese + tt->add(date[i-1].string(),1); // data vers. + tt->add(banche[i-1].get(0),2); // azienda + tt->add(banche[i-1].get(1),3); // dipendenza + tt->add(banche[i-1].get(2),4); // concessionaria + tt->add(versamenti[i-1].string(),5);// versamenti sv.row(-1) = *tt; } diff --git a/cg/cg5500b.uml b/cg/cg5500b.uml index 3d8c94f3c..a6bd39d2b 100755 --- a/cg/cg5500b.uml +++ b/cg/cg5500b.uml @@ -39,7 +39,7 @@ BEGIN CHECKTYPE REQUIRED END -STRING F_RAGSOC 37 50 +STRING F_RAGSOC 50 BEGIN PROMPT 16 2 "" FLAGS "D" @@ -78,7 +78,7 @@ BEGIN FLAGS "DFR" END -STRING F_RAGSOC2 37 50 +STRING F_RAGSOC2 50 BEGIN PROMPT 16 2 "" FLAGS "D" @@ -138,7 +138,7 @@ BEGIN PICTURE "." END -LIST 106 1 8 +LIST 106 1 10 BEGIN PROMPT 1 7 "Rettifica a " ITEM " | " diff --git a/cg/cg5500c.uml b/cg/cg5500c.uml index 80fb4798c..7443c764b 100755 --- a/cg/cg5500c.uml +++ b/cg/cg5500c.uml @@ -38,7 +38,7 @@ BEGIN CHECKTYPE REQUIRED END -STRING F_RAGSOC 37 50 +STRING F_RAGSOC 50 BEGIN PROMPT 22 2 "" FLAGS "D" @@ -116,7 +116,7 @@ BEGIN PICTURE "." END -LIST 106 1 8 +LIST 106 1 10 BEGIN PROMPT 1 6 "Rettifica a " ITEM " | "