Correzione errori sulla chiusura apertura conti. 7.11.95
git-svn-id: svn://10.65.10.50/trunk@2105 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
1bba777584
commit
c1eb760f5c
@ -33,7 +33,7 @@ class CG4600_application : public TApplication
|
|||||||
friend bool mask_dataap (TMask_field&, KEY);
|
friend bool mask_dataap (TMask_field&, KEY);
|
||||||
friend bool mask_distinti (TMask_field&, KEY);
|
friend bool mask_distinti (TMask_field&, KEY);
|
||||||
|
|
||||||
TTable* _esc, * _reg;
|
TTable* _reg;
|
||||||
TRelation* _rel;
|
TRelation* _rel;
|
||||||
TMovimentoPN* _pn;
|
TMovimentoPN* _pn;
|
||||||
TLocalisamfile* _saldi;
|
TLocalisamfile* _saldi;
|
||||||
@ -52,6 +52,8 @@ class CG4600_application : public TApplication
|
|||||||
TString _codcausap, _codcausch;
|
TString _codcausap, _codcausch;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
TTable* _esc;
|
||||||
|
|
||||||
virtual bool create();
|
virtual bool create();
|
||||||
virtual bool destroy();
|
virtual bool destroy();
|
||||||
virtual bool menu(MENU_TAG m);
|
virtual bool menu(MENU_TAG m);
|
||||||
@ -75,6 +77,8 @@ public:
|
|||||||
CG4600_application() {}
|
CG4600_application() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
CG4600_application& app() { return (CG4600_application&) main_app(); }
|
||||||
|
|
||||||
HIDDEN bool abilita_anni(TMask& m, KEY k)
|
HIDDEN bool abilita_anni(TMask& m, KEY k)
|
||||||
{
|
{
|
||||||
if (k == K_SHIFT+K_F12)
|
if (k == K_SHIFT+K_F12)
|
||||||
@ -105,7 +109,8 @@ HIDDEN bool anni_contigui (int annoch, int annoap)
|
|||||||
|
|
||||||
HIDDEN TRectype& cerca_esercizio(int anno)
|
HIDDEN TRectype& cerca_esercizio(int anno)
|
||||||
{
|
{
|
||||||
TTable TabEs ("ESC");
|
// TTable TabEs ("ESC");
|
||||||
|
TTable& TabEs = *(app()._esc);
|
||||||
TString16 dep (format("%04d", anno));
|
TString16 dep (format("%04d", anno));
|
||||||
|
|
||||||
TabEs.zero();
|
TabEs.zero();
|
||||||
@ -127,21 +132,25 @@ bool mask_datac (TMask_field& f, KEY k)
|
|||||||
TString annos (4);
|
TString annos (4);
|
||||||
int anno = 0;;
|
int anno = 0;;
|
||||||
bool ok = TRUE;
|
bool ok = TRUE;
|
||||||
|
TRectype TabEsch(LF_TAB);
|
||||||
|
TRectype TabEsap(LF_TAB);
|
||||||
|
int annoch = 0;
|
||||||
|
int annoap = 0;
|
||||||
|
|
||||||
if ( (k == K_ENTER) && f.to_check(k) )
|
if ( (k == K_ENTER) && f.to_check(k) )
|
||||||
{
|
{
|
||||||
int annoch = f.mask().get_int(F_ANNOCH);
|
annoch = f.mask().get_int(F_ANNOCH);
|
||||||
int annoap = f.mask().get_int(F_ANNO);
|
annoap = f.mask().get_int(F_ANNO);
|
||||||
|
|
||||||
if (!anni_contigui(annoch,annoap))
|
if (!anni_contigui(annoch,annoap))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
TRectype TabEsch = cerca_esercizio(annoap);
|
TabEsch = cerca_esercizio(annoap);
|
||||||
TDate inizio = TabEsch.get_date("D0");
|
TDate inizio = TabEsch.get_date("D0");
|
||||||
TDate fine = TabEsch.get_date("D1");
|
TDate fine = TabEsch.get_date("D1");
|
||||||
TDate scarico = TabEsch.get_date("D2");
|
TDate scarico = TabEsch.get_date("D2");
|
||||||
|
|
||||||
TRectype TabEsap = cerca_esercizio(annoch);
|
TabEsap = cerca_esercizio(annoch);
|
||||||
TDate iniziop = TabEsap.get_date("D0");
|
TDate iniziop = TabEsap.get_date("D0");
|
||||||
TDate finep = TabEsap.get_date("D1");
|
TDate finep = TabEsap.get_date("D1");
|
||||||
TDate data = f.get();
|
TDate data = f.get();
|
||||||
@ -221,21 +230,25 @@ bool mask_dataap (TMask_field& f, KEY k)
|
|||||||
int anno = 0;
|
int anno = 0;
|
||||||
TString annos (4);
|
TString annos (4);
|
||||||
bool ok = TRUE;
|
bool ok = TRUE;
|
||||||
|
TRectype TabEsch(LF_TAB);
|
||||||
|
TRectype TabEsap(LF_TAB);
|
||||||
|
int annoch = 0;
|
||||||
|
int annoap = 0;
|
||||||
|
|
||||||
if ( (k == K_ENTER) && f.to_check(k) )
|
if ( (k == K_ENTER) && f.to_check(k) )
|
||||||
{
|
{
|
||||||
int annoch = f.mask().get_int(F_ANNOCH);
|
annoch = f.mask().get_int(F_ANNOCH);
|
||||||
int annoap = f.mask().get_int(F_ANNO);
|
annoap = f.mask().get_int(F_ANNO);
|
||||||
|
|
||||||
if (!anni_contigui(annoch,annoap))
|
if (!anni_contigui(annoch,annoap))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
TRectype TabEsch = cerca_esercizio(annoap);
|
TabEsch = cerca_esercizio(annoap);
|
||||||
TDate inizio = TabEsch.get_date("D0");
|
TDate inizio = TabEsch.get_date("D0");
|
||||||
TDate fine = TabEsch.get_date("D1");
|
TDate fine = TabEsch.get_date("D1");
|
||||||
TDate scarico = TabEsch.get_date("D2");
|
TDate scarico = TabEsch.get_date("D2");
|
||||||
|
|
||||||
TRectype TabEsap = cerca_esercizio(annoch);
|
TabEsap = cerca_esercizio(annoch);
|
||||||
TDate iniziop = TabEsap.get_date("D0");
|
TDate iniziop = TabEsap.get_date("D0");
|
||||||
TDate finep = TabEsap.get_date("D1");
|
TDate finep = TabEsap.get_date("D1");
|
||||||
TDate data = f.get();
|
TDate data = f.get();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user