Merge branch 'FINERACT-53' into develop
This commit is contained in:
+8
-5
@@ -273,12 +273,15 @@ public class LoansApiResource {
|
|||||||
// for JLG loan both client and group details are required
|
// for JLG loan both client and group details are required
|
||||||
if (templateType.equals("individual") || templateType.equals("jlg")) {
|
if (templateType.equals("individual") || templateType.equals("jlg")) {
|
||||||
|
|
||||||
final LoanAccountData loanAccountClientDetails = this.loanReadPlatformService.retrieveClientDetailsTemplate(clientId);
|
if(clientId == null) {
|
||||||
|
newLoanAccount = newLoanAccount == null ? LoanAccountData.emptyTemplate() : newLoanAccount;
|
||||||
|
} else {
|
||||||
|
final LoanAccountData loanAccountClientDetails = this.loanReadPlatformService.retrieveClientDetailsTemplate(clientId);
|
||||||
|
|
||||||
officeId = loanAccountClientDetails.officeId();
|
officeId = loanAccountClientDetails.officeId();
|
||||||
|
newLoanAccount = newLoanAccount == null ? loanAccountClientDetails : LoanAccountData.populateClientDefaults(newLoanAccount,
|
||||||
newLoanAccount = newLoanAccount == null ? loanAccountClientDetails : LoanAccountData.populateClientDefaults(newLoanAccount,
|
loanAccountClientDetails);
|
||||||
loanAccountClientDetails);
|
}
|
||||||
|
|
||||||
// if it's JLG loan add group details
|
// if it's JLG loan add group details
|
||||||
if (templateType.equals("jlg")) {
|
if (templateType.equals("jlg")) {
|
||||||
|
|||||||
+10
@@ -1557,4 +1557,14 @@ public class LoanAccountData {
|
|||||||
return (this.repaymentFrequencyType.getId().intValue() == PeriodFrequencyType.MONTHS.getValue());
|
return (this.repaymentFrequencyType.getId().intValue() == PeriodFrequencyType.MONTHS.getValue());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Used to produce a {@link LoanAccountData} with only collateral options for now.
|
||||||
|
*
|
||||||
|
* @return {@link LoanAccountData} object
|
||||||
|
*/
|
||||||
|
public static LoanAccountData emptyTemplate() {
|
||||||
|
final Collection<CodeValueData> loanCollateralOptions = null;
|
||||||
|
|
||||||
|
return LoanAccountData.collateralTemplate(loanCollateralOptions);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user