Patch level : 10.1030
Files correlati : ve0.exe ve2.exe mg1.exe mg3.exe mg4.exe db0.exe Ricompilazione Demo : [ ] Commento : Aggiunto il parametro (CUSTOM_SEARCH_47(2)=X dove 47 e' l'identificatore del file anamag e 2 e' il numero della chiaveper descrizione) nel paragrafo Main del file ini 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@22281 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
2b08b4cf00
commit
3c5feed51f
@ -396,6 +396,15 @@ void TMask_field::construct(TScanner& scanner, WINDOW parent)
|
||||
while(scanner.popkey() != "EN") // END of control
|
||||
parse_item(scanner);
|
||||
|
||||
if (class_id() == CLASS_EDIT_FIELD)
|
||||
{
|
||||
TBrowse * b = ((TEdit_field *) this)->browse();
|
||||
|
||||
if (b != NULL)
|
||||
b->custom_display();
|
||||
}
|
||||
|
||||
|
||||
create(parent);
|
||||
}
|
||||
|
||||
|
@ -3,6 +3,7 @@
|
||||
#include "../ca/commesse.h"
|
||||
|
||||
#include <recset.h>
|
||||
#include <utility.h>
|
||||
|
||||
///////////////////////////////////////////////////////////
|
||||
// Tipo riga di un documento
|
||||
@ -78,8 +79,7 @@ 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 = ini_get_bool(CONFIG_DITTA, "ba", "CUSTOM_CURSOR_2", false, LF_ANAMAG ) )
|
||||
_extended_desc_search = ini_get_bool(CONFIG_DITTA, "Main", "CUSTOM_SEARCH_" TOSTRING(LF_ANAMAG), false, 2);
|
||||
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