projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
d0285e3
)
this should fix Can't call method "part_pkg" on an undefined value at .../cust_bill...
author
ivan
<ivan>
Mon, 19 Feb 2007 15:40:30 +0000
(15:40 +0000)
committer
ivan
<ivan>
Mon, 19 Feb 2007 15:40:30 +0000
(15:40 +0000)
FS/FS/cust_bill.pm
patch
|
blob
|
history
diff --git
a/FS/FS/cust_bill.pm
b/FS/FS/cust_bill.pm
index
2c0b353
..
844d1b8
100644
(file)
--- a/
FS/FS/cust_bill.pm
+++ b/
FS/FS/cust_bill.pm
@@
-432,12
+432,16
@@
sub apply_payments_and_credits {
my @open_lineitems = $self->open_cust_bill_pkg;
my $max_pay_weight =
my @open_lineitems = $self->open_cust_bill_pkg;
my $max_pay_weight =
- max( map { $_->cust_pkg->part_pkg->pay_weight || 0 }
- @open_lineitems
+ max( map { $_->part_pkg->pay_weight || 0 }
+ grep { $_ }
+ map { $_->cust_pkg }
+ @open_lineitems
);
my $max_credit_weight =
);
my $max_credit_weight =
- max( map { $_->cust_pkg->part_pkg->credit_weight || 0 }
- @open_lineitems
+ max( map { $_->part_pkg->credit_weight || 0 }
+ grep { $_ }
+ map { $_->cust_pkg }
+ @open_lineitems
);
#if both are the same... payments first? it has to be something
);
#if both are the same... payments first? it has to be something