Patch level : 12.0 1058

Files correlati     : cg0100a.msk src/cg/cg2100c.msk cg7.exe cg7600o.rep   cg7600a.rep cg7700a.rep cg7700b.rep
Commento        :

Aggiunto tipo costo ricavo per acquisti di materie prime al piano dei conti e alla prima nota
Modelli IVA 2021
This commit is contained in:
Alessandro Bonazzi 2021-04-20 22:11:35 +02:00
parent b5b758fef0
commit fbc375cfdc
12 changed files with 233 additions and 52 deletions

View File

@ -416,6 +416,7 @@ BEGIN
ITEM "8|8. Altri beni strumentali acquistati in leasing"
ITEM "9|9. Spese Generali"
ITEM "17|17. Operazioni nei confronti dei condominii"
ITEM "51|51. Acquisti materie prime per la produzione"
END
LIST FLD_CM1_RICSER 1 18

View File

@ -247,6 +247,7 @@ BEGIN
ITEM "8|8. Altri beni strumentali acquistati in leasing"
ITEM "9|9. Spese generali"
ITEM "17|17. Operazioni nei confronti dei condominii"
ITEM "51|51. Acquisti materie prime per la produzione"
FLAGS "D"
HELP "Tipo Costo/Ricavo del conto"
END

View File

@ -159,6 +159,17 @@ bool TQuadro_IVA_mask::on_field_event(TOperable_field& o, TField_event e, long j
return true;
}
TISAM_recordset & TQuadro_IVA_recordset::get_recordset(const int code, const int year)
{
real val;
TProgram_report & rep = _mask->get_report(code - 1);
TISAM_recordset * set = (TISAM_recordset *)rep.recordset();
CHECK(set != nullptr, TR("Null report"));
set->set_var("#ANNO", format("%d", year == 0 ? _year : year));
return *set;
}
const real TQuadro_IVA_recordset::evaluate_recordset(const int code, const int year, const char * field, const char * expr)
{
real val;
@ -227,17 +238,20 @@ const TVariant& TQuadro_IVA_recordset::get(const char* column_name) const
return TISAM_recordset::get(column_name);
}
void TQuadro_IVA_recordset::add_value(const char *s, real value)
void TQuadro_IVA_recordset::add_value(const char *s, const real value)
{
real * val = (real *)_values.objptr(s);
if (s && *s)
{
real * val = (real *)_values.objptr(s);
if (val == nullptr)
{
const TString8 key(s);
_values.add(key, val = new real);
_types.add(key, TString("real"));
}
*val += value;
if (val == nullptr)
{
const TString8 key(s);
_values.add(key, val = new real);
_types.add(key, TString("real"));
}
*val += value;
}
}
void TQuadro_IVA_recordset::set_bool(const char *s, bool on)

View File

@ -43,15 +43,17 @@ class TQuadro_IVA_recordset : public TISAM_recordset
protected:
const TMask & mask() { return *_mask; }
void add_value(const char *s, real value);
void add_value(const char *s, const real value);
void sub_value(const char *s, const real value) { add_value(s, -value); }
void set_bool(const char *s, bool on = false);
void set(const char *s,const char * value);
virtual void load() pure;
virtual const TVariant& get(const char* column_name) const;
void clear() { _values.destroy(); _types.destroy(); }
const real evaluate_recordset(const int code, const int year, const char * field, const char * expr = NULL);
const real evaluate_recordset_imponibile(const int code, const int year, const char * expr = NULL) { return evaluate_recordset(code, year, RMI_IMPONIBILE, expr); }
const real evaluate_recordset_imposta(const int code, const int year, const char * expr = NULL) { return evaluate_recordset(code, year, RMI_IMPOSTA, expr); }
TISAM_recordset & get_recordset(const int code, const int year = 0);
const real evaluate_recordset(const int code, const int year, const char * field, const char * expr = nullptr);
const real evaluate_recordset_imponibile(const int code, const int year, const char * expr = nullptr) { return evaluate_recordset(code, year, RMI_IMPONIBILE, expr); }
const real evaluate_recordset_imposta(const int code, const int year, const char * expr = nullptr) { return evaluate_recordset(code, year, RMI_IMPOSTA, expr); }
public:
TQuadro_IVA_recordset(TQuadro_IVA_mask * mask, const char* use, const int year) : TISAM_recordset(use), _mask(mask), _year(year) { }

