diff options
author | ivan <ivan> | 2009-11-30 00:38:10 +0000 |
---|---|---|
committer | ivan <ivan> | 2009-11-30 00:38:10 +0000 |
commit | 500254407a38f459a2a8df720c07f28566985dfd (patch) | |
tree | f714abc5e98b28ccf0c1348dacea7ecaa1e68db0 /FS | |
parent | 4c10da752884dae782505abdda262a7c68ab77dd (diff) |
fix bulk sending of customer notices, RT#6778
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_main.pm | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 2c01e1824..483773086 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -2528,7 +2528,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 @@ -8431,13 +8431,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 |