Patch level : 10.0 290
Files correlati : Commento : Quadro VE git-svn-id: svn://10.65.10.50/branches/R_10_00@23356 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d04b37345c
commit
98250c29aa
@ -241,7 +241,7 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
|
|||||||
TString buf(127);
|
TString buf(127);
|
||||||
buf.format( _printonly ? FR("Stampa liquidazione %s %d...\n%s:\n%s\n") :
|
buf.format( _printonly ? FR("Stampa liquidazione %s %d...\n%s:\n%s\n") :
|
||||||
FR("Calcolo liquidazione %s %d...\n%s:\n%s\n"),
|
FR("Calcolo liquidazione %s %d...\n%s:\n%s\n"),
|
||||||
itom(month), atoi(_year), (const char*)_nditte_r->get(NDT_RAGSOC), (const char*)desatt);
|
month == 13 ? "13a" : itom(month), atoi(_year), (const char*)_nditte_r->get(NDT_RAGSOC), (const char*)desatt);
|
||||||
_prind->set_text(buf);
|
_prind->set_text(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1114,7 +1114,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
TString pimsg;
|
TString pimsg;
|
||||||
pimsg << TR("Ricalcolo attività ") << trueatt << " (";
|
pimsg << TR("Ricalcolo attività ") << trueatt << " (";
|
||||||
if (month > 12)
|
if (month > 12)
|
||||||
pimsg << "13ma ";
|
pimsg << "13a ";
|
||||||
else
|
else
|
||||||
pimsg << TR("mese ") << itom(month);
|
pimsg << TR("mese ") << itom(month);
|
||||||
pimsg << ' ' << year_int << ')';
|
pimsg << ' ' << year_int << ')';
|
||||||
@ -1141,13 +1141,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
if (tipodoc == "NC")
|
if (tipodoc == "NC")
|
||||||
tm = tm_nota_credito;
|
tm = tm_nota_credito;
|
||||||
}
|
}
|
||||||
|
if (_isviaggio)
|
||||||
#ifndef NDEBUG
|
|
||||||
if (_mov->get_long(MOV_NUMREG) == 23353)
|
|
||||||
int cazzone = 1;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (_isviaggio)
|
|
||||||
{
|
{
|
||||||
if (tipomov == vendita && _mov->get_date(MOV_DATA74TER).ok())
|
if (tipomov == vendita && _mov->get_date(MOV_DATA74TER).ok())
|
||||||
date = _mov->get_date(MOV_DATA74TER);
|
date = _mov->get_date(MOV_DATA74TER);
|
||||||
@ -1408,7 +1402,10 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
|||||||
{
|
{
|
||||||
CHECKS(codiva == _iva->get("CODTAB"), "Codice IVA simile ", (const char*)codiva);
|
CHECKS(codiva == _iva->get("CODTAB"), "Codice IVA simile ", (const char*)codiva);
|
||||||
}
|
}
|
||||||
|
#ifndef DEBUG
|
||||||
|
if (codiva == "E7")
|
||||||
|
int cazzone = 1;
|
||||||
|
#endif
|
||||||
const TString4 tipoiva = _iva->get("S1");
|
const TString4 tipoiva = _iva->get("S1");
|
||||||
const TString4 tipoes_v = _iva->get("S2");
|
const TString4 tipoes_v = _iva->get("S2");
|
||||||
const TString4 tipoes_a = _iva->get("S9");
|
const TString4 tipoes_a = _iva->get("S9");
|
||||||
|
@ -248,7 +248,6 @@ void TQuadro_IVA_app::print()
|
|||||||
|
|
||||||
if (fld != NULL)
|
if (fld != NULL)
|
||||||
fld->set(year);
|
fld->set(year);
|
||||||
// set->set_var("#ANNO", year, true);
|
|
||||||
set->set_var("#CODDITTA", ditta);
|
set->set_var("#CODDITTA", ditta);
|
||||||
book.add(rep);
|
book.add(rep);
|
||||||
}
|
}
|
||||||
|
@ -107,15 +107,16 @@ void TQuadro_VE_recordset::load(const long year)
|
|||||||
|
|
||||||
if (vendite && tipo != liquidazione && month == 13)
|
if (vendite && tipo != liquidazione && month == 13)
|
||||||
{
|
{
|
||||||
const TString8 codiva(codtab.mid(16,4));
|
const TRectype& pimr = cache().get("PIM", codtab);
|
||||||
|
TString8 codiva(codtab.mid(16,4)); codiva.trim();
|
||||||
const TRectype & ivar = cache().get("%IVA", codiva);
|
const TRectype & ivar = cache().get("%IVA", codiva);
|
||||||
const TString8 aliquota = ivar.get("R0");
|
const TString8 aliquota = ivar.get("R0");
|
||||||
|
|
||||||
tiporec tipo;
|
tiporec tipo;
|
||||||
real imp;
|
real imp;
|
||||||
real iva;
|
real iva;
|
||||||
|
|
||||||
if (classify_pim(pim, imp, iva, tipo, true))
|
if (classify_pim(pimr, imp, iva, tipo, true))
|
||||||
{
|
{
|
||||||
good = true;
|
good = true;
|
||||||
switch (tipo)
|
switch (tipo)
|
||||||
@ -187,20 +188,25 @@ void TQuadro_VE_recordset::load(const long year)
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
const real imp = pimr.get_real("R0");
|
||||||
|
const real iva = pimr.get_real("R1");
|
||||||
const TString4 tipo_aliquota = ivar.get("S1");
|
const TString4 tipo_aliquota = ivar.get("S1");
|
||||||
const TString4 tipo_iva11_ven = ivar.get("S2");
|
const TString4 tipo_iva11_ven = ivar.get("S2");
|
||||||
|
const int int_tipo_iva11_ven = atoi(tipo_iva11_ven);
|
||||||
const bool non_imponibile = (tipo_aliquota == "NI");
|
const bool non_imponibile = (tipo_aliquota == "NI");
|
||||||
const bool esente = (tipo_aliquota == "ES");
|
const bool esente = (tipo_aliquota == "ES");
|
||||||
const bool reverse = (tipo_aliquota >= "31" && tipo_aliquota >= "38");
|
const bool reverse = int_tipo_iva11_ven >= 31 && int_tipo_iva11_ven <= 38;
|
||||||
const bool terremotati = tipo_aliquota >= "25";
|
const bool terremotati = int_tipo_iva11_ven == 25;
|
||||||
|
|
||||||
if (non_imponibile)
|
if (non_imponibile)
|
||||||
{
|
{
|
||||||
if (tipo_iva11_ven == "21")
|
if (int_tipo_iva11_ven == 21)
|
||||||
add_value("VE31.1", imp);
|
add_value("VE31.1", imp);
|
||||||
else
|
else
|
||||||
if (tipo_iva11_ven == "22")
|
if (int_tipo_iva11_ven == 22)
|
||||||
add_value("VE32.1", imp);
|
add_value("VE32.1", imp);
|
||||||
}
|
}
|
||||||
if (esente)
|
if (esente)
|
||||||
@ -218,7 +224,7 @@ void TQuadro_VE_recordset::load(const long year)
|
|||||||
|
|
||||||
if (reverse)
|
if (reverse)
|
||||||
{
|
{
|
||||||
const int tipo_reverse = atoi(tipo_iva11_ven);
|
const int tipo_reverse = int_tipo_iva11_ven;
|
||||||
|
|
||||||
switch (tipo_reverse)
|
switch (tipo_reverse)
|
||||||
{
|
{
|
||||||
|
@ -26,7 +26,6 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="12.25" type="Numero" align="right" width="11" id="102" pattern="1" text="###.###.###">
|
<field x="65.5" y="12.25" type="Numero" align="right" width="11" id="102" pattern="1" text="###.###.###">
|
||||||
<source>VE01.2</source>
|
<source>VE01.2</source>
|
||||||
<postscript description="B1.102 POSTSCRIPT">MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="13.4" type="Numero" align="right" width="11" id="201" pattern="1" text="###.###.###">
|
<field x="51" y="13.4" type="Numero" align="right" width="11" id="201" pattern="1" text="###.###.###">
|
||||||
<source>VE02.1</source>
|
<source>VE02.1</source>
|
||||||
@ -34,7 +33,6 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="13.4" type="Numero" align="right" width="11" id="202" pattern="1" text="###.###.###">
|
<field x="65.5" y="13.4" type="Numero" align="right" width="11" id="202" pattern="1" text="###.###.###">
|
||||||
<source>VE01.2</source>
|
<source>VE01.2</source>
|
||||||
<postscript description="B1.202 POSTSCRIPT">MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="14.4" type="Numero" align="right" width="11" id="301" pattern="1" text="###.###.###">
|
<field x="51" y="14.4" type="Numero" align="right" width="11" id="301" pattern="1" text="###.###.###">
|
||||||
<source>VE01.3</source>
|
<source>VE01.3</source>
|
||||||
@ -42,7 +40,6 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="14.4" type="Numero" align="right" width="11" id="302" pattern="1" text="###.###.###">
|
<field x="65.5" y="14.4" type="Numero" align="right" width="11" id="302" pattern="1" text="###.###.###">
|
||||||
<source>VE03.2</source>
|
<source>VE03.2</source>
|
||||||
<postscript description="B1.302 POSTSCRIPT">MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="15.4" type="Numero" align="right" width="11" id="401" pattern="1" text="###.###.###">
|
<field x="51" y="15.4" type="Numero" align="right" width="11" id="401" pattern="1" text="###.###.###">
|
||||||
<source>VE04.1</source>
|
<source>VE04.1</source>
|
||||||
@ -50,7 +47,6 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="15.4" type="Numero" align="right" width="11" id="402" pattern="1" text="###.###.###">
|
<field x="65.5" y="15.4" type="Numero" align="right" width="11" id="402" pattern="1" text="###.###.###">
|
||||||
<source>VE04.2</source>
|
<source>VE04.2</source>
|
||||||
<postscript description="B1.402 POSTSCRIPT">MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="16.5" type="Numero" align="right" width="11" id="501" pattern="1" text="###.###.###">
|
<field x="51" y="16.5" type="Numero" align="right" width="11" id="501" pattern="1" text="###.###.###">
|
||||||
<source>VE05.1</source>
|
<source>VE05.1</source>
|
||||||
@ -58,7 +54,6 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="16.5" type="Numero" align="right" width="11" id="502" pattern="1" text="###.###.###">
|
<field x="65.5" y="16.5" type="Numero" align="right" width="11" id="502" pattern="1" text="###.###.###">
|
||||||
<source>VE05.2</source>
|
<source>VE05.2</source>
|
||||||
<postscript>MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="17.5" type="Numero" align="right" width="11" id="601" pattern="1" text="###.###.###">
|
<field x="51" y="17.5" type="Numero" align="right" width="11" id="601" pattern="1" text="###.###.###">
|
||||||
<source>VE06.1</source>
|
<source>VE06.1</source>
|
||||||
@ -66,7 +61,6 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="17.5" type="Numero" align="right" width="11" id="602" pattern="1" text="###.###.###">
|
<field x="65.5" y="17.5" type="Numero" align="right" width="11" id="602" pattern="1" text="###.###.###">
|
||||||
<source>VE06.2</source>
|
<source>VE06.2</source>
|
||||||
<postscript>MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="18.5" type="Numero" align="right" width="11" id="701" pattern="1" text="###.###.###">
|
<field x="51" y="18.5" type="Numero" align="right" width="11" id="701" pattern="1" text="###.###.###">
|
||||||
<source>VE07.1</source>
|
<source>VE07.1</source>
|
||||||
@ -74,7 +68,6 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="18.5" type="Numero" align="right" width="11" id="702" pattern="1" text="###.###.###">
|
<field x="65.5" y="18.5" type="Numero" align="right" width="11" id="702" pattern="1" text="###.###.###">
|
||||||
<source>VE07.2</source>
|
<source>VE07.2</source>
|
||||||
<postscript description="B1.702 POSTSCRIPT">MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="19.5" type="Numero" align="right" width="11" id="801" pattern="1" text="###.###.###">
|
<field x="51" y="19.5" type="Numero" align="right" width="11" id="801" pattern="1" text="###.###.###">
|
||||||
<source>VE08.1</source>
|
<source>VE08.1</source>
|
||||||
@ -82,7 +75,6 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="19.5" type="Numero" align="right" width="11" id="802" pattern="1" text="###.###.###">
|
<field x="65.5" y="19.5" type="Numero" align="right" width="11" id="802" pattern="1" text="###.###.###">
|
||||||
<source>VE08.2</source>
|
<source>VE08.2</source>
|
||||||
<postscript>MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="20.5" type="Numero" align="right" width="11" id="901" pattern="1" text="###.###.###">
|
<field x="51" y="20.5" type="Numero" align="right" width="11" id="901" pattern="1" text="###.###.###">
|
||||||
<source>VE09.1</source>
|
<source>VE09.1</source>
|
||||||
@ -90,7 +82,6 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="20.5" type="Numero" align="right" width="11" id="902" pattern="1" text="###.###.###">
|
<field x="65.5" y="20.5" type="Numero" align="right" width="11" id="902" pattern="1" text="###.###.###">
|
||||||
<source>VE09.2</source>
|
<source>VE09.2</source>
|
||||||
<postscript>MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="22.5" type="Numero" align="right" width="11" id="2001" pattern="1" text="###.###.###">
|
<field x="51" y="22.5" type="Numero" align="right" width="11" id="2001" pattern="1" text="###.###.###">
|
||||||
<source>VE20.1</source>
|
<source>VE20.1</source>
|
||||||
@ -98,7 +89,6 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="22.5" type="Numero" align="right" width="11" id="2002" pattern="1" text="###.###.###">
|
<field x="65.5" y="22.5" type="Numero" align="right" width="11" id="2002" pattern="1" text="###.###.###">
|
||||||
<source>VE20.2</source>
|
<source>VE20.2</source>
|
||||||
<postscript>MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="23.65" type="Numero" align="right" width="11" id="2101" pattern="1" text="###.###.###">
|
<field x="51" y="23.65" type="Numero" align="right" width="11" id="2101" pattern="1" text="###.###.###">
|
||||||
<source>VE21.1</source>
|
<source>VE21.1</source>
|
||||||
@ -106,7 +96,6 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="23.65" type="Numero" align="right" width="11" id="2102" pattern="1" text="###.###.###">
|
<field x="65.5" y="23.65" type="Numero" align="right" width="11" id="2102" pattern="1" text="###.###.###">
|
||||||
<source>VE21.1</source>
|
<source>VE21.1</source>
|
||||||
<postscript>MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="24.6" type="Numero" align="right" width="11" id="2201" pattern="1" text="###.###.###">
|
<field x="51" y="24.6" type="Numero" align="right" width="11" id="2201" pattern="1" text="###.###.###">
|
||||||
<source>VE22.1</source>
|
<source>VE22.1</source>
|
||||||
@ -114,35 +103,34 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="24.6" type="Numero" align="right" width="11" id="2202" pattern="1" text="###.###.###">
|
<field x="65.5" y="24.6" type="Numero" align="right" width="11" id="2202" pattern="1" text="###.###.###">
|
||||||
<source>VE22.2</source>
|
<source>VE22.2</source>
|
||||||
<postscript>MESSAGE ADD,#B1.2302</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="25.75" type="Numero" align="right" width="11" id="2301" pattern="1" text="###.###.###" />
|
<field x="51" y="25.75" type="Numero" align="right" width="11" id="2301" pattern="1" text="###.###.###">
|
||||||
|
<source>#101+#201+#301+#401+#501+#601+#701+#801+#901+#2001+#2101+#2201</source>
|
||||||
|
</field>
|
||||||
<field x="65.5" y="25.75" type="Numero" align="right" width="11" id="2302" pattern="1" text="###.###.###">
|
<field x="65.5" y="25.75" type="Numero" align="right" width="11" id="2302" pattern="1" text="###.###.###">
|
||||||
<postscript>MESSAGE ADD,#B1.2502</postscript>
|
<source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#2002+#2102+#2202+#2302</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="26.75" type="Numero" align="right" width="11" id="2402" pattern="1" text="###.###.###">
|
<field x="65.5" y="26.75" type="Numero" align="right" width="11" id="2402" pattern="1" text="###.###.###">
|
||||||
<source>VE24.2</source>
|
<source>VE24.2</source>
|
||||||
<postscript>MESSAGE ADD,#B1.2502</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="65.5" y="27.75" type="Numero" align="right" width="11" id="2502" pattern="1" text="###.###.###" />
|
<field x="65.5" y="27.75" type="Numero" align="right" width="11" id="2502" pattern="1" text="###.###.###">
|
||||||
|
<source>#2302+#2402</source>
|
||||||
|
</field>
|
||||||
<field x="19" y="30.75" type="Numero" align="right" width="11" id="3002" pattern="1" text="###.###.###">
|
<field x="19" y="30.75" type="Numero" align="right" width="11" id="3002" pattern="1" text="###.###.###">
|
||||||
<source>VE30.2</source>
|
<source>VE30.2</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3010</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="37" y="30.75" type="Numero" align="right" width="11" id="3003" pattern="1" text="###.###.###">
|
<field x="37" y="30.75" type="Numero" align="right" width="11" id="3003" pattern="1" text="###.###.###">
|
||||||
<source>VE30.3</source>
|
<source>VE30.3</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3010</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="19" y="32.75" type="Numero" align="right" width="11" id="3004" pattern="1" text="###.###.###">
|
<field x="19" y="32.75" type="Numero" align="right" width="11" id="3004" pattern="1" text="###.###.###">
|
||||||
<source>VE30.4</source>
|
<source>VE30.4</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3010</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="37" y="32.75" type="Numero" align="right" width="11" id="3005" pattern="1" text="###.###.###">
|
<field x="37" y="32.75" type="Numero" align="right" width="11" id="3005" pattern="1" text="###.###.###">
|
||||||
<source>VE30.5</source>
|
<source>VE30.5</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3010</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="28.75" type="Numero" align="right" width="11" id="3010" pattern="1" text="###.###.###">
|
<field x="51" y="28.75" type="Numero" align="right" width="11" id="3010" pattern="1" text="###.###.###">
|
||||||
<postscript>MESSAGE ADD,#B1.2301</postscript>
|
<source>#3002+#3003+#3004+#3005</source>
|
||||||
|
<postscript description="B1.3010 POSTSCRIPT">MESSAGE ADD,#B1.2301</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="33.9" type="Numero" align="right" width="11" id="3101" pattern="1" text="###.###.###">
|
<field x="51" y="33.9" type="Numero" align="right" width="11" id="3101" pattern="1" text="###.###.###">
|
||||||
<source>VE31.1</source>
|
<source>VE31.1</source>
|
||||||
@ -159,38 +147,31 @@
|
|||||||
</field>
|
</field>
|
||||||
<field x="19" y="40" type="Numero" align="right" width="11" id="3502" pattern="1" text="###.###.###">
|
<field x="19" y="40" type="Numero" align="right" width="11" id="3502" pattern="1" text="###.###.###">
|
||||||
<source>VE35.2</source>
|
<source>VE35.2</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3510</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="37" y="40" type="Numero" align="right" width="11" id="3503" pattern="1" text="###.###.###">
|
<field x="37" y="40" type="Numero" align="right" width="11" id="3503" pattern="1" text="###.###.###">
|
||||||
<source>VE35.3</source>
|
<source>VE35.3</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3510</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="19" y="42.1" type="Numero" align="right" width="11" id="3504" pattern="1" text="###.###.###">
|
<field x="19" y="42.1" type="Numero" align="right" width="11" id="3504" pattern="1" text="###.###.###">
|
||||||
<source>V35.4</source>
|
<source>V35.4</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3510</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="37" y="42.1" type="Numero" align="right" width="11" id="3505" pattern="1" text="###.###.###">
|
<field x="37" y="42.1" type="Numero" align="right" width="11" id="3505" pattern="1" text="###.###.###">
|
||||||
<source>VE35.5</source>
|
<source>VE35.5</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3510</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="19" y="44.15" type="Numero" align="right" width="11" id="3506" pattern="1" text="###.###.###">
|
<field x="19" y="44.15" type="Numero" align="right" width="11" id="3506" pattern="1" text="###.###.###">
|
||||||
<source>V35.6</source>
|
<source>V35.6</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3510</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="37" y="44.15" type="Numero" align="right" width="11" id="3507" pattern="1" text="###.###.###">
|
<field x="37" y="44.15" type="Numero" align="right" width="11" id="3507" pattern="1" text="###.###.###">
|
||||||
<source>VE35.7</source>
|
<source>VE35.7</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3510</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="19" y="46.15" type="Numero" align="right" width="11" id="3508" pattern="1" text="###.###.###">
|
<field x="19" y="46.15" type="Numero" align="right" width="11" id="3508" pattern="1" text="###.###.###">
|
||||||
<source>V35.8</source>
|
<source>V35.8</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3510</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="37" y="46.15" type="Numero" align="right" width="11" id="3509" pattern="1" text="###.###.###">
|
<field x="37" y="46.15" type="Numero" align="right" width="11" id="3509" pattern="1" text="###.###.###">
|
||||||
<source>VE35.9</source>
|
<source>VE35.9</source>
|
||||||
<postscript>MESSAGE ADD,#B1.3510</postscript>
|
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="38" type="Numero" align="right" width="11" id="3510" pattern="1" text="###.###.###">
|
<field x="51" y="38" type="Numero" align="right" width="11" id="3510" pattern="1" text="###.###.###">
|
||||||
<postscript>MESSAGE ADD,#B1.2301</postscript>
|
<source>#3502+#3503+#3504+#3505+#3506+#3507+#3508+#3509</source>
|
||||||
|
<postscript description="B1.3510 POSTSCRIPT">MESSAGE ADD,#B1.2301</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="47.25" type="Numero" align="right" width="11" id="3601" pattern="1" text="###.###.###">
|
<field x="51" y="47.25" type="Numero" align="right" width="11" id="3601" pattern="1" text="###.###.###">
|
||||||
<source>VE36.1</source>
|
<source>VE36.1</source>
|
||||||
@ -214,7 +195,8 @@
|
|||||||
<postscript>MESSAGE SUB,#B1.5001</postscript>
|
<postscript>MESSAGE SUB,#B1.5001</postscript>
|
||||||
</field>
|
</field>
|
||||||
<field x="51" y="54.5" type="Numero" align="right" width="11" id="5001" pattern="1" text="###.###.###">
|
<field x="51" y="54.5" type="Numero" align="right" width="11" id="5001" pattern="1" text="###.###.###">
|
||||||
<postscript>MESSAGE ADD,#B1.2301</postscript>
|
<source>#2301+#3010+#3101+#3201+#3301+#3401+#3510+#3601+#3701+#3801-#3901-#4001</source>
|
||||||
|
<postscript description="B1.5001 POSTSCRIPT">MESSAGE ADD,#B1.2301</postscript>
|
||||||
</field>
|
</field>
|
||||||
</section>
|
</section>
|
||||||
<section type="Foot" pattern="1" />
|
<section type="Foot" pattern="1" />
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<report name="cg7600l" orientation="2" lpi="6">
|
<report name="cg7500l" orientation="1" lpi="6">
|
||||||
<description>Dichiarazione IVA Quadro VE - Rev.Charge</description>
|
<description>Dichiarazione IVA Quadro VE - Rev.Charge</description>
|
||||||
<font face="Arial" size="8" />
|
<font face="Arial" size="8" />
|
||||||
<section type="Head" pattern="1">
|
<section type="Head" pattern="1">
|
||||||
<field x="132" type="Stringa" align="right" width="30" pattern="1">
|
<field x="89" type="Stringa" align="right" width="30" pattern="1">
|
||||||
<source>"Pag. " +#PAGE</source>
|
<source>"Pag. " +#PAGE</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="2" y="0.75" type="Testo" align="right" width="7" pattern="1" text="Num.Reg" />
|
<field x="2" y="0.75" type="Testo" align="right" width="7" pattern="1" text="Num.Reg" />
|
||||||
@ -16,10 +16,10 @@
|
|||||||
<field x="38" y="0.75" type="Testo" width="7" pattern="1" text="N. Doc." />
|
<field x="38" y="0.75" type="Testo" width="7" pattern="1" text="N. Doc." />
|
||||||
<field x="46" y="0.75" type="Testo" width="4" pattern="1" text="Caus" />
|
<field x="46" y="0.75" type="Testo" width="4" pattern="1" text="Caus" />
|
||||||
<field x="51" y="0.75" type="Testo" width="50" pattern="1" text="Cliente Ragione Sociale" />
|
<field x="51" y="0.75" type="Testo" width="50" pattern="1" text="Cliente Ragione Sociale" />
|
||||||
<field x="102" y="0.75" type="Testo" align="right" width="18" pattern="1" text="Imponibile" />
|
<field x="92" y="0.75" type="Testo" align="right" width="18" pattern="1" text="Imponibile" />
|
||||||
<field x="121" y="0.75" type="Testo" width="4" pattern="1" text="C.Iva" />
|
<field x="111" y="0.75" type="Testo" width="4" pattern="1" text="C.Iva" />
|
||||||
<field x="126" y="0.75" type="Testo" width="4" pattern="1" text="R.C." />
|
<field x="116" y="0.75" type="Testo" width="4" pattern="1" text="R.C." />
|
||||||
<field border="2" x="2" y="1.75" type="Linea" width="160" height="0" pattern="1" />
|
<field border="2" x="2" y="1.75" type="Linea" width="117" height="0" pattern="1" />
|
||||||
</section>
|
</section>
|
||||||
<section type="Head" level="1" pattern="1">
|
<section type="Head" level="1" pattern="1">
|
||||||
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1</prescript>
|
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1</prescript>
|
||||||
@ -27,10 +27,10 @@
|
|||||||
<font face="Arial" bold="1" size="8" />
|
<font face="Arial" bold="1" size="8" />
|
||||||
<source>#SYSTEM.RAGSOC</source>
|
<source>#SYSTEM.RAGSOC</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="132" type="Stringa" align="right" width="30" pattern="1">
|
<field x="89" type="Stringa" align="right" width="30" pattern="1">
|
||||||
<source>"Data di Stampa: " +#SYSTEM.DATE</source>
|
<source>"Data di Stampa: " +#SYSTEM.DATE</source>
|
||||||
</field>
|
</field>
|
||||||
<field border="1" x="2" y="1" type="Stringa" align="center" width="160" pattern="1">
|
<field border="1" x="2" y="1" type="Stringa" align="center" width="117" pattern="1">
|
||||||
<source>"ELENCO OPERAZIONI CON APPLICAZIONE DEL REVERSE CHARGE - " +#ANNO</source>
|
<source>"ELENCO OPERAZIONI CON APPLICAZIONE DEL REVERSE CHARGE - " +#ANNO</source>
|
||||||
</field>
|
</field>
|
||||||
</section>
|
</section>
|
||||||
@ -94,25 +94,25 @@
|
|||||||
</section>
|
</section>
|
||||||
<section type="Foot" pattern="1" />
|
<section type="Foot" pattern="1" />
|
||||||
<section type="Foot" level="1" pattern="1">
|
<section type="Foot" level="1" pattern="1">
|
||||||
<field border="2" x="2" y="0.5" type="Linea" width="160" height="0" pattern="1" />
|
<field border="2" x="2" y="0.5" type="Linea" width="117" height="0" pattern="1" />
|
||||||
<field x="50" y="1" type="Testo" align="right" width="50" pattern="1" text="TOTALE GENERALE:" />
|
<field x="40" y="1" type="Testo" align="right" width="50" pattern="1" text="TOTALE GENERALE:" />
|
||||||
<field x="3" y="4" type="Testo" width="32" pattern="1" text="Cessioni di rottami e altri materiali di recupero" />
|
<field x="2" y="4" type="Testo" width="33" pattern="1" text="31_Cessioni di rottami e altri materiali di recupero" />
|
||||||
<field x="68.5" y="4" type="Testo" width="32" pattern="1" text="Cessioni di oro e argento puro " />
|
<field x="58.5" y="4" type="Testo" width="32" pattern="1" text="32_Cessioni di oro e argento puro " />
|
||||||
<field x="3" y="6" type="Testo" width="32" pattern="1" text="Subappalto nel settore edile" />
|
<field x="2" y="6" type="Testo" width="33" pattern="1" text="33_Subappalto nel settore edile" />
|
||||||
<field x="68.5" y="6" type="Testo" width="30" pattern="1" text="Cessioni di fabbricati" />
|
<field x="58.5" y="6" type="Testo" width="30" pattern="1" text="34_Cessioni di fabbricati" />
|
||||||
<field x="3" y="8" type="Testo" width="32" pattern="1" text="Cessioni di telefoni cellulari " />
|
<field x="2" y="8" type="Testo" width="33" pattern="1" text="35_Cessioni di telefoni cellulari " />
|
||||||
<field x="68.5" y="8" type="Testo" width="30" pattern="1" text="Cessioni di microprocessori " />
|
<field x="58.5" y="8" type="Testo" width="30" pattern="1" text="36_Cessioni di microprocessori " />
|
||||||
<field x="3" y="10" type="Testo" width="32" pattern="1" text="Prestazioni comparto edile e settori connessi" />
|
<field x="2" y="10" type="Testo" width="33" pattern="1" text="37_Prestazioni comparto edile e settori connessi" />
|
||||||
<field x="68.5" y="10" type="Testo" width="30" pattern="1" text="Operazioni settore energetico " />
|
<field x="58.5" y="10" type="Testo" width="30" pattern="1" text="38_Operazioni settore energetico " />
|
||||||
<field x="102" y="1" type="Valuta" align="right" width="18" id="100" pattern="1" text="###.###.###,@@" />
|
<field x="92" y="1" type="Valuta" align="right" width="18" id="100" pattern="1" text="###.###.###,@@" />
|
||||||
<field x="35" y="4" type="Valuta" align="right" width="18" id="131" pattern="1" text="###.###.###,@@" />
|
<field x="35" y="4" type="Valuta" align="right" width="18" id="131" pattern="1" text="###.###.###,@@" />
|
||||||
<field x="102" y="4" type="Valuta" align="right" width="18" id="132" pattern="1" text="###.###.###,@@" />
|
<field x="92" y="4" type="Valuta" align="right" width="18" id="132" pattern="1" text="###.###.###,@@" />
|
||||||
<field x="35" y="6" type="Valuta" align="right" width="18" id="133" pattern="1" text="###.###.###,@@" />
|
<field x="35" y="6" type="Valuta" align="right" width="18" id="133" pattern="1" text="###.###.###,@@" />
|
||||||
<field x="102" y="6" type="Valuta" align="right" width="18" id="134" pattern="1" text="###.###.###,@@" />
|
<field x="92" y="6" type="Valuta" align="right" width="18" id="134" pattern="1" text="###.###.###,@@" />
|
||||||
<field x="35" y="8" type="Valuta" align="right" width="18" id="135" pattern="1" text="###.###.###,@@" />
|
<field x="35" y="8" type="Valuta" align="right" width="18" id="135" pattern="1" text="###.###.###,@@" />
|
||||||
<field x="102" y="8" type="Valuta" align="right" width="18" id="136" pattern="1" text="###.###.###,@@" />
|
<field x="92" y="8" type="Valuta" align="right" width="18" id="136" pattern="1" text="###.###.###,@@" />
|
||||||
<field x="35" y="10" type="Valuta" align="right" width="18" id="137" pattern="1" text="###.###.###,@@" />
|
<field x="35" y="10" type="Valuta" align="right" width="18" id="137" pattern="1" text="###.###.###,@@" />
|
||||||
<field x="102" y="10" type="Valuta" align="right" width="18" id="138" pattern="1" text="###.###.###,@@" />
|
<field x="92" y="10" type="Valuta" align="right" width="18" id="138" pattern="1" text="###.###.###,@@" />
|
||||||
</section>
|
</section>
|
||||||
<section type="Foot" level="2" height="1" pattern="1">
|
<section type="Foot" level="2" height="1" pattern="1">
|
||||||
<field x="2" type="Numero" align="right" link="23.NUMREG" width="7" pattern="1">
|
<field x="2" type="Numero" align="right" link="23.NUMREG" width="7" pattern="1">
|
||||||
@ -136,13 +136,13 @@
|
|||||||
<field x="46" type="Stringa" width="4" pattern="1">
|
<field x="46" type="Stringa" width="4" pattern="1">
|
||||||
<source>#B1.35</source>
|
<source>#B1.35</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="51" type="Stringa" width="50" pattern="1">
|
<field x="51" type="Stringa" width="40" pattern="1">
|
||||||
<source>#B1.40</source>
|
<source>#B1.40</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="121" type="Stringa" width="4" pattern="1">
|
<field x="111" type="Stringa" width="4" pattern="1">
|
||||||
<source>#B1.105</source>
|
<source>#B1.105</source>
|
||||||
</field>
|
</field>
|
||||||
<field x="130" type="Array" width="30" pattern="1">
|
<field x="120" type="Array" hidden="1" width="30" pattern="1">
|
||||||
<source>#B1.115</source>
|
<source>#B1.115</source>
|
||||||
<list>
|
<list>
|
||||||
<li Value=" " Code=" " />
|
<li Value=" " Code=" " />
|
||||||
@ -156,10 +156,10 @@
|
|||||||
<li Value="Operazioni settore energetico" Code="38" />
|
<li Value="Operazioni settore energetico" Code="38" />
|
||||||
</list>
|
</list>
|
||||||
</field>
|
</field>
|
||||||
<field x="102" type="Valuta" align="right" width="18" id="100" pattern="1" text="###.###.###,@@">
|
<field x="92" type="Valuta" align="right" width="18" id="100" pattern="1" text="###.###.###,@@">
|
||||||
<prescript description="F2.100 PRESCRIPT">MESSAGE ADD,F1.100</prescript>
|
<prescript description="F2.100 PRESCRIPT">MESSAGE ADD,F1.100</prescript>
|
||||||
</field>
|
</field>
|
||||||
<field x="127" type="Numero" align="right" width="2" id="120" pattern="1">
|
<field x="117" type="Numero" align="right" width="2" id="120" pattern="1">
|
||||||
<source>#B1.115</source>
|
<source>#B1.115</source>
|
||||||
</field>
|
</field>
|
||||||
</section>
|
</section>
|
||||||
|
@ -285,4 +285,5 @@ Picture = <cg01>
|
|||||||
Module = 7
|
Module = 7
|
||||||
Flags = ""
|
Flags = ""
|
||||||
Item_01 = "Quadro VE", "cg7 -5", "F"
|
Item_01 = "Quadro VE", "cg7 -5", "F"
|
||||||
Item_02 = "Quadro VT", "cg5 -8", "F"
|
Item_02 = "Quadro VF", "cg5 -6", "F"
|
||||||
|
Item_03 = "Quadro VT", "cg5 -8", "F"
|
246
src/cg/cgpim.cpp
246
src/cg/cgpim.cpp
@ -249,249 +249,3 @@ bool classify_pim(const TRectype& pimr, real& imp, real& iva, tiporec& t, bool t
|
|||||||
|
|
||||||
return last_checked != -1;
|
return last_checked != -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
bool classify_pim(const TISAM_recordset& pim, real& imp, real& iva, tiporec& t, bool tipost)
|
|
||||||
{
|
|
||||||
static int last_checked = -1;
|
|
||||||
|
|
||||||
// parse CODTAB of pim record
|
|
||||||
const TString80 ctab = pim.get("CODTAB").as_string();
|
|
||||||
|
|
||||||
const int tipocr = atoi(ctab.mid(15,1)); // tipo costo_ricavo
|
|
||||||
const int tipodet = atoi(ctab.mid(20,1)); // tipo detraibilita'
|
|
||||||
const int corrisp = (int)pim.get("I0").as_int(); // netto = 1, lordo = 2
|
|
||||||
const int tipomov = (int)pim.get("I1").as_int(); // 1 = vendita, 2 = acquisto
|
|
||||||
|
|
||||||
// const bool vola = pimr.get_bool("B2");
|
|
||||||
const bool rimb = pim.get("B3").as_bool();
|
|
||||||
const bool ricl = pim.get("B4").as_bool();
|
|
||||||
|
|
||||||
const TString4 tipoiva = pim.get("S5").as_string();
|
|
||||||
|
|
||||||
// cominciamo cosi'
|
|
||||||
imp = ZERO; iva = ZERO;
|
|
||||||
|
|
||||||
for (int i = last_checked + 1; i <= MAX_TIPOREC+1; i++)
|
|
||||||
{
|
|
||||||
tiporec tocheck = (tiporec)i;
|
|
||||||
bool found = FALSE;
|
|
||||||
|
|
||||||
switch(tocheck)
|
|
||||||
{
|
|
||||||
case acq_norm:
|
|
||||||
//found = tipomov == 2 && tipoiva != "NS";
|
|
||||||
found = tipomov == 2;
|
|
||||||
found &= (tipodet == 0 /* || tipodet == 1 || tipodet == 3 ||
|
|
||||||
tipodet == 5 || tipodet == 9 */);
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
if (tipost) //stampa
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real() - pim.get("R9").as_real();
|
|
||||||
iva = pim.get("R1").as_real() - pim.get("R10").as_real();
|
|
||||||
}
|
|
||||||
else //visualizza
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case vend_norm:
|
|
||||||
//found = tipomov == 1 /* && corrisp == 1 */ && tipoiva != "NS";
|
|
||||||
found = tipomov == 1 /* && corrisp == 1 */;
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case acq_simp:
|
|
||||||
if (tipomov == 2)
|
|
||||||
{
|
|
||||||
imp = pim.get("R11").as_real();
|
|
||||||
iva = pim.get("R12").as_real();
|
|
||||||
}
|
|
||||||
found = !imp.is_zero() || !iva.is_zero();
|
|
||||||
break;
|
|
||||||
case vend_simp:
|
|
||||||
if (tipomov == 1 /* && corrisp == 1 */)
|
|
||||||
{
|
|
||||||
imp = pim.get("R11").as_real();
|
|
||||||
iva = pim.get("R12").as_real();
|
|
||||||
}
|
|
||||||
found = !imp.is_zero() || !iva.is_zero();
|
|
||||||
break;
|
|
||||||
case bolle_doganali:
|
|
||||||
//if (tipomov == 2 && tipoiva != "NS")
|
|
||||||
if (tipomov == 2 && tipodet != 9) // scarta le bolle doganali con tipo detr. == 9
|
|
||||||
{
|
|
||||||
imp = pim.get("R9").as_real();
|
|
||||||
iva = pim.get("R10").as_real();
|
|
||||||
}
|
|
||||||
found = !imp.is_zero() || !iva.is_zero();
|
|
||||||
break;
|
|
||||||
case base_ventilazione:
|
|
||||||
found = (tipomov == 2 && tipodet != 9 && tipocr == 1);
|
|
||||||
found &= (tipoiva != "NS" && tipoiva != "NI" && tipoiva != "ES");
|
|
||||||
found &= (ricl ? TRUE : tipodet == 3);
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
}
|
|
||||||
found &= !imp.is_zero() || !iva.is_zero();
|
|
||||||
break;
|
|
||||||
case acq_beni_riv:
|
|
||||||
/*
|
|
||||||
found = (tipomov == 2 && tipodet != 9 &&
|
|
||||||
(tipocr == 1 || (tipocr == 5 && tipodet == 3)));
|
|
||||||
found &= tipoiva != "NS" && tipoiva != "NI" && tipoiva != "ES";
|
|
||||||
found &= (ricl ? TRUE : tipodet == 3);
|
|
||||||
*/
|
|
||||||
found = (tipomov == 2 && (tipocr == 1 || tipocr == 5));
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
}
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
break;
|
|
||||||
case corr_norm:
|
|
||||||
found = tipomov == 1 && corrisp == 2 && tipoiva != "NS";
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case corr_simp:
|
|
||||||
if (tipomov == 1 && corrisp == 2)
|
|
||||||
{
|
|
||||||
imp = pim.get("R11").as_real();
|
|
||||||
iva = pim.get("R12").as_real();
|
|
||||||
}
|
|
||||||
found = !imp.is_zero() || !iva.is_zero();
|
|
||||||
break;
|
|
||||||
case acq_beni_ammort:
|
|
||||||
//found = tipomov == 2 && tipocr == 2 &&
|
|
||||||
// tipodet == 0 && tipoiva != "NS";
|
|
||||||
found = tipomov == 2 && tipocr == 2 && tipodet == 0;
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case acq_beni_ammort_nd:
|
|
||||||
//found = tipomov == 2 && tipocr ==2 &&
|
|
||||||
// tipodet != 0 && tipoiva != "NS";
|
|
||||||
found = tipomov == 2 && tipocr ==2 && tipodet != 0;
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case acq_beni_leasing:
|
|
||||||
//found = tipomov == 2 && tipocr == 8 && tipoiva != "NS";
|
|
||||||
found = tipomov == 2 && tipocr == 8;
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case acq_amm_ultdetr:
|
|
||||||
//found = tipomov == 2 && tipocr == 3 && tipoiva != "NS";
|
|
||||||
found = tipomov == 2 && tipocr == 3;
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case acq_ind_op_es:
|
|
||||||
found = tipomov == 2 && tipodet == 1 && tipoiva != "NS";
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case acq_ind_pass_int:
|
|
||||||
found = tipomov == 2 && tipodet == 3 && tipoiva != "NS";
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case acq_ind_art_19:
|
|
||||||
found = tipomov == 2 && tipodet == 9 && tipoiva != "NS";
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real() - pim.get("R9").as_real(); // toglie le bolle doganali (sono a parte)
|
|
||||||
iva = pim.get("R1").as_real() - pim.get("R10").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case cess_amm:
|
|
||||||
//found = tipomov == 1 && tipocr == 4 && tipoiva != "NS";
|
|
||||||
found = tipomov == 1 && tipocr == 4;
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case vend_rimborso:
|
|
||||||
found = tipomov == 1 && rimb && tipoiva != "NS";
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case acq_rimborso:
|
|
||||||
found = tipomov == 2 && rimb && tipoiva != "NS";
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R0").as_real();
|
|
||||||
iva = pim.get("R1").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
case acq_bd_ind_art_19:
|
|
||||||
found = tipomov == 2 && tipodet == 9 && tipoiva != "NS";
|
|
||||||
if (found)
|
|
||||||
{
|
|
||||||
imp = pim.get("R9").as_real();
|
|
||||||
iva = pim.get("R10").as_real();
|
|
||||||
found &= (!imp.is_zero() || !iva.is_zero());
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (i == MAX_TIPOREC+1)
|
|
||||||
last_checked = -1;
|
|
||||||
else if (found)
|
|
||||||
{
|
|
||||||
t = tocheck;
|
|
||||||
last_checked = i;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return last_checked != -1;
|
|
||||||
}
|
|
||||||
|
@ -83,6 +83,5 @@ const int MAX_TIPOREC = 19;
|
|||||||
// -----------------------------------------------------------
|
// -----------------------------------------------------------
|
||||||
|
|
||||||
bool classify_pim(const TRectype& pimr, real& imp, real& iva, tiporec& t, bool ts);
|
bool classify_pim(const TRectype& pimr, real& imp, real& iva, tiporec& t, bool ts);
|
||||||
bool classify_pim(const TISAM_recordset& pim, real& imp, real& iva, tiporec& t, bool ts);
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
x
Reference in New Issue
Block a user