- my $total = 0;
-
- my ($now_mon, $now_year) = (localtime($now))[4,5];
- $now_mon+=2; $now_year+=1900;
- until ( $now_mon < 13 ) { $now_mon -= 12; $now_year++; }
-
- my $subseq = 0;
- for my $year ( $now_year .. 2037 ) {
- for my $mon ( ( $subseq++ ? 1 : $now_mon ) .. 12 ) {
- if ( $prepaid{"$year-$mon"} ) {
- $total += $prepaid{"$year-$mon"};
- %> <TR><TD ALIGN="right"><%= $mon[$mon-1]. ' '. $year %></TD>
- <TD ALIGN="right">
- <%= sprintf("%.2f", $prepaid{"$year-$mon"} ) %>
- </TD>
- </TR>
- <%
- }
- }
+ my $unearned = $remaining * $cust_pkg->part_pkg->recur; #!! only works for flat/legacy
+ $total_legacy += $unearned;