Liquidazione e visualizzazione
git-svn-id: svn://10.65.10.50/trunk@1584 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
6ce2fb740e
commit
7f7af8474e
@ -510,7 +510,8 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
|
||||
/*
|
||||
* check date: se si calcola l'acconto, solo da 1/12 a 20/12
|
||||
*/
|
||||
if (_comp_acconto && date.month() != 12 && date.day() > 20)
|
||||
int accmonth = _isdifferita ? 11 : 12;
|
||||
if (_comp_acconto && date.month() != accmonth && date.day() > 20)
|
||||
continue;
|
||||
|
||||
bool corrisp = _reg->get_bool("B0");
|
||||
@ -1463,9 +1464,28 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
risultato -= cred_prec;
|
||||
res_cred += cred_prec;
|
||||
}
|
||||
} else if (_isdifferita)
|
||||
}
|
||||
else if (_isdifferita && !is_first_month(month) && month < 13)
|
||||
{
|
||||
// TBI gestione struonza
|
||||
// toglie credito precedente
|
||||
cred_prec = credito_prec(month);
|
||||
risultato -= cred_prec;
|
||||
res_cred += cred_prec;
|
||||
// vedi se c'era un debito precedente per debiti < 50.000
|
||||
debt_precd = debt_prec(month);
|
||||
risultato += debt_precd;
|
||||
res_debt += debt_precd;
|
||||
|
||||
// folie bergere: se il mese precedente, che e' poi questo che ho calcolato,
|
||||
// era a credito, devo tener conto del credito precedente che e' quello di
|
||||
// questo mese (Vladimiro MI3170), ovvero devo RADDOPPIARE il credito, il che
|
||||
// e' semplicemente roba da matti
|
||||
if (!cred_prec.is_zero())
|
||||
{
|
||||
risultato -= cred_prec;
|
||||
res_cred += cred_prec;
|
||||
cred_prec += cred_prec; // AH AH UAH IH UHU
|
||||
}
|
||||
}
|
||||
|
||||
if (month == 13)
|
||||
@ -1539,17 +1559,21 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
if (tot_cong.sign() < 0) res_cred += abs(tot_cong);
|
||||
|
||||
look_lim(month+deltam,TRUE);
|
||||
// azzeriamo tutto (tranne r1, r5, s7)
|
||||
// azzeriamo tutto (tranne r1, r5, s1, s0, s7)
|
||||
TString codtab = _lim->get("CODTAB");
|
||||
|
||||
real r5 = _lim->get("R5");
|
||||
real r1 = _lim->get("R1");
|
||||
TString s7 = _lim->get("S7");
|
||||
TString s0 = _lim->get("S0");
|
||||
TString s1 = _lim->get("S1");
|
||||
|
||||
_lim->zero();
|
||||
_lim->put("CODTAB", codtab);
|
||||
_lim->put("R1", r1);
|
||||
_lim->put("R5", r5);
|
||||
_lim->put("S0", s0);
|
||||
_lim->put("S1", s1);
|
||||
_lim->put("S7", s7);
|
||||
|
||||
/*
|
||||
@ -1593,10 +1617,10 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
|
||||
|
||||
/*
|
||||
* Interessi dovuti solo da trimestrali in periodica,
|
||||
* non benzinari
|
||||
* Era anche non benzinari, smentito da Cinzia (MI0853)
|
||||
*/
|
||||
if (_freqviva == "T" && risultato.sign() > 0 &&
|
||||
month < 13 && !_isbenzinaro)
|
||||
month < 13 /* && !_isbenzinaro */)
|
||||
{
|
||||
real interesse = interesse_trimestrale(_month);
|
||||
real ivi = risultato * (interesse / CENTO);
|
||||
|
@ -228,7 +228,7 @@ void TLiquidazione_app::describe_ventilation(int month, const char* codatt)
|
||||
|
||||
// questi non vanno in liquidazione, i totali sono
|
||||
// gia' calcolati altrove
|
||||
if (tipodet == 1 || tipodet == 3 || tipodet == 9)
|
||||
if (tipodet == 1 || (tipodet == 3 && tipocr == 5) || tipodet == 9)
|
||||
continue;
|
||||
|
||||
// questi non si devono vedere perche' so' bbrutti
|
||||
|
@ -1309,6 +1309,7 @@ void Visliq_app::write_general(TMask& m)
|
||||
risc -= nrett;
|
||||
else
|
||||
risd += nrett;
|
||||
|
||||
// scrivi
|
||||
_lim->put("R5",nrett);
|
||||
}
|
||||
|
@ -121,8 +121,6 @@ BEGIN
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
INPUT 104
|
||||
OUTPUT 104
|
||||
FLAGS "DU"
|
||||
END
|
||||
|
||||
@ -135,19 +133,17 @@ END
|
||||
|
||||
NUMBER 105 15
|
||||
BEGIN
|
||||
PROMPT 1 6 "Debito/Credito "
|
||||
PROMPT 1 6 "Rettifiche "
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
LIST 106 1 8
|
||||
BEGIN
|
||||
PROMPT 1 7 "Importo a "
|
||||
PROMPT 1 7 "Rettifica a "
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
INPUT 104
|
||||
OUTPUT 104
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
@ -235,8 +231,6 @@ BEGIN
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
INPUT 104
|
||||
OUTPUT 104
|
||||
FLAGS "U"
|
||||
END
|
||||
*/
|
||||
|
@ -99,8 +99,6 @@ BEGIN
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
INPUT 104
|
||||
OUTPUT 104
|
||||
FLAGS "DU"
|
||||
END
|
||||
|
||||
@ -113,19 +111,17 @@ END
|
||||
|
||||
NUMBER 105 15
|
||||
BEGIN
|
||||
PROMPT 1 5 "Debito/Credito "
|
||||
PROMPT 1 5 "Rettifiche "
|
||||
FLAGS "R"
|
||||
PICTURE "."
|
||||
END
|
||||
|
||||
LIST 106 1 8
|
||||
BEGIN
|
||||
PROMPT 1 6 "Importo a "
|
||||
PROMPT 1 6 "Rettifica a "
|
||||
ITEM " | "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
INPUT 104
|
||||
OUTPUT 104
|
||||
FLAGS "U"
|
||||
END
|
||||
|
||||
@ -212,8 +208,6 @@ BEGIN
|
||||
PROMPT 1 7 "Importo a "
|
||||
ITEM "D|Debito"
|
||||
ITEM "C|Credito"
|
||||
INPUT 104
|
||||
OUTPUT 104
|
||||
FLAGS "U"
|
||||
END
|
||||
*/
|
||||
|
Loading…
x
Reference in New Issue
Block a user