From 3c5feed51f871b130ea4001e66a90f235ca57223 Mon Sep 17 00:00:00 2001 From: alex Date: Fri, 17 Jun 2011 10:49:50 +0000 Subject: [PATCH] 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 --- include/maskfld.cpp | 9 +++++++++ ve/velib02.cpp | 4 ++-- ve/velib06.cpp | 41 ----------------------------------------- 3 files changed, 11 insertions(+), 43 deletions(-) diff --git a/include/maskfld.cpp b/include/maskfld.cpp index 46ac9ac4e..1c83796c0 100755 --- a/include/maskfld.cpp +++ b/include/maskfld.cpp @@ -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); } diff --git a/ve/velib02.cpp b/ve/velib02.cpp index 9757edbf7..6af4d23fd 100755 --- a/ve/velib02.cpp +++ b/ve/velib02.cpp @@ -3,6 +3,7 @@ #include "../ca/commesse.h" #include +#include /////////////////////////////////////////////////////////// // 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 == "*") { diff --git a/ve/velib06.cpp b/ve/velib06.cpp index dc938dae0..c4054732b 100755 --- a/ve/velib06.cpp +++ b/ve/velib06.cpp @@ -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);