From: Ivan Kohler Date: Mon, 9 Jul 2012 05:45:58 +0000 (-0700) Subject: Merge branch 'master' of git.freeside.biz:/home/git/freeside X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500 Merge branch 'master' of git.freeside.biz:/home/git/freeside Conflicts: httemplate/misc/process/cancel_pkg.html --- a6fe07e49e3fc12169e801b1ed6874c3a5bd8500 diff --cc FS/FS/domain_record.pm index 8d767d510,8d767d510..cd881ae08 --- a/FS/FS/domain_record.pm +++ b/FS/FS/domain_record.pm @@@ -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 index b7b0c1e57,b7b0c1e57..d64459cf0 --- a/bin/23commit +++ b/bin/23commit @@@ -19,7 -19,7 +19,7 @@@ die "no files!" unless @ARGV #print < Hello <%= $name %>!

- <%= $small_custview %> + + <%= include('small_custview') %> +
-<%= if ( $access_pkgnum ) { +<%= unless ( $access_pkgnum ) { $OUT .= qq!Balance: \$$balance

!; } ''; diff --cc fs_selfservice/FS-SelfService/cgi/provision_list.html index 22054e644,22054e644..2a3a8e909 --- a/fs_selfservice/FS-SelfService/cgi/provision_list.html +++ b/fs_selfservice/FS-SelfService/cgi/provision_list.html @@@ -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; diff --cc httemplate/edit/radius_group.html index 025561159,025561159..0c99b4c4c --- a/httemplate/edit/radius_group.html +++ b/httemplate/edit/radius_group.html @@@ -8,6 -8,6 +8,7 @@@ 'attrnum' => 'Attribute', 'priority' => 'Priority', }, ++ 'viewall_dir' => 'browse', 'menubar' => \@menubar, 'edit_callback' => $edit_callback, 'error_callback' => $edit_callback, diff --cc httemplate/misc/cancel_pkg.html index 42cc56dfe,348f0a6cb..f9a46a898 --- a/httemplate/misc/cancel_pkg.html +++ b/httemplate/misc/cancel_pkg.html @@@ -22,28 -22,47 +22,59 @@@ % $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' ) { + +% 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 +% } + +% } + +% 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')) diff --cc httemplate/misc/process/cancel_pkg.html index 4f8e11b7f,b2d7bfaa4..79e489c70 --- a/httemplate/misc/process/cancel_pkg.html +++ b/httemplate/misc/process/cancel_pkg.html @@@ -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) { diff --cc httemplate/view/cust_main/packages/status.html index 47ef1bcb7,4aec90efb..e9017745b --- a/httemplate/view/cust_main/packages/status.html +++ b/httemplate/view/cust_main/packages/status.html @@@ -56,14 -69,11 +69,16 @@@ <% 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 ) %>