X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;ds=inline;f=SL%2FIR.pm;h=4c57f856d6f312e2fa3c4405c94c07d729add308;hb=3aae3709a67da5479454dc46bd1d88a17b17b8b5;hp=043e846201ef3aa4f3fad8aa554dcf8a195b2275;hpb=d367e9f250ce6bd59dc1c024a93298757f93db4e;p=kivitendo-erp.git diff --git a/SL/IR.pm b/SL/IR.pm index 043e84620..4c57f856d 100644 --- a/SL/IR.pm +++ b/SL/IR.pm @@ -866,7 +866,8 @@ sub get_vendor { } my $query = qq|SELECT - v.id AS vendor_id, v.name AS vendor, v.creditlimit, v.terms, v.notes AS intnotes, + v.id AS vendor_id, v.name AS vendor, v.discount as vendor_discount, + v.creditlimit, v.terms, v.notes AS intnotes, v.email, v.cc, v.bcc, v.language_id, v.payment_id, v.street, v.zipcode, v.city, v.country, v.taxzone_id, $duedate + COALESCE(pt.terms_netto, 0) AS duedate, @@ -970,7 +971,12 @@ sub retrieve_item { $where .= " AND lower(${table_column}) LIKE lower(?)"; push @values, '%' . $form->{"${field}_${i}"} . '%'; } - + #Es soll auch nach EAN gesucht werden, ohne Einschränkung durch Beschreibung + if ($form->{"partnumber_$i"} && !$form->{"description_$i"}) { + $where .= qq| OR (NOT p.obsolete = '1' AND p.ean = ? )|; + push @values, $form->{"partnumber_$i"}; + } + if ($form->{"description_$i"}) { $where .= " ORDER BY p.description"; } else {