diff --git a/ce/ce0500.cpp b/ce/ce0500.cpp index e0c9d2b04..cd1e97fa4 100755 --- a/ce/ce0500.cpp +++ b/ce/ce0500.cpp @@ -46,6 +46,7 @@ void TQuery_mask::on_search_event(TOperable_field& o) if (o.dlg() >= F_SEARCH2) { order.add(CESPI_CODIMP); header.add("Impianto@10"); + order.add("CIM->S0"); header.add("Descrizione impianto@40"); } if (o.dlg() >= F_SEARCH1) { @@ -56,13 +57,14 @@ void TQuery_mask::on_search_event(TOperable_field& o) order.add(CESPI_IDCESPITE); header.add("Codice@10"); fields = order; - fields.add(CESPI_DESC); header.add("Descrizione@50"); + fields.add(CESPI_DESC); header.add("Descrizione cespite@50"); TRelation rel(LF_CESPI); TString filter; if (get(F_SELECT)[0] == 'I') // Filtro per impianto { + rel.add("CIM","CODTAB==CODIMP"); const TString& imp = get(F_IMPIANTO); if (!imp.empty()) filter << CESPI_CODIMP << "=\"" << imp << '"';