[freeside-commits] freeside/FS/FS/part_pkg bulk.pm,1.5,1.6
Ivan,,,
ivan at wavetail.420.am
Thu Jun 18 04:07:06 PDT 2009
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv31756
Modified Files:
bulk.pm
Log Message:
bulk price plan fix - don't omit setup fee
Index: bulk.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/bulk.pm,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -d -r1.5 -r1.6
--- bulk.pm 24 Mar 2009 02:36:30 -0000 1.5
+++ bulk.pm 18 Jun 2009 11:07:04 -0000 1.6
@@ -35,6 +35,7 @@
'weight' => 50,
);
+#some false laziness-ish w/agent.pm... not a lot
sub calc_recur {
my($self, $cust_pkg, $sdate, $details ) = @_;
@@ -74,20 +75,23 @@
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 hide_svc_detail {
More information about the freeside-commits
mailing list