Cambiato l'handler per controllare se lo scaglione e' in sequenza.
git-svn-id: svn://10.65.10.50/trunk@3392 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
aa8267f978
commit
9b719fb694
@ -54,7 +54,7 @@ class TRighe_condizioni_vendita: public TRelation_application {
|
||||
static bool handle_cod(TMask_field &, KEY); // handler del campo COD (codice listino, numero contratto, codice offerta)
|
||||
static bool handle_price(TMask_field &, KEY); // handler del prezzo netto e lordo
|
||||
static bool handle_qta(TMask_field &, KEY); // handler della quantita' limite per scaglione
|
||||
static bool handle_sca(TMask_field &, KEY); // handler della quantita' limite per scaglione
|
||||
static bool handle_sca(TMask_field &, KEY); // handler dello scaglione
|
||||
static void fill_rec(TRectype& r, TMask& m);
|
||||
static real find_prev_qta(TRectype& r);
|
||||
static real find_next_qta(TRectype& r);
|
||||
@ -463,10 +463,10 @@ real TRighe_condizioni_vendita::find_prev_qta(TRectype& r)
|
||||
{
|
||||
TLocalisamfile f(LF_RCONDV);
|
||||
real qta = 0.0;
|
||||
f.curr() = r;
|
||||
int nscagl = r.get_int("NSCAGL");
|
||||
f.read(r,_isgteq);
|
||||
if (f.good()) f.prev();
|
||||
if (f.good() && nscagl == (f.get_int("NSCAGL") +1))
|
||||
f.put("NSCAGL", nscagl-1);
|
||||
if (f.read() == NOERR)
|
||||
qta = f.get_real("QLIM");
|
||||
return qta;
|
||||
}
|
||||
@ -475,10 +475,10 @@ real TRighe_condizioni_vendita::find_next_qta(TRectype& r)
|
||||
{
|
||||
TLocalisamfile f(LF_RCONDV);
|
||||
real qta(MAX_REAL);
|
||||
f.curr() = r;
|
||||
int nscagl = r.get_int("NSCAGL");
|
||||
f.read(r,_isgteq);
|
||||
if (f.good()) f.next();
|
||||
if (f.good() && nscagl == (f.get_int("NSCAGL") -1))
|
||||
f.put("NSCAGL", nscagl+1);
|
||||
if (f.read() == NOERR)
|
||||
qta = f.get_real("QLIM");
|
||||
return qta;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user