Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 159ba2d4

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 159ba2d48f1f698c6f986e2e4691ac47365df40a
  • Vorgänger 63fa4620
  • Nachfolger 3ecc10d2

Volltext-Suche im EK-Rechnungs- und Kreditoren-Bericht

Unterschiede anzeigen:

SL/AP.pm
701 701
    }
702 702
  }
703 703

  
704
  $form->{fulltext} = trim($form->{fulltext});
705
  if ($form->{fulltext}) {
706
    my @fulltext_fields = qw(a.notes
707
                             a.intnotes
708
                             a.shipvia
709
                             a.transaction_description
710
                             a.quonumber
711
                             a.ordnumber
712
                             a.invnumber);
713
    $where .= ' AND (';
714
    $where .= join ' OR ', map {"$_ ILIKE ?"} @fulltext_fields;
715

  
716
    $where .= <<SQL;
717
      OR EXISTS (
718
        SELECT files.id FROM files LEFT JOIN file_full_texts ON (file_full_texts.file_id = files.id)
719
          WHERE files.object_id = a.id AND files.object_type = 'purchase_invoice'
720
            AND file_full_texts.full_text ILIKE ?)
721
SQL
722
    $where .= ')'; # end AND
723

  
724
    push(@values, like($form->{fulltext})) for 1 .. (scalar @fulltext_fields) + 1;
725
  }
726

  
704 727
  if ($form->{parts_partnumber}) {
705 728
    $where .= <<SQL;
706 729
 AND EXISTS (

Auch abrufbar als: Unified diff