Merge branch 'master' of git.freeside.biz:/home/git/freeside
[freeside.git] / httemplate / edit / process / credit-cust_bill_pkg.html
index 1b61997..8e66368 100644 (file)
@@ -10,7 +10,7 @@
 <%init>
 
 die "access denied"
-  unless $FS::CurrentUser::CurrentUser->access_right('Post credit');
+  unless $FS::CurrentUser::CurrentUser->access_right('Credit line items');
 
 my @billpkgnum_setuprecurs =
   map { $_ =~ /^billpkgnum(\d+\-\w*)$/ or die 'gm#23'; $1; } 
@@ -32,6 +32,7 @@ my $error = FS::cust_credit->credit_lineitems(
   'billpkgnums'       => \@billpkgnums,
   'setuprecurs'       => \@setuprecurs,
   'amounts'           => \@amounts,
+  'apply'             => ( $cgi->param('apply') eq 'yes' ),
 
   #the credit
   'newreasonnum'      => scalar($cgi->param('newreasonnum')),