X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=637c015caa6994f9636f530a82b03ed51a5cf15f;hb=ac0ecc2daa4e132d6a1fb3fb759cb757d376f84e;hp=782556b73f061602ead5461c1f63aea6bddec30d;hpb=c16ef0145a0049c3f20377e2c5076087e999cde0;p=freeside.git diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index 782556b73..637c015ca 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -1,5 +1,6 @@ <& /elements/header.html, { 'title' => $title, + 'title_noescape' => $title_noescape, 'head' => $head, 'nobr' => 1, } @@ -40,6 +41,11 @@ function areyousure(href, message) { } + +% ### +% # Basics +% ### + % if ( $view eq 'basics' || $view eq 'jumbo' ) { % if ( $curuser->access_right('Edit customer') ) { @@ -55,8 +61,8 @@ function areyousure(href, message) { 'actionlabel' => emt('Confirm Suspension'), 'color' => '#ff9900', 'cust_main' => $cust_main, - 'width' => 616, #make room for reasons - 'height' => 366, + 'width' => 768, #make room for reasons + 'height' => 450, } &> | % } @@ -86,7 +92,7 @@ function areyousure(href, message) { 'color' => '#ff0000', 'cust_main' => $cust_main, 'width' => 616, #make room for reasons - 'height' => 366, + 'height' => 410, } &> | % } @@ -165,13 +171,13 @@ function areyousure(href, message) { <& cust_main/contacts.html, $cust_main &> +
+ <& cust_main/misc.html, $cust_main &> - <& cust_main/misc.html, $cust_main &> -% if ( $conf->config('payby-default') ne 'HIDE' ) { -
<& cust_main/billing.html, $cust_main &> -% } - + <& cust_main/billing.html, $cust_main &> +
+ <& cust_main/cust_payby.html, $cust_main &> @@ -183,6 +189,11 @@ function areyousure(href, message) { % } + +% ### +% # Notes +% ### + % if ( $view eq 'notes' || $view eq 'jumbo' ) { <& cust_main/notes.html, 'cust_main' => $cust_main &> @@ -195,6 +206,11 @@ function areyousure(href, message) {
+ +% ### +% # Tickets +% ### + % if ( $view eq 'tickets' || $view eq 'jumbo' ) { % if ( $conf->config('ticket_system') ) { @@ -204,6 +220,10 @@ function areyousure(href, message) { % } +% ### +% # Appointments +% ### + % if ( $view eq 'appointments' || $view eq 'jumbo' ) { % if ( $conf->config('ticket_system') @@ -214,6 +234,28 @@ function areyousure(href, message) { % } + +% ### +% # Quotations +% ### + +% if ( $view eq 'jumbo' && $curuser->access_right('Generate quotation') ) { + <% mt('Quotations') |h %>
+% } + +% if ( $view eq 'quotations' || $view eq 'jumbo' ) { + +% if ( $curuser->access_right('Generate quotation') ) { + <& cust_main/quotations.html, $cust_main &> +% } + +% } + + +% ### +% # Packages +% ### + % if ( $view eq 'jumbo' ) { #XXX enable me && $curuser->access_right('View customer packages') { <% mt('Packages') |h %>
@@ -227,6 +269,11 @@ function areyousure(href, message) { % } + +% ### +% # Payment History +% ### + % if ( $view eq 'jumbo' ) {

<% mt('Payment History') |h %> @@ -235,12 +282,15 @@ function areyousure(href, message) { % if ( $view eq 'payment_history' || $view eq 'jumbo' ) { -% if ( $conf->config('payby-default') ne 'HIDE' ) { - <& cust_main/payment_history.html, $cust_main &> -% } +<& cust_main/payment_history.html, $cust_main &> % } + +% ### +% # Change History +% ### + % if ( $view eq 'change_history' ) { # || $view eq 'jumbo' <& cust_main/change_history.html, $cust_main &> % } @@ -284,10 +334,20 @@ my $cust_main = qsearchs( { }); die "Customer not found!" unless $cust_main; -my $title = $cust_main->name; -$title = '('. $cust_main->display_custnum. ") $title" - if $conf->exists('cust_main-title-display_custnum'); -$title = mt("Customer:")." ".$title; +my $title = encode_entities($cust_main->name); +$title = '#'. $cust_main->display_custnum. " $title"; +# if $conf->exists('cust_main-title-display_custnum'); +$title = mt("Customer")." ".$title; + +my @agentnums = $curuser->agentnums; +if (scalar(@agentnums) > 1 ) { + $title = encode_entities($cust_main->agent->agent). " $title"; +} + +my $status = $cust_main->status_label; +$status .= ' (Cancelled)' if $cust_main->is_status_delay_cancel; +my $title_noescape = $title. ' ('. $status. ')'; +$title .= " ($status)"; #false laziness w/pref/pref.html and Conf.pm (cust_main-default_view) tie my %views, 'Tie::IxHash', @@ -299,9 +359,9 @@ if ( $conf->config('ticket_system') ) { $views{emt('Appointments')} = 'appointments' if $curuser->access_right('View appointments'); } +$views{emt('Quotations')} = 'quotations'; $views{emt('Packages')} = 'packages'; -$views{emt('Payment History')} = 'payment_history' - unless $conf->config('payby-default' eq 'HIDE'); +$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'