[freeside-commits] branch FREESIDE_4_BRANCH updated. 707dc003409789d9a90c6e3c772821be2c230b98

Jonathan Prykop jonathan at 420.am
Thu Aug 25 21:16:02 PDT 2016


The branch, FREESIDE_4_BRANCH has been updated
       via  707dc003409789d9a90c6e3c772821be2c230b98 (commit)
       via  e4056d2c8ced18e0ece2639df9054b78547992d3 (commit)
      from  a733f6150824170191ca43efe7ffbf71b77999a8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 707dc003409789d9a90c6e3c772821be2c230b98
Merge: e4056d2 a733f61
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Thu Aug 25 23:15:43 2016 -0500

    Merge branch 'FREESIDE_4_BRANCH' of git.freeside.biz:/home/git/freeside into FREESIDE_4_BRANCH


commit e4056d2c8ced18e0ece2639df9054b78547992d3
Author: Jonathan Prykop <jonathan at freeside.biz>
Date:   Mon Aug 8 20:20:16 2016 -0500

    RT#71969: High-priority: Add reason to cancellations details for Reports -> Packages -> Package churn

diff --git a/httemplate/search/cust_pkg_churn.html b/httemplate/search/cust_pkg_churn.html
index 30962c9..4c7e7e8 100644
--- 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('Reason'), # hard to do this right
+                                     @reason_header,
                                      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 ) ),
 
+                    @reason_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 ),
+                    @reason_blank,
                     # cust_fields can take care of themselves
                   ],
                   'color' => [
                     ('') x 15,
+                    @reason_blank,
                     FS::UI::Web::cust_colors(),
                   ],
                   'style' => [ ('') x 15,
+                               @reason_blank,
                                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,
+                    @reason_blank,
                     ( 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, at reason_fields, at 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>

-----------------------------------------------------------------------

Summary of changes:
 httemplate/search/cust_pkg_churn.html |   21 +++++++++++++++++++--
 1 file changed, 19 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list