COMMIT PER PRIMA PATCH
This commit is contained in:
parent
85ac655949
commit
3597192f7a
@ -1,3 +1,3 @@
|
|||||||
23
|
23
|
||||||
0
|
0
|
||||||
$mov|0|0|634|0|Movimenti di prima nota|||
|
$mov|0|0|714|0|Movimenti di prima nota|||
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
23
|
23
|
||||||
67
|
68
|
||||||
ANNOES|9|4|0|Codice esercizio
|
ANNOES|9|4|0|Codice esercizio
|
||||||
NUMREG|3|7|0|Numero di operazione
|
NUMREG|3|7|0|Numero di operazione
|
||||||
DATAREG|5|8|0|Data operazione
|
DATAREG|5|8|0|Data operazione
|
||||||
@ -67,6 +67,7 @@ IDDOCSDI|1|20|0|Identificativo documento SDI
|
|||||||
DATADOCSDI|5|8|0|Data documento SDI
|
DATADOCSDI|5|8|0|Data documento SDI
|
||||||
COLL_GOLEM|11|10|0|Documenti generici
|
COLL_GOLEM|11|10|0|Documenti generici
|
||||||
CARTACEI|11|10|0|Documenti cartacei
|
CARTACEI|11|10|0|Documenti cartacei
|
||||||
|
KEYPAF|1|80|0|Chiavi del PAFW300 [KEYPRGINVIO;KEYHEADERFATT;KEYBODYFATT]
|
||||||
4
|
4
|
||||||
NUMREG|
|
NUMREG|
|
||||||
DATAREG+NUMREG|X
|
DATAREG+NUMREG|X
|
||||||
|
@ -123,7 +123,8 @@ enum state_estr_int
|
|||||||
int_with_err = -1, // Movimento associato male con FPPRO
|
int_with_err = -1, // Movimento associato male con FPPRO
|
||||||
guessed_int = 100,
|
guessed_int = 100,
|
||||||
no_guessed_int = 0,
|
no_guessed_int = 0,
|
||||||
err_read_db_int = 999 // Errore lettura da fppro
|
err_read_db_int = 999, // Errore lettura da fppro
|
||||||
|
wrong_keys = -2
|
||||||
};
|
};
|
||||||
|
|
||||||
class TF9_config
|
class TF9_config
|
||||||
@ -319,7 +320,8 @@ enum err_mov
|
|||||||
mov_no_filecart, // Il documento cartaceo non ha associato un file, o questo non e' stato trovato.
|
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
|
mov_nocat_butok, // Non è stata trovata nessuna categoria documentale per il seguente documento. Verra usato il TIPODOCSDI presente nel FPPRO
|
||||||
mov_no_sdi // Nessuno tipo doc SDI abbinato
|
mov_no_sdi, // Nessuno tipo doc SDI abbinato
|
||||||
|
mov_nomatch_keys // La chiave del documento salavta in MOV non si matcha con nessun documento elettronico
|
||||||
};
|
};
|
||||||
|
|
||||||
class TMovimento_estr : public TObject // aggiungere metodi per TArray
|
class TMovimento_estr : public TObject // aggiungere metodi per TArray
|
||||||
@ -440,6 +442,7 @@ class TEstrazione : public TObject
|
|||||||
state_estr_int guess_int(int numreg);
|
state_estr_int guess_int(int numreg);
|
||||||
bool checkPAF(TLocalisamfile& mov);
|
bool checkPAF(TLocalisamfile& mov);
|
||||||
bool checkPAA(TLocalisamfile& mov);
|
bool checkPAA(TLocalisamfile& mov);
|
||||||
|
const bool check_keys(TToken_string keys);
|
||||||
bool check_periodo_def() const;
|
bool check_periodo_def() const;
|
||||||
void copy_file_to_webapp_fld(TMovimento_estr& movimento) const;
|
void copy_file_to_webapp_fld(TMovimento_estr& movimento) const;
|
||||||
void fill_id(const TRectype& clifo, TString& statopaiv, TString& idfisc, TString& paiv, TString& codfis);
|
void fill_id(const TRectype& clifo, TString& statopaiv, TString& idfisc, TString& paiv, TString& codfis);
|
||||||
|
@ -1238,6 +1238,8 @@ const char* TEstrazione::diagnostica_mov_integrazione()
|
|||||||
int i = keys.items();
|
int i = keys.items();
|
||||||
|
|
||||||
if (keys.full() && (keys.items() == 3))
|
if (keys.full() && (keys.items() == 3))
|
||||||
|
{
|
||||||
|
if (check_keys(keys))
|
||||||
{
|
{
|
||||||
ok &= true;
|
ok &= true;
|
||||||
mov_i.set_estratto(true);
|
mov_i.set_estratto(true);
|
||||||
@ -1245,6 +1247,16 @@ const char* TEstrazione::diagnostica_mov_integrazione()
|
|||||||
++_stats.int_match;
|
++_stats.int_match;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ok &= false;
|
||||||
|
mov_i.set_state_int(int_with_err);
|
||||||
|
mov_i.reset_err();
|
||||||
|
mov_i.set_err("Chiavi del documento ERRATE", mov_nomatch_keys);
|
||||||
|
++_stats.int_nomatch;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (mov_i.no_err() && mov_i.estratto())
|
if (mov_i.no_err() && mov_i.estratto())
|
||||||
{
|
{
|
||||||
@ -1288,6 +1300,33 @@ const char* TEstrazione::diagnostica_mov_integrazione()
|
|||||||
return _head.stato_estr;
|
return _head.stato_estr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const bool TEstrazione::check_keys(TToken_string keys)
|
||||||
|
{
|
||||||
|
bool res;
|
||||||
|
TString query;
|
||||||
|
|
||||||
|
if (get_tipoiva() == iva_vendite)
|
||||||
|
{
|
||||||
|
query << "SELECT COUNT(PW_KEYBODYFATT) AS CONTA FROM PAFW300F WHERE PW_KEYPRGINVIO = '" << keys.get(0)
|
||||||
|
<< "' AND PW_KEYHEADERFATT = '" << keys.get(1) << "' AND PW_KEYBODYFATT = '" << keys.get(2) << "'";
|
||||||
|
}
|
||||||
|
else if (get_tipoiva() == iva_acquisti)
|
||||||
|
{
|
||||||
|
query << "SELECT COUNT(PZ_KEYBODYFATT) AS CONTA FROM FPPRO00F WHERE PZ_KEYPRGINVIO = '" << keys.get(0)
|
||||||
|
<< "' AND PZ_KEYHEADERFATT = '" << keys.get(1) << "' AND PZ_KEYBODYFATT = '" << keys.get(2) << "'";
|
||||||
|
}
|
||||||
|
|
||||||
|
fp_db().sq_set_exec(query);
|
||||||
|
TString query_res = fp_db().sq_get("CONTA");
|
||||||
|
|
||||||
|
if (query_res == "1")
|
||||||
|
res = true;
|
||||||
|
else
|
||||||
|
res = false;
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
result_estr TEstrazione::estrai()
|
result_estr TEstrazione::estrai()
|
||||||
{
|
{
|
||||||
// Se non c'e' nessun movimento non sto nemmeno a scrivere il record di estrazione.
|
// Se non c'e' nessun movimento non sto nemmeno a scrivere il record di estrazione.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user