X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_bill.html;h=6f440db7ed7eb144ad648444b2cb1bc7eb3c6852;hb=faa9e03809537153822776b375d3add5de7c7800;hp=b7eac57ea7bc3e712c027d4fcac76918b1008e4a;hpb=5ca43cb4aea0d1bd7c8c2b59bde7303e344380bb;p=freeside.git diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html index b7eac57ea..6f440db7e 100755 --- a/httemplate/search/cust_bill.html +++ b/httemplate/search/cust_bill.html @@ -124,8 +124,6 @@ if ( $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/ ) { $orderby = "ORDER BY cust_bill.$field"; } - $search{'newest_percust'} = 1 if $cgi->param('newest_percust'); - if ( $cgi->param('newest_percust') ) { $search{'newest_percust'} = 1; $count_query = "SELECT COUNT(DISTINCT cust_bill.custnum), 'N/A', 'N/A'"; @@ -161,7 +159,8 @@ if ( $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/ ) { FS::cust_bill->owed_sql. ' AS owed', FS::cust_bill->net_sql. ' AS net', ), - 'extra_sql' => "$extra_sql $orderby" + 'extra_sql' => $extra_sql, + 'order_by' => $orderby, }; } @@ -189,7 +188,7 @@ my $html_init = join("\n", map { qq!
!, ( map qq!!, keys %search ), qq!
! -} qw( print_ email_ fax_ ) ). +} qw( print_ email_ fax_ ftp_ spool_ ) ). ''; -my $menubar = [ - 'Main menu' => $p, - 'Print these invoices' => - "javascript:confirm_print_process()", - 'Email these invoices' => - "javascript:confirm_email_process()", - ]; - -push @$menubar, 'Fax these invoices' => - "javascript:confirm_fax_process()" - if $conf->exists('hylafax'); +my $menubar = []; + +if ( $FS::CurrentUser::CurrentUser->access_right('Resend invoices') ) { + + push @$menubar, 'Print these invoices' => + "javascript:confirm_print_process()", + 'Email these invoices' => + "javascript:confirm_email_process()"; + + push @$menubar, 'Fax these invoices' => + "javascript:confirm_fax_process()" + if $conf->exists('hylafax'); + + push @$menubar, 'FTP these invoices' => + "javascript:confirm_ftp_process()" + if $conf->exists('cust_bill-ftpformat'); + + push @$menubar, 'Spool these invoices' => + "javascript:confirm_spool_process()" + if $conf->exists('cust_bill-spoolformat'); + +}