Patch level : 12.0 no patch

Files correlati     : 
Commento            :

aggiunte le parole chiave #SYSTEM.CFPI #SYSTEM.CFPI_SPACED al linguaggio alex
per avere il codice fiscale/partita IVA normale o con uno spazio dopo ogni carattere

git-svn-id: svn://10.65.10.50/branches/R_10_00@23343 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
bonazzi 2016-09-29 18:39:56 +00:00
parent 2b7ee9af79
commit e036b0b4af

View File

@ -4,6 +4,8 @@
#include <diction.h>
#include <dongle.h>
#include <prefix.h>
#include <nditte.h>
#include <anagr.h>
#include <recarray.h>
#include <toolfld.h>
#include <urldefid.h>
@ -1210,6 +1212,28 @@ bool TAlex_virtual_machine::get_usr_val(const TString& name, TVariant& var) cons
var.set(ragsoc);
return true;
}
if (n.starts_with("CFPI"))
{
const long code = prefix().get_codditta();
const TRectype& ditta = cache().get(LF_NDITTE, code);
TToken_string key;
key.add(ditta.get(NDT_TIPOA));
key.add(ditta.get(NDT_CODANAGR));
const TRectype& anagr = cache().get(LF_ANAG, key);
TString cfpi = anagr.get(ANA_PAIV);
if (cfpi.empty())
cfpi = anagr.get(ANA_COFI);
if (n[4] == '_' && n[5] == 'S')
for (int i = 15; i > 1 ; i--)
cfpi.insert(" ", i - 1);
cfpi.trim();
var.set(cfpi);
return true;
}
if (n == "STUDY")
{
var.set(firm2dir(-1));