View File

@ -21,6 +21,7 @@
#define REP_REVCHARGE 9
#define REP_TERREM 10
#define REP_PAART17 11
#define REP_REGOLARIZ 12
class TQuadro_VE_recordset : public TQuadro_IVA_recordset
{
@ -72,17 +73,23 @@ void TQuadro_VE_recordset::load()
imposta.add("5.00", TString8("VE21.2"));
imponibile.add("10.00",TString8("VE22.1"));
imposta.add("10.00",TString8("VE22.2"));
// le imposte che non esisto più le mette nella più vicina
imponibile.add("20.00", TString8("VE23.1"));
imposta.add("20.00", TString8("VE23.2"));
imponibile.add("21.00", TString8("VE23.1"));
imposta.add("21.00", TString8("VE23.2"));
imponibile.add("4.00", TString8("VE20.1"));
imposta.add("4.00", TString8("VE20.2"));
imponibile.add("5.00", TString8("VE21.1"));
imposta.add("5.00", TString8("VE21.2"));
imponibile.add("10.00", TString8("VE22.1"));
imposta.add("10.00", TString8("VE22.2"));
// le imposte che non esisto più le mette nella più vicina
imponibile.add("22.00", TString8("VE23.1"));
imposta.add("22.00", TString8("VE23.2"));
imponibile.add("20.00", TString8("VE23.1"));
imposta.add("20.00", TString8("VE23.2"));
imponibile.add("21.00", TString8("VE23.1"));
imposta.add("21.00", TString8("VE23.2"));
imponibile.add("22.00", TString8("VE23.1"));
imposta.add("22.00", TString8("VE23.2"));
TString256 query("USE PIM\nFROM CODTAB=");
@ -129,25 +136,28 @@ void TQuadro_VE_recordset::load()
break;
case vend_norm: // vendite normali
case corr_norm:
if (aliquota.full())
if (atoi(aliquota) != 0)
{
const bool agricolo = ivar.get_int("I4") != 0;
if (agricolo)
{
const TString * field = (TString *) imponibile_agricolo.objptr(aliquota);
if (field != NULL) add_value(*field, imp);
field = (TString *) imposta_agricola.objptr(aliquota);
if (field != NULL) add_value(*field, iva);
add_value(*(TString *)imponibile_agricolo.objptr(aliquota), imp);
add_value(*(TString *)imposta_agricola.objptr(aliquota), iva);
}
else
{
const TString * field = (TString *) imponibile.objptr(aliquota);
if (aliquota == "20.00" || aliquota == "21.00")
{
real imposta_corretta = imp;
if (field != NULL) add_value(*field, imp);
field = (TString *) imposta.objptr(aliquota);
if (field != NULL) add_value(*field, iva);
imposta_corretta *= 0.22;
imposta_corretta.round(0);
add_value("VE25.2", iva - imposta_corretta);
iva = imposta_corretta;
}
add_value(STRING_TOKEN(imponibile.objptr(aliquota)), imp);
add_value(STRING_TOKEN(imposta.objptr(aliquota)), iva);
}
}
break;
@ -241,8 +251,61 @@ void TQuadro_VE_recordset::load()
}
}
query = "USE LIM\n FROM CODTAB==";
TISAM_recordset & exp = get_recordset(REP_PAART17);
for (exp.move_first(); !exp.eof(); exp.move_next())
{
TString8 cod(exp.get(FIELD_NAME(LF_RMOVIVA, RMI_CODIVA)).as_string());
const TCodiceIVA & codiva = cached_codIVA(cod);
const TString & aliquota = codiva.aliquota();
if (aliquota.full())
{
const real imp = exp.get(FIELD_NAME(LF_RMOVIVA, RMI_IMPONIBILE)).as_real();
if (codiva.is_agricola())
sub_value(STRING_TOKEN(imponibile_agricolo.objptr(aliquota)), imp);
else
sub_value(STRING_TOKEN(imponibile.objptr(aliquota)), imp);
}
}
TISAM_recordset & reg = get_recordset(REP_REGOLARIZ);
for (reg.move_first(); !reg.eof(); reg.move_next())
{
TString8 cod(reg.get(FIELD_NAME(LF_RMOVIVA, RMI_CODIVA)).as_string());
const TCodiceIVA & codiva = cached_codIVA(cod);
const TString & aliquota = codiva.aliquota();
if (aliquota.full())
{
const real imp = reg.get(FIELD_NAME(LF_RMOVIVA, RMI_IMPONIBILE)).as_real();
real iva = reg.get(FIELD_NAME(LF_RMOVIVA, RMI_IMPOSTA)).as_real();
if (codiva.is_agricola())
{
sub_value(STRING_TOKEN(imponibile_agricolo.objptr(aliquota)), imp);
sub_value(STRING_TOKEN(imposta_agricola.objptr(aliquota)), iva);
}
else
{
if (aliquota == "20.00" || aliquota == "21.00")
{
real imposta_corretta = imp;
imposta_corretta *= 0.22;
imposta_corretta.round(0);
sub_value("VE25.2", imposta_corretta - iva);
iva = imposta_corretta;
}
sub_value(STRING_TOKEN(imponibile.objptr(aliquota)), imp);
sub_value(STRING_TOKEN(imposta.objptr(aliquota)), iva);
}
}
}
query = "USE LIM\n FROM CODTAB==";
query << year() << "13\nTO CODTAB==" << year() << "13";
TISAM_recordset lim(query);
@ -391,6 +454,7 @@ void TQuadro_VE_app::load_sheet(TSheet_field & sf)
TToken_string & row9 = sf.row(sf.items()); row9.add("|9|Stampa operazioni reverse charge|cg7600l");
TToken_string & row10 = sf.row(sf.items()); row10.add("|10|Stampa operazioni terremotati|cg7600m");
TToken_string & row11 = sf.row(sf.items()); row11.add("|11|Stampa operazioni effettuate con PA ai sensi art.17|cg7600n");
TToken_string & row12 = sf.row(sf.items()); row12.add("|12|Stampa regolarizzazioni reverse charge|cg7600o");
}
int cg7600(int argc, char* argv[])

