From e7b74eb3faf6d3000121f1d6e360626c671b6590 Mon Sep 17 00:00:00 2001 From: alex Date: Sat, 14 Feb 2009 20:01:33 +0000 Subject: [PATCH] Patch level : 10.0 225 Files correlati : Ricompilazione Demo : [ ] Commento : Rportata la versione 3.2 patch 1314 git-svn-id: svn://10.65.10.50/trunk@18275 c028cbd2-c16b-5b4b-a496-9718f37d4682 --- db/db0500.cpp | 6 ++++-- mg/mglib.h | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/db/db0500.cpp b/db/db0500.cpp index 2e6d2f321..42bf45472 100755 --- a/db/db0500.cpp +++ b/db/db0500.cpp @@ -1464,6 +1464,8 @@ bool TDistinta_mask::on_field_event(TOperable_field& o, TField_event e, long jol case DLG_MOV: if (e == fe_button) { + const bool do_mov = (id == DLG_MOV); + if (app().has_module(MGAUT)) { cache().destroy(LF_DIST); @@ -1514,7 +1516,6 @@ bool TDistinta_mask::on_field_event(TOperable_field& o, TField_event e, long jol if (do_mov) { TAssoc_array & arts = mov.costs(); - TArticolo articolo; name.temp("", "ini"); @@ -1522,9 +1523,10 @@ bool TDistinta_mask::on_field_event(TOperable_field& o, TField_event e, long jol _datadoc = mov.get_date(F_DATADOC); FOR_EACH_ASSOC_OBJECT(arts, obj, key, item) { + TArticolo & articolo = (TArticolo &) cached_article(key); const real costo = * (real *)item; - if (articolo.lock_and_prompt(key)) + if (articolo.lock_and_prompt()) { articolo.put(ANAMAG_ULTCOS1, costo); articolo.rewrite(); diff --git a/mg/mglib.h b/mg/mglib.h index 7da7e597f..344d125d0 100755 --- a/mg/mglib.h +++ b/mg/mglib.h @@ -753,7 +753,6 @@ const char * add_depcode(TString & codmagdep, const char * d); const char * get_magcode(TString & codmagdep); const char * get_depcode(TString & codmagdep); bool riporta_ordinato(); -const TArticolo & cached_articolo(const char * codsrt); #endif //__MGLIB_H