Patch level : 10.1026
Files correlati : ve0.exe ve2.exe mg1.exe db0.exe Ricompilazione Demo : [ ] Commento : Aggiunto un parametro nel profilo documento "HCAOPT=X" che rende non obbligatori i campi di analitica sulla testata. ELIMINATA : 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@22272 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
8d004cb7eb
commit
3023ac833f
@ -241,7 +241,7 @@ class TTipo_documento : public TRectype // velib03
|
||||
char _tipocf;
|
||||
char _tipocr;
|
||||
char _check_qta;
|
||||
bool _cnt_prezzi, _show_evaded_lines, _load_cont, _non_evadere;
|
||||
bool _cnt_prezzi, _show_evaded_lines, _load_cont, _non_evadere, _hca_req;
|
||||
|
||||
protected:
|
||||
void add_formula_if_needed(TConfig& profile, TString& variable, const char* varname, const char* formula);
|
||||
@ -346,6 +346,7 @@ public:
|
||||
const TString& stringa_descrizione_riga() const { return _str_desc_rdoc; }
|
||||
bool mostra_righe_evase_in_elaborazione() const { return _show_evaded_lines; }
|
||||
bool da_evadere() const { return !_non_evadere; }
|
||||
bool head_ca_required() const { return _hca_req; }
|
||||
|
||||
TTipo_documento(const char* tipodoc = NULL);
|
||||
TTipo_documento(const TRectype& rec);
|
||||
|
@ -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 = ini_get_bool(CONFIG_DITTA, "ve", "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 == "*")
|
||||
{
|
||||
|
@ -425,6 +425,7 @@ void TTipo_documento::read_formule()
|
||||
_show_evaded_lines = !prof.get_bool("NASCONDI_RIGHE_EVASE"); // Normalmente mostra anche evase
|
||||
_non_evadere = prof.get_bool("NON_EVADERE"); // Normalmente mostra anche evase
|
||||
_module = prof.get("MODULE", NULL, -1, "ve").left(2);
|
||||
_hca_req = !prof.get_bool("HCAOPT");
|
||||
|
||||
}
|
||||
|
||||
|
@ -578,12 +578,12 @@ void TDocumento_mask::insert_anal_page()
|
||||
_cdc_start = dlg;
|
||||
_cdc_end = dlg + ca_multilevel_code_info(LF_CDC).levels()-1;
|
||||
if (use_fsc && fasinfo.parent() == LF_CDC)
|
||||
insert_anal_fields(*this, newpage, LF_FASI, y, dlg, dlgd, fsc_req);
|
||||
insert_anal_fields(*this, newpage, LF_FASI, y, dlg, dlgd, fsc_req && doc().tipo().head_ca_required());
|
||||
else
|
||||
{
|
||||
const bool cdc_req = ini.get_bool("CdcRequired");
|
||||
|
||||
insert_anal_fields(*this, newpage, LF_CDC, y, dlg, dlgd, cdc_req);
|
||||
insert_anal_fields(*this, newpage, LF_CDC, y, dlg, dlgd, cdc_req && doc().tipo().head_ca_required());
|
||||
}
|
||||
} else
|
||||
if (level == "CMS") // Crea commessa
|
||||
@ -591,12 +591,12 @@ void TDocumento_mask::insert_anal_page()
|
||||
_cms_start = dlg;
|
||||
_cms_end = dlg + ca_multilevel_code_info(LF_COMMESSE).levels()-1;
|
||||
if (use_fsc && fasinfo.parent() == LF_COMMESSE)
|
||||
insert_anal_fields(*this, newpage, LF_FASI, y, dlg, dlgd, fsc_req);
|
||||
insert_anal_fields(*this, newpage, LF_FASI, y, dlg, dlgd, fsc_req && doc().tipo().head_ca_required());
|
||||
else
|
||||
{
|
||||
const bool cms_req = ini.get_bool("CmsRequired");
|
||||
|
||||
insert_anal_fields(*this, newpage, LF_COMMESSE, y, dlg, dlgd, cms_req);
|
||||
insert_anal_fields(*this, newpage, LF_COMMESSE, y, dlg, dlgd, cms_req && doc().tipo().head_ca_required());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -604,7 +604,7 @@ void TDocumento_mask::insert_anal_page()
|
||||
set_field_handler(_cms_end, codcms_handler);
|
||||
|
||||
if (use_fsc && fasinfo.parent() <= 0)
|
||||
insert_anal_fields(*this, newpage, LF_FASI, y, dlg, dlgd, fsc_req);
|
||||
insert_anal_fields(*this, newpage, LF_FASI, y, dlg, dlgd, fsc_req && doc().tipo().head_ca_required());
|
||||
|
||||
//aggiunge campi per date di competenza (inizio e fine)
|
||||
add_groupbox(DLG_NULL, newpage, TR("Date di competenza"), 1, 20, 78, 3);
|
||||
@ -1406,6 +1406,26 @@ 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];
|
||||
@ -1474,6 +1494,27 @@ 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