Patch level : 12.00 1286
Files correlati : cg3.exe Commento : La stampa movimenti con controllo allegato iva dave un errore sul codice causale
This commit is contained in:
parent
f1cb182561
commit
cbae6c8fad
@ -1825,16 +1825,19 @@ bool TListaMov_application::segnala_errori_ogniriga()
|
||||
bool TListaMov_application::segnala_errori_iva()
|
||||
{
|
||||
TLocalisamfile& rmoviva = current_cursor()->file(LF_RMOVIVA);
|
||||
const TRectype& mv = current_cursor()->curr(LF_RMOV);
|
||||
const TRectype& mov = current_cursor()->curr(LF_MOV);
|
||||
|
||||
if (current_cursor()->is_first_match(LF_RMOVIVA))
|
||||
{
|
||||
const TRecnotype nrec = rmoviva.recno();
|
||||
|
||||
rmoviva.setkey(1);
|
||||
rmoviva.zero();
|
||||
rmoviva.put(RMI_NUMREG, _numero);
|
||||
|
||||
const TRectype& rec = rmoviva.curr();
|
||||
const TRectype recc (rec);
|
||||
|
||||
for (rmoviva.read(_isgteq); !rmoviva.eof() ;rmoviva.next())
|
||||
{
|
||||
if (rec > recc)
|
||||
@ -1847,9 +1850,10 @@ bool TListaMov_application::segnala_errori_iva()
|
||||
}
|
||||
const TString4 cod = rec.get(RMI_CODIVA);
|
||||
real percind;
|
||||
const int tipodet = get_tipodet_from_rmi(rec, mv, percind);
|
||||
const int tipodet = get_tipodet_from_rmi(rec, mov, percind);
|
||||
const int tipocr = rec.get_int(RMI_TIPOCR);
|
||||
const TRectype& tab_iva = cache().get("%IVA", cod);
|
||||
|
||||
if (!tab_iva.empty())
|
||||
{
|
||||
int allc = tab_iva.get_int("S7");
|
||||
|
@ -258,7 +258,7 @@ bool is_IVAxCassa(const TRectype& mov)
|
||||
int get_tipodet_from_rmi(const TRectype& rmi, const TRectype& mov, real& percind, const bool is_liq)
|
||||
{
|
||||
const int annodoc = mov.get_date(MOV_DATAREG).year();
|
||||
const TCausale caus(mov.get(MOV_CODCAUS), annodoc);
|
||||
const TCausale & caus = cached_causale(mov.get(MOV_CODCAUS), annodoc);
|
||||
|
||||
int tipodet = 0;
|
||||
percind = indetraibile_al(rmi.get(RMI_TIPODET), caus, annodoc, tipodet, is_liq);
|
||||
|
Loading…
x
Reference in New Issue
Block a user