[freeside-commits] freeside/FS/FS/part_pkg flat.pm, 1.33, 1.34 flat_delayed.pm, 1.8, 1.9 prorate_delayed.pm, 1.3, 1.4
Ivan,,,
ivan at wavetail.420.am
Wed Aug 5 16:34:31 PDT 2009
- Previous message: [freeside-commits] freeside/FS/FS/part_pkg agent.pm, 1.4, 1.5 base_rate.pm, 1.3, 1.4
- Next message: [freeside-commits] freeside/FS/FS/part_pkg flat.pm, 1.13.2.15, 1.13.2.16 flat_delayed.pm, 1.5.2.1, 1.5.2.2 prorate_delayed.pm, 1.1.2.2, 1.1.2.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/FS/FS/part_pkg
In directory wavetail.420.am:/tmp/cvs-serv25464/FS/FS/part_pkg
Modified Files:
flat.pm flat_delayed.pm prorate_delayed.pm
Log Message:
fix cancellation errors with updated flat_introrate, RT#5865
Index: flat_delayed.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat_delayed.pm,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- flat_delayed.pm 13 Apr 2008 21:37:53 -0000 1.8
+++ flat_delayed.pm 5 Aug 2009 23:34:28 -0000 1.9
@@ -58,7 +58,7 @@
return 0 if $last_bill + (86400 * $free_days) == $next_bill
&& $last_bill == $cust_pkg->setup;
- return 0 if ! $self->base_recur
+ return 0 if ! $self->base_recur($cust_pkg)
|| ! $self->option('unused_credit', 1)
|| ! $last_bill
|| ! $next_bill;
Index: flat.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/flat.pm,v
retrieving revision 1.33
retrieving revision 1.34
diff -u -d -r1.33 -r1.34
--- flat.pm 2 Jul 2009 01:26:46 -0000 1.33
+++ flat.pm 5 Aug 2009 23:34:28 -0000 1.34
@@ -162,11 +162,11 @@
}
sub base_recur_permonth {
- my($self, $cust_pkg) = @_; #$cust_pkg?
+ my($self, $cust_pkg) = @_;
return 0 unless $self->freq =~ /^\d+$/ && $self->freq > 0;
- sprintf('%.2f', $self->base_recur / $self->freq );
+ sprintf('%.2f', $self->base_recur($cust_pkg) / $self->freq );
}
sub calc_remain {
@@ -184,7 +184,7 @@
#my $last_bill = $cust_pkg->last_bill || 0;
my $last_bill = $cust_pkg->get('last_bill') || 0; #->last_bill falls back to setup
- return 0 if ! $self->base_recur
+ return 0 if ! $self->base_recur($cust_pkg)
|| ! $self->option('unused_credit', 1)
|| ! $last_bill
|| ! $next_bill
@@ -202,7 +202,7 @@
my $freq_sec = $1 * $sec{$2||'m'};
return 0 unless $freq_sec;
- sprintf("%.2f", $self->base_recur * ( $next_bill - $time ) / $freq_sec );
+ sprintf("%.2f", $self->base_recur($cust_pkg) * ( $next_bill - $time ) / $freq_sec );
}
@@ -216,7 +216,7 @@
sub usage_valuehash {
my $self = shift;
- map { $_, $self->option($_) }
+ map { $_, $self->option($_) }
grep { $self->option($_, 'hush') }
qw(seconds upbytes downbytes totalbytes);
}
Index: prorate_delayed.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/part_pkg/prorate_delayed.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- prorate_delayed.pm 13 Apr 2008 21:37:53 -0000 1.3
+++ prorate_delayed.pm 5 Aug 2009 23:34:28 -0000 1.4
@@ -56,7 +56,7 @@
return 0 if $last_bill + (86400 * $free_days) == $next_bill
&& $last_bill == $cust_pkg->setup;
- return 0 if ! $self->base_recur
+ return 0 if ! $self->base_recur($cust_pkg)
|| ! $self->option('unused_credit', 1)
|| ! $last_bill
|| ! $next_bill;
- Previous message: [freeside-commits] freeside/FS/FS/part_pkg agent.pm, 1.4, 1.5 base_rate.pm, 1.3, 1.4
- Next message: [freeside-commits] freeside/FS/FS/part_pkg flat.pm, 1.13.2.15, 1.13.2.16 flat_delayed.pm, 1.5.2.1, 1.5.2.2 prorate_delayed.pm, 1.1.2.2, 1.1.2.3
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list