X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fbulk.pm;h=69fe98e92781d4500e6c0a2ddc05d109b7d0d328;hb=16941ee3099833522bb8b7ac3cdf88b4a5f0ad89;hp=7c81138c12ce9c7dec96dcd4328f984ec62726d3;hpb=9006e983ebf98b2000a812ab01f99dcb2335534c;p=freeside.git diff --git a/FS/FS/part_pkg/bulk.pm b/FS/FS/part_pkg/bulk.pm index 7c81138c1..69fe98e92 100644 --- a/FS/FS/part_pkg/bulk.pm +++ b/FS/FS/part_pkg/bulk.pm @@ -35,6 +35,7 @@ $me = '[FS::part_pkg::bulk]'; 'weight' => 50, ); +#some false laziness-ish w/agent.pm... not a lot sub calc_recur { my($self, $cust_pkg, $sdate, $details ) = @_; @@ -74,22 +75,27 @@ sub calc_recur { my $svc_end = $h_cust_svc->date_deleted; $svc_end = ( !$svc_end || $svc_end > $$sdate ) ? $$sdate : $svc_end; - $svc_charge = $self->option('svc_recur_fee') * ( $svc_end - $svc_start ) - / ( $$sdate - $last_bill ); + my $recur_charge = + $self->option('svc_recur_fee') * ( $svc_end - $svc_start ) + / ( $$sdate - $last_bill ); - $svc_details .= $money_char. sprintf('%.2f', $svc_charge ). + $svc_details .= $money_char. sprintf('%.2f', $recur_charge ). ' ('. time2str('%x', $svc_start). ' - '. time2str('%x', $svc_end ). ')' - if $self->option('svc_recur_fee'); + if $recur_charge; + + $svc_charge += $recur_charge; push @$details, $svc_details; $total_svc_charge += $svc_charge; } - sprintf("%.2f", $self->base_recur($cust_pkg) + $total_svc_charge ); + sprintf('%.2f', $self->base_recur($cust_pkg) + $total_svc_charge ); } +sub can_discount { 0; } + sub hide_svc_detail { 1; }