###
'Customer credit and refund rights' => [
'Post credit',
+ 'Credit line items', #NEWNEWNEW
'Apply credit', #NEWNEW
{ rightname=>'Unapply credit', desc=>'Enable "unapplication" of unclosed credits.' }, #aka unapplycredits
{ rightname=>'Delete credit', desc=>'Enable deletion of unclosed credits. Be very careful! Only delete credits that were data-entry errors, not adjustments.' }, #aka. deletecredits Optionally specify one or more comma-separated email addresses to be notified when a credit is deleted.
'Cancel customer package immediately' => 'Un-cancel customer package',
'Suspend customer package' => 'Suspend customer',
'Unsuspend customer package' => 'Unsuspend customer',
+ 'Post credit' => 'Credit line items',
'List services' => [ 'Services: Accounts',
'Services: Domains',
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
-die "access denied" unless $curuser->access_right('Post credit');
+die "access denied" unless $curuser->access_right('Credit line items');
#a tiny bit of false laziness w/search/cust_bill_pkg.cgi, but we're pretty
# specialized and a piece of UI, not a report
<%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; }
<%init>
my $curuser = $FS::CurrentUser::CurrentUser;
-die "access denied" unless $curuser->access_right('Post credit');
+die "access denied" unless $curuser->access_right('Credit line items');
my $DEBUG = 0;
<A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;custnum=<% $custnum %>"><% mt('Enter Western Union payment') |h %></A>
% }
-<BR>
+<% $s ? '<BR>' : '' %>
% $s=0;
% if ( ( $payby{'CARD'} || $payby{'DCRD'} )
<A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;custnum=<% $custnum %>"><% mt('Post manual (offline/POS) credit card payment') |h %></A>
% }
-<BR>
+<% $s ? '<BR>' : '' %>
-%# credit link
+%# credit links
+% $s=0;
% if ( $curuser->access_right('Post credit') ) {
+ <% $s++ ? ' | ' : '' %>
<& /elements/popup_link-cust_main.html,
'label' => emt('Enter credit'),
'action' => "${p}edit/cust_credit.cgi",
'actionlabel' => emt('Enter credit'),
'width' => 616, #make room for reasons #540 default
&>
- |
+% }
+% if ( $curuser->access_right('Credit line items') ) {
+ <% $s++ ? ' | ' : '' %>
<& /elements/popup_link-cust_main.html,
'label' => emt('Credit line items'),
#'action' => "${p}search/cust_bill_pkg.cgi?nottax=1;type=select",
'width' => 968, #763,
'height' => 575,
&>
- <BR>
% }
+<% $s ? '<BR>' : '' %>
%# refund links