[freeside-users] modifying date range printed on invoices

Ivan Kohler ivan at freeside.biz
Tue May 20 11:32:03 PDT 2008


On Tue, May 20, 2008 at 06:02:19PM +0000, Kristian Hoffmann wrote:
> 
> On Tue, 2008-05-06 at 12:04 -0700, Ivan Kohler wrote:
> > On Tue, May 06, 2008 at 11:51:39AM -0700, Kristian Hoffmann wrote:
> > > Hi,
> > > 
> > > IIRC, the monthly interval is based on the number of the seconds in the
> > > year (365.2422*24*60*60 = 2629743.84 seconds) divided by 12 months
> > > (2629743.84 / 12 = 30.43685 days).  So, in freeside 1 month is really
> > > 30.43685 days.  As far as day of month is concerned, sometimes that
> > > takes you from the 1st to the 1st, other times it takes you from the 1st
> > > to the 31st.  Either way, you get 12 even billing intervals per year.
> > 
> > Huh?  Gosh no, I don't think things *ever* worked like that.  Where did 
> > you get that idea?
> 
> FS::part_pkg::flat::calc_remain
> 
> Of course, I'm still wrong, but now I know why I thought that.

Oh!  And now I know why credits for changed/cancelled packages come out 
a few pennies off.  Cool, thanks.

I think calc_remain should be reworked a bit.  Something like 
base_recurring * ( next bill date - current date ) / frequency

-- 
_ivan


More information about the freeside-users mailing list