Patch level : 12.0
Files correlati : f9 Commento: Sistemato il contatore dell'archiviazione (Quello che ti dice quanti movimenti ha estratto, quanti in errore etc...) Aggiunto uno status apposta per i documenti che sono stati abbinati ma non appartengono a nessuna cat doc (la cat doc ora non è più obbligatoria perche leggiamo il tipo doc dal fppro)
This commit is contained in:
parent
f2b3db383f
commit
d3ef1ee480
@ -80,6 +80,11 @@ int TEstrai_mask::estrai()
|
||||
const TipoIVA& iva = reg.iva();
|
||||
TString numdoc = mov.get_string(MOV_NUMDOCEXT);
|
||||
|
||||
long nreg = mov.get_long(MOV_NUMREG);
|
||||
|
||||
if (nreg == 20045)
|
||||
int here = 0;
|
||||
|
||||
if (escluso)
|
||||
int here = 0;
|
||||
|
||||
@ -101,21 +106,27 @@ int TEstrai_mask::estrai()
|
||||
// Effettiva estrazione. Faccio partire diagnostica e scrittura db.
|
||||
const result_estr result = _estrazione->estrai();
|
||||
#ifdef DBG
|
||||
int tot;
|
||||
if(tipodoc == 'A')
|
||||
tot = (int)_stats.fa_estr + (int)_stats.fa_err + (int)_stats.fa_skip;
|
||||
else
|
||||
tot = (int)_stats.fv_estr + (int)_stats.fv_err + (int)_stats.fv_cart_skip;
|
||||
TString msg;
|
||||
msg << "total: " << (int)_stats.total << "\n";
|
||||
msg << "Tot. Docs : " << tot << "\n";
|
||||
|
||||
if (tipodoc == 'A')
|
||||
{
|
||||
msg << "Movimenti saltati: " << (int)_stats.fa_skip << "\n";
|
||||
msg << "Movimenti in errore: " << (int)_stats.fa_err << "\n";
|
||||
msg << "Movimenti estratti: " << (int)_stats.fa_estr << "\n";
|
||||
msg << "Movimenti senza cat. doc.: " << (int)_stats.fa_nocatdoc;
|
||||
msg << "Movimenti estratti : " << (int)_stats.fa_estr << "\n";
|
||||
msg << "Movimenti in errore : " << (int)_stats.fa_err << "\n";
|
||||
msg << "Movimenti saltati : " << (int)_stats.fa_skip;
|
||||
//msg << "Movimenti senza cat. doc.: " << (int)_stats.fa_nocatdoc;
|
||||
}
|
||||
else
|
||||
{
|
||||
msg << "Movimenti saltati poiche' cartacei: " << (int)_stats.fv_cart_skip << "\n";
|
||||
msg << "Movimenti in errore: " << (int)_stats.fv_err << "\n";
|
||||
msg << "Movimenti estratti: " << (int)_stats.fv_estr << "\n";
|
||||
msg << "Movimenti senza cat. doc.: " << (int)_stats.fv_nocatdoc;
|
||||
//msg << "Movimenti senza cat. doc.: " << (int)_stats.fv_nocatdoc;
|
||||
}
|
||||
message_box(msg);
|
||||
#endif
|
||||
|
@ -305,7 +305,8 @@ enum err_mov
|
||||
mov_no_cartaceo, // Movimento cartaceo che non ha bisogno di essere estratto.
|
||||
mov_pura_iva, // Movimento di sola IVA (integrazione Rev. Charge)
|
||||
mov_no_filecart, // Il documento cartaceo non ha associato un file, o questo non e' stato trovato.
|
||||
mov_annesso_nexist // Un annesso obbligatorio e' mancante.
|
||||
mov_annesso_nexist, // Un annesso obbligatorio e' mancante.
|
||||
mov_nocat_butok // Non è stata trovata nessuna categoria documentale per il seguente documento. Verra usato il TIPODOCSDI presente nel FPPRO
|
||||
};
|
||||
|
||||
class TMovimento_estr : public TObject // aggiungere metodi per TArray
|
||||
|
@ -61,6 +61,8 @@ const char* TMovimento_estr::err_mov2name(const err_mov descr_estr)
|
||||
return "Movimento di sola IVA. (Le integrazioni Rev. Charge sono gestite come annessi alle vendite)";
|
||||
case mov_annesso_nexist:
|
||||
return "Un annesso obbligatorio e' mancante.";
|
||||
case mov_nocat_butok:
|
||||
return "OK (Nessuna categoria documentale trovata ma l'abbinamento è riuscito)";
|
||||
default: return "";
|
||||
}
|
||||
}
|
||||
@ -830,6 +832,11 @@ const char* TEstrazione::diagnostica_mov()
|
||||
{
|
||||
|
||||
const long numreg = mov_i.numreg();
|
||||
|
||||
if (numreg == 20045) {
|
||||
int here = 0;
|
||||
}
|
||||
|
||||
const TRectype & mov =cache().get(LF_MOV, numreg);
|
||||
|
||||
mov_i.set_cartaceo(!is_doc_xml(mov));
|
||||
@ -840,10 +847,13 @@ const char* TEstrazione::diagnostica_mov()
|
||||
// OK
|
||||
case guessed:
|
||||
ok &= fppro_db().associa_mov(numreg);
|
||||
++_stats.fa_estr;
|
||||
break;
|
||||
case correct:
|
||||
ok &= true;
|
||||
mov_i.reset_err();
|
||||
mov_i.set_numdoc(fppro_db().get_numdoc());
|
||||
++_stats.fa_estr;
|
||||
break;
|
||||
|
||||
// ERRORS
|
||||
@ -897,9 +907,14 @@ const char* TEstrazione::diagnostica_mov()
|
||||
TClasse_doc * cd = categorie_doc().mov2cat(mov_i.numreg());
|
||||
const bool found = cd != nullptr;
|
||||
|
||||
mov_i.set_estratto(found);
|
||||
mov_i.set_descr_estr(cd ? mov_no_error : mov_no_catdoc);
|
||||
if (found)
|
||||
mov_i.set_descr_estr(mov_no_error);
|
||||
else
|
||||
mov_i.set_descr_estr(mov_nocat_butok);
|
||||
|
||||
mov_i.set_estratto(true);
|
||||
|
||||
// DA CONTROLLARE
|
||||
if (found)
|
||||
check_annessi(mov_i, numreg);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user