X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill.pm;h=c30ee144be4236a57b6830b9f4c619e311f1de4b;hb=ea4a250ff6d0ed40f10fb66c64a095e83ee7bd5d;hp=cbb3107d7f45b95e4caf314fc6a7fbfe38934857;hpb=d114bf1bb1b929a166b7ed98be4f94369d32a535;p=freeside.git diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm index cbb3107d7..c30ee144b 100644 --- a/FS/FS/cust_bill.pm +++ b/FS/FS/cust_bill.pm @@ -2486,7 +2486,7 @@ sub print_generic { my $unsquelched = $params{unsquelch_cdr} || $cust_main->squelch_cdr ne 'Y'; my $multisection = $conf->exists('invoice_sections', $cust_main->agentnum); my $late_sections = []; - my $extra_sections = (); + my $extra_sections = []; my $extra_lines = (); if ( $multisection ) { ($extra_sections, $extra_lines) = @@ -3881,7 +3881,7 @@ sub _items_cust_bill_pkg { foreach my $cust_bill_pkg ( @$cust_bill_pkg ) { - foreach ( $s, $r, ($opt{skip_usage} ? $u : () ) ) { + foreach ( $s, $r, ($opt{skip_usage} ? () : $u ) ) { if ( $_ && !$cust_bill_pkg->hidden ) { $_->{amount} = sprintf( "%.2f", $_->{amount} ), $_->{amount} =~ s/^\-0\.00$/0.00/; @@ -4053,7 +4053,7 @@ sub _items_cust_bill_pkg { } - foreach ( $s, $r, ($opt{skip_usage} ? $u : () ) ) { + foreach ( $s, $r, ($opt{skip_usage} ? () : $u ) ) { if ( $_ ) { $_->{amount} = sprintf( "%.2f", $_->{amount} ), $_->{amount} =~ s/^\-0\.00$/0.00/; @@ -4223,7 +4223,7 @@ sub re_X { my $distinct = ''; my $orderby = 'ORDER BY cust_bill._date'; - my $extra_sql = ' WHERE '. FS::cust_bill->search_sql(\%param); + my $extra_sql = ' WHERE '. FS::cust_bill->search_sql_where(\%param); my $addl_from = 'LEFT JOIN cust_main USING ( custnum )'; @@ -4313,7 +4313,7 @@ sub credited_sql { WHERE cust_bill.invnum = cust_credit_bill.invnum )"; } -=item search_sql HASHREF +=item search_sql_where HASHREF Class method which returns an SQL WHERE fragment to search for parameters specified in HASHREF. Valid parameters are @@ -4356,10 +4356,10 @@ Note: validates all passed-in data; i.e. safe to use with unchecked CGI params. =cut -sub search_sql { +sub search_sql_where { my($class, $param) = @_; if ( $DEBUG ) { - warn "$me search_sql called with params: \n". + warn "$me search_sql_where called with params: \n". join("\n", map { " $_: ". $param->{$_} } keys %$param ). "\n"; }