X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_event.html;h=e8164c280975f1c1b7868c56703c662e11a5dc85;hb=443150b6184876c967adffa199c20f53d5b76075;hp=f9cce46ca996065a3a0a17a704fab05a6347780c;hpb=eb4ff7f73c5d4bdf74a3472448b5a195598ff4cd;p=freeside.git diff --git a/httemplate/search/cust_event.html b/httemplate/search/cust_event.html index f9cce46ca..e8164c280 100644 --- a/httemplate/search/cust_event.html +++ b/httemplate/search/cust_event.html @@ -124,7 +124,12 @@ my $trigger_link = sub { my $eventtable = $cust_event->eventtable; if ( $eventtable eq 'cust_pkg' ) { my $custnum = $cust_event->cust_main_custnum; - [ "${p}view/cust_main.cgi?$custnum#cust_pkg", 'tablenum' ]; + my $show = $FS::CurrentUser::CurrentUser->default_customer_view =~ /^(jumbo|packages)$/ + ? '' + : ';show=packages'; + my $pkgnum = $cust_event->tablenum; + my $frag = "cust_pkg$pkgnum"; #hack for IE ignoring real #fragment + [ "${p}view/cust_main.cgi?custnum=$custnum$show;fragment=$frag#cust_pkg", 'tablenum' ]; } else { [ "${p}view/$eventtable.cgi?", 'tablenum' ]; } @@ -151,7 +156,7 @@ my $title = $cgi->param('failed') my @search = (); if ( $cgi->param('agentnum') && $cgi->param('agentnum') =~ /^(\d+)$/ ) { - push @search, "agentnum = $1"; + push @search, "cust_main.agentnum = $1"; #my $agent = qsearchs('agent', { 'agentnum' => $1 } ); #die "unknown agentnum $1" unless $agent; } @@ -183,9 +188,7 @@ if ( $cgi->param('pkgnum') =~ /^(\d+)$/ ) { } #here is the agent virtualization -my $agent_sql = $curuser->agentnums_sql; -$agent_sql =~ s/agentnum/cust_main.agentnum/g; -push @search, $agent_sql; +push @search, $curuser->agentnums_sql( 'table' => 'cust_main' ); my $where = 'WHERE '. join(' AND ', @search ); @@ -261,16 +264,21 @@ function confirm_fax_process() { '; -my $menubar = [ - 'Re-print these events' => - "javascript:confirm_print_process()", - 'Re-email these events' => - "javascript:confirm_email_process()", - ]; +my $menubar = []; -push @$menubar, 'Re-fax these events' => - "javascript:confirm_fax_process()" - if $conf->exists('hylafax'); +if ( $curuser->access_right('Resend invoices') ) { + + push @$menubar, 'Re-print these events' => + "javascript:confirm_print_process()", + 'Re-email these events' => + "javascript:confirm_email_process()", + ; + + push @$menubar, 'Re-fax these events' => + "javascript:confirm_fax_process()" + if $conf->exists('hylafax'); + +} my $link_cust = sub { my $cust_event = shift;