X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fview%2Fcust_main.cgi;h=287658f70b66ef61f8e7e06215ee7e8bc0d54ba0;hb=d793ab5b5050e29654183b6d0a645f934bb87df0;hp=cdea49dee2d7a9b01325f36f784f5f7c3e001d73;hpb=b8d345a845640a9744a00c53eb3e61b02dd2f0e4;p=freeside.git diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi index cdea49dee..287658f70 100755 --- a/httemplate/view/cust_main.cgi +++ b/httemplate/view/cust_main.cgi @@ -38,8 +38,21 @@ 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') ) { @@ -55,8 +68,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 +99,7 @@ function areyousure(href, message) { 'color' => '#ff0000', 'cust_main' => $cust_main, 'width' => 616, #make room for reasons - 'height' => 366, + 'height' => 410, } &> | % } @@ -189,83 +202,28 @@ 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) { +% ### +% # Notes +% ### -% 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 ( $view eq 'notes' || $view eq 'jumbo' ) { -% 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' ) {
% } +
+ +% ### +% # Tickets +% ### + % if ( $view eq 'tickets' || $view eq 'jumbo' ) { % if ( $conf->config('ticket_system') ) { @@ -275,6 +233,10 @@ function areyousure(href, message) { % } +% ### +% # Appointments +% ### + % if ( $view eq 'appointments' || $view eq 'jumbo' ) { % if ( $conf->config('ticket_system') @@ -285,6 +247,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 %>
@@ -298,6 +282,11 @@ function areyousure(href, message) { % } + +% ### +% # Payment History +% ### + % if ( $view eq 'jumbo' ) {

<% mt('Payment History') |h %> @@ -312,6 +301,11 @@ function areyousure(href, message) { % } + +% ### +% # Change History +% ### + % if ( $view eq 'change_history' ) { # || $view eq 'jumbo' <& cust_main/change_history.html, $cust_main &> % } @@ -345,6 +339,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( { @@ -369,6 +364,7 @@ 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');