From 555390f63c6bccfd58eb191d016ab787ed7ddb2b Mon Sep 17 00:00:00 2001 From: mtollari Date: Fri, 28 Apr 2017 12:52:57 +0000 Subject: [PATCH] Patch level : 12.0 no-patch Files correlati : Commento : Aggiornamento personalizzazione ATS, aggiunto controllo causali per ritenute fiscali, adesso verifico che il campo 26.REGSPIVA non sia valorizzato git-svn-id: svn://10.65.10.50/branches/R_10_00@23759 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- src/ps/ps0713800.cpp | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/ps/ps0713800.cpp b/src/ps/ps0713800.cpp index ad110dfc8..3eaae4135 100644 --- a/src/ps/ps0713800.cpp +++ b/src/ps/ps0713800.cpp @@ -12,6 +12,15 @@ #include "ps0713800a.h" + +/* Utility */ + +bool regSpec(TString codcaus) +{ + return cache().get(LF_CAUSALI, codcaus, "REGSPIVA") != "X"; +} + + /////////////////////////////////// //// TEsportaIva_msk //// /////////////////////////////////// @@ -311,7 +320,7 @@ void TEsportaIva_msk::fill() if (!pi.add_status()) break; - if(get_bool(B_SOLRITFIS) && rmoviva.get("23.RITFIS").as_real() <= ZERO) continue; + if(get_bool(B_SOLRITFIS) && rmoviva.get("23.RITFIS").as_real() <= ZERO && !regSpec(rmoviva.get("23.CODCAUS").as_string())) continue; TCursor* i = rmoviva.cursor(); int k = i->pos(); @@ -534,7 +543,7 @@ void TEsportaIva_app::esporta_righe_iva(const TEsportaIva_msk& m) const if (!pi.add_status()) break; - if(m.get_bool(B_SOLRITFIS) && rmoviva.get("23.RITFIS").as_real() <= ZERO) continue; + if(m.get_bool(B_SOLRITFIS) && rmoviva.get("23.RITFIS").as_real() <= ZERO && !regSpec(rmoviva.get("23.CODCAUS").as_string())) continue; TDate last_data_pag; const long numreg = rmoviva.get(RMI_NUMREG).as_int();