Patch level : 12.0 1216
Files correlati : f9.exe Correzione errore su fatturazione elettronica. la funzione search() si era rotta. nella specifico la funzione di libreria sq_set_exec() ritornava true anche quando la query non resitituiva nessun recordset. questo comprometteva la funzionalita della funzione search()
This commit is contained in:
parent
22e1623d3b
commit
f0bba3fd67
@ -282,6 +282,7 @@
|
||||
</SqlCompiler>
|
||||
<SqlCompiler Include="..\src\fp\sql\fp0120.sql">
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">true</ExcludedFromBuild>
|
||||
<ExcludedFromBuild Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">true</ExcludedFromBuild>
|
||||
</SqlCompiler>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
|
@ -575,7 +575,7 @@ bool TPaf_record::search()
|
||||
{
|
||||
//CHECKS(_fields.items() > 0, "Can't search with empty key on table ", static_cast<const char*>(_table));
|
||||
|
||||
TString256 query;
|
||||
TString query;
|
||||
bool first = true;
|
||||
|
||||
query << "SELECT TOP 1 * FROM " << _table << " WHERE " << filter_string() << " ORDER BY ";
|
||||
@ -595,7 +595,13 @@ bool TPaf_record::search()
|
||||
query << ";";
|
||||
// return xvt_sql_execute(_db, query, paf_search_record, this) == 1;
|
||||
// TODO: Valutare
|
||||
return fp_db().sq_set_exec(query);
|
||||
bool exec_query = fp_db().sq_set_exec(query);
|
||||
int items = fp_db().sq_items();
|
||||
|
||||
if (items > 0)
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
}
|
||||
|
||||
// Carica un record in base ad un massimo di 3 campi chiave
|
||||
@ -1836,6 +1842,19 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc)
|
||||
paf0200f.set("P2_SEDENAZ", _paese);
|
||||
paf0200f.set("P2_GESTIONE", stato_paf());
|
||||
|
||||
//Contatti Cedente Prestatore
|
||||
TString80 tel;
|
||||
TString80 mail;
|
||||
|
||||
tel << get_firm().get(NDT_PTEL) << get_firm().get(NDT_TEL);
|
||||
mail << get_firm().get(NDT_MAIL);
|
||||
|
||||
if(tel.full())
|
||||
paf0200f.set("P2_CONTATTITELEF", tel);
|
||||
|
||||
if (mail.full())
|
||||
paf0200f.set("P2_CONTATTIMAIL", mail);
|
||||
|
||||
TString rifamm = cco(doc).get("S4");
|
||||
if (rifamm.blank())
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user