Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0b77bd2a

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 0b77bd2ae30167ffc293d0348a5da647a4b809f6
  • Vorgänger 734d4fb1

Volltext-Suche im Lieferscheinbericht

Unterschiede anzeigen:

SL/DO.pm
192 192
    push @values, conv_date($form->{insertdateto});
193 193
  }
194 194

  
195
  $form->{fulltext} = trim($form->{fulltext});
196
  if ($form->{fulltext}) {
197
    my @fulltext_fields = qw(dord.notes
198
                             dord.intnotes
199
                             dord.shippingpoint
200
                             dord.shipvia
201
                             dord.transaction_description
202
                             dord.donumber
203
                             dord.ordnumber
204
                             dord.cusordnumber
205
                             dord.oreqnumber
206
                             );
207
    my $tmp_where = '';
208
    $tmp_where .= join ' OR ', map {"$_ ILIKE ?"} @fulltext_fields;
209
    push(@values, like($form->{fulltext})) for 1 .. (scalar @fulltext_fields);
210

  
211
    $tmp_where .= <<SQL;
212
      OR EXISTS (
213
        SELECT files.id FROM files LEFT JOIN file_full_texts ON (file_full_texts.file_id = files.id)
214
          WHERE files.object_id = dord.id AND files.object_type = ?
215
            AND file_full_texts.full_text ILIKE ?)
216
SQL
217
    push(@values, $form->{type});
218
    push(@values, like($form->{fulltext}));
219
    push @where, $tmp_where;
220

  
221
  }
222

  
195 223
  if ($form->{parts_partnumber}) {
196 224
    push @where, <<SQL;
197 225
      EXISTS (

Auch abrufbar als: Unified diff