ActionBar: Setup in ir.pl in eigene Funktion ausgelagert
[kivitendo-erp.git] / bin / mozilla / rp.pl
index 96a425d..a4ba678 100644 (file)
@@ -28,7 +28,8 @@
 # GNU General Public License for more details.
 # You should have received a copy of the GNU General Public License
 # along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
+# MA 02110-1335, USA.
 #======================================================================
 #
 # module for preparing Income Statement and Balance Sheet
@@ -40,14 +41,12 @@ use POSIX qw(strftime);
 use SL::DB::Default;
 use SL::DB::Project;
 use SL::DB::Customer;
-use SL::PE;
 use SL::RP;
 use SL::Iconv;
 use SL::ReportGenerator;
 use Data::Dumper;
 use List::MoreUtils qw(any);
 
-require "bin/mozilla/arap.pl";
 require "bin/mozilla/common.pl";
 require "bin/mozilla/reportgenerator.pl";
 
@@ -174,12 +173,7 @@ sub report {
 
     $nextsub = "generate_$::form->{report}";
 
-    # setup vc selection
-    $::form->all_vc(\%::myconfig, $::form->{vc}, $is_sales ? "AR" : "AP");
-    $vc .= "<option>$_->{name}--$_->{id}\n" for @{ $::form->{"all_$::form->{vc}"} };
-    $vc = ($vc)
-        ? qq|<select name=$::form->{vc} class="initial_focus"><option>\n$vc</select>|
-        : qq|<input name=$::form->{vc} size=35 class="initial_focus">|;
+    $vc = qq|<input name=$::form->{vc} size=35 class="initial_focus">|;
   }
 
   my ($selection, $paymentaccounts);
@@ -928,7 +922,7 @@ sub list_accounts {
 sub generate_ar_aging {
   $main::lxdebug->enter_sub();
 
-  $main::auth->assert('general_ledger');
+  $main::auth->assert('general_ledger | ar_transactions');
 
   my $form     = $main::form;
   my %myconfig = %main::myconfig;
@@ -951,7 +945,7 @@ sub generate_ar_aging {
 sub generate_ap_aging {
   $main::lxdebug->enter_sub();
 
-  $main::auth->assert('general_ledger');
+  $main::auth->assert('general_ledger | ap_transactions');
 
   my $form     = $main::form;
   my %myconfig = %main::myconfig;