From 12b561fc665f124f1e9b96c0729747d8c2a8bbb6 Mon Sep 17 00:00:00 2001 From: AlexBonazzi Date: Mon, 16 Sep 2019 19:48:54 +0200 Subject: [PATCH 1/3] Patch level : 12.0 87 Files correlati : cg1.exe cg1500a.uml Commento : Stampa bilancio con provvisori Liquidazione --- src/cg/cg1500a.uml | 48 ++++++++++++++++++++++++++++++---------------- src/cg/cg4301.cpp | 20 ++++++++++++------- src/cg/cg4302.cpp | 5 +++++ 3 files changed, 50 insertions(+), 23 deletions(-) diff --git a/src/cg/cg1500a.uml b/src/cg/cg1500a.uml index 705faaed8..d3d2e8b84 100755 --- a/src/cg/cg1500a.uml +++ b/src/cg/cg1500a.uml @@ -59,19 +59,23 @@ BEGIN PROMPT 2 5 "@bTipo bilancio" HELP "Indicare il tipo di bilancio da stampare" ITEM "1|Bilancio a sezioni contrapposte" - MESSAGE HIDE,F_STAMPA1|RESET,F_STAMPA1|HIDE,F_VERIFICA|RESET,F_VERIFICA - MESSAGE HIDE,F_STAMPAV|RESET,F_STAMPAV|HIDE,F_DATADA|RESET,F_DATADA - MESSAGE HIDE,F_DATAA|RESET,F_DATAA|HIDE,F_SITUAZIONE|RESET,F_SITUAZIONE - MESSAGE HIDE,F_ORDINAMENTO|RESET,F_ORDINAMENTO|HIDE,F_STAMPAC|RESET,F_STAMPAC + //MESSAGE HIDE,F_STAMPA1|RESET,F_STAMPA1|HIDE,F_VERIFICA|RESET,F_VERIFICA + //MESSAGE HIDE,F_STAMPAV|RESET,F_STAMPAV|HIDE,F_DATADA|RESET,F_DATADA + //MESSAGE HIDE,F_DATAA|RESET,F_DATAA|HIDE,F_SITUAZIONE|RESET,F_SITUAZIONE + //MESSAGE HIDE,F_ORDINAMENTO|RESET,F_ORDINAMENTO|HIDE,F_STAMPAC|RESET,F_STAMPAC + MESSAGE SHOW,1@ + MESSAGE HIDE,2@|RESET,2@ MESSAGE HIDE,96|HIDE,97|HIDE,98|HIDE,99 MESSAGE CLEAR,F_MODULO - MESSAGE SHOW,F_STAMPA|K_SPACE,F_STAMPA + //MESSAGE SHOW,F_STAMPA|K_SPACE,F_STAMPA ITEM "2|Bilancio di verifica" - MESSAGE HIDE,F_STAMPA|RESET,F_STAMPA - MESSAGE HIDE,F_DATALIM|RESET,F_DATALIM|HIDE,F_TOTALI|RESET,F_TOTALI - MESSAGE HIDE,F_CODICI|RESET,F_CODICI|HIDE,F_SALDO|RESET,F_SALDO - MESSAGE HIDE,F_STAMPAV|RESET,F_STAMPAV - MESSAGE SHOW,F_VERIFICA|K_SPACE,F_VERIFICA|SHOW,F_STAMPA1|K_SPACE,F_STAMPA1 + //MESSAGE HIDE,F_STAMPA|RESET,F_STAMPA + //MESSAGE HIDE,F_DATALIM|RESET,F_DATALIM|HIDE,F_TOTALI|RESET,F_TOTALI + //MESSAGE HIDE,F_CODICI|RESET,F_CODICI|HIDE,F_SALDO|RESET,F_SALDO + //MESSAGE HIDE,F_STAMPAV|RESET,F_STAMPAV + MESSAGE HIDE,1@|RESET,1@ + MESSAGE SHOW,2@ + //MESSAGE SHOW,F_VERIFICA|K_SPACE,F_VERIFICA|SHOW,F_STAMPA1|K_SPACE,F_STAMPA1 MESSAGE ENABLE,F_MODULO MESSAGE SHOW,96|SHOW,97|SHOW,98|SHOW,99 END @@ -80,6 +84,7 @@ RADIOBUTTON F_STAMPA 28 BEGIN PROMPT 41 5 "@bTipo stampa" HELP "Indicare il tipo di stampa" + GROUP 1 ITEM "1|Per date limite" MESSAGE SHOW,F_DATALIM|SHOW,F_TOTALI|SHOW,F_CODICI|SHOW,F_SALDO #ifdef CONT_SEP @@ -98,13 +103,14 @@ BEGIN PROMPT 40 5 "@bTipo stampa" //FLAGS "G" HELP "Indicare il tipo di stampa" + GROUP 2 ITEM "1|Per date limite" - MESSAGE SHOW,F_VERIFICA|SHOW,F_MODULO|SHOW,F_STAMPAMPROV + MESSAGE SHOW,F_VERIFICA|SHOW,F_MODULO #ifdef CONT_SEP MESSAGE SHOW,F_CONTSEP #endif ITEM "2|All'ultima immissione" - MESSAGE SHOW,F_VERIFICA|SHOW,F_MODULO|SHOW,F_STAMPAMPROV + MESSAGE SHOW,F_VERIFICA|SHOW,F_MODULO MESSAGE COPY,F_STAMPA #ifdef CONT_SEP MESSAGE HIDE,F_CONTSEP @@ -115,34 +121,38 @@ DATE F_DATALIM BEGIN PROMPT 2 9 "Data limite " HELP "Data fino alla quale si vuole la stampa" + GROUP 1 END BOOLEAN F_TOTALI BEGIN PROMPT 33 9 "Non stampare totali per gruppo " HELP "Indicare se non si devono stampare i totali dei gruppi" + GROUP 1 END BOOLEAN F_CODICI BEGIN PROMPT 2 10 "Non stampare codici conti " HELP "Indicare se non si devono stampare i codici dei conti" + GROUP 1 END BOOLEAN F_SALDO BEGIN PROMPT 33 10 "Non stampare movimenti con saldo a zero " HELP "Indicare se non si devono stampare i movimenti con saldo nullo" + GROUP 1 END TEXT 96 BEGIN - PROMPT 2 10 "Dalla data competenza " + PROMPT 2 9 "Dalla data competenza " END TEXT 97 BEGIN - PROMPT 38 10 "Alla data competenza " + PROMPT 38 9 "Alla data competenza " END TEXT 98 @@ -158,12 +168,14 @@ END DATE F_DATADA BEGIN PROMPT 24 10 "" - HELP "Data dalla quale iniziare la stampa" + HELP "Data dall quale iniziare la stampa" + GROUP 2 END DATE F_DATAA BEGIN PROMPT 60 10 "" + GROUP 2 END BOOLEAN F_NORMALI @@ -222,6 +234,7 @@ RADIOBUTTON F_VERIFICA 27 BEGIN PROMPT 2 1 "@bStampa bilancio di verifica " HELP "Tipo di bilancio di verifica" + GROUP 2 ITEM "1|Bilancio" MESSAGE SHOW,F_HIDE_CLIFO|SHOW,F_PRINT_FULL_CODE ITEM "2|Saldi di mastro" @@ -233,9 +246,9 @@ END RADIOBUTTON F_STAMPAC 36 BEGIN PROMPT 34 1 "@bTipo stampa" - ITEM "1|Conti movimentati" ITEM "2|Conti con saldo diverso da zero" + GROUP 2 END RADIOBUTTON F_STAMPAV 36 @@ -244,6 +257,7 @@ BEGIN ITEM "1|Conti movimentati" ITEM "2|Conti con saldo diverso da zero" ITEM "3|Tutti i conti" + GROUP 1 2 END BOOLEAN F_SEPARATOR @@ -275,6 +289,7 @@ BEGIN ITEM " |Entrambi" ITEM "C|Clienti" ITEM "F|Fornitori" + GROUP 2 END LIST F_ORDINAMENTO 11 @@ -282,6 +297,7 @@ BEGIN PROMPT 2 11 "Tipo ordinamento " ITEM "1|Per codice" ITEM "2|Alfabetico" + GROUP 2 END GROUPBOX DLG_NULL 55 6 diff --git a/src/cg/cg4301.cpp b/src/cg/cg4301.cpp index 110fb7427..36619c054 100755 --- a/src/cg/cg4301.cpp +++ b/src/cg/cg4301.cpp @@ -1556,7 +1556,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array & long nr = _mov->get_long(MOV_NUMREG); if (nr == 97882 || nr == 98707) - int i = 1; + int i = 1; #endif if ((soloiva && @@ -4102,8 +4102,6 @@ void TLiquidazione_app::write_liq(int month, const char* codatts) credito_utilizzabile -= cred_util_F24; credito_autorizzato_F24 = lim.get_real("R20"); credito_utilizzabile += credito_autorizzato_F24; -// risultato += credito_autorizzato_F24; -// res_debt += credito_autorizzato_F24; if (credito_utilizzabile < ZERO) credito_utilizzabile = ZERO; @@ -4118,9 +4116,17 @@ void TLiquidazione_app::write_liq(int month, const char* codatts) credito_utilizzato_iva = min(risul, credito_utilizzabile); res_cred += credito_utilizzato_iva; risultato -= credito_utilizzato_iva; - } + } } - } + if (credito_compensabile) + { + TRectype lim = get_lim(month + deltam); + + credito_autorizzato_F24 = lim.get_real("R20"); + risultato += credito_autorizzato_F24; + res_debt += credito_autorizzato_F24; + } + } else { if (credito_compensabile) @@ -4139,8 +4145,8 @@ void TLiquidazione_app::write_liq(int month, const char* codatts) credito_utilizzabile += credito_autorizzato(13); if (credito_utilizzabile < ZERO) credito_utilizzabile = ZERO; - } - } + } + } else { // per l'annuale considera solo il credito a inizio anno diff --git a/src/cg/cg4302.cpp b/src/cg/cg4302.cpp index 782e6fc28..2623fd135 100755 --- a/src/cg/cg4302.cpp +++ b/src/cg/cg4302.cpp @@ -138,7 +138,12 @@ bool TLiquidazione_app::is_date_ok(const TDate& d, int month, int liqmonth, int else // Nuova selezione dal 1998 in poi { if (month <= 12) + { + if (_is_liq_acconto) + return (regyear == year) && ((regmonth == month && liqmonth == 0) || (liqmonth == month)) && (d.day() <= _ver->giorno_acc()); + else return (regyear == year) && ((regmonth == month && liqmonth == 0) || (liqmonth == month)); + } else // Annuale, month == 13 return (regyear == year && liqmonth != 12) || (regyear == year + 1 && liqmonth == 12); } From 216d2b6d849bf690dd826b70320511d6a5c2557c Mon Sep 17 00:00:00 2001 From: AlexBonazzi Date: Mon, 16 Sep 2019 19:50:29 +0200 Subject: [PATCH 2/3] Patch level : 12.0 874 Files correlati : cg4.exe cg1500a.uml Commento : Stampa bilancio con provvisori Liquidazione --- src/cg/cg4304.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cg/cg4304.cpp b/src/cg/cg4304.cpp index f621c86c2..2e425b05d 100755 --- a/src/cg/cg4304.cpp +++ b/src/cg/cg4304.cpp @@ -2426,7 +2426,7 @@ void TLiquidazione_app::set_grand_2000(_DescrItem& d, int &rw) if (_month < 13 && credito_compensabile && credito_autorizzato_F24 > ZERO) { cred_prec -= credito_autorizzato_F24; - cre_deb_per += credito_autorizzato_F24; +// cre_deb_per += credito_autorizzato_F24; set_row(rw++,FR("%s@11gCredito IVA autorizzato in F24%s@75g%r@100gil %s"), _is_visliq ? "$[r]" : "", _is_visliq ? "$[n]" : "", &credito_autorizzato_F24, (const char *) data_autorizzazione); } cred_prec -= rimborso; @@ -2547,7 +2547,7 @@ void TLiquidazione_app::set_grand_2000(_DescrItem& d, int &rw) if (credito_autorizzato_F24 > ZERO) { credito_utilizzabile += credito_autorizzato_F24; - set_row(rw++,FR("%s@11gCredito IVA autorizzato in F24%s@75g%r@100gil %s"), _is_visliq ? "$[r]" : "", _is_visliq ? "$[n]" : "", &credito_autorizzato_F24, (const char *) data_autorizzazione); + set_row(rw++,FR("%s@11gCredito IVA autorizzato in F24%s@58g%r@100gil %s"), _is_visliq ? "$[r]" : "", _is_visliq ? "$[n]" : "", &credito_autorizzato_F24, (const char *) data_autorizzazione); } set_row(rw++, FR("@11gCredito IVA compensabile detratto@75g%r"), &credito_utilizzato_IVA); credito_utilizzabile -= credito_utilizzato_IVA; From 75b60405f13a4dd1382e683c8c34205b1fad216d Mon Sep 17 00:00:00 2001 From: AlexBonazzi Date: Mon, 16 Sep 2019 20:01:00 +0200 Subject: [PATCH 3/3] Patch level : 12.0 874 Files correlati : cg4.exe cg1500a.uml Commento : Stampa bilancio con provvisori Liquidazione --- src/cg/cg4302.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/cg/cg4302.cpp b/src/cg/cg4302.cpp index 2623fd135..782e6fc28 100755 --- a/src/cg/cg4302.cpp +++ b/src/cg/cg4302.cpp @@ -138,12 +138,7 @@ bool TLiquidazione_app::is_date_ok(const TDate& d, int month, int liqmonth, int else // Nuova selezione dal 1998 in poi { if (month <= 12) - { - if (_is_liq_acconto) - return (regyear == year) && ((regmonth == month && liqmonth == 0) || (liqmonth == month)) && (d.day() <= _ver->giorno_acc()); - else return (regyear == year) && ((regmonth == month && liqmonth == 0) || (liqmonth == month)); - } else // Annuale, month == 13 return (regyear == year && liqmonth != 12) || (regyear == year + 1 && liqmonth == 12); }