projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix prorates & recurring fees with recur_Common-using packages, RT#11993
[freeside.git]
/
FS
/
FS
/
part_pkg
/
flat.pm
diff --git
a/FS/FS/part_pkg/flat.pm
b/FS/FS/part_pkg/flat.pm
index
f5a2100
..
d4b95b5
100644
(file)
--- a/
FS/FS/part_pkg/flat.pm
+++ b/
FS/FS/part_pkg/flat.pm
@@
-1,19
+1,16
@@
package FS::part_pkg::flat;
use strict;
package FS::part_pkg::flat;
use strict;
-use vars qw( @ISA %info
- %usage_recharge_fields @usage_recharge_fieldorder
+use base qw( FS::part_pkg
+ FS::part_pkg::prorate_Mixin
+ FS::part_pkg::discount_Mixin
);
);
+use vars qw( %info %usage_recharge_fields @usage_recharge_fieldorder );
use Tie::IxHash;
use List::Util qw(min); # max);
#use FS::Record qw(qsearch);
use FS::UI::bytecount;
use FS::Conf;
use Tie::IxHash;
use List::Util qw(min); # max);
#use FS::Record qw(qsearch);
use FS::UI::bytecount;
use FS::Conf;
-use FS::part_pkg;
-
-@ISA = qw(FS::part_pkg
- FS::part_pkg::prorate_Mixin
- FS::part_pkg::discount_Mixin);
tie my %temporalities, 'Tie::IxHash',
'upcoming' => "Upcoming (future)",
tie my %temporalities, 'Tie::IxHash',
'upcoming' => "Upcoming (future)",
@@
-129,7
+126,7
@@
sub calc_recur {
if $self->option('recur_temporality', 1) eq 'preceding' && $last_bill == 0;
my $charge = $self->base_recur($cust_pkg, $sdate);
if $self->option('recur_temporality', 1) eq 'preceding' && $last_bill == 0;
my $charge = $self->base_recur($cust_pkg, $sdate);
- if ( my $cutoff_day = $self->cutoff_day($cust_pkg) ) {
+ if ( my $cutoff_day = $self->
flat_
cutoff_day($cust_pkg) ) {
$charge = $self->calc_prorate(@_);
}
elsif ( $param->{freq_override} ) {
$charge = $self->calc_prorate(@_);
}
elsif ( $param->{freq_override} ) {
@@
-143,7
+140,7
@@
sub calc_recur {
return sprintf('%.2f', $charge - $discount);
}
return sprintf('%.2f', $charge - $discount);
}
-sub cutoff_day {
+sub
flat_
cutoff_day {
my $self = shift;
my $cust_pkg = shift;
if ( $self->option('sync_bill_date',1) ) {
my $self = shift;
my $cust_pkg = shift;
if ( $self->option('sync_bill_date',1) ) {