[freeside-commits] freeside/FS/FS cust_bill.pm,1.281,1.282
Ivan,,,
ivan at wavetail.420.am
Fri May 21 12:57:49 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv9546
Modified Files:
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.281
retrieving revision 1.282
diff -u -w -d -r1.281 -r1.282
--- cust_bill.pm 20 May 2010 01:33:07 -0000 1.281
+++ cust_bill.pm 21 May 2010 19:57:45 -0000 1.282
@@ -4341,8 +4341,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);
@@ -4355,8 +4354,7 @@
=cut
sub net_sql {
- my $class = shift;
- my ($start, $end) = @_;
+ my ($class, $start, $end) = @_;
'charged - '. $class->credited_sql($start, $end);
}
@@ -4370,6 +4368,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 )";
}
@@ -4384,6 +4384,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