diff --git a/src/cg/cg3100.cpp b/src/cg/cg3100.cpp index d35a5fc35..32d0aa530 100755 --- a/src/cg/cg3100.cpp +++ b/src/cg/cg3100.cpp @@ -535,12 +535,13 @@ bool TListaMov_application::filter_func (const TRelation * rel) } else // Lista movimenti sola prima nota { - const TString& cod_reg = mov.get(MOV_REG); - const int ann_reg = mov.get_int(MOV_ANNOIVA); - const tiporeg tipo_reg = cached_registro(cod_reg, ann_reg).tipo_registro(); + const TString & codcaus = mov.get(MOV_CODCAUS); + + if (codcaus.blank()) + return true; // Considera solo iva acquisti o vendite - if (tipo_reg != vendita && tipo_reg != acquisto) + if (cached_causale(codcaus).iva() != nessuna_iva) return false; } @@ -987,13 +988,13 @@ bool TListaMov_application::preprocess_page(int file,int counter) if ((curmov >= da) && (curmov <= a)) { - const TRectype & caus = cache().get(LF_CAUSALI, _causale); + const TCausale & caus = cached_causale(_causale); - _descr_causale = caus.get(CAU_DESCR); - _alleg_causale = caus.get_bool(CAU_ALLEG); - _tipodocumento = caus.get(CAU_TIPODOC); + _descr_causale = caus.descrizione(); + _alleg_causale = caus.alleg(); + _tipodocumento = caus.tipodoc(); _tiporegistro = cached_registro(_registro, _anno).tipo_registro(); - if ((_tiporegistro != vendita) && (_tiporegistro != acquisto))//se si tratta di un movimento di sola prima nota + if (_causale.blank() || caus.iva() == nessuna_iva)//se si tratta di un movimento di sola prima nota return true; } } diff --git a/src/cg/cg3100a.uml b/src/cg/cg3100a.uml index 8c2cac9d5..75cc36788 100755 --- a/src/cg/cg3100a.uml +++ b/src/cg/cg3100a.uml @@ -239,8 +239,5 @@ BEGIN MODULE NP END #endif - - ENDPAGE - ENDMASK diff --git a/src/cg/cglib.h b/src/cg/cglib.h index e063778e0..9adf26103 100644 --- a/src/cg/cglib.h +++ b/src/cg/cglib.h @@ -337,6 +337,7 @@ public: bool corrispettivi() const { return _corrisp; } bool esclusione_allegati() const; bool escludi2archiviazione() const { return _rec.get_bool(CAU_ESCLUDIARC); } + bool alleg() const { return _rec.get_bool(CAU_ALLEG); } // bill deve essere il conto di ricavo bool IVA2bill(const TCodiceIVA& iva, TBill& bill) const;