Bilanz und GuV mit oder ohne SB-Buchungen ausgeben
[kivitendo-erp.git] / SL / RP.pm
index f98d475..abf95be 100644 (file)
--- a/SL/RP.pm
+++ b/SL/RP.pm
@@ -211,6 +211,13 @@ sub get_accounts {
 
   $sth->finish;
 
+  # if l_ob is selected l_cb is always ignored
+  if ( $form->{l_ob} ) {
+    $where .= ' AND ob_transaction is true  ' 
+  } elsif ( not $form->{l_cb} ) {
+    $where .= ' AND cb_transaction is false ';
+  };
+
   if ($fromdate) {
     $fromdate = conv_dateq($fromdate);
     if ($form->{method} eq 'cash') {
@@ -464,6 +471,8 @@ sub get_accounts_g {
   my $inwhere = "";
   my $item;
 
+  $where .= ' AND cb_transaction is false ' unless $form->{l_cb};
+
   if ($fromdate) {
     $fromdate = conv_dateq($fromdate);
     if ($form->{method} eq 'cash') {