Corretto errore prorata

git-svn-id: svn://10.65.10.50/trunk@2616 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
nik 1996-02-20 09:26:43 +00:00
parent 581fbefbc0
commit f1bfaa0fdc

View File

@ -311,7 +311,7 @@ void TLiquidazione_app::describe_ventilation(int month, const char* codatt)
vd->_vnd += imponibile;
vd->_viv += imposta;
d->_r1 += imponibile+imposta;
d->_r1 += imponibile+imposta;
if (vd->_codiva.empty())
{
@ -825,48 +825,33 @@ void TLiquidazione_app::describe_liq(int month, const char* codatts,
_DescrItem* TLiquidazione_app::describe_deleghe(int month)
{
/*
if (!look_del(month,1)) return NULL;
_DescrItem* d = new _DescrItem(DELEGA);
if (_del->get_bool("B0"))
{
d->_s0 = _del->get("S2"); // localita'
d->_s1 = _del->get("S1"); // banca
d->_s2 = _del->get("S7"); // ABI
d->_s3 = _del->get("S8"); // CAB
d->_r0 = _del->get_real("R0");
d->_d0 = _del->get_date("D0");
} // altrimenti lascia tutto in bianco e ci scriveranno i dati a mano
}
return d;
*/
bool stampa_vers = FALSE;
_stampa_vers = _stampa_acc = FALSE;
if (_lim->get_real("R0") > ZERO)
{
real iva = _lim->get_real("R0") + _lim->get_real("R14");
if (_isannual) iva.round(ROUND_MILLELIRE);
if (month == 13) iva.round(ROUND_MILLELIRE);
if (iva >= IVA_DA_RIPORTARE)
stampa_vers = TRUE;
_stampa_vers = TRUE;
}
/***13/02/1996
int mese = month;
if (_freqviva == "T" && _isannual) mese = 12;
//17/11/1995
/*
if (!look_del(month,month == 13 ? 2 : 1) &&
!look_del(mese,7) && !stampa_vers) return NULL;
*/
if (!look_del(mese,7) && !stampa_vers) return NULL;
//fine
***/
_stampa_acc = (month == 12 && (_freqviva == "M" || (_isbenzinaro && _gest4)))
||(month == 13 && _freqviva == "T" && !(_isbenzinaro && _gest4));
if (!_stampa_vers && !(_stampa_acc && look_del(12,7))) return NULL;
_DescrItem* d = new _DescrItem(DELEGA);
d->_f0 = 0;
if (stampa_vers) //solo se sono a debito
//prospettino versamento
if (_stampa_vers) //solo se sono a debito
if (look_del(month,month == 13 ? 2 : 1))
{
if (_del->get("S9").not_empty())
@ -882,10 +867,10 @@ _DescrItem* TLiquidazione_app::describe_deleghe(int month)
d->_d0 = _del->get_date("D0");
} // altrimenti lascia tutto in bianco e ci scriveranno i dati a mano
}
//prospettino acconto
if ( (month == 12 && (_freqviva == "M" || (_isbenzinaro && _gest4)))
|| (_isannual && _freqviva == "T" && !(_isbenzinaro && _gest4)) )
if (look_del(12,7)) //sia che sia a debito oppure a credito
|| (month == 13 && _freqviva == "T" && !(_isbenzinaro && _gest4)) )
if (look_del(12,7)) //sia che sia a debito che a credito
{
d->_s4 = "ACC";
if (_del->get("S9").not_empty())
@ -1626,13 +1611,13 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
/*
if (rw < (printer().formlen() - 10))
rw = printer().formlen() - 10;
*/
*/
//11/10/1995
int cont = 10;
if (di._s4 == "ACC")
{
TToken_string ac(di._s5);
if (!ac.empty_items())
if (!ac.empty_items() && _stampa_vers)
cont = 14;
}
if (rw < (printer().formlen() - cont))
@ -1664,7 +1649,7 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
TString cab (ac.get(3));
if (atof(vr) == 0.0 && vr[vr.len()-1] == '0') vr[vr.len()-1] = ' ';
set_row(rw++, "- ACCONTO DICEMBRE -");
set_row(rw, "Versamento di L. %s effettuato il %s",
set_row(rw, " Versamento di L. %s effettuato il %s",
(const char*)vr,
(const char*)dt);
if (di._f1 == 1)
@ -1679,32 +1664,36 @@ void TLiquidazione_app::set_grand(_DescrItem& d)
set_row(rw++, "@68gdiretto al Ministero delle Finanze");
set_row(rw++, "@68gConcessione %s", (const char*)loc);
}
}
set_row(rw++, "- SALDO -");
}
//if (_stampa_vers) set_row(rw++, "- SALDO -");
}
//fine
set_row(rw, "Versamento di L. %s effettuato il %s",
if (_stampa_acc && _stampa_vers) set_row(rw++, "- SALDO -");
if (_stampa_vers)
{
set_row(rw, " Versamento di L. %s effettuato il %s",
(const char*)vr,
(const char*)dt);
if (di._f0 == 1)
{
if (di._f0 == 1)
{
set_row(rw++, "@68gdiretto all'ufficio IVA di %s",
(const char*)(di._s0));
set_row(rw++, "@68gtramite %s", (const char*)(di._s1));
set_row(rw++, "@68gcodice azienda %s codice dipendenza %s",
(const char*)(di._s2), (const char*)(di._s3));
}
else if (di._f0 == 2)
{
}
else if (di._f0 == 2)
{
set_row(rw++, "@68gdiretto al Ministero delle Finanze");
set_row(rw++, "@68gConcessione %s", (const char*)(di._s0));
}
else
{
}
else
{
set_row(rw++, "@68gdiretto");
set_row(rw++, "@68gtramite");
}
}
}
}
}
}
@ -1730,8 +1719,10 @@ bool TLiquidazione_app::set_annual(_DescrItem& d)
{
// non lo ha stampato prima se annuale, perche' vladimiro il nefido
// pretende l'assurdo aggiornamento della perc. a quella nuova
set_row(++row, "%% PRO-RATA ed IVA non detraibile (%s%%)@69g%r",
(const char*)(d._r2.string()), &(d._r6));
//set_row(++row, "%% PRO-RATA ed IVA non detraibile (%s%%)@69g%r",
// (const char*)(d._r2.string()), &(d._r6));
set_row(++row,"CALCOLO DELLA PERCENTUALE DI INDETRAIBILITA'");
row++;
set_bookmark("Calcolo pro-rata", _att_bookmark);
@ -1739,8 +1730,10 @@ bool TLiquidazione_app::set_annual(_DescrItem& d)
ret = TRUE;
set_print_zero(TRUE);
set_row(row++,"");
set_row(row++,"CALCOLO DELLA PERCENTUALE DI INDETRAIBILITA'");
set_row(row++,"");
//set_row(row++,"CALCOLO DELLA PERCENTUALE DI INDETRAIBILITA'");
set_row(row++, "%% PRO-RATA ed IVA non detraibile (%s%%)@69g%r",
(const char*)(d._r2.string()), &(d._r6));
//set_row(row++,"");
set_row(row++,"Operazioni esenti riga B1@30g%r", &(d._r1));
set_row(row++,"Operazioni esenti riga B2@30g%r", &(d._r4));
set_row(row++,"Operazioni esenti riga B3@30g%r", &(d._r5));