mariiaKraievska commented on code in PR #5828:
URL: https://github.com/apache/fineract/pull/5828#discussion_r3201468394


##########
fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/loanschedule/service/LoanScheduleAssembler.java:
##########
@@ -271,7 +271,7 @@ private LoanApplicationTerms 
assembleLoanApplicationTermsFrom(final JsonElement
         LocalDate repaymentsStartingFromDate = 
this.fromApiJsonHelper.extractLocalDateNamed("repaymentsStartingFromDate", 
element);
         final LocalDate submittedOnDate = 
this.fromApiJsonHelper.extractLocalDateNamed("submittedOnDate", element);
 
-        RepaymentStartDateType repaymentStartDateType = 
loanProduct.getRepaymentStartDateType();
+        RepaymentStartDateType repaymentStartDateType = 
loanProduct.getLoanProductRelatedDetail().getRepaymentStartDateType();

Review Comment:
   LoanProduct is the entity for a loan product. LoanProductRelatedDetail is an 
@Embeddable used for fields that are defined at product level and 
copied/persisted per loan — principal, repayment frequency, schedule flags, 
etc... repaymentStartDateType falls into that same category, so moving it into 
LoanProductRelatedDetail keeps one consistent place in code for “fields shared 
between product and loan”.
   Behaviour wise, the product still defines the default (via m_product_loan), 
and the loan holds its own value on m_loan when we need loan-level 
persistence/overrides — same as before this PR. We only changed where the field 
sits in the domain model to match the embeddable pattern.



-- 
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