summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2009-11-30 00:38:12 +0000
committerivan <ivan>2009-11-30 00:38:12 +0000
commit23a8839dda76d0e8491152736122b81dc454bab8 (patch)
treeeafd76fc26828d01b89ba0c137cb608ca2848c3b /FS
parent6e300508ea4094a403302db30afdf69373179e79 (diff)
fix bulk sending of customer notices, RT#6778
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_main.pm19
1 files changed, 13 insertions, 6 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm
index 5728cd3a1..372aeb033 100644
--- a/FS/FS/cust_main.pm
+++ b/FS/FS/cust_main.pm
@@ -2479,7 +2479,7 @@ plans support this feature (they tend to charge 0).
=item invoice_terms
-Options terms to be printed on this invoice. Otherwise, customer-specific
+Optional terms to be printed on this invoice. Otherwise, customer-specific
terms or the default terms are used.
=back
@@ -8305,13 +8305,20 @@ sub search_sql {
# amounts
##
- #my $balance_sql = $class->balance_sql();
- my $balance_sql = FS::cust_main->balance_sql();
+ if ( $params->{'current_balance'} ) {
- my @current_balance = @{ $params->{'current_balance'} };
+ #my $balance_sql = $class->balance_sql();
+ my $balance_sql = FS::cust_main->balance_sql();
- push @where, map { s/current_balance/$balance_sql/; $_ }
- @current_balance;
+ my @current_balance =
+ ref( $params->{'current_balance'} )
+ ? @{ $params->{'current_balance'} }
+ : ( $params->{'current_balance'} );
+
+ push @where, map { s/current_balance/$balance_sql/; $_ }
+ @current_balance;
+
+ }
##
# custbatch