Patch level : 12.01 1306

Files correlati     : c3.exe cg3100a.msk
Commento            :

La lista movimenti di sola prima nonta non funziona
This commit is contained in:
Alessandro Bonazzi 2023-11-16 00:15:15 +01:00
parent f96ef070ea
commit f4fe5eed73
3 changed files with 11 additions and 12 deletions

View File

@ -535,12 +535,13 @@ bool TListaMov_application::filter_func (const TRelation * rel)
} }
else // Lista movimenti sola prima nota else // Lista movimenti sola prima nota
{ {
const TString& cod_reg = mov.get(MOV_REG); const TString & codcaus = mov.get(MOV_CODCAUS);
const int ann_reg = mov.get_int(MOV_ANNOIVA);
const tiporeg tipo_reg = cached_registro(cod_reg, ann_reg).tipo_registro(); if (codcaus.blank())
return true;
// Considera solo iva acquisti o vendite // Considera solo iva acquisti o vendite
if (tipo_reg != vendita && tipo_reg != acquisto) if (cached_causale(codcaus).iva() != nessuna_iva)
return false; return false;
} }
@ -987,13 +988,13 @@ bool TListaMov_application::preprocess_page(int file,int counter)
if ((curmov >= da) && (curmov <= a)) 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); _descr_causale = caus.descrizione();
_alleg_causale = caus.get_bool(CAU_ALLEG); _alleg_causale = caus.alleg();
_tipodocumento = caus.get(CAU_TIPODOC); _tipodocumento = caus.tipodoc();
_tiporegistro = cached_registro(_registro, _anno).tipo_registro(); _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; return true;
} }
} }

View File

@ -239,8 +239,5 @@ BEGIN
MODULE NP MODULE NP
END END
#endif #endif
ENDPAGE ENDPAGE
ENDMASK ENDMASK

View File

@ -337,6 +337,7 @@ public:
bool corrispettivi() const { return _corrisp; } bool corrispettivi() const { return _corrisp; }
bool esclusione_allegati() const; bool esclusione_allegati() const;
bool escludi2archiviazione() const { return _rec.get_bool(CAU_ESCLUDIARC); } 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 // bill deve essere il conto di ricavo
bool IVA2bill(const TCodiceIVA& iva, TBill& bill) const; bool IVA2bill(const TCodiceIVA& iva, TBill& bill) const;