for subscription.pm and prorate.pm:
authorlsc <lsc>
Thu, 23 Mar 2006 12:00:07 +0000 (12:00 +0000)
committerlsc <lsc>
Thu, 23 Mar 2006 12:00:07 +0000 (12:00 +0000)
commit6235203383153fb1d3725662db4ee3e779b449f4
tree150b5a5eb53d07906415df45eb303fdb50e9366a
parentff24bc786a5fd479f2252260e0da580a736f97be
for subscription.pm and prorate.pm:

-modify the subscription and prorate price plans
(FS/FS/part_pkg/subscription.pm and prorate.pm) to have a
configurable (add a field to the %info hash) billing day instead of
"1st of the month" only.  subscription will be easy, prorate will be a
little trickier.

essentially, I replaced the '1' in the 'day' field of the timelocal that generates $$date with the value I added to the %info hash, 'cutoff_day'

-implement a price plan (new file in FS/FS/part_pkg/ - probably @ISA
FS::part_pkg::subscription) that charges the first full month if the
customer signs up between the 1st and the configurable billing day,
and gives them the remainder of the month free if they sign up
between the configurable billing day and the end of the month.

if this is the first time the customer is billed, and if the date is greater than the cutoff date, advance $ssdate to cutoff_day of next month, else $$date is cutoff_date of this month.  Either way, charge them for a month.

----------------------------------------------------------------------
FS/FS/part_pkg/billoneday.pm [new file with mode: 0644]
FS/FS/part_pkg/prorate.pm
FS/FS/part_pkg/subscription.pm