lmi-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lmi-commits] [lmi] valyuta/007 e351a5c4 4/7: Change several more ledger


From: Greg Chicares
Subject: [lmi-commits] [lmi] valyuta/007 e351a5c4 4/7: Change several more ledger fields to cents
Date: Wed, 20 Apr 2022 20:05:04 -0400 (EDT)

branch: valyuta/007
commit e351a5c44e210ffaca99d7cda0eb61a151626e42
Author: Gregory W. Chicares <gchicares@sbcglobal.net>
Commit: Gregory W. Chicares <gchicares@sbcglobal.net>

    Change several more ledger fields to cents
---
 accountvalue.cpp           | 14 +++++++-------
 custom_io_0.cpp            |  6 +++---
 custom_io_1.cpp            |  6 +++---
 group_quote_pdf_gen_wx.cpp |  6 +++---
 ihs_acctval.cpp            | 12 ++++++------
 ihs_avmly.cpp              | 12 ++++++------
 ihs_avsolve.cpp            |  7 +++++--
 ledger_evaluator.cpp       |  6 +++---
 ledger_invariant_init.cpp  | 20 ++++++++++----------
 ledger_text_formats.cpp    | 22 +++++++++++-----------
 main_cli.cpp               |  4 ++--
 11 files changed, 59 insertions(+), 56 deletions(-)

diff --git a/accountvalue.cpp b/accountvalue.cpp
index 7f11d48b..69f043de 100644
--- a/accountvalue.cpp
+++ b/accountvalue.cpp
@@ -130,7 +130,7 @@ AccountValue::AccountValue(Input const& input)
 currency AccountValue::base_specamt(int year) const
 {
     // CURRENCY !! Cents in ledger will make rounding unnecessary.
-    return round_specamt().c(InvariantValues().SpecAmt[year]);
+    return round_specamt().c(InvariantValues().SpecAmt[year] / 100.0);
 }
 
 //============================================================================
@@ -339,8 +339,8 @@ void AccountValue::DoYear
             }
         }
 
-    VariantValues().AcctVal[Year] = dblize(AVUnloaned + AVRegLn + AVPrfLn);
-    VariantValues().CSVNet[Year] = VariantValues().AcctVal[Year] * 100.0 - 
VariantValues().SurrChg[Year];
+    VariantValues().AcctVal[Year] = centize(AVUnloaned + AVRegLn + AVPrfLn);
+    VariantValues().CSVNet[Year] = VariantValues().AcctVal[Year] - 
VariantValues().SurrChg[Year];
     // Update death benefit: "deathbft" currently holds benefit as of the
     //   beginning of month 12, but we want it as of the end of that month,
     //   in case the corridor or option 2 drove it up during the last month.
@@ -489,7 +489,7 @@ void AccountValue::PerformSpecAmtStrategy()
 
     for(int j = 0; j < BasicValues::GetLength(); ++j)
         {
-        InvariantValues().SpecAmt[j] = dblize(SA);
+        InvariantValues().SpecAmt[j] = centize(SA);
         }
 }
 
@@ -550,7 +550,7 @@ void AccountValue::TxOptionChange()
     // Carry the new spec amt forward into all future years.
     for(int j = Year; j < BasicValues::GetLength(); ++j)
         {
-        InvariantValues().SpecAmt[j] = dblize(ActualSpecAmt);
+        InvariantValues().SpecAmt[j] = centize(ActualSpecAmt);
         }
 }
 
@@ -582,7 +582,7 @@ void AccountValue::TxSpecAmtChange()
     // Carry the new spec amt forward into all future years.
     for(int j = Year; j < BasicValues::GetLength(); ++j)
         {
-        InvariantValues().SpecAmt[j] = dblize(ActualSpecAmt);
+        InvariantValues().SpecAmt[j] = centize(ActualSpecAmt);
         }
 }
 
