]> wagnertech.de Git - mfinanz.git/blobdiff - SL/OE.pm
Recht zum Einsehen von Einkaufsdokumenten aller Mitarbeiter anwenden
[mfinanz.git] / SL / OE.pm
index 49681bd8e48a06786739d93f6ede5c272eb900e0..1887d94f96ff187754526b53a66b6c075ca95b91 100644 (file)
--- a/SL/OE.pm
+++ b/SL/OE.pm
@@ -183,7 +183,7 @@ SQL
     push(@values, (like($form->{"cp_name"}))x2);
   }
 
-  if (!$main::auth->assert('sales_all_edit', 1)) {
+  if ( !(($vc eq 'customer' && $main::auth->assert('sales_all_edit', 1)) || ($vc eq 'vendor' && $main::auth->assert('purchase_all_edit', 1))) ) {
     $query .= " AND o.employee_id = (select id from employee where login= ?)";
     push @values, $::myconfig{login};
   }