X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main%2Fpackages%2Fstatus.html;h=e9017745bf7f87b40d9c6d54d3f34b8629795ab3;hp=e982220be068ce48794ddec15633b41dff01c87c;hb=a6fe07e49e3fc12169e801b1ed6874c3a5bd8500;hpb=806c6d4a749b1855e5aff96c45d60fb8b83ef364 diff --git a/httemplate/view/cust_main/packages/status.html b/httemplate/view/cust_main/packages/status.html index e982220be..e9017745b 100644 --- a/httemplate/view/cust_main/packages/status.html +++ b/httemplate/view/cust_main/packages/status.html @@ -32,7 +32,20 @@ % } % -% } else { +% if ( $part_pkg->freq ) { #? + + + > + +% if ( $curuser->access_right('Un-cancel customer package') ) { + ( <% pkg_uncancel_link($cust_pkg) %> ) +% } + + + +% } +% +% } else { % % if ( $cust_pkg->get('susp') ) { #status: suspended % my $cpr = $cust_pkg->last_cust_pkg_reason('susp'); @@ -56,11 +69,19 @@ <% 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 ) %> <% pkg_status_row_if( $cust_pkg, emt('Expires'), 'expire', %opt, curuser=>$curuser ) %> <% pkg_status_row_if( $cust_pkg, emt('Contract ends'), 'contract_end', %opt ) %> @@ -69,7 +90,8 @@ % if ( $curuser->access_right('Unsuspend customer package') ) { ( <% pkg_unsuspend_link($cust_pkg) %> ) -% } + ( <% pkg_resume_link($cust_pkg) %> ) +% } % if ( $curuser->access_right('Cancel customer package immediately') ) { ( <% pkg_cancel_link($cust_pkg) %> ) % } @@ -97,6 +119,8 @@ ) %> + <% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %> + > @@ -116,6 +140,7 @@ <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %> <% pkg_status_row_if($cust_pkg, emt('Start billing'), 'start_date', %opt) %> + <% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %> % } % @@ -131,6 +156,8 @@ <% pkg_status_row_discount( $cust_pkg, %opt, 'colspan'=>$colspan ) %> + <% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %> + % } else { % % my $num_cust_svc = $cust_pkg->num_cust_svc; @@ -164,6 +191,8 @@ <% pkg_status_row($cust_pkg, emt('Setup'), 'setup', %opt) %> + <% pkg_status_row_if($cust_pkg, emt('Un-cancelled'), 'uncancel', %opt ) %> + % } % % } @@ -179,6 +208,7 @@ <% pkg_status_row_if($cust_pkg, emt('Will automatically suspend by'), 'autosuspend', %opt) %> <% pkg_status_row_if($cust_pkg, emt('Automatic suspension delayed until'), 'dundate', %opt) %> <% pkg_status_row_if( $cust_pkg, emt('Will suspend on'), 'adjourn', %opt, curuser=>$curuser ) %> + <% pkg_status_row_if( $cust_pkg, emt('Will resume on'), 'resume', %opt, curuser=>$curuser ) %> <% pkg_status_row_if( $cust_pkg, emt('Expires'), 'expire', %opt, curuser=>$curuser ) %> <% pkg_status_row_if( $cust_pkg, emt('Contract ends'), 'contract_end', %opt ) %> @@ -241,7 +271,7 @@ unless ( $part_pkg->is_prepaid ) { sub myfreq { my $part_pkg = shift; my $freq = $part_pkg->freq_pretty; - $freq =~ s/ / /g; + #$freq =~ s/ / /g; $freq; } @@ -440,7 +470,17 @@ sub pkg_delay_link { ) } -sub pkg_unsuspend_link { pkg_link('misc/unsusp_pkg', emt('Unsuspend'), @_ ); } +sub pkg_resume_link { + include( '/elements/popup_link-cust_pkg.html', + 'action' => $p. 'misc/cancel_pkg.html?method=resume', + 'label' => emt('Unsuspend later'), + 'actionlabel' => emt('Resume'), + 'color' => '#00CC00', + 'cust_pkg' => shift, + ) +} + +sub pkg_unsuspend_link { pkg_link('misc/unsusp_pkg', emt('Unsuspend now'), @_ ); } sub pkg_unadjourn_link { pkg_link('misc/unadjourn_pkg', emt('Abort'), @_ ); } sub pkg_unexpire_link { pkg_link('misc/unexpire_pkg', emt('Abort'), @_ ); } @@ -454,6 +494,16 @@ sub pkg_cancel_link { ) } +sub pkg_uncancel_link { + include( '/elements/popup_link-cust_pkg.html', + 'action' => $p. 'misc/cancel_pkg.html?method=uncancel', + 'label' => emt('Un-cancel'), + 'actionlabel' => emt('Un-cancel'), + #'color' => #? + 'cust_pkg' => shift, + ) +} + sub pkg_expire_link { include( '/elements/popup_link-cust_pkg.html', 'action' => $p. 'misc/cancel_pkg.html?method=expire',