@@ -927,7 +927,7 @@ void AccountValue::TxTakeWD()
             // Carry the new spec amt forward into all future years.
             for(int j = Year; j < BasicValues::GetLength(); ++j)
                 {
-                InvariantValues().SpecAmt[j] = dblize(ActualSpecAmt);
+                InvariantValues().SpecAmt[j] = centize(ActualSpecAmt);
                 }
             }
             break;
diff --git a/custom_io_0.cpp b/custom_io_0.cpp
index 2c795fdf..ca901a84 100644
--- a/custom_io_0.cpp
+++ b/custom_io_0.cpp
@@ -511,7 +511,7 @@ void custom_io_0_write(Ledger const& ledger_values, 
std::string const& filename)
         ;
 
     std::vector<double> surr_chg(Invar.GetLength());
-    assign(surr_chg, Curr_.AcctVal - Curr_.CSVNet / 100.0);
+    assign(surr_chg, Curr_.AcctVal - Curr_.CSVNet);
 
     std::vector<double> prem_load(Invar.GetLength());
     assign(prem_load, Invar.GrossPmt - Curr_.NetPmt);
@@ -523,7 +523,7 @@ void custom_io_0_write(Ledger const& ledger_values, 
std::string const& filename)
         {
         os
             << std::setprecision(0)
-            <<        Curr_.AcctVal        [j]
+            <<        Curr_.AcctVal        [j] / 100.0
             << ',' << Curr_.CSVNet         [j] / 100.0
             << ',' << Curr_.EOYDeathBft    [j] / 100.0
             << ',' << Curr_.NetIntCredited [j] / 100.0
@@ -533,7 +533,7 @@ void custom_io_0_write(Ledger const& ledger_values, 
std::string const& filename)
 // in actual practice.
             << ',' << 0                                  // 'MinPrem' always 
zero.
             << ',' << prem_load            [j] / 100.0
-            << ',' << surr_chg             [j]
+            << ',' << surr_chg             [j] / 100.0
             << ',' << Invar.GrossPmt       [j] / 100.0
             << ',' << Curr_.AnnGAIntRate   [j] * 10000.0 // 'IntRate' in bp.
             << '\n'
diff --git a/custom_io_1.cpp b/custom_io_1.cpp
index 54adee82..9206026d 100644
--- a/custom_io_1.cpp
+++ b/custom_io_1.cpp
@@ -381,7 +381,7 @@ void custom_io_1_write(Ledger const& ledger_values, 
std::string const& filename)
         ;
 
     std::vector<double> surr_chg(Invar.GetLength());
-    assign(surr_chg, Curr_.AcctVal - Curr_.CSVNet / 100.0);
+    assign(surr_chg, Curr_.AcctVal - Curr_.CSVNet);
 
     std::vector<double> prem_load(Invar.GetLength());
     assign(prem_load, Invar.GrossPmt - Curr_.NetPmt);
@@ -393,7 +393,7 @@ void custom_io_1_write(Ledger const& ledger_values, 
std::string const& filename)
         {
         os
             << std::setprecision(2)
-            <<        Curr_.AcctVal        [j]
+            <<        Curr_.AcctVal        [j] / 100.0
             << ',' << Curr_.CSVNet         [j] / 100.0
             << ',' << Curr_.EOYDeathBft    [j] / 100.0
             << std::setprecision(4)
@@ -404,7 +404,7 @@ void custom_io_1_write(Ledger const& ledger_values, 
std::string const& filename)
             << ',' << Curr_.SpecAmtLoad    [j] / 100.0   // 'MiscFees' = spec 
amt load.
             << ',' << prem_load            [j] / 100.0
             << ',' << 0                                  // 'MinPrem' always 
zero.
-            << ',' << surr_chg             [j]
+            << ',' << surr_chg             [j] / 100.0
             << ',' << Invar.GrossPmt       [j] / 100.0
             << '\n'
             ;
diff --git a/group_quote_pdf_gen_wx.cpp b/group_quote_pdf_gen_wx.cpp
index 85dbfe1f..b45db350 100644
--- a/group_quote_pdf_gen_wx.cpp
+++ b/group_quote_pdf_gen_wx.cpp
@@ -543,7 +543,7 @@ void group_quote_pdf_generator_wx::add_ledger(Ledger const& 
ledger)
                 break;
             case e_col_basic_face_amount:
                 {
-                double const z = invar.SpecAmt.at(year);
+                double const z = invar.SpecAmt.at(year) / 100.0;
                 rd.output_values[i] = '$' + ledger_format(z, f0);
                 if(is_composite)
                     {
@@ -563,7 +563,7 @@ void group_quote_pdf_generator_wx::add_ledger(Ledger const& 
ledger)
                 break;
             case e_col_supplemental_face_amount:
                 {
-                double const z = invar.TermSpecAmt.at(year);
+                double const z = invar.TermSpecAmt.at(year) / 100.0;
                 rd.output_values[i] = '$' + ledger_format(z, f0);
                 if(is_composite)
                     {
@@ -583,7 +583,7 @@ void group_quote_pdf_generator_wx::add_ledger(Ledger const& 
ledger)
                 break;
             case e_col_total_face_amount:
                 {
-                double const z = invar.SpecAmt.at(year) + 
invar.TermSpecAmt.at(year);
+                double const z = (invar.SpecAmt.at(year) + 
invar.TermSpecAmt.at(year)) / 100.0;
                 rd.output_values[i] = '$' + ledger_format(z, f0);
                 if(is_composite)
                     {
diff --git a/ihs_acctval.cpp b/ihs_acctval.cpp
index 29eced0b..3db369aa 100644
--- a/ihs_acctval.cpp
+++ b/ihs_acctval.cpp
@@ -149,7 +149,7 @@ AccountValue::AccountValue(Input const& input)
 currency AccountValue::base_specamt(int year) const
 {
     // CURRENCY !! Cents in ledger will make rounding unnecessary.
-    return round_specamt().c(InvariantValues().SpecAmt[year]);
+    return round_specamt().c(InvariantValues().SpecAmt[year] / 100.0);
 }
 
 /// Specified amount of term rider.
@@ -157,7 +157,7 @@ currency AccountValue::base_specamt(int year) const
 currency AccountValue::term_specamt(int year) const
 {
     // CURRENCY !! Cents in ledger will make rounding unnecessary.
-    return round_specamt().c(InvariantValues().TermSpecAmt[year]);
+    return round_specamt().c(InvariantValues().TermSpecAmt[year] / 100.0);
 }
 
 /// Specified amount for 7702 (not 7702A).
@@ -1227,7 +1227,7 @@ void AccountValue::FinalizeYear()
         }
     cv_7702 = std::max(cv_7702, HoneymoonValue);
 
-    VariantValues().AcctVal     [Year] = dblize(total_av);
+    VariantValues().AcctVal     [Year] = centize(total_av);
     VariantValues().AVGenAcct   [Year] = centize(AVGenAcct + AVRegLn + 
AVPrfLn);
     VariantValues().AVSepAcct   [Year] = centize(AVSepAcct);
     VariantValues().DacTaxRsv   [Year] = DacTaxRsv;
@@ -1244,7 +1244,7 @@ void AccountValue::FinalizeYear()
     TxSetDeathBft();
     TxSetTermAmt();
     // post values to LedgerVariant
-    InvariantValues().TermSpecAmt   [Year] = dblize(TermSpecAmt);
+    InvariantValues().TermSpecAmt   [Year] = centize(TermSpecAmt);
     VariantValues().TermPurchased   [Year] = centize(TermDB);
     // Add term rider DB
     VariantValues().BaseDeathBft    [Year] = centize(DBReflectingCorr);
@@ -1318,8 +1318,8 @@ void AccountValue::FinalizeYear()
         //   $git grep -h '\<Init[A-Z]' ledger_invariant.hpp
         // family should be eliminated.
         // CURRENCY !! KLUDGE 100.0 is a kludge to work around that kludge.
-        InvariantValues().InitBaseSpecAmt = InvariantValues().SpecAmt[0] * 
100.0;
-        InvariantValues().InitTermSpecAmt = InvariantValues().TermSpecAmt[0] * 
100.0;
+        InvariantValues().InitBaseSpecAmt = InvariantValues().SpecAmt[0];
+        InvariantValues().InitTermSpecAmt = InvariantValues().TermSpecAmt[0];
 
         InvariantValues().GrossPmt  [Year]  = 0.0;
         InvariantValues().EeGrossPmt[Year]  = 0.0;
diff --git a/ihs_avmly.cpp b/ihs_avmly.cpp
index c15e8b5b..7c3e6f04 100644
--- a/ihs_avmly.cpp
+++ b/ihs_avmly.cpp
@@ -815,12 +815,12 @@ void AccountValue::ChangeSpecAmtBy(currency delta)
 // TODO ?? Shouldn't this be moved to FinalizeMonth()? The problem is
 // that the ledger object is used for working storage, where it should
 // probably be write-only instead.
-        InvariantValues().SpecAmt[j] = dblize(ActualSpecAmt);
+        InvariantValues().SpecAmt[j] = centize(ActualSpecAmt);
         // Adjust term here only if it's formally a rider.
         // Otherwise, its amount should not have been changed.
         if(!TermIsNotRider)
             {
-            InvariantValues().TermSpecAmt[j] = dblize(TermSpecAmt);
+            InvariantValues().TermSpecAmt[j] = centize(TermSpecAmt);
             }
 // Term specamt is a vector in class LedgerInvariant, but a scalar in
 // the input classes, e.g.:
@@ -845,7 +845,7 @@ void AccountValue::ChangeSupplAmtBy(currency delta)
     // At least for now, there is no effect on surrender charges.
     for(int j = Year; j < BasicValues::GetLength(); ++j)
         {
-        InvariantValues().TermSpecAmt[j] = dblize(TermSpecAmt);
+        InvariantValues().TermSpecAmt[j] = centize(TermSpecAmt);
         }
     // Reset term DB whenever term SA changes. It's not obviously
     // necessary to do this here, but neither should it do any harm.
@@ -1018,10 +1018,10 @@ void AccountValue::TxSpecAmtChange()
                 ,minimum_specified_amount(0 == Year && 0 == Month, 
TermRiderActive)
                 );
             ActualSpecAmt = round_specamt().c(ActualSpecAmt); // CURRENCY !! 
already rounded?
-            InvariantValues().SpecAmt[j] = dblize(ActualSpecAmt);
+            InvariantValues().SpecAmt[j] = centize(ActualSpecAmt);
             if(!TermIsNotRider)
                 {
-                InvariantValues().TermSpecAmt[j] = dblize(TermSpecAmt);
+                InvariantValues().TermSpecAmt[j] = centize(TermSpecAmt);
                 }
             }
         // Set BOM DB for 7702 and 7702A.
@@ -1840,7 +1840,7 @@ void AccountValue::EndTermRider(bool convert)
     // Carry the new term spec amt forward into all future years.
     for(int j = Year; j < BasicValues::GetLength(); ++j)
         {
-        InvariantValues().TermSpecAmt[j] = dblize(TermSpecAmt);
+        InvariantValues().TermSpecAmt[j] = centize(TermSpecAmt);
         }
 }
 
diff --git a/ihs_avsolve.cpp b/ihs_avsolve.cpp
index 8af923a4..f4dc859a 100644
--- a/ihs_avsolve.cpp
+++ b/ihs_avsolve.cpp
@@ -245,8 +245,11 @@ currency AccountValue::SolveTest
         // CURRENCY !! Cents in ledger will make rounding unnecessary.
         value = round_minutiae().c
             (
-              VariantValues().EOYDeathBft[SolveTargetDuration_ - 1] / 100.0
-            - VariantValues().AcctVal    [SolveTargetDuration_ - 1]
+                (
+                  VariantValues().EOYDeathBft[SolveTargetDuration_ - 1]
+                - VariantValues().AcctVal    [SolveTargetDuration_ - 1]
+                )
+            / 100.0
             );
         }
     if(worst_negative < C0)
diff --git a/ledger_evaluator.cpp b/ledger_evaluator.cpp
index 5ba21630..b89cb0ab 100644
--- a/ledger_evaluator.cpp
+++ b/ledger_evaluator.cpp
@@ -615,7 +615,7 @@ format_map_t static_formats()
     ,{"AVGenAcct"                       , f5}
     ,{"AVRelOnDeath"                    , f1}
     ,{"AVSepAcct"                       , f5}
-    ,{"AcctVal"                         , f1}
+    ,{"AcctVal"                         , f5}
     ,{"AccumulatedPremium"              , f1}
     ,{"AddonCompOnAssets"               , f1}
     ,{"AddonCompOnPremium"              , f1}
@@ -661,7 +661,7 @@ format_map_t static_formats()
     ,{"RiderCharges"                    , f5}
     ,{"Salary"                          , f1}
     ,{"SepAcctCharges"                  , f5}
-    ,{"SpecAmt"                         , f1}
+    ,{"SpecAmt"                         , f5}
     ,{"SpecAmtLoad"                     , f5}
     ,{"SpouseRiderAmount"               , f1}
     ,{"SurrChg"                         , f5}
@@ -796,7 +796,7 @@ ledger_evaluator Ledger::make_evaluator() const
     vectors   ["SupplSpecAmt"            ] = &SupplSpecAmt;
     title_map ["SupplSpecAmt"            ] = "Suppl\nSpecified\nAmount";
     mask_map  ["SupplSpecAmt"            ] = "999,999,999";
-    format_map["SupplSpecAmt"            ] = f1;
+    format_map["SupplSpecAmt"            ] = f5;
 
     // [End of derived columns.]
 
diff --git a/ledger_invariant_init.cpp b/ledger_invariant_init.cpp
index 4f9da0a9..da360bfc 100644
--- a/ledger_invariant_init.cpp
+++ b/ledger_invariant_init.cpp
@@ -105,11 +105,11 @@ void LedgerInvariant::Init(BasicValues const* b)
     HasSupplSpecAmt            = false;
     if(b->yare_input_.TermRider)
         {
-        TermSpecAmt            .assign(Length, b->yare_input_.TermRiderAmount);
+        TermSpecAmt            .assign(Length, b->yare_input_.TermRiderAmount 
* 100.0);
         }
     else if(b->database().query<bool>(DB_TermIsNotRider))
         {
-        TermSpecAmt            = dblize(b->DeathBfts_->supplamt());
+        TermSpecAmt            = centize(b->DeathBfts_->supplamt());
         if(!each_equal(TermSpecAmt, 0.0))
             {
             HasSupplSpecAmt    = true;
@@ -119,7 +119,7 @@ void LedgerInvariant::Init(BasicValues const* b)
         {
         TermSpecAmt            .assign(Length, 0.0);
         }
-    SpecAmt                    = dblize(b->DeathBfts_->specamt());
+    SpecAmt                    = centize(b->DeathBfts_->specamt());
 //  Dcv                        = DYNAMIC
 
     // Forborne vectors.
@@ -158,8 +158,8 @@ void LedgerInvariant::Init(BasicValues const* b)
     // Scalable scalars.
 
     // SOMEDAY !! Things indexed with '[0]' should probably use inforce year 
instead.
-    InitBaseSpecAmt            = 100.0 * dblize(b->DeathBfts_->specamt()[0]);
-    InitTermSpecAmt            = 100.0 * TermSpecAmt[0];
+    InitBaseSpecAmt            = centize(b->DeathBfts_->specamt()[0]);
+    InitTermSpecAmt            = TermSpecAmt[0];
     ChildRiderAmount           = b->yare_input_.ChildRiderAmount;
     SpouseRiderAmount          = b->yare_input_.SpouseRiderAmount;
 
@@ -731,11 +731,11 @@ void LedgerInvariant::ReInit(BasicValues const* b)
     HasSupplSpecAmt            = false;
     if(b->yare_input_.TermRider)
         {
-        TermSpecAmt            .assign(Length, b->yare_input_.TermRiderAmount);
+        TermSpecAmt            .assign(Length, b->yare_input_.TermRiderAmount 
* 100.0);
         }
     else if(b->database().query<bool>(DB_TermIsNotRider))
         {
-        TermSpecAmt            = dblize(b->DeathBfts_->supplamt());
+        TermSpecAmt            = centize(b->DeathBfts_->supplamt());
         if(!each_equal(TermSpecAmt, 0.0))
             {
             HasSupplSpecAmt    = true;
@@ -745,10 +745,10 @@ void LedgerInvariant::ReInit(BasicValues const* b)
         {
         TermSpecAmt            .assign(Length, 0.0);
         }
-    SpecAmt                    = dblize(b->DeathBfts_->specamt());
+    SpecAmt                    = centize(b->DeathBfts_->specamt());
 
-    InitBaseSpecAmt            = 100.0 * dblize(b->DeathBfts_->specamt()[0]);
-    InitTermSpecAmt            = 100.0 * TermSpecAmt[0];
+    InitBaseSpecAmt            = centize(b->DeathBfts_->specamt()[0]);
+    InitTermSpecAmt            = TermSpecAmt[0];
 
     IsMec                      = false;
     MecMonth                   = 11;
diff --git a/ledger_text_formats.cpp b/ledger_text_formats.cpp
index 1e4da5b2..bcb44d6e 100644
--- a/ledger_text_formats.cpp
+++ b/ledger_text_formats.cpp
@@ -72,8 +72,8 @@ std::map<std::string,ledger_metadata> const& 
ledger_metadata_map()
         m["AttainedAge"                ] = ledger_metadata(0, oe_format_normal 
   , "Attained Age"                          );
         m["PolicyYear"                 ] = ledger_metadata(0, oe_format_normal 
   , "Policy Year"                           );
         m["InforceLives"               ] = ledger_metadata(4, oe_format_normal 
   , "BOY Lives Inforce"                     ); // "Inforce Lives BOY"
-        m["SpecAmt"                    ] = ledger_metadata(0, oe_format_normal 
   , "Specified Amount"                      ); // "Base Specified Amount"
-        m["TermSpecAmt"                ] = ledger_metadata(0, oe_format_normal 
   , "Term Specified Amount"                 );
+        m["SpecAmt"                    ] = ledger_metadata(0, 
oe_cents_as_dollars , "Specified Amount"                      ); // "Base 
Specified Amount"
+        m["TermSpecAmt"                ] = ledger_metadata(0, 
oe_cents_as_dollars , "Term Specified Amount"                 );
         m["SupplSpecAmt"               ] = ledger_metadata(0, oe_format_normal 
   , "Suppl Specified Amount"                ); // "Supplemental Specified 
Amount"
         m["CorridorFactor"             ] = ledger_metadata(0, 
oe_format_percentage, "Corridor Factor"                       );
         m["AnnGAIntRate_Current"       ] = ledger_metadata(2, 
oe_format_percentage, "Curr Ann Gen Acct Int Rate"            ); // "General 
Account Crediting Rate"
@@ -586,10 +586,10 @@ void PrintCellTabDelimited
         os << Curr_.value_str("GrossIntCredited"      ,j, 100.0) << '\t';
         os << Curr_.value_str("NetIntCredited"        ,j, 100.0) << '\t';
 
-        os << Guar_.value_str("AcctVal"               ,j) << '\t';
+        os << Guar_.value_str("AcctVal"               ,j, 100.0) << '\t';
         os << Guar_.value_str("CSVNet"                ,j, 100.0) << '\t';
         os << Guar_.value_str("EOYDeathBft"           ,j, 100.0) << '\t';
-        os << Curr_.value_str("AcctVal"               ,j) << '\t';
+        os << Curr_.value_str("AcctVal"               ,j, 100.0) << '\t';
         os << Curr_.value_str("CSVNet"                ,j, 100.0) << '\t';
         os << Curr_.value_str("EOYDeathBft"           ,j, 100.0) << '\t';
 
@@ -743,8 +743,8 @@ void PrintRosterTabDelimited
         << Invar.value_str("UWClass"                ) << '\t'
         << Invar.value_str("Smoker"                 ) << '\t'
         << Invar.value_str("Salary"               ,d) << '\t'
-        << Invar.value_str("SpecAmt"              ,d) << '\t'
-        << Invar.value_str("TermSpecAmt"          ,d) << '\t'
+        << Invar.value_str("SpecAmt"              ,d, 100.0) << '\t'
+        << Invar.value_str("TermSpecAmt"          ,d, 100.0) << '\t'
         << Invar.value_str("InitTgtPrem"            , 100.0) << '\t'
         << Invar.value_str("ModalMinimumPremium"  ,d, 100.0) << '\t'
         << Invar.value_str("EeModalMinimumPremium",d, 100.0) << '\t'
@@ -1029,15 +1029,15 @@ void FlatTextLedgerPrinter::PrintNumericalSummary() 
const
 
         os_ << std::setw(12) << invar().Outlay     [row] / 100.0;
 
-        os_ << std::setw(12) << guar_().AcctVal    [row];
+        os_ << std::setw(12) << guar_().AcctVal    [row] / 100.0;
         os_ << std::setw(12) << guar_().CSVNet     [row] / 100.0;
         os_ << std::setw(12) << guar_().EOYDeathBft[row] / 100.0;
 
-        os_ << std::setw(12) << mdpt_().AcctVal    [row];
+        os_ << std::setw(12) << mdpt_().AcctVal    [row] / 100.0;
         os_ << std::setw(12) << mdpt_().CSVNet     [row] / 100.0;
         os_ << std::setw(12) << mdpt_().EOYDeathBft[row] / 100.0;
 
-        os_ << std::setw(12) << curr_().AcctVal    [row];
+        os_ << std::setw(12) << curr_().AcctVal    [row] / 100.0;
         os_ << std::setw(12) << curr_().CSVNet     [row] / 100.0;
         os_ << std::setw(12) << curr_().EOYDeathBft[row] / 100.0;
 
@@ -1124,11 +1124,11 @@ void FlatTextLedgerPrinter::PrintTabularDetail() const
 
         os_ << std::setw(12) << invar().Outlay     [j] / 100.0;
 
-        os_ << std::setw(12) << guar_().AcctVal    [j];
+        os_ << std::setw(12) << guar_().AcctVal    [j] / 100.0;
         os_ << std::setw(12) << guar_().CSVNet     [j] / 100.0;
         os_ << std::setw(12) << guar_().EOYDeathBft[j] / 100.0;
 
-        os_ << std::setw(12) << curr_().AcctVal    [j];
+        os_ << std::setw(12) << curr_().AcctVal    [j] / 100.0;
         os_ << std::setw(12) << curr_().CSVNet     [j] / 100.0;
         os_ << std::setw(12) << curr_().EOYDeathBft[j] / 100.0;
 
diff --git a/main_cli.cpp b/main_cli.cpp
index d14e301a..2c5fa755 100644
--- a/main_cli.cpp
+++ b/main_cli.cpp
@@ -91,7 +91,7 @@ void self_test()
 
     expected_value = 6305652.52;
     z("CLI_selftest", naic_no_solve);
-    observed_value = z.principal_ledger()->GetCurrFull().AcctVal.back();
+    observed_value = z.principal_ledger()->GetCurrFull().AcctVal.back() / 
100.0;
     if(!antediluvian && .005 < std::fabs(expected_value - observed_value))
         {
         warning()
@@ -108,7 +108,7 @@ void self_test()
     naic_solve_specamt["SolveType"] = "Specified amount";
     expected_value = 1879139.14;
     z("CLI_selftest", naic_solve_specamt);
-    observed_value = z.principal_ledger()->GetCurrFull().AcctVal.back();
+    observed_value = z.principal_ledger()->GetCurrFull().AcctVal.back() / 
100.0;
     if(!antediluvian && .005 < std::fabs(expected_value - observed_value))
         {
         warning()



reply via email to

[Prev in Thread] Current Thread [Next in Thread]