]> wagnertech.de Git - mfinanz.git/blobdiff - SL/AR.pm
Neue Rechte für Anzeige der Debitoren- und Kreditorenbuchungen
[mfinanz.git] / SL / AR.pm
index 212b2b894bc1ed17f1c03defc6d3850098ecbdfa..d97c443d17dd9c0a6d934189cd2d14365123fa7d 100644 (file)
--- 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 ( $main::auth->check_right($form->{login}, 'show_ar_transactions') ) { 
+    $where .= " AND NOT invoice = 'f' ";  # remove ar transactions from Sales -> Reports -> Invoices
+  };
+
   if ($form->{customernumber}) {
     $where .= " AND c.customernumber = ?";
     push(@values, $form->{customernumber});