push(@values, like($form->{phone_notes}), like($form->{phone_notes}));
}
+ $form->{fulltext} = trim($form->{fulltext});
+ if ($form->{fulltext}) {
+ my @fulltext_fields = qw(o.notes
+ o.intnotes
+ o.shippingpoint
+ o.shipvia
+ o.transaction_description
+ o.quonumber
+ o.ordnumber
+ o.cusordnumber);
+ $query .= ' AND (';
+ $query .= join ' ILIKE ? OR ', @fulltext_fields;
+ $query .= ' ILIKE ?';
+ $query .= qq| OR EXISTS (SELECT files.id FROM files LEFT JOIN file_full_texts ON (file_full_texts.file_id = files.id) WHERE files.object_id = o.id AND files.object_type = 'sales_order' AND file_full_texts.full_text ILIKE ?)|;
+ $query .= qq| OR EXISTS (SELECT notes.id FROM notes WHERE notes.trans_id = o.id AND notes.trans_module LIKE 'oe' AND (notes.subject ILIKE ? OR notes.body ILIKE ?))|;
+ $query .= ')';
+ push(@values, like($form->{fulltext})) for 1 .. (scalar @fulltext_fields) + 3;
+ }
+
if ($form->{parts_partnumber}) {
$query .= <<SQL;
AND EXISTS (
reqdatefrom reqdateto projectnumber project_id periodic_invoices_active periodic_invoices_inactive
business_id shippingpoint taxzone_id reqdate_unset_or_old insertdatefrom insertdateto
order_probability_op order_probability_value expected_billing_date_from expected_billing_date_to
- parts_partnumber parts_description all department_id intnotes phone_notes);
+ parts_partnumber parts_description all department_id intnotes phone_notes fulltext);
push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables;
my @keys_for_url = grep { $form->{$_} } @hidden_variables;
push @options, $locale->text('Part Description') . " : $form->{parts_description}" if $form->{parts_description};
push @options, $locale->text('Part Number') . " : $form->{parts_partnumber}" if $form->{parts_partnumber};
push @options, $locale->text('Phone Notes') . " : $form->{phone_notes}" if $form->{phone_notes};
+ push @options, $locale->text('Full Text') . " : $form->{fulltext}" if $form->{fulltext};
if ( $form->{transdatefrom} or $form->{transdateto} ) {
push @options, $locale->text('Order Date');
push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1) if $form->{transdatefrom};
'Front page' => 'Hauptseite',
'Full Access' => 'Vollzugriff',
'Full Preview' => 'Alles',
+ 'Full Text' => 'Volltext',
'Full access to all functions' => 'Vollzugriff auf alle Funktionen',
'Function block' => 'Funktionsblock',
'Function block actions' => 'Funktionsblockaktionen',
'Front page' => '',
'Full Access' => '',
'Full Preview' => '',
+ 'Full Text' => '',
'Full access to all functions' => '',
'Function block' => '',
'Function block actions' => '',
<th align="right">[% 'Phone Notes' | $T8 %]</th>
<td>[% L.input_tag('phone_notes', '', style=style) %]</td>
</tr>
+ [%- IF type == 'sales_order' %]
+ <tr>
+ <th align="right">[% 'Full Text' | $T8 %]</th>
+ <td>[% L.input_tag('fulltext', '', style=style) %]</td>
+ </tr>
+ [%- END %]
<tr>
<th align="right">[% IF is_order %][% 'Order Date' | $T8 %][% ELSE %][% 'Quotation Date' | $T8 %][% END %] [% 'From' | $T8 %]</th>
<td>