projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (from parent 1:
7c4b45d
)
bulk price plan fix - don't omit setup fee
author
ivan
<ivan>
Thu, 18 Jun 2009 11:07:04 +0000
(11:07 +0000)
committer
ivan
<ivan>
Thu, 18 Jun 2009 11:07:04 +0000
(11:07 +0000)
FS/FS/part_pkg/bulk.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_pkg/bulk.pm
b/FS/FS/part_pkg/bulk.pm
index
7c81138
..
1b52d9f
100644
(file)
--- 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,
);
'weight' => 50,
);
+#some false laziness-ish w/agent.pm... not a lot
sub calc_recur {
my($self, $cust_pkg, $sdate, $details ) = @_;
sub calc_recur {
my($self, $cust_pkg, $sdate, $details ) = @_;
@@
-74,20
+75,23
@@
sub calc_recur {
my $svc_end = $h_cust_svc->date_deleted;
$svc_end = ( !$svc_end || $svc_end > $$sdate ) ? $$sdate : $svc_end;
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 ). ')'
' ('. 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;
}
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 {
}
sub hide_svc_detail {