X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fbulk_Common.pm;h=ede2fef44b0ceedf3b00b39b73590b1082764df2;hb=1295a884b51fda6c56ff6b3c4c05c89d93075eee;hp=f8f0ab88195c5eed41e3a69c45fd44573adaa6fa;hpb=61e372dce8fb1406d4e83da7f33984ef2d235da2;p=freeside.git diff --git a/FS/FS/part_pkg/bulk_Common.pm b/FS/FS/part_pkg/bulk_Common.pm index f8f0ab881..ede2fef44 100644 --- a/FS/FS/part_pkg/bulk_Common.pm +++ b/FS/FS/part_pkg/bulk_Common.pm @@ -23,10 +23,6 @@ $me = '[FS::part_pkg::bulk_Common]'; 'instead of a detailed list', 'type' => 'checkbox', }, - 'no_prorate' => { 'name' => 'Don\'t prorate recurring fees on services '. - 'active for a partial month', - 'type' => 'checkbox', - }, }, 'fieldorder' => [ 'svc_setup_fee', 'svc_recur_fee', 'summarize_svcs', 'no_prorate' ], @@ -51,7 +47,7 @@ sub price_info { #some false laziness-ish w/agent.pm... not a lot sub calc_recur { - my($self, $cust_pkg, $sdate, $details ) = @_; + my($self, $cust_pkg, $sdate, $details, $param ) = @_; my $conf = new FS::Conf; my $money_char = $conf->config('money_char') || '$'; @@ -104,10 +100,13 @@ sub calc_recur { } } - sprintf('%.2f', $self->base_recur($cust_pkg, $sdate) + $total_svc_charge ); -} + my $charge = $self->base_recur($cust_pkg, $sdate) + $total_svc_charge; -sub can_discount { 0; } + $param->{'override_charges'} = $total_svc_charge / $self->freq; + my $discount = $self->calc_discount($cust_pkg, $sdate, $details, $param); + + sprintf('%.2f', $charge - $discount ); +} sub hide_svc_detail { 1; }