Patch level : 10.0
Files correlati : fe0.exe Ricompilazione Demo : [ ] Commento : Corretto blocco anteprima in assenza di Partita IVA in anagrafica git-svn-id: svn://10.65.10.50/branches/R_10_00@22555 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
0352ef0f2e
commit
1a5e0b37af
17
fe/felib.cpp
17
fe/felib.cpp
@ -707,6 +707,7 @@ TObject* TCofi_cache::find_ragsoc(bool piva, char tipocf, const TString& code)
|
|||||||
TISAM_recordset occas(query);
|
TISAM_recordset occas(query);
|
||||||
if (occas.move_first())
|
if (occas.move_first())
|
||||||
return new TString80(occas.get(OCC_RAGSOC).as_string());
|
return new TString80(occas.get(OCC_RAGSOC).as_string());
|
||||||
|
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -734,25 +735,37 @@ TObject* TCofi_cache::key2obj(const char* key)
|
|||||||
|
|
||||||
const TString& TCofi_cache::cofi2ragsoc(char tipocf, const TString& cofi)
|
const TString& TCofi_cache::cofi2ragsoc(char tipocf, const TString& cofi)
|
||||||
{
|
{
|
||||||
const TString* ragsoc = &EMPTY_STRING;
|
const TString* ragsoc = NULL;
|
||||||
if (cofi.full())
|
if (cofi.full())
|
||||||
{
|
{
|
||||||
TString80 key;
|
TString80 key;
|
||||||
key.format("CF|%c|%s", tipocf, (const char*)cofi);
|
key.format("CF|%c|%s", tipocf, (const char*)cofi);
|
||||||
ragsoc = (const TString*)objptr(key);
|
ragsoc = (const TString*)objptr(key);
|
||||||
}
|
}
|
||||||
|
if (ragsoc == NULL)
|
||||||
|
{
|
||||||
|
TString& str = get_tmp_string();
|
||||||
|
str << TR("C.F. sconosciuto ") << cofi;
|
||||||
|
ragsoc = &str;
|
||||||
|
}
|
||||||
return *ragsoc;
|
return *ragsoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
const TString& TCofi_cache::paiv2ragsoc(char tipocf, const TString& paiv)
|
const TString& TCofi_cache::paiv2ragsoc(char tipocf, const TString& paiv)
|
||||||
{
|
{
|
||||||
const TString* ragsoc = &EMPTY_STRING;
|
const TString* ragsoc = NULL;
|
||||||
if (paiv.full())
|
if (paiv.full())
|
||||||
{
|
{
|
||||||
TString80 key;
|
TString80 key;
|
||||||
key.format("PI|%c|%s", tipocf, (const char*)paiv);
|
key.format("PI|%c|%s", tipocf, (const char*)paiv);
|
||||||
ragsoc = (const TString*)objptr(key);
|
ragsoc = (const TString*)objptr(key);
|
||||||
}
|
}
|
||||||
|
if (ragsoc == NULL)
|
||||||
|
{
|
||||||
|
TString& str = get_tmp_string();
|
||||||
|
str << TR("P.I. sconosciuta ") << paiv;
|
||||||
|
ragsoc = &str;
|
||||||
|
}
|
||||||
return *ragsoc;
|
return *ragsoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user