'header' => [ 'Payment',
'Amount',
'Date',
+ 'By',
FS::UI::Web::cust_header(),
],
'fields' => [
},
sub { sprintf('$%.2f', shift->paid ) },
sub { time2str('%b %d %Y', shift->_date ) },
+ sub { my $o = shift->otaker;
+ $o = 'auto billing' if $o eq 'fs_daily';
+ $o = 'customer self-service' if $o eq 'fs_selfservice';
+ $o;
+ },
\&FS::UI::Web::cust_fields,
],
#'align' => 'lrrrll',
- 'align' => 'rrr'.FS::UI::Web::cust_aligns(),
+ 'align' => 'rrrc'.FS::UI::Web::cust_aligns(),
'links' => [
+ $link,
+ $link,
+ $link,
'',
- '',
- '',
- ( map { $_ ne 'Cust. Status' ? $link : '' }
+ ( map { $_ ne 'Cust. Status' ? $cust_link : '' }
FS::UI::Web::cust_header()
),
],
'',
'',
'',
+ '',
FS::UI::Web::cust_colors(),
],
'style' => [
'',
'',
'',
+ '',
FS::UI::Web::cust_styles(),
],
)
}
-my $link = sub {
+my $link = '';
+$link = [ "${p}view/cust_pay.html?paynum=", 'paynum' ]
+ if $FS::CurrentUser::CurrentUser->access_right('View invoices'); #XXX for now
+ #later# if $FS::CurrentUser::CurrentUser->access_right('View customer payments');
+
+my $cust_link = sub {
my $cust_pay = shift;
$cust_pay->cust_main_custnum
? [ "${p}view/cust_main.cgi?", 'custnum' ]