[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 1fcfa917490094be40c0db373502ded2671b1017

Mark Wells mark at 420.am
Fri Apr 6 12:35:25 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  1fcfa917490094be40c0db373502ded2671b1017 (commit)
      from  bebc6056dddc1bdeb0f3f763659cb9909d787583 (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 1fcfa917490094be40c0db373502ded2671b1017
Author: Mark Wells <mark at freeside.biz>
Date:   Fri Apr 6 12:34:59 2012 -0700

    search by change date on advanced package report, #17113

diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 88ce3a0..a0e21fe 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -3230,7 +3230,7 @@ sub search {
       "NOT (".FS::cust_pkg->onetime_sql . ")";
   }
   else {
-    foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end cancel )) {
+    foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end change_date cancel )) {
 
       next unless exists($params->{$field});
 
diff --git a/httemplate/search/cust_pkg.cgi b/httemplate/search/cust_pkg.cgi
index 297edee..887ec60 100755
--- a/httemplate/search/cust_pkg.cgi
+++ b/httemplate/search/cust_pkg.cgi
@@ -20,6 +20,7 @@
                                      emt('Susp. delay'),
                                      emt('Expire'),
                                      emt('Contract end'),
+                                     emt('Changed'),
                                      emt('Cancel'),
                                      emt('Reason'),
                                      FS::UI::Web::cust_header(
@@ -45,7 +46,7 @@
                     sub { FS::part_pkg::freq_pretty(shift); },
 
                     ( map { time_or_blank($_) }
-          qw( setup last_bill bill adjourn susp dundate expire contract_end cancel ) ),
+          qw( setup last_bill bill adjourn susp dundate expire contract_end change_date cancel ) ),
 
                     sub { my $self = shift;
                           my $return = '';
@@ -94,13 +95,14 @@
                     '',
                     '',
                     '',
+                    '',
                     FS::UI::Web::cust_colors(),
                     '',
                   ],
-                  'style' => [ '', '', '', '', 'b', '', '', '', '', '', '', '', '', '', '', '', '', '',
+                  'style' => [ '', '', '', '', 'b', '', '', '', '', '', '', '', '', '', '', '', '', '', '',
                                FS::UI::Web::cust_styles() ],
                   'size'  => [ '', '', '', '', '-1' ],
-                  'align' => 'rrlccrrlrrrrrrrrrl'. FS::UI::Web::cust_aligns(). 'r',
+                  'align' => 'rrlccrrlrrrrrrrrrrl'. FS::UI::Web::cust_aligns(). 'r',
                   'links' => [
                     $link,
                     $link,
@@ -117,6 +119,7 @@
                     '',
                     '',
                     '',
+                    '', # link to changed-from package?
                     '',
                     '',
                     '',
@@ -182,7 +185,7 @@ my %disable = (
   ''                => {},
 );
 
-foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end cancel active )) {
+foreach my $field (qw( setup last_bill bill adjourn susp expire contract_end change_date cancel active )) {
 
   my($beginning, $ending) = FS::UI::Web::parse_beginning_ending($cgi, $field);
 
diff --git a/httemplate/search/report_cust_pkg.html b/httemplate/search/report_cust_pkg.html
index 3da59c2..e47bbb1 100755
--- a/httemplate/search/report_cust_pkg.html
+++ b/httemplate/search/report_cust_pkg.html
@@ -88,23 +88,35 @@
     %>
 
 %   }
-
+    <TR>
+      <TD COLSPAN=2>
+        <TABLE>
+          <TR>
+            <TD></TD>
+            <TD>From date <i>(m/d/y)</i></TD>
+            <TD>To date <i>(m/d/y)</i></TD>
+          </TR>
+%   my $noinit = 0;
 %   foreach my $field (@date_fields) {
 
-      <TR>
-        <TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
-        <TD>
-          <TABLE>
-            <% include( '/elements/tr-input-beginning_ending.html',
-                          prefix   => $field,
-                          layout   => 'horiz',
-                      )
-            %>
-          </TABLE>
-        </TD>
-      </TR>
-
-%   }
+          <TR>
+            <TD ALIGN="right" VALIGN="center"><% $label{$field} %></TD>
+%     foreach (qw(beginning ending)) {
+            <TD>
+              <& /elements/input-date-field.html, {
+                'name'    => $field.'_'.$_,
+                'value'   => '',
+                'noinit'  => $noinit,
+                'format'  => '%m/%d/%Y',
+              } &>
+            </TD>
+%     $noinit = 1;
+%     }
+          </TR>
+%   } #foreach $field
+        </TABLE>
+      </TD>
+    </TR>
     
     <SCRIPT TYPE="text/javascript">
   
@@ -186,6 +198,7 @@ tie my %label, 'Tie::IxHash',
   'dundate'      => 'Suspension delayed until',
   'expire'       => 'Expires',
   'contract_end' => 'Contract ends',
+  'change_date'  => 'Changed from other package',
   'cancel'       => 'Cancelled',
 ;
 my @date_fields = keys %label;

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

Summary of changes:
 FS/FS/cust_pkg.pm                      |    2 +-
 httemplate/search/cust_pkg.cgi         |   11 +++++---
 httemplate/search/report_cust_pkg.html |   43 ++++++++++++++++++++-----------
 3 files changed, 36 insertions(+), 20 deletions(-)




More information about the freeside-commits mailing list