X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/14a2c687b4458d903ff212103ca24cf32c239dd1..deb4d2dbb676d7d6f69dfe7815d6e0cb09bd4a44:/SL/VK.pm 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});