X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FAR.pm;h=adffeb6bc677cb7d132919789c3348965c559196;hb=2a3bcd6e2e1adee31dff01f4f18086a536998a3c;hp=212b2b894bc1ed17f1c03defc6d3850098ecbdfa;hpb=96dbc0768869a53c1d146efbc0bd364c2ea9de63;p=kivitendo-erp.git diff --git a/SL/AR.pm b/SL/AR.pm index 212b2b894..adffeb6bc 100644 --- a/SL/AR.pm +++ b/SL/AR.pm @@ -330,6 +330,7 @@ sub post_transaction { dbh => $dbh, from => $transdate, to => $transdate, + trans_id => $form->{id}, ); $datev->export; @@ -514,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});