X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=c6266ce34523484425e1c4966662c1a9531fb86d;hp=be0100fb3cf8d167a7cc45e62e5945b7fe8f3b75;hb=9fae251fc1e3069694ebaf4fae62bde844f45cff;hpb=1daf1a670d3cdfb307271fb7c7c98c83fb1fb464 diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index be0100fb3..c6266ce34 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -131,15 +131,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')); @@ -153,7 +158,6 @@ function areyousure(href, message) { % if ( $br ) {

% } - %my $signupurl = $conf->config('signupurl'); %if ( $signupurl ) { @@ -162,11 +166,6 @@ function areyousure(href, message) {

% } -%if ( $conf->exists('maestro-status_test') ) { - <% mt('Test maestro status') |h %> -

-% } - @@ -192,79 +191,14 @@ function areyousure(href, message) { % if ( $view eq 'notes' || $view eq 'jumbo' ) { -%if ( $cust_main->comments =~ /[^\s\n\r]/ ) { -
<% mt('Comments') |h %> -<% ntable("#cccccc") %> - - -
<% ntable("#cccccc",2) %> -
-
<% encode_entities($cust_main->comments) %>
-
-

-% } - -% my $notecount = scalar($cust_main->notes(0)); -% if ( ! $conf->exists('cust_main-disable_notes') || $notecount) { - -% unless ( $view eq 'notes' && $cust_main->comments !~ /[^\s\n\r]/ ) { -
-
<% mt('Notes') |h %>
-% } - -% if ( $curuser->access_right('Add customer note') && -% ! $conf->exists('cust_main-disable_notes') -% ) { - - <& /elements/popup_link-cust_main.html, - 'label' => emt('Add customer note'), - 'action' => $p. 'edit/cust_main_note.cgi', - 'actionlabel' => emt('Enter customer note'), - 'cust_main' => $cust_main, - 'width' => 616, - 'height' => 538, #575 - &> - -% } - -
- -<& cust_main/notes.html, 'custnum' => $cust_main->custnum &> - -% } -
- -% if(! $conf->config('disable_cust_attachment') -% and $curuser->access_right('Add attachment')) { -<& /elements/popup_link-cust_main.html, - 'label' => emt('Attach file'), - 'action' => $p.'edit/cust_main_attach.cgi', - 'actionlabel' => emt('Upload file'), - 'cust_main' => $cust_main, - 'width' => 480, - 'height' => 296, -&> -% } -% if( $curuser->access_right('View attachments') ) { -<& cust_main/attachments.html, 'custnum' => $cust_main->custnum &> -% if ($cgi->param('show_deleted')) { -">(<% mt('Show active attachments') |h %>) -% } -% elsif($curuser->access_right('View deleted attachments')) { -">(<% mt('Show deleted attachments') |h %>) -% } -% } -
+<& cust_main/notes.html, 'cust_main' => $cust_main &> % } % if ( $view eq 'jumbo' ) {
% } +
% if ( $view eq 'tickets' || $view eq 'jumbo' ) { @@ -276,6 +210,16 @@ function areyousure(href, message) { % } +% if ( $view eq 'appointments' || $view eq 'jumbo' ) { + +% if ( $conf->config('ticket_system') +% && $curuser->access_right('View appointments') ) { + <& cust_main/appointments.html, $cust_main &> +% } +

+ +% } + % if ( $view eq 'jumbo' ) { #XXX enable me && $curuser->access_right('View customer packages') { <% mt('Packages') |h %>
@@ -336,6 +280,7 @@ if ( $cgi->param('custnum') =~ /^(\d+)$/ ) { my($query) = $cgi->keywords; # needs parens with my, ->keywords returns array $query =~ /^(\d+)$/; $custnum = $1; + $cgi->param('custnum', $1); } my $cust_main = qsearchs( { @@ -352,12 +297,15 @@ $title = mt("Customer:")." ".$title; #false laziness w/pref/pref.html and Conf.pm (cust_main-default_view) tie my %views, 'Tie::IxHash', - emt('Basics') => 'basics', - emt('Notes') => 'notes', #notes and files? + emt('Basics') => 'basics', + emt('Notes') => 'notes', #notes and files? ; -$views{emt('Tickets')} = 'tickets' - if $conf->config('ticket_system'); -$views{emt('Packages')} = 'packages'; +if ( $conf->config('ticket_system') ) { + $views{emt('Tickets')} = 'tickets'; + $views{emt('Appointments')} = 'appointments' + if $curuser->access_right('View appointments'); +} +$views{emt('Packages')} = 'packages'; $views{emt('Payment History')} = 'payment_history' unless $conf->config('payby-default' eq 'HIDE'); $views{emt('Change History')} = 'change_history'