X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/82053b457be3de2ee5285dc13633222f4d30802c..9c0ec2622da20eb96c8b4bbd98a8cce47cb8a6ee:/SL/AR.pm diff --git a/SL/AR.pm b/SL/AR.pm index b6a7376e1..adffeb6bc 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -515,6 +515,11 @@ sub ar_transactions { qq|LEFT JOIN department d ON (d.id = a.department_id)|; my $where = "1 = 1"; + + unless ( $::auth->assert('show_ar_transactions', 1) ) { + $where .= " AND NOT invoice = 'f' "; # remove ar transactions from Sales -> Reports -> Invoices + }; + if ($form->{customernumber}) { $where .= " AND c.customernumber = ?"; push(@values, $form->{customernumber});