[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [5700] Fix defect noted 20130417T2025Z
From: |
Greg Chicares |
Subject: |
[lmi-commits] [5700] Fix defect noted 20130417T2025Z |
Date: |
Thu, 18 Apr 2013 23:07:27 +0000 |
Revision: 5700
http://svn.sv.gnu.org/viewvc/?view=rev&root=lmi&revision=5700
Author: chicares
Date: 2013-04-18 23:07:27 +0000 (Thu, 18 Apr 2013)
Log Message:
-----------
Fix defect noted 20130417T2025Z
Modified Paths:
--------------
lmi/trunk/ChangeLog
lmi/trunk/premium_tax.cpp
lmi/trunk/premium_tax.hpp
lmi/trunk/premium_tax_test.cpp
Modified: lmi/trunk/ChangeLog
===================================================================
--- lmi/trunk/ChangeLog 2013-04-18 22:22:30 UTC (rev 5699)
+++ lmi/trunk/ChangeLog 2013-04-18 23:07:27 UTC (rev 5700)
@@ -32090,3 +32090,34 @@
intention to decrease its loads over time, but there has been no call
to reflect that prospectively.
+20130418T1350Z <address@hidden> [544]
+
+ premium_tax.cpp
+ premium_tax.hpp
+Refactor.
+
+20130418T1504Z <address@hidden> [544]
+
+ antediluvian_stubs.cpp
+ premium_tax.cpp
+ premium_tax.hpp
+ premium_tax_test.cpp
+ stratified_charges.cpp
+ stratified_charges.hpp
+Calculate maximum premium tax.
+
+20130418T2222Z <address@hidden> [545]
+
+ premium_tax.cpp
+Mark a defect.
+
+20130418T2307Z <address@hidden> [544]
+
+ premium_tax.cpp
+ premium_tax.hpp
+ premium_tax_test.cpp
+Fix defect noted 20130417T2025Z. When the product database's scalar
+premium-tax load is zero in all states, tiering should be disregarded
+in AK and SD: no product would pass premium tax through as a load in
+those two states only.
+
Modified: lmi/trunk/premium_tax.cpp
===================================================================
--- lmi/trunk/premium_tax.cpp 2013-04-18 22:22:30 UTC (rev 5699)
+++ lmi/trunk/premium_tax.cpp 2013-04-18 23:07:27 UTC (rev 5700)
@@ -312,7 +312,7 @@
// TODO ?? Incorrect: load_rate() isn't just the rate in the tax
// state: it already reflects retaliation.
double tax_in_tax_state = load_rate() * payment;
- if(is_tiered_in_tax_state_)
+ if(varies_by_state_ && is_tiered_in_tax_state_)
{
LMI_ASSERT(0.0 == tax_in_tax_state);
tax_in_tax_state = strata.tiered_premium_tax
@@ -327,7 +327,7 @@
if(is_retaliatory_)
{
tax_in_domicile = domiciliary_load_rate_ * payment;
- if(is_tiered_in_domicile_)
+ if(varies_by_state_ && is_tiered_in_domicile_)
{
LMI_ASSERT(0.0 == tax_in_domicile);
tax_in_domicile = strata.tiered_premium_tax
Modified: lmi/trunk/premium_tax.hpp
===================================================================
--- lmi/trunk/premium_tax.hpp 2013-04-18 22:22:30 UTC (rev 5699)
+++ lmi/trunk/premium_tax.hpp 2013-04-18 23:07:27 UTC (rev 5700)
@@ -63,9 +63,6 @@
/// expense covered elsewhere in pricing--and tiering is ignored, so
/// the tax load is simply that scalar. In the second case, the exact
/// premium tax is passed through, so the load equals the tax rate.
-/// For now, in the first case--because the '.strata' files do not yet
-/// distinguish tax loads from tax rates--the tiered premium tax must
-/// be set equal to the scalar load, for all amounts up to infinity.
///
/// Known shortcomings.
///
Modified: lmi/trunk/premium_tax_test.cpp
===================================================================
--- lmi/trunk/premium_tax_test.cpp 2013-04-18 22:22:30 UTC (rev 5699)
+++ lmi/trunk/premium_tax_test.cpp 2013-04-18 23:07:27 UTC (rev 5700)
@@ -118,11 +118,7 @@
BOOST_TEST_EQUAL(z.maximum_load_rate (), 0.0000);
BOOST_TEST_EQUAL(z.minimum_load_rate (), 0.0000);
BOOST_TEST_EQUAL(z.is_tiered (), true );
- // TODO ?? This is a pitfall--at least it should be diagnosed.
- // The tiered load is 2.7% on the first dollar, but the '0.027'
- // answer is surprising and inconsistent with the behavior of
- // minimum_load_rate() above.
-// BOOST_TEST_EQUAL(z.calculate_load(1.0, strata), 0.0000);
+ BOOST_TEST_EQUAL(z.calculate_load(1.0, strata), 0.0000);
DBDictionary::instance().datum("PremTaxLoad") = original;
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [lmi-commits] [5700] Fix defect noted 20130417T2025Z,
Greg Chicares <=