projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
92713b3
)
RT#71969: High-priority: Add reason to cancellations details for Reports -> Packages...
author
Jonathan Prykop
<jonathan@freeside.biz>
Tue, 9 Aug 2016 01:20:16 +0000
(20:20 -0500)
committer
Jonathan Prykop
<jonathan@freeside.biz>
Tue, 9 Aug 2016 01:20:16 +0000
(20:20 -0500)
httemplate/search/cust_pkg_churn.html
patch
|
blob
|
history
diff --git
a/httemplate/search/cust_pkg_churn.html
b/httemplate/search/cust_pkg_churn.html
index
30962c9
..
4c7e7e8
100644
(file)
--- a/
httemplate/search/cust_pkg_churn.html
+++ b/
httemplate/search/cust_pkg_churn.html
@@
-18,7
+18,7
@@
emt('Susp.'),
emt('Changed'),
emt('Cancel'),
emt('Susp.'),
emt('Changed'),
emt('Cancel'),
- #emt('Reason'), # hard to do this right
+ @reason_header,
FS::UI::Web::cust_header(
$cgi->param('cust_fields')
),
FS::UI::Web::cust_header(
$cgi->param('cust_fields')
),
@@
-45,6
+45,7
@@
( map { time_or_blank($_) }
qw( setup last_bill bill susp change_date cancel ) ),
( map { time_or_blank($_) }
qw( setup last_bill bill susp change_date cancel ) ),
+ @reason_fields,
\&FS::UI::Web::cust_fields,
],
'sort_fields' => [
\&FS::UI::Web::cust_fields,
],
'sort_fields' => [
@@
-53,21
+54,25
@@
('') x 3, # can't use at all
# use the plain SQL column names
qw( setup last_bill bill susp change_date cancel ),
('') x 3, # can't use at all
# use the plain SQL column names
qw( setup last_bill bill susp change_date cancel ),
+ @reason_blank,
# cust_fields can take care of themselves
],
'color' => [
('') x 15,
# cust_fields can take care of themselves
],
'color' => [
('') x 15,
+ @reason_blank,
FS::UI::Web::cust_colors(),
],
'style' => [ ('') x 15,
FS::UI::Web::cust_colors(),
],
'style' => [ ('') x 15,
+ @reason_blank,
FS::UI::Web::cust_styles() ],
'size' => [ '', '', '', '', '-1' ],
FS::UI::Web::cust_styles() ],
'size' => [ '', '', '', '', '-1' ],
- 'align' => 'rrlcccrrlrrrrrr'. FS::UI::Web::cust_aligns(). 'r',
+ 'align' => 'rrlcccrrlrrrrrr'.
$reason_align.
FS::UI::Web::cust_aligns(). 'r',
'links' => [
$link,
$link,
$link,
('') x 12,
'links' => [
$link,
$link,
$link,
('') x 12,
+ @reason_blank,
( map { $_ ne 'Cust. Status' ? $clink : '' }
FS::UI::Web::cust_header(
$cgi->param('cust_fields')
( map { $_ ne 'Cust. Status' ? $clink : '' }
FS::UI::Web::cust_header(
$cgi->param('cust_fields')
@@
-184,4
+189,16
@@
sub time_or_blank {
};
}
};
}
+my (@reason_header,@reason_fields,@reason_blank);
+my $reason_align = '';
+if ($status eq 'cancel') {
+ push @reason_header, emt('Cancel Reason');
+ push @reason_fields, sub {
+ my $c = shift;
+ my $cust_pkg_reason = $c->last_cust_pkg_reason('cancel');
+ $cust_pkg_reason ? $cust_pkg_reason->reason->reason : '';
+ };
+ push @reason_blank, '';
+ $reason_align = 'l';
+}
</%init>
</%init>