summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
authorivan <ivan>2007-09-19 00:12:08 +0000
committerivan <ivan>2007-09-19 00:12:08 +0000
commitb3adce5416b0342d664a84d75fe51d272f841d8e (patch)
treefe71271a9ca762f09b822cd22968eb06a8ff0c7e /FS
parent6645a15148cd06e3b7a25276e8d2ace5725d8783 (diff)
fix at least one small problem with reprint/email/fax functionality: now should understand the "most recent invoice per customer" and invoice # min/max options
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/cust_bill.pm7
1 files changed, 6 insertions, 1 deletions
diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index d31276d35..ace853356 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -2600,6 +2600,12 @@ sub re_X {
if ( $param{'end'} =~ /^(\d+)$/ ) {
push @where, "cust_bill._date < $1";
}
+ if ( $param{'invnum_min'} =~ /^(\d+)$/ ) {
+ push @where, "cust_bill.invnum >= $1";
+ }
+ if ( $param{'invnum_max'} =~ /^(\d+)$/ ) {
+ push @where, "cust_bill.invnum <= $1";
+ }
if ( $param{'agentnum'} =~ /^(\d+)$/ ) {
push @where, "cust_main.agentnum = $1";
}
@@ -2623,7 +2629,6 @@ sub re_X {
if ( $param{'newest_percust'} ) {
$distinct = 'DISTINCT ON ( cust_bill.custnum )';
$orderby = 'ORDER BY cust_bill.custnum ASC, cust_bill._date DESC';
- #$count_query = "SELECT COUNT(DISTINCT cust_bill.custnum), 'N/A', 'N/A'";
}
my @cust_bill = qsearch( 'cust_bill',