% #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>
% } 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;
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;