Patch level : 10.0 patch ???

Files correlati     :cg0 cg0200a.msk
Ricompilazione Demo : [ ]
Commento            :
Modifiche per gestione tabella di modulo collegata (lvclifo)


git-svn-id: svn://10.65.10.50/branches/R_10_00@22168 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca83 2011-05-25 15:41:10 +00:00
parent 719828f649
commit 087a7d1268
5 changed files with 71 additions and 4 deletions

View File

@ -27,7 +27,7 @@ class TClifo_application : public TRelation_application
TMask* _msk;
TClifoVI* _rel;
bool _lbcn, _gesven, _gessal, _has_cg, _liscatven;
bool _lbcn, _gesven, _gessal, _has_cg, _liscatven, _geslv;
bool _savenew;
TToken_string _tmp;
@ -599,6 +599,7 @@ void TClifo_application::on_config_change()
_gessal = cnf.get_bool("GesSal") || !_has_cg;
_lbcn = cnf.get_bool("GsLbCn");
_liscatven = cnf.get_bool("GESLISCV", "ve");
_geslv = _gesven && main_app().has_module(LVAUT);
init_pages(*_msk);
_msk->show(-9, _gessal); // Mostra campi Estratti conto
@ -609,6 +610,7 @@ void TClifo_application::on_config_change()
void TClifo_application::init_pages(TMask& m)
{
_rel->gestione_vendite(_gesven);
_rel->gestione_lavanderie(_geslv);
m.show(-5, _lbcn);
}
@ -634,12 +636,16 @@ void TClifo_application::init_insert_mode(TMask& m)
{
init_query_mode(m);
m.enable_page(4, _gesven);
if(_gesven)
m.enable_page(10, _geslv);
}
void TClifo_application::init_modify_mode(TMask& m)
{
m.enable_page(4, _gesven);
m.enable(DLG_CONTRLAV, main_app().has_module(LVAUT) && m.get(F_TIPOCF) == "C");
if(_gesven)
m.enable_page(10, _geslv);
m.enable(DLG_CONTRLAV, _geslv && m.get(F_TIPOCF) == "C");
}
void TClifo_application::set_pnae(TMask& m, TToken_string& nonacc, TToken_string& nonscd)
@ -1373,9 +1379,14 @@ bool TClifo_application::effetti_notify(TSheet_field& pnae, int r, KEY key)
bool TClifo_application::user_create() // initvar e arrmask
{
open_files(LF_CLIFO, LF_CFVEN, LF_INDSP, LF_TAB, LF_TABCOM, LF_MOV, LF_ANAG,
LF_ANAGFIS, LF_PCON, LF_COMUNI, 0);
LF_ANAGFIS, LF_PCON, LF_COMUNI, LF_TABMOD, 0);
_has_cg = has_module(CGAUT, CHK_DONGLE);
_rel = new TClifoVI;
//gestisce i campi salvati sulla tabella di modulo lv020 (lvclifo)
_rel->add("&LV020" ,"CODTAB==" CLI_TIPOCF "+" CLI_CODCF, 1, LF_CLIFO, LVAUT);
_rel->write_enable(-LVAUT); //abilita la lettura / scrittura sul record collegato
_msk = new TMask("cg0200a") ;
_msk->set_handler(F_TIPOCF, tipocf_handler);

View File

@ -171,6 +171,10 @@
#define F_DESENTE 314
#define F_INDENTE 315
#define F_TPIMBALLO 401
#define F_RIEMPIMENTO 402
#define F_ARTSEP 403
#define F_IBAN_STATO 101
#define F_IBAN_CHECK 102
#define F_BBAN_CIN 103

View File

@ -2082,6 +2082,41 @@ END
ENDPAGE
PAGE "Lavanderie" -1 -1 78 19
GROUPBOX DLG_NULL 78 14
BEGIN
PROMPT 0 4 "@bLavanderie"
GROUP G_LV
END
LISTBOX F_TPIMBALLO 10
BEGIN
PROMPT 1 5 "Tipo Imballo"
ITEM "S|Sacco"
ITEM "C|Carrello"
FIELD 41@->S0 //LVAUT = 41
GROUP G_LV
END
LISTBOX F_RIEMPIMENTO 24
BEGIN
PROMPT 1 6 "Riempimento "
ITEM "A|Un solo art. per imballo"
ITEM "P|Proporzionale"
FIELD 41@->S1 //LVAUT = 41
GROUP G_LV
END
BOOLEAN F_ARTSEP
BEGIN
PROMPT 1 7 "Articoli separati"
FIELD 41@->B0 //LVAUT = 41
GROUP G_LV
END
ENDPAGE
ENDMASK
PAGE "Banche di appoggio" -1 -1 52 5

View File

@ -1,6 +1,7 @@
#include "cg0201.h"
#include <clifo.h>
#include <modaut.h>
#include <indsp.h>
// Definizione dei metodi relativi alla classe TClifoVI
@ -113,6 +114,21 @@ int TClifoVI::registra(bool re, bool force)
cancella(rind,i+1,_oldindirizzi);
_oldindirizzi=indirizzi_items();
}
if(_geslv)
{
TLocalisamfile& lv = lfile(-LVAUT);
const char tipocf=c.get(CLI_TIPOCF)[0];
const long codcf=c.get_long(CLI_CODCF);
TString codtab; codtab << tipocf << codcf;
TRectype& rec = lv.curr();
rec.put("CODTAB", codtab);
err = write_rec(TRUE, rec, lv);
if (err!=NOERR) return err;
}
// END of gest_vend() discrimination
return err;
}

View File

@ -7,7 +7,7 @@ class TClifoVI:public TRelation
// @DPRIV
TArray _indirizzi;
int _oldindirizzi;
bool _gesven;
bool _gesven, _geslv;
// @END
protected:
@ -33,6 +33,7 @@ public:
void destroy_rows();
void gestione_vendite(bool gv) { _gesven = gv; }
void gestione_lavanderie(bool glv) { _geslv = glv; }
TClifoVI();
virtual ~TClifoVI() {}