Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4a06c433

Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt

  • ID 4a06c43348965e95ca77af5ac38f89fedefdc25f
  • Vorgänger 612e3ebe
  • Nachfolger 028ea578

Lieferscheine: Suche nach Artikelnummer/-beschreibung in Positionen

Unterschiede anzeigen:

SL/DO.pm
180 180
    push @values, conv_date($form->{insertdateto});
181 181
  }
182 182

  
183
  if ($form->{parts_partnumber}) {
184
    push @where, <<SQL;
185
      EXISTS (
186
        SELECT delivery_order_items.delivery_order_id
187
        FROM delivery_order_items
188
        LEFT JOIN parts ON (delivery_order_items.parts_id = parts.id)
189
        WHERE (delivery_order_items.delivery_order_id = dord.id)
190
          AND (parts.partnumber ILIKE ?)
191
        LIMIT 1
192
      )
193
SQL
194
    push @values, like($form->{parts_partnumber});
195
  }
196

  
197
  if ($form->{parts_description}) {
198
    push @where, <<SQL;
199
      EXISTS (
200
        SELECT delivery_order_items.delivery_order_id
201
        FROM delivery_order_items
202
        WHERE (delivery_order_items.delivery_order_id = dord.id)
203
          AND (delivery_order_items.description ILIKE ?)
204
        LIMIT 1
205
      )
206
SQL
207
    push @values, like($form->{parts_description});
208
  }
209

  
183 210
  if (@where) {
184 211
    $query .= " WHERE " . join(" AND ", map { "($_)" } @where);
185 212
  }
bin/mozilla/do.pl
558 558
  my @hidden_variables = map { "l_${_}" } @columns;
559 559
  push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber serialnumber cusordnumber
560 560
                                          transaction_description transdatefrom transdateto reqdatefrom reqdateto
561
                                          type vc employee_id salesman_id project_id
561
                                          type vc employee_id salesman_id project_id parts_partnumber parts_description
562 562
                                          insertdatefrom insertdateto business_id);
563 563

  
564 564
  my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
......
629 629
  if ($form->{transaction_description}) {
630 630
    push @options, $locale->text('Transaction description') . " : $form->{transaction_description}";
631 631
  }
632
  if ($form->{parts_description}) {
633
    push @options, $locale->text('Part Description') . " : $form->{parts_description}";
634
  }
635
  if ($form->{parts_partnumber}) {
636
    push @options, $locale->text('Part Number') . " : $form->{parts_partnumber}";
637
  }
632 638
  if ( $form->{transdatefrom} or $form->{transdateto} ) {
633 639
    push @options, $locale->text('Delivery Order Date');
634 640
    push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1)     if $form->{transdatefrom};
templates/webpages/do/search.html
86 86

  
87 87
    <tr>
88 88
     <th align="right">[% 'Transaction description' | $T8 %]</th>
89
     <td colspan="3"><input name="transaction_description" class="fixed_width"></td>
89
     <td><input name="transaction_description" class="fixed_width"></td>
90
     <th align="right">[% 'Part Description' | $T8 %]</th>
91
     <td><input name="parts_description" size="20"></td>
90 92
    </tr>
91 93

  
92 94
    <tr>
93 95
     <th align="right">[% 'Project Number' | $T8 %]</th>
94
     <td colspan="3">
96
     <td>
95 97
      <select name="project_id" class="fixed_width">
96 98
       <option></option>
97 99
       [%- FOREACH row = ALL_PROJECTS %]
......
99 101
       [%- END %]
100 102
      </select>
101 103
     </td>
104
     <th align="right">[% 'Part Number' | $T8 %]</th>
105
     <td><input name="parts_partnumber" size="20"></td>
102 106
    </tr>
103 107

  
104 108
    <tr>

Auch abrufbar als: Unified diff