Patch level : 12.0 552

Files correlati     :   cg4.exe cg7.exe cg7600a.rep cg7700a.rep cg7800a.rep

Modificato il calcolo dell' iva per cassa e differita nella liquidazione e nei quadri della dichiarazione, metteva in ivadiff dei righi di pagamaemnto di iva aesente che non avevano il rigo fattura, tolti.

git-svn-id: svn://10.65.10.50/branches/R_10_00@24432 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
bonazzi 2018-03-13 16:19:21 +00:00
parent 067ddf6587
commit 4a569295a1
7 changed files with 44 additions and 56 deletions

View File

@ -1371,6 +1371,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
if (!dok || sreg || rs8 || cmt)
continue;
const tipo_sospensione sosp_imp = _reg->get_bool("B1") ? (tipo_sospensione) _reg->get_int("I9") : nessuna;
/*
@ -1514,17 +1515,16 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
continue;
TDate datafat;
const TDate datareg = _mov->get_date(MOV_DATAREG);
int mesereg = datareg.month();
const bool ok = is_month_ok(month, mesereg) && (atoi(_year) == datareg.year());
if (!ok && civa.senza_imposta())
continue;
if (is_detr_diff == 1 && !ok)
continue;
if (bRowIsMovDiff && tm == tm_fattura)
{
const TDate datareg = _mov->get_date(MOV_DATAREG);
int mesereg = datareg.month();
const bool ok = is_month_ok(month, mesereg) && (atoi(_year) == datareg.year());
if (!ok && civa.senza_imposta())
continue;
if (is_detr_diff == 1 && !ok)
continue;
datafat = datareg;
sezfat = tipomov == vendita ? 'D' : 'A';
id.put(RMI_NUMREG, _rmoviva->get(RMI_NUMREG));
@ -1559,8 +1559,8 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
cantwrite_box(id.description());
}
if (!pagscatt.empty())
{
if (bRowIsMovDiff && !pagscatt.empty())
{
const char sezpag = tipomov == vendita ? 'A' : 'D';
real totfat = _mov->get(MOV_TOTDOC);
real tot = totfat;
@ -4597,13 +4597,13 @@ void TLiquidazione_app::recalc_annual(const char* att, real tot_reg, bool & firs
switch (tipomov)
{
case 1:
volaff1 -= (sezione == 'D') ? imp : -imp;
volaff1 += (sezione == 'D') ? imp : -imp;
break;
case 2:
volaff1 += (sezione == 'A') ? imp : -imp;
volaff1 += (sezione == 'A') ? -imp : imp;
break;
case 3:
volaff1 += (sezione == 'A') ? imp : -imp;
volaff1 += (sezione == 'A') ? -imp : imp;
break;
default:
break;

View File

@ -2791,8 +2791,9 @@ static void imp2string(const real& n, TString& str)
void TLiquidazione_app::set_iva_succ(int& rw)
{
TString query;
query << "USE IVADIFF KEY 2 SELECT (BETWEEN(DATAREG,#DAL,#AL))&&(BETWEEN(DATAREGP,0,#AL))"
<< "\nFROM ANNOLIQ=" << _year;
query << "USE IVADIFF KEY 2 SELECT (BETWEEN(DATAREG,#DAL,#AL))&&(BETWEEN(DATAREGP,0,#AL))"
<< "\nFROM ANNOLIQ=" << _year;
TISAM_recordset id(query);
const TDate da_datareg(1, 1, atoi(_year));
const TDate a_datareg(31, 12, atoi(_year));
@ -2815,6 +2816,7 @@ void TLiquidazione_app::set_iva_succ(int& rw)
}
const char sezione = id.get("SEZIONE").as_string()[0];
const TImporto imp(sezione, id.get(RMI_IMPONIBILE).as_real());
if (!imp.is_zero())
{
if (cur_tipoiva == 1) // Vendite
@ -2831,7 +2833,7 @@ void TLiquidazione_app::set_iva_succ(int& rw)
if (!ven_diff.is_zero() || !ven_xcas.is_zero() || !acq_xcas.is_zero())
{
set_row(rw++,FR("@11g@bOPERAZIONI EFFETTUATE NELL'ANNO CON IMPOSTA ESIGIBILE NEGLI ANNI SUCCESSIVI@r"));
set_row(rw++,FR("@11g@bOPERAZIONI EFFETTUATE NELL'ANNO CON IMPOSTA ESIGIBILE NEGLI ANNI SUCCESSIVI@r"));
const real vd = ven_diff.valore();
const real vc = ven_xcas.valore();
const real vt = vc+vd;

View File

@ -3,6 +3,7 @@
#include <tabutil.h>
#include <utility.h>
#include "cglib03.h"
#include "cg7401.h"
#include "cgpim.h"
#include "cg7400a.h"
@ -280,9 +281,10 @@ void TQuadro_VE_recordset::load()
cur_tipodiff = id.get(ID_TIPODIFF).as_int();
}
const TRectype & mov = cache().get(LF_MOV, numreg);
const char sezione = id.get(ID_SEZIONE).as_string()[0];
const int tipomov = id.get(ID_TIPOMOV).as_int();
const real imp = id.get(RMI_IMPONIBILE).as_real();
const real imp = id.get(RMI_IMPONIBILE).as_real();
if (!imp.is_zero() && cur_tipoiva == 1) // Vendite
{
@ -299,10 +301,7 @@ void TQuadro_VE_recordset::load()
add_value("VE37.2", (sezione == 'A') ? -imp : imp); // VE37.2 iva per cassa da incassare
break;
case 3:
add_value("VE37.1", (sezione == 'A') ? -imp : imp); // VE37.1 2 iva sospensione da incassare
add_value("VE39.1", (sezione == 'A') ? imp : -imp); // VE39.1 iva sospensione incassata
if (cur_tipodiff == 2)
add_value("VE37.2", (sezione == 'A') ? -imp : imp); // VE37.2 iva per cassa da incassare
break;
default:
break;

View File

@ -140,20 +140,18 @@
</field>
<field x="51.5" y="31.75" type="Numero" align="right" width="11" id="3010" pattern="1" text="###.###.###">
<source>#3002+#3003+#3004+#3005</source>
<postscript description="B1.3010 POSTSCRIPT">MESSAGE ADD,#B1.2301</postscript>
</field>
<field x="51" y="36.75" type="Numero" align="right" width="11" id="3101" pattern="1" text="###.###.###">
<field x="51" y="37" type="Numero" align="right" width="11" id="3101" pattern="1" text="###.###.###">
<source>VE31.1</source>
</field>
<field x="51" y="37.75" type="Numero" align="right" width="11" id="3201" pattern="1" text="###.###.###">
<field x="51" y="38" type="Numero" align="right" width="11" id="3201" pattern="1" text="###.###.###">
<source>VE32.1</source>
</field>
<field x="51" y="38.7" type="Numero" align="right" width="11" id="3301" pattern="1" text="###.###.###">
<field x="51" y="39" type="Numero" align="right" width="11" id="3301" pattern="1" text="###.###.###">
<source>VE33.1</source>
</field>
<field x="51" y="39.7" type="Numero" align="right" width="11" id="3401" pattern="1" text="###.###.###">
<field x="51" y="40" type="Numero" align="right" width="11" id="3401" pattern="1" text="###.###.###">
<source>VE34.1</source>
<postscript>MESSAGE ADD,#B1.2301</postscript>
</field>
<field x="19" y="43" type="Numero" align="right" width="11" id="3502" pattern="1" text="###.###.###">
<source>VE35.2</source>
@ -179,9 +177,8 @@
<field x="37" y="49.15" type="Numero" align="right" width="11" id="3509" pattern="1" text="###.###.###">
<source>VE35.9</source>
</field>
<field x="51" y="40.75" type="Numero" align="right" width="11" id="3510" pattern="1" text="###.###.###">
<field x="51" y="41" type="Numero" align="right" width="11" id="3510" pattern="1" text="###.###.###">
<source>#3502+#3503+#3504+#3505+#3506+#3507+#3508+#3509</source>
<postscript description="B1.3510 POSTSCRIPT">MESSAGE ADD,#B1.2301</postscript>
</field>
<field x="51" y="50.25" type="Numero" align="right" width="11" id="3601" pattern="1" text="###.###.###">
<source>VE36.1</source>
@ -194,19 +191,15 @@
</field>
<field x="51" y="54.25" type="Numero" align="right" width="11" id="3801" pattern="1" text="###.###.###">
<source>VE38.1</source>
<postscript>MESSAGE ADD,#B1.5001</postscript>
</field>
<field x="51" y="55.35" type="Numero" align="right" width="11" id="3901" pattern="1" text="###.###.###">
<source>VE39.1</source>
<postscript>MESSAGE SUB,#B1.5001</postscript>
</field>
<field x="51" y="56.35" type="Numero" align="right" width="11" id="4001" pattern="1" text="###.###.###">
<source>VE40.1</source>
<postscript>MESSAGE SUB,#B1.5001</postscript>
</field>
<field x="51" y="57.5" type="Numero" align="right" width="11" id="5001" pattern="1" text="###.###.###">
<source>#2401+#3010+#3101+#3201+#3301+#3401+#3510+#3601+#3701+#3801-#3901-#4001</source>
<postscript description="B1.5001 POSTSCRIPT">MESSAGE ADD,#B1.2301</postscript>
</field>
</section>
<section type="Foot" pattern="1" />

View File

@ -339,10 +339,10 @@ void TQuadro_VF_recordset::load()
add_value("VF21.2", (sezione == 'D') ? -imp : imp); // VF21.2 iva per cassa da pagare
break;
case 3:
add_value("VF21.1", (sezione == 'D') ? -imp : imp); // VF21.1 iva sospensione da pagare
// add_value("VF21.1", (sezione == 'D') ? -imp : imp); // VF21.1 iva sospensione da pagare
add_value("VF22.1", (sezione == 'D') ? imp : -imp); // VF22.1 iva sospensione pagata
if (cur_tipodiff == 2)
add_value("VF21.2", (sezione == 'D') ? -imp : imp); // VF21.2 iva per cassa da pagare
// if (cur_tipodiff == 2)
// add_value("VF21.2", (sezione == 'D') ? -imp : imp); // VF21.2 iva per cassa da pagare
break;
default:
break;

View File

@ -136,7 +136,7 @@
<source>VF22.1</source>
</field>
<field x="51" y="39" type="Numero" align="right" width="11" id="2301" pattern="1" text="###.###.###">
<source>#101+#201+#301+#401+#501+#601+#701+#801+#901+#1001+#1101+#1201+#1301+#1401+#1501+#1601+#1701+#1801+#1901+#2001+#2101+#2201</source>
<source>#101+#201+#301+#401+#501+#601+#701+#801+#901+#1001+#1101+#1201+#1301+#1401+#1501+#1601+#1701+#1801+#1901+#2001+#2101-#2201</source>
</field>
<field x="65" y="39" type="Numero" align="right" width="11" id="2302" pattern="1" text="###.###.###">
<source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#1002+#1102+#1202+#1302</source>

View File

@ -90,34 +90,34 @@
<field x="65.5" y="27.75" type="Numero" align="right" width="11" id="1102" pattern="1" text="###.###.###">
<source>VJ11.2</source>
</field>
<field x="51.5" y="29.75" type="Numero" align="right" width="11" id="1201" pattern="1" text="###.###.###">
<field x="51.5" y="28.75" type="Numero" align="right" width="11" id="1201" pattern="1" text="###.###.###">
<source>VJ12.1</source>
</field>
<field x="65.5" y="29.5" type="Numero" align="right" width="11" id="1202" pattern="1" text="###.###.###">
<field x="65.5" y="28.75" type="Numero" align="right" width="11" id="1202" pattern="1" text="###.###.###">
<source>VJ12.2</source>
</field>
<field x="51.5" y="30.75" type="Numero" align="right" width="11" id="1301" pattern="1" text="###.###.###">
<field x="51.5" y="29.75" type="Numero" align="right" width="11" id="1301" pattern="1" text="###.###.###">
<source>VJ13.1</source>
</field>
<field x="65.5" y="30.75" type="Numero" align="right" width="11" id="1302" pattern="1" text="###.###.###">
<field x="65.5" y="29.75" type="Numero" align="right" width="11" id="1302" pattern="1" text="###.###.###">
<source>VJ13.2</source>
</field>
<field x="51.5" y="31.75" type="Numero" align="right" width="11" id="1401" pattern="1" text="###.###.###">
<field x="51.5" y="30.75" type="Numero" align="right" width="11" id="1401" pattern="1" text="###.###.###">
<source>VJ14.1</source>
</field>
<field x="65.5" y="31.75" type="Numero" align="right" width="11" id="1402" pattern="1" text="###.###.###">
<field x="65.5" y="30.75" type="Numero" align="right" width="11" id="1402" pattern="1" text="###.###.###">
<source>VJ14.2</source>
</field>
<field x="51.5" y="32.75" type="Numero" align="right" width="11" id="1501" pattern="1" text="###.###.###">
<field x="51.5" y="31.75" type="Numero" align="right" width="11" id="1501" pattern="1" text="###.###.###">
<source>VJ15.1</source>
</field>
<field x="65.5" y="32.75" type="Numero" align="right" width="11" id="1502" pattern="1" text="###.###.###">
<field x="65.5" y="31.75" type="Numero" align="right" width="11" id="1502" pattern="1" text="###.###.###">
<source>VJ16.2</source>
</field>
<field x="51.5" y="34" type="Numero" align="right" width="11" id="1601" pattern="1" text="###.###.###">
<field x="51.5" y="32.75" type="Numero" align="right" width="11" id="1601" pattern="1" text="###.###.###">
<source>VJ16.1</source>
</field>
<field x="65.5" y="34" type="Numero" align="right" width="11" id="1602" pattern="1" text="###.###.###">
<field x="65.5" y="32.75" type="Numero" align="right" width="11" id="1602" pattern="1" text="###.###.###">
<source>VJ16.2</source>
</field>
<field x="51.5" y="35" type="Numero" align="right" width="11" id="1701" pattern="1" text="###.###.###">
@ -126,20 +126,14 @@
<field x="65.5" y="35" type="Numero" align="right" width="11" id="1702" pattern="1" text="###.###.###">
<source>VJ17.2</source>
</field>
<field x="51.5" y="37" type="Numero" align="right" width="11" id="1801" pattern="1" text="###.###.###">
<field x="51.5" y="36" type="Numero" align="right" width="11" id="1801" pattern="1" text="###.###.###">
<source>VJ18.1</source>
</field>
<field x="65.5" y="37" type="Numero" align="right" width="11" id="1802" pattern="1" text="###.###.###">
<field x="65.5" y="36" type="Numero" align="right" width="11" id="1802" pattern="1" text="###.###.###">
<source>VJ18.2</source>
</field>
<field x="51.5" y="38" type="Numero" align="right" width="11" id="1901" pattern="1" text="###.###.###">
<source>VJ19.1</source>
</field>
<field x="65.5" y="38" type="Numero" align="right" width="11" id="1902" pattern="1" text="###.###.###">
<source>VJ19.2</source>
</field>
<field x="65.5" y="39" type="Numero" align="right" width="11" id="2002" pattern="1" text="###.###.###">
<source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#1002+ #1102+#1202+#1302+#1402+#1502+#1602+#1702+#1802+#1902</source>
<field x="65.5" y="37" type="Numero" align="right" width="11" id="1902" pattern="1" text="###.###.###">
<source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#1002+ #1102+#1202+#1302+#1402+#1502+#1602+#1702+#1802</source>
</field>
<field x="78" y="64.75" type="Numero" align="right" width="1" id="9999" pattern="1" text="###.###.###" />
</section>