X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=287658f70b66ef61f8e7e06215ee7e8bc0d54ba0;hb=d793ab5b5050e29654183b6d0a645f934bb87df0;hp=9ce55b0b9745320bcd381f96f8b7776d08389b96;hpb=2c1bad9f29492546788aa4ffa0baf8e1dc0fff58;p=freeside.git
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index 9ce55b0b9..287658f70 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -38,18 +38,60 @@ function areyousure(href, message) {
if (confirm(message) == true)
window.location.href = href;
}
+function areyousure_popup(message, action, actionlabel) {
+ if (confirm(message) == true) {
+<% include('/elements/popup_link_onclick.html',
+ 'js_action' => 'action',
+ 'js_actionlabel' => 'actionlabel',
+ ) %>
+ }
+}
+
+% ###
+% # Basics
+% ###
+
% if ( $view eq 'basics' || $view eq 'jumbo' ) {
% if ( $curuser->access_right('Edit customer') ) {
<% 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' => 768, #make room for reasons
+ 'height' => 450,
+ }
+ &> |
+% }
+
+% 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'),
@@ -57,24 +99,26 @@ function areyousure(href, message) {
'color' => '#ff0000',
'cust_main' => $cust_main,
'width' => 616, #make room for reasons
- 'height' => 366,
+ 'height' => 410,
}
&> |
-
% }
-% if ( $curuser->access_right('Merge customer') ) {
-
+% if ( $curuser->access_right('Merge customer')
+% and ( scalar($cust_main->ncancelled_pkgs)
+% || $conf->exists('deletecustomers')
+% )
+% )
+% {
<& /elements/popup_link-cust_main.html,
{ 'action' => $p. 'misc/merge_cust.html',
'label' => emt('Merge this customer'),
'actionlabel' => emt('Merge customer'),
'cust_main' => $cust_main,
- 'width' => 480,
- 'height' => 192,
+ 'width' => 569,
+ 'height' => 210,
}
&> |
-
% }
% if ( $conf->exists('deletecustomers')
@@ -100,15 +144,20 @@ function areyousure(href, message) {
%
% my $email_link = ($cust_main->invoicing_list_emailonly) &&
% include('/elements/email-link.html',
-% 'table' => 'cust_main',
-% 'search_hash' => { 'custnum' => $custnum },
-% 'label' => 'Email a notice to this customer',
+% 'table' => 'cust_main',
+% 'search_hash' => { 'custnum' => $custnum },
+% 'agent_virt_agentnum' => $cust_main->agentnum,
+% 'label' => 'Email a notice to this customer',
% );
% if ( $email_link and $br ) {
|
% }
<% $email_link || '' %>
+% if ( $curuser->access_right('Order customer package') && $conf->exists('cust_main-enable_order_package') ) {
+ | <& /elements/order_pkg_link.html, 'cust_main'=>$cust_main &>
+% }
+
% if ( $conf->config('cust_main-external_links') ) {
<% $br++ ? ' | ' : '' %>
% my @links = split(/\n/, $conf->config('cust_main-external_links'));
@@ -122,7 +171,6 @@ function areyousure(href, message) {
% if ( $br ) {
% }
-%doc>
%my $signupurl = $conf->config('signupurl');
%if ( $signupurl ) {
@@ -131,11 +179,6 @@ function areyousure(href, message) {
% }
-%if ( $conf->exists('maestro-status_test') ) {
- <% mt('Test maestro status') |h %>
-
-% }
-
<% ntable("#cccccc",2) %> - |
- <% encode_entities($cust_main->comments) %>- |
-