X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FVK.pm;h=f20414c7fbfa387cc5c03125aaecdb6ffa426f6d;hb=c0158b6b111fa98fbde66a300237133c999bfb9f;hp=cc49cb412395093570261b56cc9b5ba50f30fb8a;hpb=e42233910a57d39f3ccef150db1212f7ecb7fb30;p=kivitendo-erp.git diff --git a/SL/VK.pm b/SL/VK.pm index cc49cb412..f20414c7f 100644 --- a/SL/VK.pm +++ b/SL/VK.pm @@ -72,7 +72,7 @@ sub invoice_transactions { # limits by employees (Bearbeiter), not salesmen! if (!$main::auth->assert('sales_all_edit', 1)) { $where .= " AND ar.employee_id = (select id from employee where login= ?)"; - push (@values, $form->{login}); + push (@values, $::myconfig{login}); } # Stornierte Rechnungen und Stornorechnungen in invoice rausfiltern @@ -110,7 +110,10 @@ sub invoice_transactions { if ($form->{customer_id}) { $where .= " AND ar.customer_id = ?"; push(@values, $form->{customer_id}); - }; + } elsif ($form->{customer}) { + $where .= " AND ct.name ILIKE ?"; + push(@values, $form->like($form->{customer})); + } if ($form->{customernumber}) { $where .= qq| AND ct.customernumber = ? |; push(@values, $form->{customernumber});