From e459e740635424853c44798ffb02b3224bb85213 Mon Sep 17 00:00:00 2001 From: smen Date: Tue, 28 Feb 2023 11:35:29 +0100 Subject: [PATCH] Patch level : 12.0 Files correlati : fp Commento: Preparazione patch TD16 --- build/fp0.vcxproj | 3 +++ build/fp0.vcxproj.filters | 3 +++ src/fp/fplib01.cpp | 28 ++++++++++++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/build/fp0.vcxproj b/build/fp0.vcxproj index ec1992a42..244517710 100644 --- a/build/fp0.vcxproj +++ b/build/fp0.vcxproj @@ -288,6 +288,9 @@ true true + + true + diff --git a/build/fp0.vcxproj.filters b/build/fp0.vcxproj.filters index 7b51fd866..fc9bbbd4d 100644 --- a/build/fp0.vcxproj.filters +++ b/build/fp0.vcxproj.filters @@ -147,6 +147,9 @@ Sqls + + Sqls + diff --git a/src/fp/fplib01.cpp b/src/fp/fplib01.cpp index a7a0c5c52..6939acf01 100644 --- a/src/fp/fplib01.cpp +++ b/src/fp/fplib01.cpp @@ -835,6 +835,8 @@ const char* TPaf_container::paf_to_prefix(const char * paf) return "PP"; if (paf_name == "PAF2700F") return "PQ"; + if (paf_name == "PAF2800F") + return "PR"; if (paf_name == "PAF3000F") return "PT"; if (paf_name == "PAF3200F") @@ -896,6 +898,8 @@ TPaf_container::TPaf_container() _pafs.insert(std::pair("PAF2600F", TPaf_record("PAF2600F"))); // Testata documento (aggiunte) _pafs.insert(std::pair("PAF2700F", TPaf_record("PAF2700F"))); + // Indirizzi di spedizione + _pafs.insert(std::pair("PAF2800F", TPaf_record("PAF2800F"))); // Descrizione _pafs.insert(std::pair("PAF3000F", TPaf_record("PAF3000F"))); // PEC @@ -2042,6 +2046,30 @@ bool TDoc_fp::doc_to_paf(TDocumentoEsteso& doc) // paf2700f.set("PQ_ART73", true); paf2700f.set("PQ_GESTIONE", stato_paf()); ok &= insert(paf2700f); + + // Indirizzi di spedizione PAF28 + TPaf_record paf2800f = _paf_container.get_paf("PAF2800F"); + reset(paf2800f); + + const TString& cod_sped = cache().get("%MSP", doc.get(DOC_CODSPMEZZO), "S0"); + const TString& caus_trasp = cache().get("%CTR", doc.get(DOC_CAUSTRASP), "S0"); + const TString& asp_beni = cache().get("%ABE", doc.get(DOC_ASPBENI1), "S0"); + const TString& um_netto = doc.get(DOC_UMPNETTO); + const real pnetto = doc.get(DOC_PNETTO); + const real tara = doc.get(DOC_TARA); + const real plordo = pnetto + tara; + TDate data_part = doc.get_date(DOC_DATAPART); + + paf2800f.set("PR_MEZZOTRASP", cod_sped); + paf2800f.set("PR_CAUSALETRASP", caus_trasp); + paf2800f.set("PR_NUMCOLLI", doc.get(DOC_NCOLLI)); + paf2800f.set("PR_DESCRIZIONE", asp_beni); + paf2800f.set("PR_UMPESO", um_netto); + paf2800f.set("PR_PESONETTO", pnetto); + paf2800f.set("PR_PESOLORDO", plordo); + paf2800f.set("PR_DATAUNIZIO", data_part); + ok &= insert(paf2800f); + // if ((doc.is_nota_credito() || get_send_all_rifs()) && doc.get(DOC_NUMDOCRIF).full()) {