From 6c36498345ff17223b8f0e131575e9b537130fb0 Mon Sep 17 00:00:00 2001 From: Simone Palacino Date: Thu, 17 Oct 2019 12:22:15 +0200 Subject: [PATCH] Patch level : 12.0 890 Files correlati : f90.exe Commento : - Corretto caricamento moviementi utilizzando un recordset invece che leggere dal file direttamente: non tutti i moviementi venivano letti - Cambiato idfiscale secondo nuove direttive --- src/f9/f90100.cpp | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/f9/f90100.cpp b/src/f9/f90100.cpp index 201b91c7f..4fb90e3e1 100644 --- a/src/f9/f90100.cpp +++ b/src/f9/f90100.cpp @@ -1100,10 +1100,13 @@ bool TF9_app::estrazione_iva(const bool escluso) TString statopaiv; statopaiv << cli.get(CLI_STATOPAIV); TString idfisc; TString numdoc; numdoc << (mov.get(MOV_NUMDOCEXT).full() ? mov.get(MOV_NUMDOCEXT) : mov.get(MOV_NUMDOC)); - if (statopaiv == "IT" || statopaiv.empty()) - idfisc << (cli.get(CLI_PAIV).empty() ? cli.get(CLI_COFI) : TString("IT") << cli.get(CLI_PAIV)); - else - idfisc << statopaiv << cli.get(CLI_COFI); // Esteri + if (statopaiv == "IT" || statopaiv.empty()) + { + idfisc << "IT"; + if (cli.get(CLI_PAIV).full()) // Se non ho la partita IVA e' privato quindi non metto niente solo cod. ISO + idfisc << cli.get(CLI_PAIV); + } + else idfisc << statopaiv << cli.get(CLI_COFI); // Esteri query.cut(0) << "INSERT INTO " F9_IVA " (\n" IVA_CODSOC ", " IVA_IDLAN ", " IVA_FLAG_PD ",\n"