X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Fcust_bill.html;h=6f440db7ed7eb144ad648444b2cb1bc7eb3c6852;hb=217630ac6f2b1f48a84f468b300fd9dc8c414283;hp=fe2f6e5f8c89dc1412c3b757abfe70a605781d93;hpb=df52f854e367f6342e480c22cb6ec7b8244fd334;p=freeside.git diff --git a/httemplate/search/cust_bill.html b/httemplate/search/cust_bill.html index fe2f6e5f8..6f440db7e 100755 --- a/httemplate/search/cust_bill.html +++ b/httemplate/search/cust_bill.html @@ -144,7 +144,7 @@ if ( $cgi->param('invnum') =~ /^\s*(FS-)?(\d+)\s*$/ ) { '$%.2f outstanding balance', ]; } - $count_query .= " FROM cust_bill $join_cust_main WHERE $extra_sql"; + $count_query .= " FROM cust_bill $join_cust_main $extra_sql"; $sql_query = { 'table' => 'cust_bill', @@ -159,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, }; } @@ -187,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'); + +}