summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMark Wells <mark@freeside.biz>2016-04-27 13:35:38 -0700
committerMark Wells <mark@freeside.biz>2016-04-27 13:38:56 -0700
commit8c0a1f2603a182b7a9b9ab5313a6fabc964de6c9 (patch)
tree1b6663d8c1354f862f014fc612550b4b9a63a314
parent335561fccaaab8f17bbbc6470f7e25bca282c10f (diff)
fix DST in prorate test
-rwxr-xr-xFS/t/suite/02-bill_customer.t7
1 files changed, 4 insertions, 3 deletions
diff --git a/FS/t/suite/02-bill_customer.t b/FS/t/suite/02-bill_customer.t
index e3f6406f4..3fa908e96 100755
--- a/FS/t/suite/02-bill_customer.t
+++ b/FS/t/suite/02-bill_customer.t
@@ -23,9 +23,10 @@ ok($error eq '', "billed on $date") or diag($error);
my $cust_bill = $return[0];
isa_ok($cust_bill, 'FS::cust_bill');
-# 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' );
+# 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;