quick list of area codes and a kludge to print DA numbers for all of them
[freeside.git] / httemplate / view / cust_pay.html
index 4037d35..c36d769 100644 (file)
@@ -11,7 +11,7 @@
 % #it would be nice if the menubar could be hidden for print, but better to
 % # have it available than not, otherwise the user winds up at a dead end
   <% menubar(
-       "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
+       "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
      )
   %>
   <BR><BR>
@@ -19,7 +19,7 @@
 % } else { 
 
   <% include('/elements/header.html', "Payment Receipt", menubar(
-       "View this customer (#$custnum)" => "${p}view/cust_main.cgi?$custnum",
+       "View this customer (#$display_custnum)" => "${p}view/cust_main.cgi?$custnum",
        'Print receipt' => $pr_link,
      ))
   %>
 my $curuser = $FS::CurrentUser::CurrentUser;
 
 die "access denied"
-  unless $curuser->access_right('View customer payments');
+  unless $curuser->access_right('View invoices') #remove this in 1.9 EVENTUALLY
+  || $curuser->access_right('View customer payments');
 
 $cgi->param('paynum') =~ /^(\d+)$/ or die "no paynum";
 my $paynum = $1;
@@ -123,6 +124,7 @@ die "Payment #$paynum not found!" unless $cust_pay;
 my $pr_link = "${p}view/cust_pay.html?link=print;paynum=$paynum";
 
 my $custnum = $cust_pay->custnum;
+my $display_custnum = $cust_pay->cust_main->display_custnum;
 
 my $conf = new FS::Conf;