[freeside-commits] freeside/httemplate/search svc_acct.cgi, 1.53, 1.54
Ivan,,,
ivan at wavetail.420.am
Wed Jul 16 16:55:34 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/search
In directory wavetail.420.am:/tmp/cvs-serv26666
Modified Files:
svc_acct.cgi
Log Message:
fix account search by time remaining to deal with situations w/o a recurring amount
Index: svc_acct.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/search/svc_acct.cgi,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- svc_acct.cgi 22 Feb 2008 01:32:10 -0000 1.53
+++ svc_acct.cgi 16 Jul 2008 23:55:31 -0000 1.54
@@ -120,13 +120,17 @@
my $seconds = $svc_acct->seconds;
my $cust_pkg = $svc_acct->cust_svc->cust_pkg;
my $part_pkg = $cust_pkg->part_pkg;
+
#my $timepermonth = $part_pkg->option('seconds');
$timepermonth = $part_pkg->option('seconds');
$timepermonth = $timepermonth / $part_pkg->freq
if $part_pkg->freq =~ /^\d+$/ && $part_pkg->freq != 0;
- return format_time($seconds) unless $timepermonth;
+
#my $recur = $part_pkg->calc_recur($cust_pkg);
my $recur = $part_pkg->base_recur($cust_pkg);
+
+ return format_time($seconds) unless $timepermonth && $recur;
+
my $balance = $cust_pkg->cust_main->balance;
my $months_unpaid = $balance / $recur;
my $time_unpaid = $months_unpaid * $timepermonth;
More information about the freeside-commits
mailing list