Merge branch 'master' of git.freeside.biz:/home/git/freeside
authorIvan Kohler <ivan@freeside.biz>
Mon, 9 Jul 2012 05:45:58 +0000 (22:45 -0700)
committerIvan Kohler <ivan@freeside.biz>
Mon, 9 Jul 2012 05:45:58 +0000 (22:45 -0700)
Conflicts:
httemplate/misc/process/cancel_pkg.html

1  2 
FS/FS/cust_main/Billing.pm
FS/FS/cust_main/Packages.pm
FS/FS/cust_pkg.pm
FS/FS/domain_record.pm
bin/23commit
fs_selfservice/FS-SelfService/cgi/myaccount.html
fs_selfservice/FS-SelfService/cgi/provision_list.html
httemplate/edit/radius_group.html
httemplate/misc/cancel_pkg.html
httemplate/misc/process/cancel_pkg.html
httemplate/view/cust_main/packages/status.html

Simple merge
Simple merge
Simple merge
@@@ -3,8 -3,8 +3,7 @@@ package FS::domain_record
  use strict;
  use vars qw( @ISA $noserial_hack $DEBUG $me );
  use FS::Conf;
--#use FS::Record qw( qsearch qsearchs );
--use FS::Record qw( qsearchs dbh );
++use FS::Record qw( qsearchs dbh ); #qsearch
  use FS::svc_domain;
  use FS::svc_www;
  
diff --cc bin/23commit
@@@ -19,7 -19,7 +19,7 @@@ die "no files!" unless @ARGV
  #print <<END;
  system join('',
    "( cd /home/$USER/freeside2.3/$prefix; git pull ) && ",
--  "git diff -u @ARGV | ( cd /home/$USER/freeside2.3/$prefix; patch  ) ",
++  "git diff -u @ARGV | ( cd /home/$USER/freeside2.3/$prefix; patch -p1 ) ",
    " && ( ( git pull && git commit  -m $desc @ARGV && git push ); ",
    "( cd /home/$USER/freeside2.3/$prefix; git commit -m $desc @ARGV && git push ) )"
  );
@@@ -2,9 -2,11 +2,11 @@@
  <%= include('header', 'My Account') %>
  
  Hello <%= $name %>!<BR><BR>
- <%= $small_custview %>
+ <%= include('small_custview') %>
  <BR>
 -<%= if ( $access_pkgnum ) {
 +<%= unless ( $access_pkgnum ) {
        $OUT .= qq!Balance: <B>\$$balance</B><BR><BR>!;
      }
      '';
@@@ -10,7 -10,7 +10,6 @@@ foreach my $pkg 
           } @cust_pkg
      ) {
    my $susp = $pkg->{'susp'} || '';
--  warn $pkg->{'pkg'}. ' '.$susp."\n";
    my @pkg_actions = ( [ 'customer_change_pkg' => 'change' ] );
    push @pkg_actions, [ 'process_suspend_pkg' => 'suspend' ] 
      if $self_suspend_reason and !$susp;
@@@ -8,6 -8,6 +8,7 @@@
      'attrnum'   => 'Attribute',
      'priority'  => 'Priority',
    },
++  'viewall_dir' => 'browse',
    'menubar' => \@menubar,
    'edit_callback' => $edit_callback,
    'error_callback' => $edit_callback,
  %   $date_init = 1;
  % }
  
- % unless ( $method eq 'resume' ) { #the only one that doesn't need a reason
- <& /elements/tr-select-reason.html,
-      'field'          => 'reasonnum',
-      'reason_class'   => $class,
-      'curr_value'     => $reasonnum,
-      'control_button' => "document.getElementById('confirm_cancel_pkg_button')",
- &>
+ % if ($method eq 'uncancel' ) {
+ %
+ % #XXX customer also requested setup
+ % # setup: what usefulness is changing or blanking this?  re-charge setup fee?
+ % #        an option that says that would be better if that's what we want to do
+ % # last_bill: isn't this informational?  what good would editing it do?
+ % #            something about invoice display?
+   <& /elements/tr-input-date-field.html, {
+       'name'    => 'last_bill',
+       'value'   => ( $cgi->param('last_bill') || $cust_pkg->get('last_bill') ),
+       'label'   => mt("Last bill date"),
+       'format'  => $date_format,
+   } &>
+   <& /elements/tr-input-date-field.html, {
+       'name'    => 'bill',
+       'value'   => ( $cgi->param('bill') || $cust_pkg->get('bill') ),
+       'label'   => mt("Next bill date"),
+       'format'  => $date_format,
+   } &>
+   <& /elements/tr-checkbox.html,
+        'label'  => mt("Uncancel even if a service can't be re-provisioned"),
+        'field'  => 'svc_not_fatal',
+        'value'  => 'Y',
+   &>
+ %   $date_init = 1;
+ % }
+ % unless ( $method eq 'resume' || $method eq 'uncancel' ) {
+   <& /elements/tr-select-reason.html,
+        field          => 'reasonnum',
+        reason_class   => $class,
+        curr_value     => $reasonnum,
+        control_button => "document.getElementById('confirm_cancel_pkg_button')",
+   &>
  % }
  
 -% if ( ( $method eq 'adjourn' or $method eq 'suspend' ) and 
 +% if ( $method eq 'adjourn' || $method eq 'suspend' ) {
 +    <TR><TD COLSPAN=2>
 +%   if ( $part_pkg->option('suspend_bill', 1) ) {
 +      <& /elements/checkbox.html, name=>'no_suspend_bill', value=>'Y' &>
 +      Disable recurring billing while suspended
 +%   } else {
 +      <& /elements/checkbox.html, name=>'suspend_bill', value=>'Y' &>
 +      Continue recurring billing while suspended
 +%   }
 +    </TD></TR>
 +% }
 +
 +% if ( ( $method eq 'adjourn' || $method eq 'suspend' ) and 
  %      $curuser->access_right('Unsuspend customer package') )  { #later?
  %   my $resume_date = $cgi->param('error') 
  %                     ? str2time($cgi->param('resume_date'))
@@@ -79,7 -85,9 +90,10 @@@ my $svc_fatal = ( $cgi->param('svc_not_
  my $error = $cust_pkg->$method( 'reason'      => $reasonnum,
                                  'date'        => $date,
                                  'resume_date' => $resume_date,
+                                 'last_bill'   => $last_bill,
+                                 'bill'        => $bill,
+                                 'svc_fatal'   => $svc_fatal,
 +                                'options'     => $options,
                                );
  
  if ($error) {
        <% pkg_status_row($cust_pkg, emt('Setup'), 'setup', %opt ) %>
  %   } 
  
+     <% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %>
      <% pkg_status_row_changed( $cust_pkg, %opt, 'colspan'=>$colspan ) %>
      <% pkg_status_row_if( $cust_pkg, $last_bill_or_renewed, 'last_bill', %opt, curuser=>$curuser ) %>
 -%   if ( $part_pkg->option('suspend_bill', 1) ) {
 +%   if ( $cust_pkg->option('suspend_bill', 1)
 +%        || ( $part_pkg->option('suspend_bill', 1)
 +%               && ! $cust_pkg->option('no_suspend_bill',1)
 +%           )
 +%      )
 +%   {
        <% pkg_status_row_if( $cust_pkg, emt('Next bill'), 'bill', %opt, curuser=>$curuser ) %>
  %   }
      <% pkg_status_row_if( $cust_pkg, emt('Will resume'), 'resume', %opt, curuser=>$curuser ) %>