projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
4c10da7
)
fix bulk sending of customer notices, RT#6778
author
ivan
<ivan>
Mon, 30 Nov 2009 00:38:10 +0000
(
00:38
+0000)
committer
ivan
<ivan>
Mon, 30 Nov 2009 00:38:10 +0000
(
00:38
+0000)
FS/FS/cust_main.pm
patch
|
blob
|
history
httemplate/misc/email-customers.html
patch
|
blob
|
history
diff --git
a/FS/FS/cust_main.pm
b/FS/FS/cust_main.pm
index
2c01e18
..
4837730
100644
(file)
--- 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
=item invoice_terms
-Option
s
terms to be printed on this invoice. Otherwise, customer-specific
+Option
al
terms to be printed on this invoice. Otherwise, customer-specific
terms or the default terms are used.
=back
terms or the default terms are used.
=back
@@
-8431,13
+8431,20
@@
sub search_sql {
# amounts
##
# 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
##
# custbatch
diff --git
a/httemplate/misc/email-customers.html
b/httemplate/misc/email-customers.html
index
f644db9
..
46bf3b4
100644
(file)
--- a/
httemplate/misc/email-customers.html
+++ b/
httemplate/misc/email-customers.html
@@
-4,7
+4,7
@@
% foreach my $key ( keys %search ) {
% my @values = ref($search{$key}) ? @{$search{$key}} : ( $search{$key} );
% foreach my $value ( @values ) {
% foreach my $key ( keys %search ) {
% my @values = ref($search{$key}) ? @{$search{$key}} : ( $search{$key} );
% foreach my $value ( @values ) {
- <INPUT TYPE="hidden" NAME="<% $key
|h %>" VALUE="<% $value |h
%>">
+ <INPUT TYPE="hidden" NAME="<% $key
%>" VALUE="<% $value
%>">
% }
% }
% }
% }