Patch level : 10.0 patch 419

Files correlati     : lv3
Ricompilazione Demo : [ ]
Commento            :
se è possibile la data di presunta consegna è meglio che sia modificabile quando entro in correzione (solo il b03) (mail Paolo 20/08)


git-svn-id: svn://10.65.10.50/trunk@19215 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
luca83 2009-08-21 08:21:37 +00:00
parent be817e2acc
commit b171a4e629

View File

@ -266,6 +266,8 @@ protected:
virtual int rewrite( const TMask& m );
virtual int read ( TMask& m );
virtual void init_insert_mode( TMask& m );
virtual void init_modify_mode( TMask& m );
void elimina_vuote( const TMask& m);
virtual const char * query_mask_name() { return "lv3100a"; }
@ -284,9 +286,7 @@ inline TGestione_bolle_app& gbapp() { return (TGestione_bolle_app &)main_app();
//ARROTONDA: metodo che arrotonda la quantità che gli passo se è previsto sul contratto
void TGestione_bolle_msk::arrotonda(const TMask& msk, real& quantita)
{
TConfig* configlv = new TConfig(CONFIG_DITTA,"lv");
int perarr = configlv->get_int("Perarr");
int perarr = ini_get_int(CONFIG_DITTA, "lv", "Perarr");
const TString& codart = msk.get(FR_CODART);
//instanzio una cache sulla tabella del magazzino
@ -609,10 +609,9 @@ bool TGestione_bolle_msk::lv_bolla_handler(TMask_field& f, KEY k)
rcont.set_var("#CODCF",codcf);
rcont.set_var("#CODCONT",codcont);
//leggo dalla configurazione i codici magazzino e deposito standard
TConfig* configlv = new TConfig(CONFIG_DITTA,"lv");
//leggo dalla configurazione i codici magazzino e deposito standard
TString8 codmag;
codmag << configlv->get("CODMAG") << configlv->get("CODMAGC");
codmag << ini_get_string(CONFIG_DITTA, "lv", "CODMAG") << ini_get_string(CONFIG_DITTA, "lv", "CODMAGC");
//per ogni riga estraggo l'articolo, il relativo prezzo e l'eventaule sconto da applicare,
//...riportati in bolla solo se necessario
@ -627,10 +626,7 @@ bool TGestione_bolle_msk::lv_bolla_handler(TMask_field& f, KEY k)
TString4 causale = rcont.get(LVRCONDV_CAUSLAV).as_string();
if (causale.blank() || atoi(causale) == 0)
{
TConfig* configlv = new TConfig(CONFIG_DITTA,"lv");
causale = configlv->get("CAUSLAV");
}
causale = ini_get_string(CONFIG_DITTA, "lv", "CAUSLAV");
//instanzio una cache sulle anagrafice di magazzino
const TRectype& anamag = cache().get(LF_ANAMAG,codart);
@ -816,11 +812,8 @@ bool TGestione_bolle_msk::lv_codart_handler(TMask_field& f, KEY k)
//cerco la causale relativa all'articolo; se non la trovo prendo quella standard
TString4 causale = rcont.get(LVRCONDV_CAUSLAV);
if (causale.blank() || atoi(causale) == 0 )
{
TConfig* configlv = new TConfig(CONFIG_DITTA,"lv");
causale = configlv->get("CAUSLAV");
}
if (causale.blank() || atoi(causale) == 0 )
causale = ini_get_string(CONFIG_DITTA, "lv", "CAUSLAV");
if (rdoc.get("DOTOD").empty())
{
@ -888,10 +881,8 @@ bool TGestione_bolle_msk::lv_codart_handler(TMask_field& f, KEY k)
{
//se è settata la categoria merceologica, leggo sia il listino che la cat merc, altrimenti solo il listino
TString8 codlis = cfven.get(CFV_CODLIST);
TString8 catven;
TConfig* configve = new TConfig(CONFIG_DITTA,"ve");
const char gesliscv = configve->get_char("GESLISCV");
if (gesliscv != 'X')
TString8 catven;
if (!ini_get_bool(CONFIG_DITTA, "ve", "GESLISCV"))
catven = "";
else
catven = cfven.get(CFV_CATVEN);
@ -948,10 +939,9 @@ bool TGestione_bolle_msk::lv_codart_handler(TMask_field& f, KEY k)
bool TGestione_bolle_msk::lv_causale_handler(TMask_field& f, KEY k)
{
if (f.to_check(k, true))
{
TConfig* configlv = new TConfig(CONFIG_DITTA,"lv");
TString4 codmagdef = configlv->get("CODMAG"); //magazzino
TString4 coddepdef = configlv->get("CODMAGC"); //magazzino del circolante (deposito)
{
TString4 codmagdef = ini_get_string(CONFIG_DITTA, "lv", "CODMAG"); //magazzino
TString4 coddepdef = ini_get_string(CONFIG_DITTA, "lv", "CODMAGC"); //magazzino del circolante (deposito)
//leggo la causale che ho scritto nella riga corrente dello sheet
TString4 causale = f.get();
@ -1236,10 +1226,8 @@ void TGestione_bolle_msk::user_set_handler( short fieldid, int index)
}
TGestione_bolle_msk::TGestione_bolle_msk(const char* tipodoc) : TDocumento_mask(tipodoc), _autoselect(-1)
{
TConfig* configlv = new TConfig(CONFIG_DITTA,"lv");
char dtfs = configlv->get_char("Datafissa");
if (dtfs == 'X')
{
if (ini_get_bool(CONFIG_DITTA, "lv", "Datafissa"))
field(F_DATADOC).disable();
sfield(F_SHEET).set_nav_column(FR_QTA, FR_QTAGG1);
sfield(F_SHEET).set_auto_append();
@ -1355,6 +1343,22 @@ void TGestione_bolle_app::init_insert_mode(TMask &m)
return TMotore_application::init_insert_mode(m);
}
//ridefinisco il metodo init_query_mode della TMotore_application
void TGestione_bolle_app::init_modify_mode(TMask &m)
{
TGestione_bolle_msk& mask = (TGestione_bolle_msk&) m;
//se sto leggendo o generando un buono di ritiro, abilito questo campo
bool enable_dataprco = mask.get(F_CODNUM) == ini_get_string(CONFIG_DITTA, "lv", "NUM_RIT(0)") &&
mask.get(F_TIPODOC) == ini_get_string(CONFIG_DITTA, "lv", "TIPODOC_RIT(0)");
mask.field(F_LVDATAPRCO).enable(enable_dataprco);
mask.first_focus(F_CODCF, false);
return TMotore_application::init_modify_mode(m);
}
//metodo che mi restituisce la giac
TGiac_per_cli& TGestione_bolle_app::giacenza()
{