Puttanatiella credito precedente non notificata, aggiustata visualizzazione

git-svn-id: svn://10.65.10.50/trunk@842 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1995-01-10 11:43:57 +00:00
parent d15ac0013b
commit b082989fc2
3 changed files with 30 additions and 29 deletions

View File

@ -380,8 +380,6 @@ void TLiquidazione_app::recalc_att(int month, const char* codatt)
{ {
look_iva(_rmoviva->get("CODIVA")); look_iva(_rmoviva->get("CODIVA"));
// TBI settare _isrimborso
TString codiva = _iva->get("CODTAB"); TString codiva = _iva->get("CODTAB");
TString tipoiva = _iva->get("S1"); TString tipoiva = _iva->get("S1");
int tipoes_v = (int)_iva->get_long("I3"); int tipoes_v = (int)_iva->get_long("I3");

View File

@ -354,33 +354,30 @@ real TLiquidazione_app::credito_prec(int month)
{ {
look_lia(); look_lia();
if (_lia->status() == NOERR) if (_lia->status() == NOERR)
{
c = _lia->get_real("R0"); c = _lia->get_real("R0");
if (!c.is_zero()) return c; // int yr = atoi(_year) - 1;
} // _lim->zero();
int yr = atoi(_year) - 1; // *_lim_anno = yr;
_lim->zero(); // *_lim_mese = 12;
*_lim_anno = yr; // if (_lim->read() == NOERR)
*_lim_mese = 12;
if (_lim->read() == NOERR)
// considera anche il rimborso // considera anche il rimborso
c = _lim->get_real("R0") + _lim->get_real("R1"); // c = _lim->get_real("R0") + _lim->get_real("R1");
// e le eventuali rettifiche // e le eventuali rettifiche
real rett = _lim->get_real("R5"); // real rett = _lim->get_real("R5");
c += rett; // c += rett;
// e le ulteriori detrazioni // e le ulteriori detrazioni
real detr = _lim->get_real("R6"); // real detr = _lim->get_real("R6");
c -= detr; // c -= detr;
// e l'acconto versato a dicembre // e l'acconto versato a dicembre
_del->zero(); // _del->zero();
TString ditta = _nditte->curr().get("CODDITTA"); // TString ditta = _nditte->curr().get("CODDITTA");
*_del_ditta = ditta; // *_del_ditta = ditta;
*_del_anno = yr; // *_del_anno = yr;
*_del_mese = 12; // *_del_mese = 12;
*_del_tipo = 7; // *_del_tipo = 7;
if (_del->read() == NOERR) // if (_del->read() == NOERR)
c -= _del->get_real("R0"); // c -= _del->get_real("R0");
} }
else else
{ {

View File

@ -187,6 +187,14 @@ bool Visliq_app::sel_mese_sh1 (TMask_field& f, KEY k)
((Visliq_app&)main_app()).vis_one(month); ((Visliq_app&)main_app()).vis_one(month);
((Visliq_app&)main_app()).look_lim(month); ((Visliq_app&)main_app()).look_lim(month);
((Visliq_app&)main_app()).update_sheet_row(tt); ((Visliq_app&)main_app()).update_sheet_row(tt);
TMask& sm = sh.sheet_mask();
sm.field(103).set(tt.get(2));
sm.field(104).set(tt.get(3));
sm.field(105).set(tt.get(4));
sm.field(106).set(tt.get(5));
sm.field(107).set(tt.get(6));
sh.force_update(); sh.force_update();
return TRUE; return TRUE;
} }
@ -205,11 +213,11 @@ bool Visliq_app::sel_mese_sh2 (TMask_field& f, KEY k)
void Visliq_app::update_sheet_row(TToken_string& t) void Visliq_app::update_sheet_row(TToken_string& t)
{ {
t.add(abs(_lim->get_real("R0")).string(),2); // t.add(abs(_lim->get_real("R0")).string(),2);
t.add((_lim->get_real("R0")).sign() > 0 ? "D" : "C", 3); // t.add((_lim->get_real("R0")).sign() > 0 ? "D" : "C", 3);
t.add((_lim->get_real("R1")).string(),4); t.add((_lim->get_real("R1")).string(),4);
t.add(abs(_lim->get_real("R5")).string(),5); t.add(abs(_lim->get_real("R5")).string(),5);
t.add((_lim->get_real("R5")).sign() > 0 ? "D" : "C", 3); t.add((_lim->get_real("R5")).sign() > 0 ? "D" : "C", 6);
} }
bool Visliq_app::vis_liq() bool Visliq_app::vis_liq()
@ -443,9 +451,7 @@ bool Visliq_app::vis_one(int m)
for(;;) for(;;)
{ {
begin_wait();
KEY k = msk.run(); KEY k = msk.run();
end_wait();
if (k == K_INS || k == K_SAVE) // TBI registra: dovra' essere RICALCOLA if (k == K_INS || k == K_SAVE) // TBI registra: dovra' essere RICALCOLA
{ {
@ -469,7 +475,7 @@ bool Visliq_app::vis_one(int m)
} }
else else
{ {
vsw->replace(ll, n_rettifica.string("###.###.###.###"), 58); vsw->replace(ll, n_rettifica.string("###.###.###.### "), 58);
vsw->replace(ll2, " ", 75); vsw->replace(ll2, " ", 75);
} }