Patch level : 12.0 448
Files correlati : tf Commento : - Rivista parte bolle doganali, tolti errori con più bolle di diversi clienti e stessa dogana - Sistemato errore nella lettura del nome di un Rappresentante Fiscale giuridico git-svn-id: svn://10.65.10.50/branches/R_10_00@24082 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6102c43250
commit
866e9bdcdb
@ -832,7 +832,26 @@ TString TTrFa_app::getHeader(TToken_string* strarr)
|
||||
static long int idHeader = 0L;
|
||||
|
||||
// Cerco/Aggiungo il Clifo all'std::map
|
||||
TString keyMap; keyMap << strarr->get_char(_tipocf) << "|" << strarr->get_int(_codcf);
|
||||
static TString keyMap; keyMap.cut(0);
|
||||
static TString tipocf, codcf;
|
||||
tipocf.cut(0); codcf.cut(0);
|
||||
|
||||
// Controlli per bolladog
|
||||
if(strcmp(strarr->get(_codnum),"BD") == 0)
|
||||
{
|
||||
tipocf = "F";
|
||||
codcf = cache().get(LF_MOV, strarr->get_long(_numero), "CFBOLLADOG");
|
||||
if(codcf.blank())
|
||||
codcf.cut(0) << strarr->get(_codcf);
|
||||
}
|
||||
else
|
||||
{
|
||||
tipocf << strarr->get_char(_tipocf);
|
||||
codcf << strarr->get(_codcf);
|
||||
}
|
||||
|
||||
keyMap << tipocf << "|" << codcf;
|
||||
|
||||
clifoDoc app;
|
||||
// Non è presente e lo inserisco per la chiave body
|
||||
if(mCliDoc.find(keyMap) == mCliDoc.end())
|
||||
@ -842,7 +861,7 @@ TString TTrFa_app::getHeader(TToken_string* strarr)
|
||||
app.countDoc = 0L;
|
||||
mCliDoc.insert(std::pair<TString,clifoDoc>(keyMap, app));
|
||||
}
|
||||
TString header; header.format("%c%06ld", strarr->get_char(_tipocf), strarr->get_int(_codcf));
|
||||
TString header; header.format("%c%06ld", tipocf[0], atol(codcf));
|
||||
// Ritorno l'header
|
||||
return header;
|
||||
}
|
||||
@ -1068,18 +1087,34 @@ bool TTrFa_app::tff0400(TSheet_field& sheet)
|
||||
return false;
|
||||
|
||||
IF_IS_ENABLED(strarr);
|
||||
static TString checkClifo; checkClifo.cut(0);
|
||||
|
||||
// Per le bolle doganali devo fare sempre questo giro
|
||||
bool foundBolla = false;
|
||||
if(strcmp(strarr->get(_codnum),"BD") == 0)
|
||||
{
|
||||
TString cfbolladog = cache().get(LF_MOV, strarr->get_long(_numero), "CFBOLLADOG");
|
||||
if(!cfbolladog.blank())
|
||||
{
|
||||
foundBolla = true;
|
||||
checkClifo << "F" << cfbolladog;
|
||||
}
|
||||
}
|
||||
if(!foundBolla)
|
||||
{
|
||||
checkClifo << strarr->get_char(_tipocf) << strarr->get_long(_codcf);
|
||||
}
|
||||
|
||||
// Controllo il clifo, se non c'è lo aggiungo altrimenti salto sto giro
|
||||
TString checkClifo; checkClifo << strarr->get_char(_tipocf) << strarr->get_long(_codcf);
|
||||
if(clifoSent.get_pos(checkClifo) < 0)
|
||||
clifoSent.add(checkClifo);
|
||||
else
|
||||
continue;
|
||||
|
||||
|
||||
TVariant vtipocf = strarr->get(_tipocf), vcodcf = strarr->get(_codcf), voccas = strarr->get(_occas);
|
||||
|
||||
#ifdef DBG
|
||||
if(vtipocf.as_string() == "F" && vcodcf.as_string() == "200423")
|
||||
if(vtipocf.as_string() == "F" && vcodcf.as_string() == "1814")
|
||||
bool tolla = true;
|
||||
#endif
|
||||
|
||||
@ -1096,7 +1131,7 @@ bool TTrFa_app::tff0400(TSheet_field& sheet)
|
||||
if(movimento >= MOV_CUSTOM)
|
||||
codcf << strarr->get(_codcf);
|
||||
else
|
||||
codcf = cache().get(LF_MOV, strarr->get(_numero), "CFBOLLADOG");
|
||||
codcf = cache().get(LF_MOV, movimento, "CFBOLLADOG");
|
||||
r_cedeprest = getCli("F", codcf, "");
|
||||
cedeprest.init(r_cedeprest);
|
||||
}
|
||||
@ -1373,7 +1408,13 @@ bool TTrFa_app::tff3100(TToken_string* strarr, TRectype r_ana)
|
||||
// La P.IVA del rappresentante fiscale deve essere in AT quindi non faccio alcun controllo,
|
||||
// se il valore nullo perchè Extra CEE non è un errore di campo (Anche perchè che senso ha un RF extra CEE?)
|
||||
|
||||
TString paiv = rfso.partita_IVA(), ragsoc = rfso.ragione_sociale(), nom = rfso.nome(), cog = rfso.cognome();
|
||||
TString paiv = rfso.partita_IVA(), ragsoc, nom, cog;
|
||||
ragsoc = rfso.ragione_sociale();
|
||||
if(ragsoc.blank())
|
||||
{
|
||||
nom = rfso.nome(),
|
||||
cog = rfso.cognome();
|
||||
}
|
||||
|
||||
tff3100f.set("PH_FISCIVAPAESE", rfso.stato_residenza_ISO());
|
||||
tff3100f.set("PH_FISCIVACODICE", paiv);
|
||||
|
Loading…
x
Reference in New Issue
Block a user