Patch level : 12.0 878
Files correlati : f9.exe Commento : Corretto id fiscale se e' senza piva metto il cod.fisc senza iso paese
This commit is contained in:
parent
62752a5aff
commit
5f3e1cf913
@ -1096,16 +1096,16 @@ bool TF9_app::estrazione_iva(const bool escluso)
|
|||||||
|
|
||||||
TLocalisamfile mov(LF_MOV); mov.put(MOV_NUMREG, it->get(1)); mov.read();
|
TLocalisamfile mov(LF_MOV); mov.put(MOV_NUMREG, it->get(1)); mov.read();
|
||||||
TLocalisamfile cli(LF_CLIFO);
|
TLocalisamfile cli(LF_CLIFO);
|
||||||
|
cli.put(CLI_TIPOCF, mov.get(MOV_TIPO));
|
||||||
|
cli.put(CLI_CODCF, mov.get(MOV_CODCF));
|
||||||
|
cli.read();
|
||||||
TString statopaiv; statopaiv << cli.get(CLI_STATOPAIV);
|
TString statopaiv; statopaiv << cli.get(CLI_STATOPAIV);
|
||||||
TString idfisc;
|
TString idfisc;
|
||||||
TString numdoc; numdoc << (mov.get(MOV_NUMDOCEXT).full() ? mov.get(MOV_NUMDOCEXT) : mov.get(MOV_NUMDOC));
|
TString numdoc; numdoc << (mov.get(MOV_NUMDOCEXT).full() ? mov.get(MOV_NUMDOCEXT) : mov.get(MOV_NUMDOC));
|
||||||
if (statopaiv == "IT" || statopaiv.empty())
|
if (statopaiv == "IT" || statopaiv.empty())
|
||||||
idfisc << "IT" << cli.get(CLI_PAIV);
|
idfisc << (cli.get(CLI_PAIV).empty() ? cli.get(CLI_COFI) : TString("IT") << cli.get(CLI_PAIV));
|
||||||
else
|
else
|
||||||
idfisc << statopaiv << cli.get(CLI_COFI);
|
idfisc << statopaiv << cli.get(CLI_COFI); // Esteri
|
||||||
cli.put(CLI_TIPOCF, mov.get(MOV_TIPO));
|
|
||||||
cli.put(CLI_CODCF, mov.get(MOV_CODCF));
|
|
||||||
cli.read();
|
|
||||||
|
|
||||||
query.cut(0) << "INSERT INTO " F9_IVA " (\n"
|
query.cut(0) << "INSERT INTO " F9_IVA " (\n"
|
||||||
IVA_CODSOC ", " IVA_IDLAN ", " IVA_FLAG_PD ",\n"
|
IVA_CODSOC ", " IVA_IDLAN ", " IVA_FLAG_PD ",\n"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user