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 (
bin/mozilla/do.pl
796 796
  push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber serialnumber cusordnumber
797 797
                                          transaction_description transdatefrom transdateto reqdatefrom reqdateto
798 798
                                          type vc employee_id salesman_id project_id parts_partnumber parts_description
799
                                          insertdatefrom insertdateto business_id all department_id chargenumber);
799
                                          insertdatefrom insertdateto business_id all department_id chargenumber full_text);
800 800

  
801 801
  my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
802 802

  
......
866 866
  if ($form->{transaction_description}) {
867 867
    push @options, $locale->text('Transaction description') . " : $form->{transaction_description}";
868 868
  }
869
  if ($form->{fulltext}) {
870
    push @options, $locale->text('Full Text') . " : $form->{fulltext}";
871
  }
869 872
  if ($form->{parts_description}) {
870 873
    push @options, $locale->text('Part Description') . " : $form->{parts_description}";
871 874
  }
templates/design40_webpages/do/search.html
103 103
      <td> <input type="text" name="transaction_description" class="fixed_width wi-mediumsmall">
104 104
      </td>
105 105
    </tr>
106
    <tr>
107
      <th align="right">[% 'Full Text' | $T8 %]</th>
108
      <td>[% L.input_tag('fulltext', '', class="fixed_width wi-mediumsmall") %]</td>
109
    </tr>
106 110
    <tr>
107 111
      <th class="caption" colspan="2">[% 'Article data' | $T8 %]</th>
108 112
    </tr>
templates/webpages/do/search.html
72 72
     <td><input name="parts_description" size="20" class="fixed_width"></td>
73 73
    </tr>
74 74

  
75
    <tr>
76
     <th align="right">[% 'Full Text' | $T8 %]</th>
77
     <td colspan="3">[% L.input_tag('fulltext', '', class="fixed_width") %]</td>
78
    </tr>
79

  
75 80
    <tr>
76 81
     <th align="right">[% 'Project Number' | $T8 %]</th>
77 82
     <td>

Auch abrufbar als: Unified diff