Patch level : 12.0 938
Files correlati : cg5.exe cg5500b.msk cg5500c.msk Commento : Attivati acconto e interessi con ricalcolo nei trimestrali. Aggiunta 13 nei trimestrali e sistemata la visualizzazione dei trimestrali. Corrette diciture pro rata a da C1 C2 C3 C1a in B1 B2 B3 B4 Calcolato il pro rata mensile sempre Detratti gli i beni ammortizzabili esenti venduti nel calcolo pro rata con numeratore e denominatore (da verificare)
This commit is contained in:
parent
feb5200475
commit
125d03e77b
@ -398,6 +398,9 @@ bool TLiquidazione_app::update_firm(int month, bool recalc)
|
||||
_pla->zero("R16");
|
||||
_pla->zero("R17");
|
||||
_pla->zero("R18");
|
||||
_pla->zero("R19");
|
||||
_pla->zero("R20");
|
||||
_pla->zero("R21");
|
||||
_pla->put("S1","0");
|
||||
_pla->put("S2","0");
|
||||
_pla->put("S3", "0");
|
||||
@ -917,6 +920,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
real esenti_c1a = ZERO;
|
||||
real esenti_c3_bam = ZERO; // Beni ammorizzabili esenti c3
|
||||
real esenti_c1a_bam = ZERO; // Beni ammorizzabili esenti c1a
|
||||
real esenti_num_amm;
|
||||
real esenti_b14 = ZERO;
|
||||
real vendite_rev = ZERO; // Vendire in reverse charge (da escludere in prorata)
|
||||
real cred_fattrit;
|
||||
@ -1499,6 +1503,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
int isrimbinfr = _iva->get_bool("B3"); // vale per calcolo rimborso se ES o NI
|
||||
const real perciva = _iva->get_real("R0") / CENTO;
|
||||
int ivarimb = !_iva->get_bool("B4"); // non escluso calcolo rimb. per al. media
|
||||
const bool den_prorata = _iva->get_bool("B7"); // denominatore prorata nel caso di calcolo pro rata con numeratore e denominatore
|
||||
|
||||
const TString4 tipocr_s = _rmoviva->get(RMI_TIPOCR);
|
||||
const int tipocr = atoi(tipocr_s);
|
||||
@ -2207,28 +2212,31 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
}
|
||||
|
||||
// operazioni esenti
|
||||
|
||||
if (tipoiva == "ES" && !imponibile.is_zero())
|
||||
{
|
||||
if (tipomov == vendita)
|
||||
{
|
||||
if (sosp_imp != normale && sosp_imp != vol_affari) // CM500308
|
||||
{
|
||||
if (tipoes_v == "B1") // C1
|
||||
if (tipoes_v == "B1")
|
||||
esenti_c1 += imponibile;
|
||||
else if (tipoes_v == "B2") // C2
|
||||
else if (tipoes_v == "B2")
|
||||
esenti_c2 += imponibile;
|
||||
else if (tipoes_v == "B3") // C3
|
||||
else if (tipoes_v == "B3")
|
||||
{
|
||||
esenti_c3 += imponibile;
|
||||
if (tipocr == 4)
|
||||
esenti_c3_bam += imponibile;
|
||||
}
|
||||
else if (tipoes_v == "B4") // C1A
|
||||
else if (tipoes_v == "B4")
|
||||
{
|
||||
esenti_c1a += imponibile;
|
||||
if (tipocr == 4)
|
||||
esenti_c1a_bam += imponibile;
|
||||
}
|
||||
if (den_prorata && tipocr == 4)
|
||||
esenti_num_amm += imponibile;
|
||||
// se e' il caso sommare esenti per rimborso
|
||||
if (isrimbinfr)
|
||||
esni_rimb += imponibile;
|
||||
@ -2923,8 +2931,8 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
// Somma i vari prorata calcolati per gli anni precedenti
|
||||
prorata += prorata_precedente1 + prorata_precedente2;
|
||||
prorata += prorata_diff;
|
||||
if (!lia.get_bool("B7"))
|
||||
prorata = ZERO;
|
||||
/* if (!lia.get_bool("B7"))
|
||||
prorata = ZERO; */
|
||||
acquisti_iva -= prorata; // Rettifica acquisti_iva
|
||||
fdiffinc_iva_acq -= prorata_diff; // Rettifica acquisti_iva differiti incassati
|
||||
}
|
||||
@ -3030,6 +3038,7 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt, TAssoc_array &
|
||||
_pum->put("R13", esenti_c1a);
|
||||
_pum->put("S4", esenti_c3_bam);
|
||||
_pum->put("S5", esenti_c1a_bam);
|
||||
_pum->put("S6", esenti_num_amm);
|
||||
_pum->put("R7", esenti_b14);
|
||||
_pum->put("R12", esni_rimb);
|
||||
_pum->put("R28", vendite_rev); // Vendite in reverse charge da escludere da prorata
|
||||
@ -4251,37 +4260,36 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
vol_aff_2 += vf2;
|
||||
vol_aff_l += _pla->get_real("R0"); // volume affari lordo
|
||||
|
||||
real es_c1 = _pla->get_real("R1"); // Tipo esenzione B1
|
||||
real es_c2 = _pla->get_real("R2");
|
||||
real es_c3 = _pla->get_real("R3");
|
||||
real es_c1a = _pla->get_real("R15");
|
||||
real es_c3_am = _pla->get_real("R16");
|
||||
real es_c1a_am = _pla->get_real("R17");
|
||||
real es_b1 = _pla->get_real("R1"); // Tipo esenzione B1
|
||||
real es_b2 = _pla->get_real("R2");
|
||||
real es_b3 = _pla->get_real("R3");
|
||||
real es_b4 = _pla->get_real("R15");
|
||||
real es_b3_am = _pla->get_real("R16");
|
||||
real es_b4_am = _pla->get_real("R17");
|
||||
real csamm = _pla->get_real("R4");
|
||||
real ven_rev = _pla->get_real("R18");
|
||||
real num_amm = _pla->get_real("R21");
|
||||
|
||||
real prorata;
|
||||
real conguaglio;
|
||||
real topay;
|
||||
|
||||
real ris; // gia' esclusi: NS, B3, cess. amm
|
||||
real rsd;
|
||||
real rsn;
|
||||
// calcola nuovo prorata dal 1998 per ogni attivita' (miste: 1+2)
|
||||
if (_prorata_nd)
|
||||
{
|
||||
const real rsd = _pla->get_real("R20");
|
||||
const real rsn = _pla->get_real("R19");
|
||||
|
||||
if (rsd != ZERO)
|
||||
prorata = CENTO - (rsn * CENTO / rsd); // Percentuale di indetraibilita: reciproco della percentuale di detraibilita'
|
||||
rsd = _pla->get_real("R20") + num_amm;
|
||||
rsn = _pla->get_real("R19");
|
||||
}
|
||||
else
|
||||
{
|
||||
const real ris = vf1 + vf2; // gia' esclusi: NS, B3, cess. amm
|
||||
const real rsd = ris - (es_c1a - es_c1a_am) - (es_c3 - es_c3_am) - ven_rev;
|
||||
const real rsn = rsd - es_c1;
|
||||
|
||||
if (!rsd.is_zero())
|
||||
prorata = CENTO - (rsn * CENTO / rsd); // Percentuale di indetraibilità: reciproco della detraibilità
|
||||
ris = vf1 + vf2; // gia' esclusi: NS, B3, cess. amm
|
||||
rsd = ris - (es_b4 - es_b4_am) - (es_b3 - es_b3_am) - ven_rev;
|
||||
rsn = rsd - es_b1;
|
||||
}
|
||||
if (rsd != ZERO)
|
||||
prorata = CENTO - (rsn * CENTO / rsd); // Percentuale di indetraibilita: reciproco della percentuale di detraibilita'
|
||||
prorata.round(0);
|
||||
// calcolo conguaglio -- se positivo e' a debito
|
||||
if (prorata > ZERO && lia.get_bool("B7"))
|
||||
@ -4614,6 +4622,7 @@ void TLiquidazione_app::recalc_annual(const char* att, bool & first)
|
||||
real volaff1;
|
||||
real volaff2;
|
||||
real ven_rev;
|
||||
real num_amm;
|
||||
|
||||
TString4 codiva,reg,tiva;
|
||||
TToken_string va7("",'!');
|
||||
@ -4638,6 +4647,8 @@ void TLiquidazione_app::recalc_annual(const char* att, bool & first)
|
||||
iva_acq = _pla->get_real("R11");
|
||||
ven_rev = _pla->get_real("R18");
|
||||
volaff1 -= _pla->get_real("R34");
|
||||
num_amm = _pla->get_real("R21");;
|
||||
|
||||
|
||||
// Per avere un risultato corretto, si deve totalizzare PIM->R3 per codice iva
|
||||
// e quindi effettuare lo scorporo dell'imponibile e aggiungere al relativo volume d'affari
|
||||
@ -4746,6 +4757,7 @@ void TLiquidazione_app::recalc_annual(const char* att, bool & first)
|
||||
es_c1a += _pum->get_real("R13");
|
||||
es_c3_am += _pum->get_real("S4");
|
||||
es_c1a_am += _pum->get_real("S5");
|
||||
num_amm += _pum->get_real("S6");
|
||||
cess_amm += _pum->get_real("R0");
|
||||
ven_rev += _pum->get_real("R28");
|
||||
|
||||
@ -4840,6 +4852,7 @@ void TLiquidazione_app::recalc_annual(const char* att, bool & first)
|
||||
{
|
||||
_pla->put("R19", num_pro_rata);
|
||||
_pla->put("R20", den_pro_rata);
|
||||
_pla->put("R21", num_amm);
|
||||
}
|
||||
_pla->rewrite();
|
||||
}
|
||||
|
@ -1098,16 +1098,17 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
||||
real v1 = _pla->get_real("R14"); // Volume d'affari I attività
|
||||
real v2 = _pla->get_real("S1"); // Volume d'affari II attività
|
||||
real ris = v1 + v2;
|
||||
real e1 = _pla->get_real("R1"); // Totale vendite esenti C1
|
||||
real e2 = _pla->get_real("R2"); // Totale vendite esenti C2
|
||||
real e3 = _pla->get_real("R3"); // Totale vendite esenti C3
|
||||
real e4 = _pla->get_real("R15"); // Totale vendite esenti C1A
|
||||
real e5 = _pla->get_real("R16"); // Totale vendite beni ammortizzabili esenti C3
|
||||
real e6 = _pla->get_real("R17"); // Totale vendite beni ammortizzabili esenti C1A
|
||||
real e1 = _pla->get_real("R1"); // Totale vendite esenti B1
|
||||
real e2 = _pla->get_real("R2"); // Totale vendite esenti B2
|
||||
real e3 = _pla->get_real("R3"); // Totale vendite esenti B3
|
||||
real e4 = _pla->get_real("R15"); // Totale vendite esenti B4
|
||||
real e5 = _pla->get_real("R16"); // Totale vendite beni ammortizzabili esenti B3
|
||||
real e6 = _pla->get_real("R17"); // Totale vendite beni ammortizzabili esenti B4
|
||||
real bam = _pla->get_real("R4"); // Cessione beni ammortizzabili
|
||||
real vrc = _pla->get_real("R18"); // Vendite reverse charge
|
||||
real iaq = _pla->get_real("R11"); // IVA acquisti
|
||||
real ppg = _pla->get_real("R12"); // pro-rata pagato
|
||||
real num_amm = _pla->get_real("R21");
|
||||
// calcola nuovo prorata per ogni attivita' (miste: 1+2)
|
||||
real prorata;
|
||||
real rsd;
|
||||
@ -1115,20 +1116,16 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
||||
|
||||
if (_prorata_nd)
|
||||
{
|
||||
rsd = _pla->get_real("R20");
|
||||
rsd = _pla->get_real("R20") + num_amm;
|
||||
rsn = _pla->get_real("R19");
|
||||
|
||||
if (!rsd.is_zero())
|
||||
prorata = CENTO - (rsn * CENTO / rsd); // Percentuale di indetraibilita: reciproco della percentuale di detraibilita'
|
||||
}
|
||||
else
|
||||
{
|
||||
rsd = ris - (e3 - e5) - (e4 - e6) - vrc;
|
||||
rsn = rsd - e1;
|
||||
|
||||
}
|
||||
if (!rsd.is_zero())
|
||||
prorata = CENTO - (rsn * CENTO / rsd); // Percentuale di indetraibilita: reciproco della percentuale di detraibilita'
|
||||
}
|
||||
prorata.round(0);
|
||||
|
||||
real co = 0.0;
|
||||
@ -1149,7 +1146,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
||||
|
||||
_DescrItem* dd = new _DescrItem(ANNUAL);
|
||||
|
||||
// MonsterFish: arrotonda all'Euro C1,C2,C3,C1A
|
||||
// MonsterFish: arrotonda all'Euro B1,B2,B3,B4
|
||||
round_imposta(e1);
|
||||
round_imposta(e2);
|
||||
round_imposta(e3);
|
||||
@ -1159,6 +1156,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
||||
round_imposta(bam);
|
||||
round_imposta(ris);
|
||||
round_imposta(vrc);
|
||||
round_imposta(num_amm);
|
||||
|
||||
// segna flag prorata
|
||||
if ((e1+e2+e3+e4) > ZERO)
|
||||
@ -1180,6 +1178,7 @@ void TLiquidazione_app::describe_pims(int month, const char* codatt, const bool
|
||||
dd->_ra0 = rsn;
|
||||
dd->_ra1 = rsd;
|
||||
dd->_ra2 = vrc;
|
||||
dd->_ra3 = num_amm;
|
||||
t->_arr.add(dd);
|
||||
}
|
||||
}
|
||||
@ -2834,45 +2833,52 @@ bool TLiquidazione_app::set_annual(_DescrItem& d)
|
||||
row++;
|
||||
if (_prorata_nd)
|
||||
{
|
||||
set_row(row++, FR("Numeratore pro-rata @69g%r"), &(d._ra0));
|
||||
set_row(row++, FR("Denominatore @69g%r"), &(d._ra1));
|
||||
set_row(row++, FR(" - Numeratore pro-rata @69g%r"), &d._ra0);
|
||||
set_row(row++, FR(" - cessioni esenti di beni ammortizzabili @69g%r"), &d._ra3);
|
||||
const real tot = d._ra0 + d._ra3;
|
||||
|
||||
if (tot != ZERO)
|
||||
{
|
||||
set_row(row++, FR("@69g----------------"));
|
||||
set_row(row++, FR("@6gTotale @69g%r"), &tot);
|
||||
row++;
|
||||
}
|
||||
set_row(row++, FR(" - Denominatore @69g%r"), &d._ra1);
|
||||
}
|
||||
else
|
||||
{
|
||||
set_row(row++, FR(" - Volume d'affari @69g%r"), &(vol_aff));
|
||||
set_row(row++, FR("C1 - Operazioni esenti escluse da nr. 1 a 9 e 11 art. 10 @69g%r"), &(d._r1));
|
||||
set_row(row++, FR("C2 - Operazioni esenti di cui nr. 11 art. 10 @69g%r"), &(d._r4));
|
||||
set_row(row++, FR("C3 - Operazioni esenti da nr. 1 a 9 art. 10 @69g%r"), &(d._r5));
|
||||
set_row(row++, FR("@6gdi cui cessione beni ammortizzabili @69g%r"), &(d._r8));
|
||||
set_row(row++, FR(" - Volume d'affari @69g%r"), &vol_aff);
|
||||
set_row(row++, FR("B1 - Operazioni esenti escluse da nr. 1 a 9 e 11 art. 10 @69g%r"), &d._r1);
|
||||
set_row(row++, FR("B2 - Operazioni esenti di cui nr. 11 art. 10 @69g%r"), &d._r4);
|
||||
set_row(row++, FR("B3 - Operazioni esenti da nr. 1 a 9 art. 10 @69g%r"), &d._r5);
|
||||
set_row(row++, FR("@6gdi cui cessione beni ammortizzabili @69g%r"), &d._r8);
|
||||
|
||||
const real diff1 = d._r5 - d._r8;
|
||||
|
||||
if (diff1 != ZERO)
|
||||
{
|
||||
set_row(row++, FR("@69g----------------"));
|
||||
set_row(row++, FR("6g Differenza @69g%r"), &(diff1));
|
||||
set_row(row++, FR("6gDifferenza @69g%r"), &diff1);
|
||||
row++;
|
||||
}
|
||||
set_row(row++, FR("C1A - Operazioni esenti di cui all'art.10 n. 27 quinquies @69g%r"), &(d._r7));
|
||||
set_row(row++, FR("@6gdi cui cessione beni ammortizzabili @69g%r"), &(d._r9));
|
||||
set_row(row++, FR("B4 - Operazioni esenti di cui all'art.10 n. 27 quinquies @69g%r"), &d._r7);
|
||||
set_row(row++, FR("@6gdi cui cessione beni ammortizzabili @69g%r"), &d._r9);
|
||||
|
||||
const real diff2 = d._r7 - d._r9;
|
||||
|
||||
if (diff2 != ZERO)
|
||||
{
|
||||
set_row(row++, FR("@69g----------------"));
|
||||
set_row(row++, FR("6g Differenza @69g%r"), &(diff2));
|
||||
set_row(row++, FR("6gDifferenza @69g%r"), &diff2);
|
||||
row++;
|
||||
}
|
||||
set_row(row++, FR(" - Vendite Reverse Charge @69g%r"), &(d._ra2));
|
||||
set_row(row++, FR("Numeratore pro-rata @69g%r"), &(d._ra0));
|
||||
set_row(row++, FR(" Volume d'affari - C3(senza beni amm.) - C1A(senza beni amm.) - vendite reverse charge "));
|
||||
set_row(row++, FR("Denominatore @69g%r"), &(d._ra1));
|
||||
set_row(row++, FR(" Denominatore - C1 "));
|
||||
set_row(row++, FR(" - Vendite Reverse Charge @69g%r"), &d._ra2);
|
||||
row++;
|
||||
set_row(row++, FR(" - Numeratore pro-rata @69g%r"), &d._ra0);
|
||||
set_row(row++, FR(" Volume d'affari - B3(senza beni amm.) - B4(senza beni amm.) - vendite reverse charge "));
|
||||
set_row(row++, FR(" - Denominatore @69g%r"), &d._ra1);
|
||||
set_row(row++, FR(" Denominatore - B1 "));
|
||||
}
|
||||
// set_row(row++, FR("Volume d'affari @69g%r"), &vol_aff);
|
||||
// set_row(row++, FR("Totale vendite al fine del calcolo del pro-rata @69g%r"), &vol_aff);
|
||||
|
||||
set_print_zero(false);
|
||||
}
|
||||
return ret;
|
||||
|
Loading…
x
Reference in New Issue
Block a user