fix cancellation errors with updated flat_introrate, RT#5865
[freeside.git] / FS / FS / part_pkg / agent.pm
index 9bcf33d..d41978c 100644 (file)
@@ -68,8 +68,7 @@ sub calc_recur {
   my $total_agent_charge = 0;
 
   warn "$me billing for agent packages from ". time2str('%x', $last_bill).
-                                       " to ". time2str('%x', $$sdate);
-       "\n"
+                                       " to ". time2str('%x', $$sdate). "\n"
     if $DEBUG;
 
   my $prorate_ratio =   ( $$sdate                     - $last_bill )
@@ -120,7 +119,7 @@ sub calc_recur {
         my $pkg_setup_fee  =
           $part_pkg->setup_cost || $part_pkg->option('setup_fee');
         my $pkg_base_recur =
-          $part_pkg->recur_cost || $part_pkg->base_recur_permonth;
+          $part_pkg->recur_cost || $part_pkg->base_recur_permonth($cust_pkg);
 
         my $pkg_start = $cust_pkg->get('setup');
         if ( $pkg_start < $last_bill ) {