Liquidazione e visualizzazione

git-svn-id: svn://10.65.10.50/trunk@1584 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1995-07-11 10:41:30 +00:00
parent 6ce2fb740e
commit 7f7af8474e
6 changed files with 3687 additions and 3674 deletions

View File

@ -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 * 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; continue;
bool corrisp = _reg->get_bool("B0"); bool corrisp = _reg->get_bool("B0");
@ -1463,9 +1464,28 @@ void TLiquidazione_app::write_liq(int month, const char* codatts)
risultato -= cred_prec; risultato -= cred_prec;
res_cred += 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) 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); if (tot_cong.sign() < 0) res_cred += abs(tot_cong);
look_lim(month+deltam,TRUE); look_lim(month+deltam,TRUE);
// azzeriamo tutto (tranne r1, r5, s7) // azzeriamo tutto (tranne r1, r5, s1, s0, s7)
TString codtab = _lim->get("CODTAB"); TString codtab = _lim->get("CODTAB");
real r5 = _lim->get("R5"); real r5 = _lim->get("R5");
real r1 = _lim->get("R1"); real r1 = _lim->get("R1");
TString s7 = _lim->get("S7"); TString s7 = _lim->get("S7");
TString s0 = _lim->get("S0");
TString s1 = _lim->get("S1");
_lim->zero(); _lim->zero();
_lim->put("CODTAB", codtab); _lim->put("CODTAB", codtab);
_lim->put("R1", r1); _lim->put("R1", r1);
_lim->put("R5", r5); _lim->put("R5", r5);
_lim->put("S0", s0);
_lim->put("S1", s1);
_lim->put("S7", s7); _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, * Interessi dovuti solo da trimestrali in periodica,
* non benzinari * Era anche non benzinari, smentito da Cinzia (MI0853)
*/ */
if (_freqviva == "T" && risultato.sign() > 0 && if (_freqviva == "T" && risultato.sign() > 0 &&
month < 13 && !_isbenzinaro) month < 13 /* && !_isbenzinaro */)
{ {
real interesse = interesse_trimestrale(_month); real interesse = interesse_trimestrale(_month);
real ivi = risultato * (interesse / CENTO); real ivi = risultato * (interesse / CENTO);

View File

@ -228,7 +228,7 @@ void TLiquidazione_app::describe_ventilation(int month, const char* codatt)
// questi non vanno in liquidazione, i totali sono // questi non vanno in liquidazione, i totali sono
// gia' calcolati altrove // gia' calcolati altrove
if (tipodet == 1 || tipodet == 3 || tipodet == 9) if (tipodet == 1 || (tipodet == 3 && tipocr == 5) || tipodet == 9)
continue; continue;
// questi non si devono vedere perche' so' bbrutti // questi non si devono vedere perche' so' bbrutti

View File

@ -1309,6 +1309,7 @@ void Visliq_app::write_general(TMask& m)
risc -= nrett; risc -= nrett;
else else
risd += nrett; risd += nrett;
// scrivi // scrivi
_lim->put("R5",nrett); _lim->put("R5",nrett);
} }

View File

@ -121,8 +121,6 @@ BEGIN
ITEM " | " ITEM " | "
ITEM "D|Debito" ITEM "D|Debito"
ITEM "C|Credito" ITEM "C|Credito"
INPUT 104
OUTPUT 104
FLAGS "DU" FLAGS "DU"
END END
@ -135,19 +133,17 @@ END
NUMBER 105 15 NUMBER 105 15
BEGIN BEGIN
PROMPT 1 6 "Debito/Credito " PROMPT 1 6 "Rettifiche "
FLAGS "R" FLAGS "R"
PICTURE "." PICTURE "."
END END
LIST 106 1 8 LIST 106 1 8
BEGIN BEGIN
PROMPT 1 7 "Importo a " PROMPT 1 7 "Rettifica a "
ITEM " | " ITEM " | "
ITEM "D|Debito" ITEM "D|Debito"
ITEM "C|Credito" ITEM "C|Credito"
INPUT 104
OUTPUT 104
FLAGS "U" FLAGS "U"
END END
@ -235,8 +231,6 @@ BEGIN
ITEM " | " ITEM " | "
ITEM "D|Debito" ITEM "D|Debito"
ITEM "C|Credito" ITEM "C|Credito"
INPUT 104
OUTPUT 104
FLAGS "U" FLAGS "U"
END END
*/ */

View File

@ -99,8 +99,6 @@ BEGIN
ITEM " | " ITEM " | "
ITEM "D|Debito" ITEM "D|Debito"
ITEM "C|Credito" ITEM "C|Credito"
INPUT 104
OUTPUT 104
FLAGS "DU" FLAGS "DU"
END END
@ -113,19 +111,17 @@ END
NUMBER 105 15 NUMBER 105 15
BEGIN BEGIN
PROMPT 1 5 "Debito/Credito " PROMPT 1 5 "Rettifiche "
FLAGS "R" FLAGS "R"
PICTURE "." PICTURE "."
END END
LIST 106 1 8 LIST 106 1 8
BEGIN BEGIN
PROMPT 1 6 "Importo a " PROMPT 1 6 "Rettifica a "
ITEM " | " ITEM " | "
ITEM "D|Debito" ITEM "D|Debito"
ITEM "C|Credito" ITEM "C|Credito"
INPUT 104
OUTPUT 104
FLAGS "U" FLAGS "U"
END END
@ -212,8 +208,6 @@ BEGIN
PROMPT 1 7 "Importo a " PROMPT 1 7 "Importo a "
ITEM "D|Debito" ITEM "D|Debito"
ITEM "C|Credito" ITEM "C|Credito"
INPUT 104
OUTPUT 104
FLAGS "U" FLAGS "U"
END END
*/ */