- my $recur_charge += $pkg_base_recur * ( $pkg_end - $pkg_start )
- / ( $prorate_sdate - $last_bill );
+ my $pkg_recur_charge = $prorate_ratio * $pkg_base_recur;
+ $pkg_recur_charge *= ( $pkg_end - $pkg_start )
+ / ( $$sdate - $last_bill )
+ unless $self->option('no_pkg_prorate');
+
+ my $recur_charge += $pkg_recur_charge;
+
+ if ( $recur_charge ) {
+ $pkg_details .= $money_char.
+ sprintf('%.2f', $quantity * $recur_charge );
+ $pkg_details .= sprintf(" ($quantity \@ $money_char". '%.2f)',
+ $recur_charge )
+ if $quantity > 1;
+ $pkg_details .= ' ('. time2str($date_format, $pkg_start).
+ ' - '. time2str($date_format, $pkg_end ). ')';
+ }