How Distributed Fees Work With Subtotals

Problem
 
Fee Subtotals in Estimator were using the Distributed Direct Cost as their starting point for calculating their values.  This means that Distributed Fees are included within all Fee Subtotals.  As a result, any Fee that is based on a Subtotal is effectively double-dipping on the distributed fee.
 
From the user's perspective, a distributed fee has a cost, and the estimator is simply spreading that cost across the estimate when marking the fee as distributed.  As a result, simply marking a fee as distributed shouldn't change the project's total cost because the total cost is just the direct cost plus the cost of all of the fees.
 
User Example
 

I have a direct cost project value that is $100,000. 

I have a fee with a value of 10% of the subtotal of the original project value ($100,000)

This should equate to $10,000

Now, I want to distribute that cost across the project cost items and end up with a total project cost of $110,000
 
Resolution 
 

Subtotals will now be based upon "Direct Cost instead of the Distributed Direct Cost and will now include the cost of distributed fees within them.

Example: 

Old Method - Subtotal = Distributed Direct Cost + Fee 1
New Method -  Subtotal = Direct Cost + Fee 1 + Fee 2
 
Notes:
  1. A fee subtotal is calculated as the Direct Cost plus previous fees.
  2. If the user has a fee subtotal followed by a distributed fee based on that fee subtotal, the fee subtotal is still based on Direct Cost.
  3. If the user closes and reopens an estimate containing fee subtotals followed by a distributed fee based on that fee subtotal, the fee subtotal is still based on Direct Cost.
  4. If the user has a fee subtotal followed by a distributed fee based on that fee subtotal, the fee subtotal is still based on Direct Cost when creating a new Estimate Version.
  5. If the user has a fee subtotal followed by a distributed fee based on that fee subtotal, the fee subtotal is still based on Direct Cost when creating a new Estimate from a Template.
  6. If the user opens an old estimate with fee subtotal followed by a distributed fee based on that fee subtotal, the estimate's fees and Total Cost will update according to the new fee subtotal calculation.