alberto-art3ch commented on PR #6201:
URL: https://github.com/apache/fineract/pull/6201#issuecomment-6504485433

   > We dont want to call any helper (even if static) from entity objects... 
the math either belong into the entity itself or not and should not be called 
from there. I kinda prefer the latter option:
   > 
   > Entity itself should contains only the most necessary functions to create, 
fetch, update or delete its field values. How to calculate that value usually 
belongs to a service / helper / util which based on incoming parameters 
calculate something and that "something" can be provided to the entity which 
stores it. Would you be open to consider this strategy?
   
   @adamsaghy Done in this PR. Entities no longer call any helper: 
SavingsAccountTransactionSummaryWrapper computes the summary totals (and the 
balance) into SavingsAccountSummaryTotals / SavingsAccountPivotSummaryTotals, 
and SavingsAccountSummary only stores them. The services that drive 
deposit/withdraw-independent refreshes (escheat, inactive sub-status, FD/RD 
closure, maturity and premature-closure interest, guarantor holds) now refresh 
the summary after the entity mutation. Withhold tax receives the total interest 
posted from the service instead of computing it in the entity.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to