Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 3735d44d

Von Tamino Steinert vor 12 Monaten hinzugefügt

  • ID 3735d44d9f20f87b8570c52f895fe476fe3a32a3
  • Vorgänger eb82b54d
  • Nachfolger 6538d8cf

Varianten: zum Bericht Artikel hinzugefügt

Unterschiede anzeigen:

SL/IC.pm
314 314

  
315 315
  # special case smart search
316 316
  if ($form->{all}) {
317
    $form->{"l_$_"}       = 1 for qw(partnumber description unit sellprice lastcost linetotal);
318
    $form->{l_service}    = 1 if $form->{searchitems} eq 'service'    || $form->{searchitems} eq '';
319
    $form->{l_assembly}   = 1 if $form->{searchitems} eq 'assembly'   || $form->{searchitems} eq '';
320
    $form->{l_part}       = 1 if $form->{searchitems} eq 'part'       || $form->{searchitems} eq '';
321
    $form->{l_assortment} = 1 if $form->{searchitems} eq 'assortment' || $form->{searchitems} eq '';
317
    $form->{"l_$_"}           = 1 for qw(partnumber description unit sellprice lastcost linetotal);
318
    $form->{l_service}        = 1 if $form->{searchitems} eq 'service'        || $form->{searchitems} eq '';
319
    $form->{l_assembly}       = 1 if $form->{searchitems} eq 'assembly'       || $form->{searchitems} eq '';
320
    $form->{l_part}           = 1 if $form->{searchitems} eq 'part'           || $form->{searchitems} eq '';
321
    $form->{l_assortment}     = 1 if $form->{searchitems} eq 'assortment'     || $form->{searchitems} eq '';
322
    $form->{l_parent_variant} = 1 if $form->{searchitems} eq 'parent_variant' || $form->{searchitems} eq '';
323
    $form->{l_variant}        = 1 if $form->{searchitems} eq 'variant'        || $form->{searchitems} eq '';
322 324
    push @where_tokens, "p.partnumber ILIKE ? OR p.description ILIKE ?";
323 325
    push @bind_vars,    (like($form->{all})) x 2;
324 326
  }
......
368 370
  }
369 371

  
370 372
  # Oder Bedingungen fuer Ware Dienstleistung Erzeugnis:
371
  if ($form->{l_part} || $form->{l_assembly} || $form->{l_service} || $form->{l_assortment}) {
372
      my @or_tokens = ();
373
      push @or_tokens, "p.part_type = 'service'"    if $form->{l_service};
374
      push @or_tokens, "p.part_type = 'assembly'"   if $form->{l_assembly};
375
      push @or_tokens, "p.part_type = 'part'"       if $form->{l_part};
376
      push @or_tokens, "p.part_type = 'assortment'" if $form->{l_assortment};
377
      push @where_tokens, join ' OR ', map { "($_)" } @or_tokens;
373
  if (   $form->{l_part}           || $form->{l_assembly}
374
      || $form->{l_service}        || $form->{l_assortment}
375
      || $form->{l_parent_variant} || $form->{l_variant}
376
    ) {
377
    my @or_tokens = ();
378
    push @or_tokens, "p.part_type = 'service'"        if $form->{l_service};
379
    push @or_tokens, "p.part_type = 'assembly'"       if $form->{l_assembly};
380
    push @or_tokens, "p.part_type = 'part'"           if $form->{l_part};
381
    push @or_tokens, "p.part_type = 'assortment'"     if $form->{l_assortment};
382
    push @or_tokens, "p.part_type = 'parent_variant'" if $form->{l_parent_variant};
383
    push @or_tokens, "p.part_type = 'variant'"        if $form->{l_variant};
384
    push @where_tokens, join ' OR ', map { "($_)" } @or_tokens;
378 385
  }
379 386
  else {
380 387
      # gar keine Teile
templates/design40_webpages/ic/search.html
36 36
            <input name="l_assortment" id="l_assortment" type="checkbox" value="Y" checked>
37 37
            <label for="l_assortment"> [% 'Assortment' | $T8 %] </label>
38 38
          [% END %]
39
          <input name="l_parent_variant" id="l_parent_variant" type="checkbox" value="Y" checked>
40
          <label for="l_parent_variant"> [% 'Parent Variant' | $T8 %] </label>
41
          <input name="l_variant" id="l_variant" type="checkbox" value="Y" checked>
42
          <label for="l_variant"> [% 'Variant' | $T8 %] </label>
39 43
        </td>
40 44
      </tr>
41 45
      <tr>

Auch abrufbar als: Unified diff