From: ivan Date: Sun, 22 Feb 2009 10:58:50 +0000 (+0000) Subject: don't do a credit for unused time for packages that don't have a last bill date.... X-Git-Tag: root_of_webpay_support~28 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=65efe8eb9ee8bb02deb776da0897e25d821b4f65 don't do a credit for unused time for packages that don't have a last bill date. really. RT#4881 --- diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm index 7a78d0ba4..3ac44c4e2 100644 --- a/FS/FS/part_pkg/flat.pm +++ b/FS/FS/part_pkg/flat.pm @@ -161,7 +161,10 @@ sub calc_remain { } my $next_bill = $cust_pkg->getfield('bill') || 0; - my $last_bill = $cust_pkg->last_bill || 0; + + #my $last_bill = $cust_pkg->last_bill || 0; + my $last_bill = $cust_pkg->get('last_bill') || 0; #->last_bill falls back to setup + return 0 if ! $self->base_recur || ! $self->option('unused_credit', 1) || ! $last_bill