projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3dbb7d1
)
fix 'Can't call method "setup" on an undefined value' error when using into rates...
author
ivan
<ivan>
Tue, 20 Dec 2011 23:50:19 +0000
(23:50 +0000)
committer
ivan
<ivan>
Tue, 20 Dec 2011 23:50:19 +0000
(23:50 +0000)
FS/FS/discount_plan.pm
patch
|
blob
|
history
FS/FS/part_pkg/recur_Common.pm
patch
|
blob
|
history
diff --git
a/FS/FS/discount_plan.pm
b/FS/FS/discount_plan.pm
index
4f97e33
..
3ae44c8
100644
(file)
--- a/
FS/FS/discount_plan.pm
+++ b/
FS/FS/discount_plan.pm
@@
-63,7
+63,7
@@
sub new {
my $recur = $cust_bill_pkg->recur || 0;
if ( $freq eq '1' ) { # monthly recurring package
my $recur = $cust_bill_pkg->recur || 0;
if ( $freq eq '1' ) { # monthly recurring package
- my $permonth = $part_pkg->base_recur_permonth || 0;
+ my $permonth = $part_pkg->base_recur_permonth
($cust_pkg)
|| 0;
my ($discount) = grep { $_->months == $months }
map { $_->discount } $part_pkg->part_pkg_discount;
my ($discount) = grep { $_->months == $months }
map { $_->discount } $part_pkg->part_pkg_discount;
diff --git
a/FS/FS/part_pkg/recur_Common.pm
b/FS/FS/part_pkg/recur_Common.pm
index
7197eae
..
7233cc6
100644
(file)
--- a/
FS/FS/part_pkg/recur_Common.pm
+++ b/
FS/FS/part_pkg/recur_Common.pm
@@
-60,7
+60,7
@@
sub calc_recur_Common {
my $recur_method = $self->option('recur_method', 1) || 'anniversary';
my $cutoff_day = $self->cutoff_day($cust_pkg);
my $recur_method = $self->option('recur_method', 1) || 'anniversary';
my $cutoff_day = $self->cutoff_day($cust_pkg);
- $charges = $self->base_recur;
+ $charges = $self->base_recur
($cust_pkg)
;
$charges += $param->{'override_charges'} if $param->{'override_charges'};
if ( $recur_method eq 'prorate' ) {
$charges += $param->{'override_charges'} if $param->{'override_charges'};
if ( $recur_method eq 'prorate' ) {