]> wagnertech.de Git - mfinanz.git/blobdiff - bin/mozilla/ic.pl
Warenbericht: Wenn subtotal und mehrere bsooqr modi angewählt sind nur einen anzeigen.
[mfinanz.git] / bin / mozilla / ic.pl
index eeed7e9b1c39f0c1f13ab29bcd54eaae00b7ca14..b02e19d3e3e8e405c07a4fa48fa417119367801a 100644 (file)
@@ -1198,6 +1198,17 @@ sub generate_report {
     }
   }
 
+  # soldtotal doesn't make sense with more than one bsooqr option.
+  # so reset it to sold (the most common option), and issue a warning
+  my @bsooqr = qw(sold bought onorder ordered rfq quoted);
+  if ($form->{l_subtotal} && 1 < grep { $form->{$_} } @bsooqr) {
+    my $enabled       = first { $form->{$_} } @bsooqr;
+    $form->{$_}       = ''   for @bsooqr;
+    $form->{$enabled} = 'Y';
+
+    push @options, $::locale->text('Subtotal cannot distinguish betweens record types. Only one of the selected record types will be displayed: #1', $optiontexts{$enabled});
+  }
+
   IC->all_parts(\%myconfig, \%$form);
 
   my @columns = qw(