diff options
author | mark <mark> | 2010-06-11 21:17:48 +0000 |
---|---|---|
committer | mark <mark> | 2010-06-11 21:17:48 +0000 |
commit | 4e2b0b934d568e9b512bc45bf684bf5f23ae63b6 (patch) | |
tree | 1ce9d01a020c12019f3584fa663eb8f8e7b10efd /FS | |
parent | 8a89d5b9f6731673c53cb3edbf20d76c2c1c8c25 (diff) |
RT#7266: continue fixing aging reports
Diffstat (limited to 'FS')
-rw-r--r-- | FS/FS/cust_main.pm | 6 | ||||
-rw-r--r-- | FS/FS/cust_pay.pm | 2 | ||||
-rw-r--r-- | FS/FS/cust_refund.pm | 2 |
3 files changed, 6 insertions, 4 deletions
diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 46f32e5db..c2107125b 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -7486,9 +7486,11 @@ Available options are: =cut sub unapplied_payments_date_sql { - my( $class, $start, $end, ) = @_; + my( $class, $start, $end, %opt ) = @_; + + my $cutoff = $opt{'cutoff'}; - my $unapp_pay = FS::cust_pay->unapplied_sql; + my $unapp_pay = FS::cust_pay->unapplied_sql($cutoff); my $pay_where = $class->_money_table_where( 'cust_pay', $start, $end, 'unapplied_date'=>1 ); diff --git a/FS/FS/cust_pay.pm b/FS/FS/cust_pay.pm index ff8226c8d..261bb4fd0 100644 --- a/FS/FS/cust_pay.pm +++ b/FS/FS/cust_pay.pm @@ -659,7 +659,7 @@ Returns an SQL fragment to retreive the unapplied amount. =cut sub unapplied_sql { - my ($class, $start, $end) = shift; + my ($class, $start, $end) = @_; my $bill_start = $start ? "AND cust_bill_pay._date <= $start" : ''; my $bill_end = $end ? "AND cust_bill_pay._date > $end" : ''; my $refund_start = $start ? "AND cust_pay_refund._date <= $start" : ''; diff --git a/FS/FS/cust_refund.pm b/FS/FS/cust_refund.pm index 6d08c8621..39603701f 100644 --- a/FS/FS/cust_refund.pm +++ b/FS/FS/cust_refund.pm @@ -343,7 +343,7 @@ Returns an SQL fragment to retreive the unapplied amount. =cut sub unapplied_sql { - my ($class, $start, $end) = shift; + my ($class, $start, $end) = @_; my $credit_start = $start ? "AND cust_credit_refund._date <= $start" : ''; my $credit_end = $end ? "AND cust_credit_refund._date > $end" : ''; my $pay_start = $start ? "AND cust_pay_refund._date <= $start" : ''; |