From 7532b598db497f5e484d4d2245505daa1fe5dfd4 Mon Sep 17 00:00:00 2001 From: bonazzi Date: Thu, 25 May 2017 02:15:25 +0000 Subject: [PATCH] Patch level : 12.0 400 Files correlati : cg4.exe Considerati i movimenti split payment solo per l'imponibile e non per l'imposta git-svn-id: svn://10.65.10.50/branches/R_10_00@23838 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- src/cg/cg4301.cpp | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/src/cg/cg4301.cpp b/src/cg/cg4301.cpp index d6cf0647d..ab4ec7aff 100755 --- a/src/cg/cg4301.cpp +++ b/src/cg/cg4301.cpp @@ -1116,6 +1116,13 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array & break; TDate date = _mov->get(MOV_DATAREG); +#ifdef DBG + const long nr = _mov->get_long(MOV_NUMREG); + + if (nr == 214882) + int i = 1 ; +#endif + const int liqmonth = _mov->get_int(MOV_MESELIQ); const TString4 reg = _mov->get("REG"); const bool isreg = look_reg(reg); @@ -1143,11 +1150,12 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array & const bool cau_intra = rcs.get_bool(CAU_INTRACOM); const bool cau_valintra = rcs.get_bool(CAU_VALINTRA); + /* // Gestione SPLIT PAYMENT dal 01-01-2015: movimenti a enti pubblici senza ritenuta e senza reverse charge if (tipomov == vendita && (tm == tm_fattura || tm == tm_nota_credito) && !cau_intra && date.year() >= 2015 && is_split_payment(_mov->curr())) { - /* Dal 2016 calcoliamo comunicazione annuale in cg5 + Dal 2016 calcoliamo comunicazione annuale in cg5 // aggiunto il 27-01-2016: in tredicesima devo compilare anche CD1_1 if (month == 13 && date.year() == year_int) { @@ -1168,9 +1176,9 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array & } } while (_cur->next_match(LF_RMOVIVA)); } - */ + continue; // Ignora movimento di split payment - } + } */ // Inizio gestione IVA differita const bool iva_diff = _mov->get_bool(MOV_LIQDIFF) && is_IVA_diff(_mov->curr()); @@ -1182,9 +1190,9 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array & TPointer_array pagscatt; // Righe di pagsca interessate #ifdef DBG - const long nr = _mov->get_long(MOV_NUMREG); +// const long nr = _mov->get_long(MOV_NUMREG); - if (nr == 91934 ) + if (nr == 214882 ) int i = 1 ; #endif @@ -1436,9 +1444,12 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array & const int decimals = TCurrency::get_firm_dec(); const real imponibile_orig = _rmoviva->get_real(RMI_IMPONIBILE); - const real imposta_orig = _rmoviva->get_real(RMI_IMPOSTA); + real imposta_orig = _rmoviva->get_real(RMI_IMPOSTA); const real lordo_orig = imponibile_orig + imposta_orig; + if (is_split_payment(_mov->curr())) + imposta_orig = ZERO; + real diff_imp; // Liquidazione differita imponibile real diff_iva; // Liquidazione differita imposta real incdiff_imp; // Liquidazione differita incassate imponibile @@ -1459,7 +1470,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array & #ifdef DBG const long nr = _mov->get_long(MOV_NUMREG); - if (nr == 91934) + if (nr == 214882) int i = 1 ; if (iva_cass && tm == vendita) int i = 1; @@ -2936,6 +2947,9 @@ void TLiquidazione_app::iva11_set_arr_phase_1(const TString& codatt) const int tipodet = get_tipodet_from_rmi(_rmoviva->curr(), _mov->curr(), percind); real imponibile = _rmoviva->get_real(RMI_IMPONIBILE); real imposta = _rmoviva->get_real(RMI_IMPOSTA); + + if (is_split_payment(_mov->curr())) + imposta = ZERO; const TString4 codiva = _iva->get("CODTAB"); const TString4 tipoiva = _iva->get("S1"); const real ali = _iva->get_real("R0");