X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=1d002c099b3ec4a374829fc5cab4cc38bde644a9;hb=39b842eecba98e7d86b45ea50548a4c5546090d8;hp=dcadf991219e5c4c63400f8761ea157ce20c1e62;hpb=4b80fe118da16b21603fcdbd090bc03d8fbf0578;p=freeside.git
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index dcadf9912..1d002c099 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -46,10 +46,39 @@ function areyousure(href, message) {
<% mt('Edit this customer') |h %> |
% }
-% if ( $curuser->access_right('Cancel customer')
-% && $cust_main->ncancelled_pkgs
+% if ( $curuser->access_right('Suspend customer')
+% && scalar($cust_main->unsuspended_pkgs)
% ) {
+ <& /elements/popup_link-cust_main.html,
+ { 'action' => $p. 'misc/suspend_cust.html',
+ 'label' => emt('Suspend this customer'),
+ 'actionlabel' => emt('Confirm Suspension'),
+ 'color' => '#ff9900',
+ 'cust_main' => $cust_main,
+ 'width' => 616, #make room for reasons
+ 'height' => 366,
+ }
+ &> |
+% }
+% if ( $curuser->access_right('Unsuspend customer')
+% && scalar($cust_main->suspended_pkgs)
+% ) {
+ <& /elements/popup_link-cust_main.html,
+ { 'action' => $p. 'misc/unsuspend_cust.html',
+ 'label' => emt('Unsuspend this customer'),
+ 'actionlabel' => emt('Confirm Unsuspension'),
+ #'color' => '#ff9900',
+ 'cust_main' => $cust_main,
+ #'width' => 616, #make room for reasons
+ #'height' => 366,
+ }
+ &> |
+% }
+
+% if ( $curuser->access_right('Cancel customer')
+% && scalar($cust_main->ncancelled_pkgs)
+% ) {
<& /elements/popup_link-cust_main.html,
{ 'action' => $p. 'misc/cancel_cust.html',
'label' => emt('Cancel this customer'),
@@ -60,11 +89,9 @@ function areyousure(href, message) {
'height' => 366,
}
&> |
-
% }
% if ( $curuser->access_right('Merge customer') ) {
-
<& /elements/popup_link-cust_main.html,
{ 'action' => $p. 'misc/merge_cust.html',
'label' => emt('Merge this customer'),
@@ -74,7 +101,6 @@ function areyousure(href, message) {
'height' => 192,
}
&> |
-
% }
% if ( $conf->exists('deletecustomers')
@@ -122,7 +148,6 @@ function areyousure(href, message) {
% if ( $br ) {
% }
-%doc>
%my $signupurl = $conf->config('signupurl');
%if ( $signupurl ) {
@@ -272,7 +297,13 @@ function areyousure(href, message) {
% }
% if ( $view eq 'custom' ) {
+% if ( $conf->config('cust_main-custom_link') ) {
<& cust_main/custom.html, $cust_main &>
+% } elsif ( $conf->config('cust_main-custom_content') ) {
+ <& cust_main/custom_content.html, $cust_main &>
+% #} else {
+% # warn "custom view without cust_main-custom_link or -custom_content?";
+% }
% }
@@ -321,7 +352,8 @@ $views{emt('Payment History')} = 'payment_history'
$views{emt('Change History')} = 'change_history'
if $curuser->access_right('View customer history');
$views{$conf->config('cust_main-custom_title') || emt('Custom')} = 'custom'
- if $conf->config('cust_main-custom_link');
+ if $conf->config('cust_main-custom_link')
+ || $conf->config('cust_main-custom_content');
$views{emt('Jumbo')} = 'jumbo';
my %viewname = reverse %views;