projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
9855089
)
better sync behavior near the end of the month, #17043
author
Mark Wells
<mark@freeside.biz>
Sat, 24 Mar 2012 23:35:59 +0000
(16:35 -0700)
committer
Mark Wells
<mark@freeside.biz>
Sat, 24 Mar 2012 23:35:59 +0000
(16:35 -0700)
FS/FS/part_pkg/prorate_Mixin.pm
patch
|
blob
|
history
diff --git
a/FS/FS/part_pkg/prorate_Mixin.pm
b/FS/FS/part_pkg/prorate_Mixin.pm
index
0f40576
..
a01b5c4
100644
(file)
--- a/
FS/FS/part_pkg/prorate_Mixin.pm
+++ b/
FS/FS/part_pkg/prorate_Mixin.pm
@@
-2,7
+2,7
@@
package FS::part_pkg::prorate_Mixin;
use strict;
use vars qw( %info );
use strict;
use vars qw( %info );
-use Time::Local qw( timelocal );
+use Time::Local qw( timelocal
timelocal_nocheck
);
use Date::Format qw( time2str );
%info = (
use Date::Format qw( time2str );
%info = (
@@
-202,28
+202,17
@@
sub _endpoints {
}
my $mend;
my $mstart;
}
my $mend;
my $mstart;
- # if cutoff day > 28, force it to the 1st of next month
- if ( $cutoff_day > 28 ) {
- $cutoff_day = 1;
- # and if we are currently after the 28th, roll the current day
- # forward to that day
- if ( $mday > 28 ) {
- $mday = 1;
- #set $mnow = $mend so the amount billed will be zero
- $mnow = timelocal(0,0,0,1,$mon == 11 ? 0 : $mon + 1,$year+($mon==11));
- }
- }
if ( $mday >= $cutoff_day ) {
$mend =
if ( $mday >= $cutoff_day ) {
$mend =
- timelocal(0,0,0,$cutoff_day,$mon == 11 ? 0 : $mon + 1,$year+($mon==11));
+ timelocal
_nocheck
(0,0,0,$cutoff_day,$mon == 11 ? 0 : $mon + 1,$year+($mon==11));
$mstart =
$mstart =
- timelocal(0,0,0,$cutoff_day,$mon,$year);
+ timelocal
_nocheck
(0,0,0,$cutoff_day,$mon,$year);
}
else {
$mend =
}
else {
$mend =
- timelocal(0,0,0,$cutoff_day,$mon,$year);
+ timelocal
_nocheck
(0,0,0,$cutoff_day,$mon,$year);
$mstart =
$mstart =
- timelocal(0,0,0,$cutoff_day,$mon == 0 ? 11 : $mon - 1,$year-($mon==0));
+ timelocal
_nocheck
(0,0,0,$cutoff_day,$mon == 0 ? 11 : $mon - 1,$year-($mon==0));
}
return ($mnow, $mend, $mstart);
}
}
return ($mnow, $mend, $mstart);
}