projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
df52f85
)
fix earlier drain bramage
author
ivan
<ivan>
Sat, 15 Dec 2007 01:45:22 +0000
(
01:45
+0000)
committer
ivan
<ivan>
Sat, 15 Dec 2007 01:45:22 +0000
(
01:45
+0000)
FS/FS/cust_bill.pm
patch
|
blob
|
history
httemplate/search/cust_bill.html
patch
|
blob
|
history
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
1f6f85b
..
c599488
100644
(file)
--- a/
FS/FS/cust_bill.pm
+++ b/
FS/FS/cust_bill.pm
@@
-2879,7
+2879,7
@@
sub search_sql {
#$orderby = 'ORDER BY cust_bill.custnum ASC, cust_bill._date DESC';
my @newest_where = map { my $x = $_;
#$orderby = 'ORDER BY cust_bill.custnum ASC, cust_bill._date DESC';
my @newest_where = map { my $x = $_;
- $x = s/\bcust_bill\./newest_cust_bill./g;
+ $x =
~
s/\bcust_bill\./newest_cust_bill./g;
$x;
}
grep ! /^cust_main./, @search;
$x;
}
grep ! /^cust_main./, @search;
@@
-2887,6
+2887,7
@@
sub search_sql {
? ' AND '. join(' AND ', @newest_where)
: '';
? ' AND '. join(' AND ', @newest_where)
: '';
+
push @search, "cust_bill._date = (
SELECT(MAX(newest_cust_bill._date)) FROM cust_bill AS newest_cust_bill
WHERE newest_cust_bill.custnum = cust_bill.custnum
push @search, "cust_bill._date = (
SELECT(MAX(newest_cust_bill._date)) FROM cust_bill AS newest_cust_bill
WHERE newest_cust_bill.custnum = cust_bill.custnum
diff --git
a/httemplate/search/cust_bill.html
b/httemplate/search/cust_bill.html
index
fe2f6e5
..
69384b8
100755
(executable)
--- 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',
];
}
'$%.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',
$sql_query = {
'table' => 'cust_bill',