From ea2523e8a78957c32cabe6e4d2dbe2f2fcfbcef4 Mon Sep 17 00:00:00 2001 From: alex Date: Tue, 27 Mar 2007 12:58:41 +0000 Subject: [PATCH] Patch level : 3.0 668 Files correlati : cg4.exe Ricompilazione Demo : [ ] Commento : MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: 0000713 Il quadro VT non viene calcolato correttamente se la ditta ha piu' attività git-svn-id: svn://10.65.10.50/trunk@15126 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- cg/cg4301.cpp | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/cg/cg4301.cpp b/cg/cg4301.cpp index a8e841cba..a7b3e14a6 100755 --- a/cg/cg4301.cpp +++ b/cg/cg4301.cpp @@ -154,6 +154,19 @@ bool TLiquidazione_app::update_firm(int month, bool recalc) // se necessario (serve nelle chiamate ricorsive) // Ritorna FALSE soltanto se il ricalcolo era necessario e non e' // stato effettuato per scelta dello stronzo commercialista. + if (month == 13 && recalc) + { + TTable pem("PEM"); + + for (int reg = 0; reg < 23; reg++) + { + look_pem(pem, reg); + pem.zero("R0"); + pem.zero("R1"); + pem.rewrite(); + } + } + look_lim(liq_month(month), TRUE); _isdiffacc = is_differita(); @@ -1923,15 +1936,21 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt) _pum->rewrite(); _pom->rewrite(); + if (month == 13) + { TTable pem("PEM"); + for (int reg = 0; reg < 23; reg++) { look_pem(pem, reg); - pem.put("R0", vt_imponibile[reg]); - pem.put("R1", vt_imposta[reg]); + real r = pem.get_real("R0") + vt_imponibile[reg]; + pem.put("R0", r); + r = pem.get_real("R1") + vt_imposta[reg]; + pem.put("R1", r); pem.rewrite(); } } + } } void TLiquidazione_app::iva11_set_arr_phase_1(const TString& codatt)