Cagatella raddoppio rettifiche e rimborsi dopo visualizzazione dettaglio

git-svn-id: svn://10.65.10.50/trunk@1663 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
villa 1995-08-03 08:40:09 +00:00
parent 8f08916243
commit 376f32383f
2 changed files with 14 additions and 6 deletions

@ -66,6 +66,8 @@ bool Visliq_app::create()
_ditte = new TArray_sheet(-1, -1, 0, 0, "Selezione Ditte",
"Cod.@5|Ragione Sociale@50|Vers.");
_from_one = FALSE;
_del = new TTable("%DEL");
_lia = new TTable("%LIA");
_lim = new TTable("LIM");
@ -360,10 +362,12 @@ bool Visliq_app::sel_mese_sh1 (TMask_field& f, KEY k)
}
else ok = TRUE;
if (ok) app().vis_one(month);
if (ok)
app().vis_one(month);
TMask& sm = sh.sheet_mask();
// TBC controllare se sono i dati giusti in tt
sm.field(102).set(tt.get(1));
sm.field(103).set(tt.get(2));
sm.field(104).set(tt.get(3));
@ -645,6 +649,8 @@ bool Visliq_app::vis_one(int m)
bool l_mod = FALSE;
bool d_mod = FALSE;
_from_one = TRUE;
for(;;)
{
KEY k = msk.run();
@ -1206,7 +1212,7 @@ void Visliq_app::write_general(TMask& m)
// this is a true bordel
int row = (i/step) - 1;
bool lfrommask = sh.selected() == row && sh.sheet_mask().is_running();
bool lfrommask = sh.selected() == row && (sh.sheet_mask().is_running() || _from_one);
bool vfrommask = sv.selected() == (i == 12 ? row + 1 : row) &&
sv.sheet_mask().is_running();
@ -1336,7 +1342,7 @@ void Visliq_app::write_general(TMask& m)
// se modificate rettifiche
// sistemare
if (nrett != orett)
if (nrett != orett && !_from_one)
{
// toglie vecchie
risl -= orett;
@ -1388,7 +1394,7 @@ void Visliq_app::write_general(TMask& m)
}
// se modificato rimborso sistemare
if (nrimb != orimb)
if (nrimb != orimb && !_from_one)
{
// check compatibilita'
bool ok = (_lim->get_bool("B2") && risc > risd) || nrimb.is_zero();
@ -1453,6 +1459,7 @@ if (was_lim)
tt_ln.add(sr5 == 0 ? "" : (sr5 > 0 ? "D" : "C"),5);
sh.force_update(row);
_from_one = FALSE;
}
} // for mese liq. (riga sheet)

@ -38,12 +38,13 @@ class Visliq_app : public TApplication
TSheet_field* _vers_sheet, *_liq_sheet;
TArray _vers_rows, _liq_rows;
TMask* _mask;
bool _from_one;
const char* itoname(int m);
bool is_trim(int x);
bool is_month_ok(int x, int month = -1);
protected:
virtual bool menu(MENU_TAG);