Risolti problemucci in elaborazioni differite per DBService

git-svn-id: svn://10.65.10.50/branches/R_10_00@22788 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
guy 2013-01-25 08:45:36 +00:00
parent 7e9f0d51c5
commit 06cfa6bf68
3 changed files with 79 additions and 81 deletions

View File

@ -297,10 +297,10 @@ void TTipo_documento::set_defaults(TMask& m) const
{
TFilename pn; profile_name(pn);
TConfig prof(pn, "DEFAULT");
TToken_string s;
for(int i = 0; ; i++)
{
TToken_string s(prof.get("Default", NULL, i));
s = prof.get("Default", NULL, i);
if (s.empty())
break;
const int field = s.get_int();

View File

@ -993,7 +993,6 @@ void TDocumento_mask::cli2mask(bool force_load)
set(F_CODPAG, c.get(CLI_CODPAG));
TToken_string key;
key.add(c.get(CLI_TIPOCF));
key.add(c.get(CLI_CODCF));
key.add("V");
@ -3267,6 +3266,8 @@ bool TElabora_mask::elabora()
TParametri_elaborazione& p = e->params();
set(F_QTA, p.get("QUANTITA"));
}
// Toglie spunta ai documenti selezionati
_tree.toggle_all_nodes();
}
const TString8 num_in = e->codice_numerazione_iniziale();
set(F_CODNUM_ELAB, num_in);

View File

@ -713,8 +713,6 @@ bool codmag_coll_handler( TMask_field& f, KEY key )
return true;
}
void upd_colli_peso_tara(TMask& m, const TString & codart)
{
// const real qta = m.get_real(FR_QTA) * curr_fc; // curr_fc puo' non essere inizializzata e vale -1
@ -722,7 +720,6 @@ void upd_colli_peso_tara(TMask& m, const TString & codart)
// Sarebbe bene sparare (come dice Luca) a curr_fc ovunque copaia
TArticolo& articolo = cached_article(codart);
const real qta = articolo.convert_to_um(m.get_real(FR_QTA), NULL, m.get(FR_UMQTA));
const real ppcollo = articolo.get_real(ANAMAG_PPCOLLO);
real ncolli = ppcollo.is_zero() ? UNO : qta / ppcollo;
@ -1602,6 +1599,7 @@ bool codart_handler(TMask_field& f, KEY key )
if (key == K_TAB && (f.focusdirty() || row_mask.get(FR_CHECKED).empty()))
{
// cached_article(NULL); // Azzera cache articoli nel caso l'utente abbia cambiato pesi
TCond_vendita & condv = mask.condv();
condv.set_testa(&mask);
@ -1725,7 +1723,7 @@ bool codart_handler(TMask_field& f, KEY key )
else
{
curr_um.cut(0);
curr_fc = 1.0;
curr_fc = UNO;
}
row_mask.set(FR_UMQTA, curr_um);
upd_colli_peso_tara(row_mask, codart);
@ -1783,8 +1781,7 @@ bool codart_handler(TMask_field& f, KEY key )
if (mask.gestione_note_per_articolo())
mask.send_key(K_F8, F_NAR, &sh);
}
}
else
} else
if (key == K_F8 && !row_mask.is_running())
{
const bool explode_db = ini_get_bool(CONFIG_DITTA, "ve", "EXPLODEDB");