diff options
author | Mark Wells <mark@freeside.biz> | 2016-04-26 13:06:37 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2016-04-27 13:07:37 -0700 |
commit | 19ba8ba34507ec889908271b7238bc58fce5dc80 (patch) | |
tree | 173072b6048ab2a40e4b22e5c91a6ceb7bab5942 | |
parent | 90eaa5512c9cd3ff34b34c9e2426ff2fa39e27dd (diff) |
fix basic prorate test
-rwxr-xr-x | FS/t/suite/01-order_pkg.t | 2 | ||||
-rwxr-xr-x | FS/t/suite/02-bill_customer.t | 5 |
2 files changed, 4 insertions, 3 deletions
diff --git a/FS/t/suite/01-order_pkg.t b/FS/t/suite/01-order_pkg.t index 1511350c4..ab5a2ddc6 100755 --- a/FS/t/suite/01-order_pkg.t +++ b/FS/t/suite/01-order_pkg.t @@ -16,7 +16,7 @@ my $form = $FS->form('OrderPkgForm'); # behavior visible). my %params = ( - pkgpart => 5, + pkgpart => 2, quantity => 1, start => 'on_date', start_date => '03/20/2016', diff --git a/FS/t/suite/02-bill_customer.t b/FS/t/suite/02-bill_customer.t index 0afffaa70..e3f6406f4 100755 --- a/FS/t/suite/02-bill_customer.t +++ b/FS/t/suite/02-bill_customer.t @@ -23,8 +23,9 @@ ok($error eq '', "billed on $date") or diag($error); my $cust_bill = $return[0]; isa_ok($cust_bill, 'FS::cust_bill'); -# $60/month * (30 days - 19 days)/30 days = $42 -ok( $cust_bill->charged == 42.00, 'prorated first month correctly' ); +# Apr 1 - Mar 20 = 12 days +# 12/31 * $30 = 11.61 recurring, + 20.00 setup +ok( $cust_bill->charged == 31.61, 'prorated first month correctly' ); # the package bill date should now be 2016-04-01 my @lineitems = $cust_bill->cust_bill_pkg; |