[freeside-commits] freeside/FS/FS cust_bill.pm, 1.263.2.17, 1.263.2.18
Ivan,,,
ivan at wavetail.420.am
Fri May 21 12:57:52 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv9548
Modified Files:
Tag: FREESIDE_1_9_BRANCH
cust_bill.pm
Log Message:
fix 'Use of uninitialized value' spew, fallout from RT#7266
Index: cust_bill.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill.pm,v
retrieving revision 1.263.2.17
retrieving revision 1.263.2.18
diff -u -w -d -r1.263.2.17 -r1.263.2.18
--- cust_bill.pm 20 May 2010 01:34:20 -0000 1.263.2.17
+++ cust_bill.pm 21 May 2010 19:57:49 -0000 1.263.2.18
@@ -4320,8 +4320,7 @@
=cut
sub owed_sql {
- my $class = shift;
- my ($start, $end) = @_;
+ my ($class, $start, $end) = @_;
'charged - '.
$class->paid_sql($start, $end). ' - '.
$class->credited_sql($start, $end);
@@ -4334,8 +4333,7 @@
=cut
sub net_sql {
- my $class = shift;
- my ($start, $end) = @_;
+ my ($class, $start, $end) = @_;
'charged - '. $class->credited_sql($start, $end);
}
@@ -4349,6 +4347,8 @@
my ($class, $start, $end) = @_;
$start &&= "AND cust_bill_pay._date <= $start";
$end &&= "AND cust_bill_pay._date > $end";
+ $start = '' unless defined($start);
+ $end = '' unless defined($end);
"( SELECT COALESCE(SUM(amount),0) FROM cust_bill_pay
WHERE cust_bill.invnum = cust_bill_pay.invnum $start $end )";
}
@@ -4363,6 +4363,8 @@
my ($class, $start, $end) = shift;
$start &&= "AND cust_credit_bill._date <= $start";
$end &&= "AND cust_credit_bill._date > $end";
+ $start = '' unless defined($start);
+ $end = '' unless defined($end);
"( SELECT COALESCE(SUM(amount),0) FROM cust_credit_bill
WHERE cust_bill.invnum = cust_credit_bill.invnum $start $end )";
}
More information about the freeside-commits
mailing list