diff --git a/pe/pe0400.cpp b/pe/pe0400.cpp index a99d6b920..375cbcd5c 100755 --- a/pe/pe0400.cpp +++ b/pe/pe0400.cpp @@ -33,6 +33,7 @@ class TGestione_preventivo_msk : public TDocumento_mask { int _rule; int _clipboard_row; + TString16 _field_costo; protected: //hanlder di documento: @@ -490,7 +491,7 @@ bool TGestione_preventivo_msk::pe_codart_handler(TMask_field& f, KEY k) if (codart.full()) { const TArticolo_giacenza & art = cached_article(codart); - const real costo = art.get_real(ANAMAG_ULTCOS1); + const real costo = art.get_real(mask._field_costo); if (row_mask.field(FR_JOLLY2).enabled()) { @@ -696,6 +697,11 @@ TGestione_preventivo_msk::TGestione_preventivo_msk(const char* tipodoc) : TDocum TConfig* configpe = new TConfig(CONFIG_DITTA, "pe"); sfield(F_SHEET).set_notify( ss_notify ); _rule = color_rules().add(new TColor_rule("Livello", "", _numexpr, COLOR_BLUE, FOCUS_COLOR)); + + TFilename pn; doc().tipo().profile_name(pn); + TConfig prof(pn, "MAIN"); + + _field_costo = prof.get("FieldCosto", NULL, -1, ANAMAG_ULTCOS1); } //////////////////////////////////////////