View File

@ -124,7 +124,7 @@
<source>#101+#201+#301+#401+#501+#601+#701+#801+#901+#1001+#1101+#2001+#2101+#2201+#2301</source>
</field>
<field x="65.5" y="29.75" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="2402" pattern="1" hide_zero="" text="###.###.###">
<source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#1002+#1102+#2002+#2102+#2202+#2302</source>
<source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#1002+#1102+#1202+#2002+#2102+#2202+#2302</source>
</field>
<field x="65.5" y="30.75" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="2502" pattern="1" hide_zero="" text="###.###.###">
<source>VE25.2</source>
@ -132,7 +132,7 @@
<field x="65.5" y="31.7" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="2602" pattern="1" hide_zero="" text="###.###.###">
<source>#2402+#2502</source>
</field>
<field x="19" y="34" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="3002" pattern="1" hide_zero="" text="###.###.###">
<field x="19" y="35" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="3002" pattern="1" hide_zero="" text="###.###.###">
<source>VE30.2</source>
</field>
<field x="37" y="35" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="3003" pattern="1" hide_zero="" text="###.###.###">

86
src/cg/cg7600o.rep Normal file
View File

@ -0,0 +1,86 @@
<?xml version="1.0" encoding="UTF-8" ?>
<report libraries="" page_merge="" save_printer="" name="cg7600o" use_printer_font="" orientation="1" page_split="" lpi="6" command="" class="">
<description>Regolarizzazioni reverse charge</description>
<font face="Courier New" size="10" />
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="" hidden="" page_break="" can_break="" pattern="1">
<font face="Arial" size="8" />
<field deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="50" codval="" id="" pattern="1" hide_zero="" text="">
<source>"Ditta: " +#SYSTEM.RAGSOC</source>
</field>
<field x="50" deactivated="" type="Stringa" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="45" codval="" id="" pattern="1" hide_zero="" text="">
<source>"Data di Stampa: " +#SYSTEM.DATE+" - Pag. "+#PAGE</source>
</field>
<field y="1" deactivated="" type="Stringa" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="95" codval="" id="" pattern="1" hide_zero="" text="">
<font face="Arial" bold="1" size="10" />
<source>"Regolarizzazioni reverse charge nel periodo: " +#ANNO</source>
</field>
<field y="3" deactivated="" type="Testo" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="7" codval="" id="" pattern="1" hide_zero="" text="NumReg" />
<field x="8" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="DataReg" />
<field x="18" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="Caus" />
<field x="22" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="Reg." />
<field x="25" y="3" deactivated="" type="Testo" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="6" codval="" id="" pattern="1" hide_zero="" text="Cli." />
<field x="32" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="35" codval="" id="" pattern="1" hide_zero="" text="Ragione Sociale" />
<field x="67" y="3" deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="5" codval="" id="" pattern="1" hide_zero="" text="C.Iva" />
<field x="71.5" y="3" deactivated="" type="Testo" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="1" hide_zero="" text="Imponibile" />
<field x="82.5" y="3" deactivated="" type="Testo" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="9" codval="" id="" pattern="1" hide_zero="" text="Imposta" />
<field x="92" y="3" deactivated="" type="Testo" hidden="" align="center" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="Split" />
<field border="2" y="4" deactivated="" type="Linea" hidden="" link="" dynamic_height="" shade_offset="" width="95" codval="" height="0" id="" pattern="1" hide_zero="" text="" />
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Head" level="1" hidden="" page_break="" can_break="" pattern="1">
<font face="Arial" bold="1" size="8" />
<prescript description="H1 PRESCRIPT">MESSAGE RESET,F1</prescript>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="" hidden="" page_break="" can_break="" pattern="1" />
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Body" level="1" hidden="" page_break="" can_break="" pattern="1">
<font face="Arial" size="8" />
<field deactivated="" type="Numero" hidden="" align="right" link="23.NUMREG" dynamic_height="" shade_offset="" width="7" codval="" id="" pattern="1" hide_zero="" text="">
<source>RMOVIVA.NUMREG</source>
</field>
<field x="8" deactivated="" type="Data" hidden="" link="" dynamic_height="" shade_offset="" width="10" codval="" id="" pattern="1" hide_zero="" text="">
<source>MOV.DATAREG</source>
</field>
<field x="18" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="">
<source>MOV.CODCAUS</source>
</field>
<field x="21.5" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="3" codval="" id="" pattern="1" hide_zero="" text="">
<source>MOV.REG</source>
</field>
<field x="25" deactivated="" type="Numero" hidden="" align="right" link="20.CODCF" dynamic_height="" shade_offset="" width="6" codval="" id="" pattern="1" hide_zero="" text="">
<source>MOV.CODCF</source>
</field>
<field x="26" deactivated="" type="Stringa" hidden="1" link="20.TIPOCF" dynamic_height="" shade_offset="" width="1" codval="" id="" pattern="1" hide_zero="" text="">
<source>MOV.TIPO</source>
</field>
<field x="31.5" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="35" codval="" id="" pattern="1" hide_zero="" text="">
<source>CLIFO.RAGSOC</source>
</field>
<field x="67.5" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="4" codval="" id="" pattern="1" hide_zero="" text="">
<source>RMOVIVA.CODIVA</source>
</field>
<field x="71.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="" pattern="1" hide_zero="" text="###.###.###,@@">
<source>RMOVIVA.IMPONIBILE</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.100</prescript>
</field>
<field x="82.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="9" codval="" id="" pattern="1" hide_zero="" text="###.###.###,@@">
<source>RMOVIVA.IMPOSTA</source>
<prescript description="B1.0 PRESCRIPT">MESSAGE ADD,F1.200</prescript>
</field>
<field x="93" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="1" codval="" id="" pattern="1" hide_zero="" text="">
<source>MOV.SPLITPAY</source>
</field>
<field x="95" deactivated="" type="Stringa" hidden="" link="" dynamic_height="" shade_offset="" width="1" codval="" id="" pattern="1" hide_zero="" text="">
<source>CLIFO.SPLITPAY</source>
</field>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1" />
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="1" hidden="" page_break="" can_break="" pattern="1">
<font face="Arial" bold="1" size="8" />
<field deactivated="" type="Testo" hidden="" link="" dynamic_height="" shade_offset="" width="16" codval="" id="" pattern="1" hide_zero="" text="Totale Generale:" />
<field x="71.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="100" pattern="1" hide_zero="" text="###.###.###,@@" />
<field x="82.5" deactivated="" type="Valuta" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="9" codval="" id="200" pattern="1" hide_zero="" text="###.###.###,@@" />
</section>
<sql>USE RMOVIVA SELECT (MOV.ANNOIVA=#ANNO)&#26;&#26;(26.SOLOIVA=="X")&#26;&#26;(26.REGSPIVA!="")
JOIN MOV INTO NUMREG==NUMREG
JOIN 26 TO MOV INTO CODCAUS==CODCAUS
JOIN CLIFO TO MOV INTO TIPOCF==TIPO CODCF==CODCF</sql>
</report>

View File

@ -191,17 +191,14 @@ void TQuadro_VF_recordset::load()
}
else
{
if (aliquota.full())
if (atoi(aliquota) != 0)
{
const bool agricolo = ivar.get_int("I4") != 0;
if (agricolo)
{
const TString * field = (TString *) imponibile_agricolo.objptr(aliquota);
if (field != NULL) add_value(*field, imp); // VF39.1 VF48.1 Imprese agricole impobnibil e imposte
field = (TString *) imposta_agricola.objptr(aliquota);
if (field != NULL) add_value(*field, iva); // VF39.2 VF48.2 Imprese agricole impobnibil e imposte
add_value(STRING_TOKEN(imponibile_agricolo.objptr(aliquota)), imp); // VF39.1 VF48.1 Imprese agricole impobnibil e imposte
add_value(STRING_TOKEN(imposta_agricola.objptr(aliquota)), iva); // VF39.2 VF48.2 Imprese agricole impobnibil e imposte
}
else
@ -210,11 +207,8 @@ void TQuadro_VF_recordset::load()
add_value("VF38.1", imp); // VF38.1 2 Riservato alle imprese agricole miste - Totale operazioni imponibili diverse
add_value("VF38.2", iva);
}
const TString * field = (TString *) imponibile.objptr(aliquota);
if (field != NULL) add_value(*field, imp);
field = (TString *) imposta.objptr(aliquota);
if (field != NULL) add_value(*field, iva);
add_value(STRING_TOKEN(imponibile.objptr(aliquota)), imp);
add_value(STRING_TOKEN(imposta.objptr(aliquota)), iva);
if (prorataprev)
{
add_value("VF31.1", imp); // VF31.1 Acquisti destinati alle operazioni imponibili occasionali
@ -443,7 +437,7 @@ void TQuadro_VF_recordset::load()
add_value("VF27.1", val);
val = evaluate_recordset_imponibile(REP_RIPACQ, year(), "RMOVIVA.TIPOCR==8");
add_value("VF27.2", val);
val = evaluate_recordset_imponibile(REP_RIPACQ, year(), "RMOVIVA.TIPOCR==1");
val = evaluate_recordset_imponibile(REP_RIPACQ, year(), "(RMOVIVA.TIPOCR==1)||(RMOVIVA.TIPOCR==51)");
add_value("VF27.3", val);
val = evaluate_recordset_imponibile(REP_RIPACQ, year(), "(RMOVIVA.TIPOCR==0)||(RMOVIVA.TIPOCR==3)||(RMOVIVA.TIPOCR==5)||(RMOVIVA.TIPOCR==9)||(RMOVIVA.TIPOCR==17)");
add_value("VF27.4", val);

View File

@ -145,13 +145,13 @@
<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="40" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="2302" pattern="1" hide_zero="" text="###.###.###">
<source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#1002+#1102+#1202+#1302</source>
<source>#102+#202+#302+#402+#502+#602+#702+#802+#902+#1002+#1102+#1202+#1302+#1402</source>
</field>
<field x="65" y="41" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="2402" pattern="1" hide_zero="" text="###.###.###">
<source>VF24.2</source>
</field>
<field x="65" y="42" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="2502" pattern="1" hide_zero="" text="###.###.###">
<source>VF25</source>
<source>#2302+#2402</source>
</field>
<field x="41.5" y="44" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="2601" pattern="1" hide_zero="" text="###.###.###">
<source>VF26.1</source>

View File

@ -213,7 +213,7 @@
<source>VF70.2</source>
</field>
<field x="65.5" y="61.5" deactivated="" type="Numero" hidden="" align="right" link="" dynamic_height="" shade_offset="" width="11" codval="" id="7102" pattern="1" hide_zero="" text="###.###.###">
<source>NUM(#6001!="X"&#26;&#26;#6002!="X")*(#6202&#2F;2+#7002)</source>
<source>NUM(#6001!="X"&#26;&#26;#6002!="X")*(#2502+#6202&#2F;2+#7002)</source>
</field>
</section>
<section repeat="" keep_with_next="" deactivated="" hidden_if_needed="" type="Foot" level="" hidden="" page_break="" can_break="" pattern="1" />

View File

@ -48,9 +48,21 @@ void TQuadro_VJ_recordset::load()
add_value("VJ02.2", iva); // VJ2.2 Estrazione di beni da depositi IVA (art. 50-bis, comma 6, d.l. n. 331/1993)
break;
case 3:
add_value("VJ03.1", imp); // VJ3.1 Acquisti di beni e servizi da soggettIi non residenti ai sensi dellart. 17, comma 2
add_value("VJ03.2", iva); // VJ3.2 Acquisti di beni e servizi da soggettIi non residenti ai sensi dellart. 17, comma 2
break;
{
const bool intra = recset->get(FIELD_NAME(LF_CAUSALI, CAU_INTRACOM)).as_bool();
if (intra)
{
add_value("VJ09.1", imp); // VJ9.1 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui allart. 74, commi 7 e 8)
add_value("VJ09.2", iva); // VJ9.2 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui allart. 74, commi 7 e 8)
}
else
{
add_value("VJ03.1", imp); // VJ3.1 Acquisti di beni e servizi da soggettIi non residenti ai sensi dellart. 17, comma 2
add_value("VJ03.2", iva); // VJ3.2 Acquisti di beni e servizi da soggettIi non residenti ai sensi dellart. 17, comma 2
}
}
break;
case 4:
add_value("VJ04.1", imp); // VJ4.1 Operazioni di cui allart. 74, comma 1, lett. e)
add_value("VJ04.2", iva); // VJ4.2 Operazioni di cui allart. 74, comma 1, lett. e)
@ -119,6 +131,10 @@ void TQuadro_VJ_recordset::load()
add_value("VJ09.1", imp); // VJ09.1 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui allart. 74, commi 7 e 8)
add_value("VJ09.2", iva); // VJ09.2 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui allart. 74, commi 7 e 8)
break;
case 51:
add_value("VJ09.1", imp); // VJ09.1 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui allart. 74, commi 7 e 8)
add_value("VJ09.2", iva); // VJ09.2 Acquisti intracomunitari di beni (inclusi acquisti di oro industriale, argento puro e beni di cui allart. 74, commi 7 e 8)
break;
default:
break;
}

View File

@ -425,7 +425,10 @@ public: // TObject
const TString& codice() const { return get("CODTAB"); }
const TString& descrizione() const { return get("S0"); }
const real percentuale() const { return get_real("R0"); }
const TString & aliquota() const { return get("R0"); }
const TString& tipo() const { return get("S1"); }
const int tipo_IVA_agricola() const { return get_int("I4"); }
const bool is_agricola() const { return tipo_IVA_agricola() != 0; }
const TString& indetraibilita() const { return get("S4"); } // Codice indetraibilità alfanumerico (ex. 1, 3, 9)
int tipo_indetraibilita() const; // Tipo indetraibilità: 1,3,9
bool senza_imposta() { return percentuale() == ZERO;}