From 517fa1f6db7e34d64fcf65818e86a6c7357a6643 Mon Sep 17 00:00:00 2001 From: Sirio Builder Date: Thu, 21 Feb 2019 12:25:58 +0100 Subject: [PATCH] Patch level : 12.0 704 Files correlati : fp Commento : Aggiunto controllo tipo documento SDI per dati sporchi --- src/fp/fp0500.cpp | 2 +- src/fp/fplib01.cpp | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/fp/fp0500.cpp b/src/fp/fp0500.cpp index 0f126eb15..b6b6fa9e5 100644 --- a/src/fp/fp0500.cpp +++ b/src/fp/fp0500.cpp @@ -124,7 +124,7 @@ void TMancati_mask::fill() #ifdef DBG enable(DLG_OK); #else - enable(DLG_OK, filter_selected != "X" && filter_selected != "P"); + enable(DLG_OK, false); #endif // Record di controllo per eventuali elaborazioni precedenti diff --git a/src/fp/fplib01.cpp b/src/fp/fplib01.cpp index 4d1e4d373..779411c3c 100644 --- a/src/fp/fplib01.cpp +++ b/src/fp/fplib01.cpp @@ -207,7 +207,16 @@ inline const TString& no_special(char a) } const TString& tipo_doc_sdi(const TDocumento& doc) { - return doc.get(DOC_TIPODOCSDI).full() ? doc.get(DOC_TIPODOCSDI) : doc.tipo().tipo_doc_sdi(); + static TString tipo_doc_sdi; + tipo_doc_sdi.cut(0) << doc.get(DOC_TIPODOCSDI); + + // Controlli da fare per clienti a cui si fotte la conversione e mi trovo dati sporchi nella colonna + if (tipo_doc_sdi.len() == 4 && tipo_doc_sdi.starts_with("TD")) + { + return tipo_doc_sdi; + } + + return doc.tipo().tipo_doc_sdi(); } bool is_fattura(const TRectype& doc)