Patch level : 10.1016
Files correlati : ve0.exe ve2.exe mg1.exe db0.exe Ricompilazione Demo : [ ] Commento : Aggiunto un parametro (EXTDESCSRC=X) nel paragrafo ve della ditta) per aggiungere la descrizione estesa alle discerche per descrizione degli articoli git-svn-id: svn://10.65.10.50/branches/R_10_00@22209 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
7a75b31554
commit
76420ade84
@ -78,8 +78,8 @@ void TTipo_riga_documento::read_formule()
|
||||
_select_clifo = profile.get_bool("SELCLIFO", NULL, -1, true);
|
||||
_no_desc = profile.get_bool("NODESC");
|
||||
_formule = profile.get("CAMPICALC");
|
||||
_extended_desc_search = profile.get_bool("EXTDESCSRC");
|
||||
|
||||
// _extended_desc_search = profile.get_bool("EXTDESCSRC");
|
||||
_extended_desc_search = ini_get_bool(CONFIG_DITTA, "ve", "EXTDESCSRC");
|
||||
const TString& calcoli = profile.get("CALCOLI");
|
||||
if (calcoli == "*")
|
||||
{
|
||||
|
@ -1406,26 +1406,6 @@ bool TDocumento_mask::new_mask(int numriga) const
|
||||
return _maskriga.objptr(name) == NULL;
|
||||
}
|
||||
|
||||
static bool descr_filter_handler(TMask_field& f, KEY k)
|
||||
{
|
||||
if (k == K_SPACE)
|
||||
{
|
||||
TString expr;
|
||||
if (!f.get().empty()) // Filtro attivato!
|
||||
{
|
||||
const short id = f.dlg()-500;
|
||||
TString e = f.mask().get(id); // Espressione regolare
|
||||
e.strip("\"'"); // Tolgo caratteri che potrebbero dare problemi
|
||||
if (!e.blank())
|
||||
expr << "(DESCR+DESCRAGG)" << "?=\"" << e << '"';
|
||||
if (expr.empty())
|
||||
f.reset();
|
||||
}
|
||||
((TBrowse_sheet&) f.mask()).add_custom_filter(expr);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
TVariable_mask* TDocumento_mask::riga_mask(int numriga)
|
||||
{
|
||||
const TRiga_documento& riga = doc()[numriga + 1];
|
||||
@ -1494,27 +1474,6 @@ TVariable_mask* TDocumento_mask::riga_mask(int numriga)
|
||||
}
|
||||
}
|
||||
}
|
||||
if (tiporiga.extended_desc_search())
|
||||
{
|
||||
pos = m->id2pos(FR_DESCRART);
|
||||
if (pos >= 0)
|
||||
{
|
||||
const TMask_field & f = m->fld(pos);
|
||||
if (f.is_edit())
|
||||
{
|
||||
TBrowse * browse = ((TEdit_field &) f).browse();
|
||||
|
||||
if (browse )
|
||||
{
|
||||
TRelation * r = new TRelation(LF_ANAMAG);
|
||||
TSorted_cursor * c = new TSorted_cursor(r,ANAMAG_DESCR "|" ANAMAG_DESCRAGG, "", 2);
|
||||
|
||||
browse->set_cursor(c);
|
||||
browse->set_custom_filter_handler(descr_filter_handler);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
m->set_handler(FR_QTAEVASA, qta_evasa_handler);
|
||||
m->set_handler(FR_CAUS, causmag_handler);
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user