X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2Ft%2Fsuite%2F02-bill_customer.t;h=3fa908e96ab27fae0474639430f264d8a8b7d78e;hb=14c989e0aea38668f27dc0492f8e6749bf0cd98c;hp=0afffaa701e508bfa3659e2bc861d1bd77f48f3b;hpb=cb6214a6c0b0ecc8c3a5c264ee98ff3f301c33a6;p=freeside.git diff --git a/FS/t/suite/02-bill_customer.t b/FS/t/suite/02-bill_customer.t index 0afffaa70..3fa908e96 100755 --- a/FS/t/suite/02-bill_customer.t +++ b/FS/t/suite/02-bill_customer.t @@ -23,8 +23,10 @@ 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 = 288 hours +# Apr 1 - Mar 1 = 31 days - 1 hour (DST) = 743 hours +# 288/743 * $30 = $11.63 recur + $20.00 setup +ok( $cust_bill->charged == 31.63, 'prorated first month correctly' ); # the package bill date should now be 2016-04-01 my @lineitems = $cust_bill->cust_bill_pkg;