Corretti o rimandati al mittente errori liquidazione MI1058 MI 1123
MI0147 1221 MI1056 MI2009MI1062 MI2002 MI1055 MI0049 1226 MI2037 MI2038 MI2039 1215 MI1051 MI2040 git-svn-id: svn://10.65.10.50/trunk@612 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8aa7cd7cf4
commit
ac126ba3c0
@ -87,6 +87,10 @@ bool CG4300_App::update_firm(int month, bool recalc)
|
||||
// gia' ricalcolata definitivamente?
|
||||
bool ok = _lim->get_bool("B1");
|
||||
if (ok && !_comp_acconto) return TRUE;
|
||||
|
||||
// azzera ulteriori detrazioni
|
||||
_lim->put("R6","");
|
||||
_lim->rewrite();
|
||||
|
||||
// ricalcolo normale
|
||||
ok = _lim->get_bool("B0");
|
||||
@ -305,9 +309,9 @@ void CG4300_App::recalc_att(int month, const char* codatt)
|
||||
for (; _cur->pos() < items; ++(*_cur))
|
||||
{
|
||||
TDate date(_mov_r->get("DATAREG"));
|
||||
TString16 reg = _mov_r->get("REG");
|
||||
bool isreg = look_reg(_mov_r->get("REG"));
|
||||
|
||||
TString16 reg = _mov_r->get("REG");
|
||||
bool isreg = look_reg(_mov_r->get("REG"));
|
||||
TString16 tipodoc = _mov_r->get("TIPODOC");
|
||||
/*
|
||||
* check register present, rmoviva present and date OK
|
||||
*/
|
||||
@ -432,8 +436,10 @@ void CG4300_App::recalc_att(int month, const char* codatt)
|
||||
// plafond
|
||||
if (_isplafond && tipomov == acquisto &&
|
||||
tipoiva == "NI" && tipopla != 0)
|
||||
{
|
||||
if (tipodoc == "BD") intra = TRUE;
|
||||
add_plafond(month, codatt, tipopla, imponibile, intra);
|
||||
|
||||
}
|
||||
// agenzie viaggio (CHECK imponibili etc.)
|
||||
if (_isviaggio)
|
||||
switch (tipoag)
|
||||
@ -469,8 +475,8 @@ void CG4300_App::recalc_att(int month, const char* codatt)
|
||||
continue;
|
||||
}
|
||||
|
||||
if (tipodet == 3) // passaggi interni (solo ventilaz.)
|
||||
continue;
|
||||
// if (tipodet == 3) // passaggi interni (solo ventilaz.)
|
||||
// continue;
|
||||
|
||||
// *****************************************
|
||||
// Fine casi particolari
|
||||
@ -543,8 +549,10 @@ void CG4300_App::recalc_att(int month, const char* codatt)
|
||||
// calcola il lercio prorata
|
||||
real prorata;
|
||||
if (!_prorata.is_zero())
|
||||
{
|
||||
prorata = acquisti_iva * (_prorata / CENTO);
|
||||
|
||||
prorata.round(ROUND_LIRA);
|
||||
}
|
||||
look_plm(month, codatt, TRUE);
|
||||
|
||||
// ACHTUNG: l'iva sulle vendite e' calcolata sommando anche i
|
||||
|
@ -65,37 +65,6 @@ void CG4300_App::zero_plafond (int month, const char* codatt)
|
||||
_ppa->rewrite();
|
||||
} // for tipo esenzione plafond
|
||||
}
|
||||
|
||||
void CG4300_App::describe_plafond(int month, const char* codatt)
|
||||
{
|
||||
if (month == 13) month = 12;
|
||||
// prepara la descrizione del riepilogo da stampare e lo accoda
|
||||
real t1, t2, t3;
|
||||
_DescrItem* d = new _DescrItem(PLAFOND);
|
||||
|
||||
for (int jj = 1; jj <= 3; jj++) // three types of plafond
|
||||
{
|
||||
t1 = 0.0; t2 = 0.0; t3 = 0.0;
|
||||
for (int m = 1; m <= month; m++)
|
||||
{
|
||||
if (look_ppa(m,codatt,jj))
|
||||
{
|
||||
t1 = _ppa->get_real("R0");
|
||||
t2 = _ppa->get_real("R1");
|
||||
t3 = _ppa->get_real("R2");
|
||||
}
|
||||
}
|
||||
switch (jj)
|
||||
{
|
||||
case 1: d->_r0 = t1; d->_r1 = t2; d->_r2 = t3; break;
|
||||
case 2: d->_r3 = t1; d->_r4 = t2; d->_r5 = t3; break;
|
||||
case 3: d->_r6 = t1; d->_r7 = t2; d->_r8 = t3; break;
|
||||
}
|
||||
} // for tipo esenzione plafond
|
||||
|
||||
_descr_arr.add(d);
|
||||
}
|
||||
|
||||
// ricalcolo dei corrispettivi
|
||||
void CG4300_App::recalc_corrispettivi(int month, const char* codatt)
|
||||
{
|
||||
|
@ -118,6 +118,39 @@ void CG4300_App::describe_firm(int month)
|
||||
_descr_arr.add(d);
|
||||
}
|
||||
|
||||
|
||||
void CG4300_App::describe_plafond(int month, const char* codatt)
|
||||
{
|
||||
if (month == 13) month = 12;
|
||||
// prepara la descrizione del riepilogo da stampare e lo accoda
|
||||
real t1, t2, t3;
|
||||
_DescrItem* d = new _DescrItem(PLAFOND);
|
||||
|
||||
for (int jj = 1; jj <= 3; jj++) // three types of plafond
|
||||
{
|
||||
t1 = 0.0; t2 = 0.0; t3 = 0.0;
|
||||
for (int m = 1; m <= month; m++)
|
||||
{
|
||||
if (!is_month_ok(m)) continue;
|
||||
|
||||
if (look_ppa(m,codatt,jj))
|
||||
{
|
||||
t1 = _ppa->get_real("R0");
|
||||
t2 = _ppa->get_real("R1");
|
||||
t3 = _ppa->get_real("R2");
|
||||
}
|
||||
}
|
||||
switch (jj)
|
||||
{
|
||||
case 1: d->_r0 = t1; d->_r1 = t2; d->_r2 = t3; break;
|
||||
case 2: d->_r3 = t1; d->_r4 = t2; d->_r5 = t3; break;
|
||||
case 3: d->_r6 = t1; d->_r7 = t2; d->_r8 = t3; break;
|
||||
}
|
||||
} // for tipo esenzione plafond
|
||||
|
||||
_descr_arr.add(d);
|
||||
}
|
||||
|
||||
void CG4300_App::describe_ventilation(int month, const char* codatt)
|
||||
{
|
||||
if (_isriepilogo || _isannual) month = 12;
|
||||
@ -378,7 +411,7 @@ void CG4300_App::describe_pims(int month, const char* codatt)
|
||||
|
||||
for (int m = 1; m <= month && m < 13; m++)
|
||||
{
|
||||
if (!check_month(m,month)) continue;
|
||||
if (!is_month_ok(m) || !check_month(m,month)) continue;
|
||||
|
||||
atts.restart();
|
||||
while ((tmpatt = atts.get()) != NULL)
|
||||
@ -404,7 +437,7 @@ void CG4300_App::describe_pims(int month, const char* codatt)
|
||||
|
||||
t->_r11 += _plm->get_real("R2"); // pro-rata indetraibile
|
||||
t->_s0 = (_plm->get_real("R12")).string(); // % pro-rata
|
||||
real aie(_plm->get("S2")); // acq. inded. su ricavi esenti
|
||||
real aie(_plm->get("S2")); // acq. inded. su ricavi esenti
|
||||
real aiev(_plm->get("S3")); // IVA acq. inded. su ricavi esenti
|
||||
d->_r9 += aie;
|
||||
d->_r10 += aiev;
|
||||
@ -575,7 +608,7 @@ void CG4300_App::set_firm(_DescrItem& d)
|
||||
tim_title << format(": Riepilogo Annuale %s",(const char*)_year);
|
||||
else
|
||||
{
|
||||
if (d._s3 == "T")
|
||||
if (d._s2 == "T")
|
||||
tim_title << format(" del %d° Trimestre %s", d._f1/3, (const char *) _year);
|
||||
else
|
||||
tim_title << format(" del mese di %s %s", itom(d._f1),
|
||||
@ -623,7 +656,7 @@ void CG4300_App::set_att(_DescrItem& d)
|
||||
else
|
||||
{
|
||||
if (d._s4 == "T")
|
||||
tim_title << format(" del %do Trimestre %s", d._f1/3, (const char *) _year);
|
||||
tim_title << format(" del %d° Trimestre %s", d._f1/3, (const char *) _year);
|
||||
else
|
||||
tim_title << format(" del mese di %s %s", itom(d._f1),
|
||||
(const char*)_year);
|
||||
@ -678,24 +711,24 @@ void CG4300_App::set_plafond(_DescrItem& d)
|
||||
"MENSILE DEI PLAFOND");
|
||||
|
||||
set_row(2,""); set_row(3,"");
|
||||
set_row(4,"Art. 8 1@io@rcomma lettere a-b@31gDisponibile@48g%r",
|
||||
set_row(4,"Art. 8 1° comma lettere a-b@31gDisponibile@48g%r",
|
||||
&r1);
|
||||
set_row(5,"Utilizzato all'interno@48g%r", &(d._r0));
|
||||
set_row(6,"Utilizzato per l'importazione@48g%r@69gRiporto %r",
|
||||
set_row(6,"Utilizzato per l'importazione@48g%r@69gRiporto@78g%r",
|
||||
&(d._r1), &(d._r2));
|
||||
|
||||
set_row(7,"");
|
||||
set_row(8,"Art. 8bis 1@io@rcomma@31gDisponibile@48g%r",
|
||||
set_row(8,"Art. 8bis 1° comma@31gDisponibile@48g%r",
|
||||
&r2);
|
||||
set_row(9,"Utilizzato all'interno@48g%r", &(d._r3));
|
||||
set_row(10,"Utilizzato per l'importazione@48g%r@69gRiporto %r",
|
||||
set_row(10,"Utilizzato per l'importazione@48g%r@69gRiporto@78g%r",
|
||||
&(d._r4), &(d._r5));
|
||||
|
||||
set_row(11,"");
|
||||
set_row(12,"Art. 9 1@io@rcomma@31gDisponibile@48g%r",
|
||||
set_row(12,"Art. 9 1° comma@31gDisponibile@48g%r",
|
||||
&r3);
|
||||
set_row(13,"Utilizzato all'interno@48g%r", &(d._r6));
|
||||
set_row(14,"Utilizzato per l'importazione@48g%r@69gRiporto %r",
|
||||
set_row(14,"Utilizzato per l'importazione@48g%r@69gRiporto@78g%r",
|
||||
&(d._r7), &(d._r8));
|
||||
|
||||
set_print_zero(FALSE);
|
||||
@ -737,12 +770,18 @@ void CG4300_App::set_plm(_DescrItem& d)
|
||||
&(d._r4),
|
||||
&(d._r5));
|
||||
// totalazzi parziali e generali
|
||||
set_row(4,"di cui per acquisti intracomunitari@107g%r", &(d._r6));
|
||||
set_row(5,"");
|
||||
set_row(6,"Totali acquisti indeducibili per art.19@91g%r@107g%r",
|
||||
&(d._r7), &(d._r8));
|
||||
set_row(7,"");
|
||||
int rw = 8;
|
||||
int rw = 4;
|
||||
if (!d._r6.is_zero())
|
||||
{
|
||||
set_row(rw++,"di cui per acquisti intracomunitari@107g%r", &(d._r6));
|
||||
set_row(rw++,"");
|
||||
}
|
||||
if (!(d._r7.is_zero() && d._r8.is_zero()))
|
||||
{
|
||||
set_row(rw++,"Totali acquisti indeducibili per art.19@91g%r@107g%r",
|
||||
&(d._r7), &(d._r8));
|
||||
set_row(rw++,"");
|
||||
}
|
||||
if (! (d._r9.is_zero() && d._r10.is_zero()))
|
||||
{
|
||||
set_row(rw++, "Totale acquisti indeducibili su ricavi esenti@91g%r@107g%r",
|
||||
@ -841,17 +880,17 @@ void CG4300_App::set_grand(_DescrItem& d)
|
||||
set_row(1,""); set_row(2,""); set_row(3,""); set_row(4,"");
|
||||
set_row(5,"@11g@bCALCOLO LIQUIDAZIONE D'IMPOSTA@r");
|
||||
set_row(6,""); int rw = 7;
|
||||
set_row(rw++,"@67gCredito@84gDebito"); set_row(rw++,"");
|
||||
set_row(rw++," @66gCredito@84gDebito"); set_row(rw++,"");
|
||||
set_row(rw++,"@11gIva sulle operazioni di vendita@75g%r", &(d._r0));
|
||||
set_row(rw++,"@11gRettifiche IVA a debito@75g%r", &(d._r5));
|
||||
set_row(rw++,"@11gIva chiesta a rimborso@75g%r", &(d._r4));
|
||||
real rd = d._r0 + d._r5 + d._r4;
|
||||
|
||||
// conguaglio prorata
|
||||
if (d._r9.sign() > 0)
|
||||
if (d._r9.sign() < 0)
|
||||
{
|
||||
rd += d._r9;
|
||||
set_row(rw++,"@11gConguaglio pro-rata@75g%r", &(d._r9));
|
||||
real r = abs(d._r9);
|
||||
set_row(rw++,"@11gConguaglio pro-rata@58g%r", &r);
|
||||
}
|
||||
|
||||
// debito liq. precedente < 50000
|
||||
@ -931,13 +970,15 @@ void CG4300_App::set_grand(_DescrItem& d)
|
||||
{
|
||||
_DescrItem& di = (_DescrItem&)d._arr[0];
|
||||
|
||||
set_print_zero(TRUE);
|
||||
|
||||
set_row(rw++,"");
|
||||
set_row(rw++,"");
|
||||
set_row(rw++, " PROSPETTO DI RIMBORSO");
|
||||
set_row(rw++,"");
|
||||
|
||||
if (di._f0)
|
||||
{
|
||||
{
|
||||
// esenti
|
||||
set_row(rw++,"1) Soggetto con quota di operazioni esenti e non"
|
||||
" imponibili superiore al 50%%");
|
||||
@ -967,7 +1008,9 @@ void CG4300_App::set_grand(_DescrItem& d)
|
||||
set_row(rw++,"@26gTotale imposte sulle vendite@66g%r", &(di._r4));
|
||||
set_row(rw++,"@66g%t x 100 = %5.2r", &sep, &(di._r6));
|
||||
set_row(rw++,"@26gTotale imponibili sulle vendite@66g%r", &(di._r2));
|
||||
}
|
||||
}
|
||||
|
||||
set_print_zero(FALSE);
|
||||
}
|
||||
set_auto_ff(TRUE);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user