From 10981c9c9ce1ef6937c4b4cc680e07c2f283605b Mon Sep 17 00:00:00 2001 From: Alessandro Bonazzi Date: Tue, 11 Feb 2020 14:35:52 +0100 Subject: [PATCH] Patch level : 12.0 940 Files correlati : cg2.exe Commento : Aggiunti regimi speciali 14 16 17 18 al reverse charge --- src/cg/cg2102.cpp | 1 + src/cg/cg2103.cpp | 4 ++-- src/cg/cgpagame.cpp | 5 +++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/cg/cg2102.cpp b/src/cg/cg2102.cpp index 69eca9280..4afd90b1b 100755 --- a/src/cg/cg2102.cpp +++ b/src/cg/cg2102.cpp @@ -4058,6 +4058,7 @@ bool TPrimanota_application::scollega_handler(TMask_field& f, KEY key) } message_box("Il movimento e' stato scollegato dalla fattura elettronica\nin ingresso, precedentemente associata."); } + return true; } bool TPrimanota_application::is_collegato(TMask_field& f) diff --git a/src/cg/cg2103.cpp b/src/cg/cg2103.cpp index e6d71839d..02f99020a 100755 --- a/src/cg/cg2103.cpp +++ b/src/cg/cg2103.cpp @@ -171,13 +171,13 @@ bool TCausale::datareg_prec() const bool TCausale::reverse_charge() const { const int rsi = regime_speciale(); - return rsi == 13 || rsi == 50 || rsi == 51; // Reverse charge! + return rsi >= 13 || rsi <= 18 || rsi == 50 || rsi == 51; // Reverse charge! } bool TCausale::reverse_charge_pubb() const { const int rsi = regime_speciale(); - return rsi == 13 || rsi == 19 || rsi == 50 || rsi == 51; // Reverse charge! + return rsi >= 13 || rsi <= 19 || rsi == 50 || rsi == 51; // Reverse charge! } bool TCausale::esclusione_allegati() const diff --git a/src/cg/cgpagame.cpp b/src/cg/cgpagame.cpp index 4c8686305..67b3ebbb6 100755 --- a/src/cg/cgpagame.cpp +++ b/src/cg/cgpagame.cpp @@ -831,8 +831,9 @@ const char* TPagamento::desc_tipo(int tipo, char ulc, bool* ok) const if (ok != NULL) *ok = true; if (ulc > ' ') { - const char key[3] = { tipo+'0', toupper(ulc), '\0' }; - o = cache().get("%CLR", key).get("S0"); + // const char key[3] = { tipo+'0', toupper(ulc), '\0' }; + TString4 key; key << tipo << toupper(ulc); + o = cache().get("%CLR", key).get("S0"); } if (*o == '\0') {