Patch level : 2.0 470
Files correlati : cg0.exe cg0100a.msk Ricompilazione Demo : [ ] Commento : Corretta ricerca tramite il pulsante "Ricerca" in basso (Lente) git-svn-id: svn://10.65.10.50/trunk@11139 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
b15210d4f6
commit
99e211d385
@ -14,7 +14,7 @@
|
|||||||
#define RICAVI 4
|
#define RICAVI 4
|
||||||
#define ORDINE 5
|
#define ORDINE 5
|
||||||
|
|
||||||
class TCausali_app : public TRelation_application
|
class TPianoconti_app : public TRelation_application
|
||||||
{
|
{
|
||||||
TMask* _msk;
|
TMask* _msk;
|
||||||
TRelation *_rel;
|
TRelation *_rel;
|
||||||
@ -38,12 +38,12 @@ public:
|
|||||||
virtual bool check_autorization() const
|
virtual bool check_autorization() const
|
||||||
{return FALSE;}
|
{return FALSE;}
|
||||||
virtual TRelation* get_relation() const {return _rel;}
|
virtual TRelation* get_relation() const {return _rel;}
|
||||||
TCausali_app() : _pcon_com(FALSE) {}
|
TPianoconti_app() : _pcon_com(FALSE) {}
|
||||||
};
|
};
|
||||||
HIDDEN inline TCausali_app & app() { return (TCausali_app &) main_app();}
|
HIDDEN inline TPianoconti_app & app() { return (TPianoconti_app &) main_app();}
|
||||||
|
|
||||||
|
|
||||||
int TCausali_app::read(TMask& m)
|
int TPianoconti_app::read(TMask& m)
|
||||||
|
|
||||||
{
|
{
|
||||||
const TRelation *r = get_relation();
|
const TRelation *r = get_relation();
|
||||||
@ -63,7 +63,7 @@ int TCausali_app::read(TMask& m)
|
|||||||
return NOERR;
|
return NOERR;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TCausali_app::rewrite(const TMask& m)
|
int TPianoconti_app::rewrite(const TMask& m)
|
||||||
{
|
{
|
||||||
TString16 sez;
|
TString16 sez;
|
||||||
|
|
||||||
@ -89,7 +89,7 @@ int TCausali_app::rewrite(const TMask& m)
|
|||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
int TCausali_app::write(const TMask& m)
|
int TPianoconti_app::write(const TMask& m)
|
||||||
{
|
{
|
||||||
TString16 sez;
|
TString16 sez;
|
||||||
|
|
||||||
@ -116,14 +116,14 @@ int TCausali_app::write(const TMask& m)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Controlla se puo' essere effettuata la cancellazione di un conto
|
// Controlla se puo' essere effettuata la cancellazione di un conto
|
||||||
void TCausali_app::on_firm_change()
|
void TPianoconti_app::on_firm_change()
|
||||||
{
|
{
|
||||||
TDir d;
|
TDir d;
|
||||||
d.get(LF_PCON, _nolock, _nordir, _sysdirop);
|
d.get(LF_PCON, _nolock, _nordir, _sysdirop);
|
||||||
_pcon_com = d.is_com();
|
_pcon_com = d.is_com();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TCausali_app::protected_record(TRectype &rec)
|
bool TPianoconti_app::protected_record(TRectype &rec)
|
||||||
{
|
{
|
||||||
if (!_pcon_com )
|
if (!_pcon_com )
|
||||||
{
|
{
|
||||||
@ -171,7 +171,7 @@ bool TCausali_app::protected_record(TRectype &rec)
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCausali_app::init_query_mode(TMask& m)
|
void TPianoconti_app::init_query_mode(TMask& m)
|
||||||
{
|
{
|
||||||
m.show_default();
|
m.show_default();
|
||||||
m.hide(-3);
|
m.hide(-3);
|
||||||
@ -191,7 +191,7 @@ HIDDEN bool tmcf_handler(TMask_field& f, KEY key)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
void TCausali_app::init_insert_mode(TMask& m)
|
void TPianoconti_app::init_insert_mode(TMask& m)
|
||||||
{
|
{
|
||||||
const int gruppo = m.get_int(FLD_CM1_GRUPPO);
|
const int gruppo = m.get_int(FLD_CM1_GRUPPO);
|
||||||
const int conto = m.get_int(FLD_CM1_CONTO);
|
const int conto = m.get_int(FLD_CM1_CONTO);
|
||||||
@ -356,7 +356,7 @@ HIDDEN bool sottoc_handler(TMask_field& f, KEY key)
|
|||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TCausali_app::user_create()
|
bool TPianoconti_app::user_create()
|
||||||
{
|
{
|
||||||
open_files(LF_PCON, LF_SALDI, LF_TABCOM, LF_ABPCON, 0);
|
open_files(LF_PCON, LF_SALDI, LF_TABCOM, LF_ABPCON, 0);
|
||||||
|
|
||||||
@ -366,21 +366,22 @@ bool TCausali_app::user_create()
|
|||||||
_msk->set_handler(FLD_CM1_SOTTOCONTO, sottoc_handler);
|
_msk->set_handler(FLD_CM1_SOTTOCONTO, sottoc_handler);
|
||||||
_msk->set_handler(FLD_CM1_TMCF, tmcf_handler);
|
_msk->set_handler(FLD_CM1_TMCF, tmcf_handler);
|
||||||
_rel = new TRelation(LF_PCON);
|
_rel = new TRelation(LF_PCON);
|
||||||
set_search_field(FH_SOTTOCONTO);
|
// set_search_field(FH_SOTTOCONTO); // Ottima trovata, ma non funziona
|
||||||
|
set_search_field(FLD_CM1_SOTTOCONTO);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool TCausali_app::user_destroy()
|
bool TPianoconti_app::user_destroy()
|
||||||
{
|
{
|
||||||
delete _msk;
|
|
||||||
delete _rel;
|
delete _rel;
|
||||||
|
delete _msk;
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
int cg0100(int argc, char* argv[])
|
int cg0100(int argc, char* argv[])
|
||||||
{
|
{
|
||||||
TCausali_app a ;
|
TPianoconti_app a ;
|
||||||
a.run(argc, argv, TR("Piano dei conti"));
|
a.run(argc, argv, TR("Piano dei conti"));
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -68,7 +68,6 @@ BEGIN
|
|||||||
PROMPT 2 3 "Sottoconto "
|
PROMPT 2 3 "Sottoconto "
|
||||||
HELP "Codice dell'eventuale sottoconto"
|
HELP "Codice dell'eventuale sottoconto"
|
||||||
FIELD LF_PCON->SOTTOCONTO
|
FIELD LF_PCON->SOTTOCONTO
|
||||||
FLAGS "R"
|
|
||||||
KEY 1
|
KEY 1
|
||||||
USE LF_PCON KEY 1 SELECT SOTTOCONTO!=""
|
USE LF_PCON KEY 1 SELECT SOTTOCONTO!=""
|
||||||
COPY INPUT FLD_CM1_CONTO
|
COPY INPUT FLD_CM1_CONTO
|
||||||
|
Loading…
x
Reference in New Issue
Block a user