add gl mapping in the saving product,current product,rd product and also add genrate account no all three
This commit is contained in:
+2
-1
@@ -137,7 +137,8 @@ public class CurrentProductDataValidator {
|
||||
SavingsApiConstants.balanceFrequencyParamName, SavingsApiConstants.accountClosedZeroBalanceInDayClosingParamName,
|
||||
SavingsApiConstants.balanceSwapOptionParamName, SavingsApiConstants.msmeParamName,
|
||||
SavingsApiConstants.autoDebitFacilityParamName, SavingsApiConstants.avgBalanceCalcPeriodParamName,
|
||||
SavingsApiConstants.validForPeriodParamName, SavingsApiConstants.odAccountClosedZeroBalanceInDayClosingParamName));
|
||||
SavingsApiConstants.validForPeriodParamName, SavingsApiConstants.odAccountClosedZeroBalanceInDayClosingParamName,
|
||||
SavingsApiConstants.glAccountIdParamName));
|
||||
|
||||
public void validateForCreate(final String json) {
|
||||
if (StringUtils.isBlank(json)) {
|
||||
|
||||
+11
@@ -55,6 +55,7 @@ import static org.apache.fineract.portfolio.savings.SavingsApiConstants.withdraw
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.accountTypeParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.customerSegmentParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.productCodeParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.glAccountIdParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.effectiveDateParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.effectiveToParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.endDateParamName;
|
||||
@@ -228,6 +229,9 @@ public class CurrentProduct extends AbstractPersistableCustom<Long> {
|
||||
@Column(name = "product_code", length = 20, unique = true)
|
||||
private String productCode;
|
||||
|
||||
@Column(name = "gl_account_id")
|
||||
private Long glAccountId;
|
||||
|
||||
@Column(name = "effective_date")
|
||||
private LocalDate effectiveDate;
|
||||
|
||||
@@ -734,6 +738,11 @@ public class CurrentProduct extends AbstractPersistableCustom<Long> {
|
||||
actualChanges.put(productCodeParamName, newValue);
|
||||
this.productCode = newValue;
|
||||
}
|
||||
if (command.isChangeInLongParameterNamed(glAccountIdParamName, this.glAccountId)) {
|
||||
final Long newValue = command.longValueOfParameterNamed(glAccountIdParamName);
|
||||
actualChanges.put(glAccountIdParamName, newValue);
|
||||
this.glAccountId = newValue;
|
||||
}
|
||||
if (command.isChangeInBooleanParameterNamed(introducerRequiredParamName, this.introducerRequired)) {
|
||||
final boolean newValue = command.booleanPrimitiveValueOfParameterNamed(introducerRequiredParamName);
|
||||
actualChanges.put(introducerRequiredParamName, newValue);
|
||||
@@ -821,6 +830,8 @@ public class CurrentProduct extends AbstractPersistableCustom<Long> {
|
||||
public void setCustomerSegment(String customerSegment) { this.customerSegment = customerSegment; }
|
||||
public String getProductCode() { return productCode; }
|
||||
public void setProductCode(String productCode) { this.productCode = productCode; }
|
||||
public Long getGlAccountId() { return glAccountId; }
|
||||
public void setGlAccountId(Long glAccountId) { this.glAccountId = glAccountId; }
|
||||
public LocalDate getEffectiveDate() { return effectiveDate; }
|
||||
public void setEffectiveDate(LocalDate effectiveDate) { this.effectiveDate = effectiveDate; }
|
||||
public LocalDate getEffectiveTo() { return effectiveTo; }
|
||||
|
||||
+4
@@ -71,6 +71,7 @@ import static org.apache.fineract.portfolio.savings.SavingsApiConstants.nominalA
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.otherGlMappingsParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.overdraftLimitParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.productCodeParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.glAccountIdParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.shareLinkingEnabledParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.shortNameParamName;
|
||||
import static org.apache.fineract.portfolio.savings.SavingsApiConstants.taxGroupIdParamName;
|
||||
@@ -241,6 +242,9 @@ public class CurrentProductAssembler {
|
||||
if (command.parameterExists(productCodeParamName)) {
|
||||
product.setProductCode(command.stringValueOfParameterNamed(productCodeParamName));
|
||||
}
|
||||
if (command.parameterExists(glAccountIdParamName)) {
|
||||
product.setGlAccountId(command.longValueOfParameterNamed(glAccountIdParamName));
|
||||
}
|
||||
if (command.parameterExists(effectiveDateParamName)) {
|
||||
product.setEffectiveDate(command.localDateValueOfParameterNamed(effectiveDateParamName));
|
||||
}
|
||||
|
||||
+4
-1
@@ -186,7 +186,7 @@ public class CurrentProductReadPlatformServiceImpl implements CurrentProductRead
|
||||
sqlBuilder.append("cp.other_gl_mappings as otherGlMappings, ");
|
||||
|
||||
// Enhanced fields
|
||||
sqlBuilder.append("cp.account_type as accountType, cp.customer_segment as customerSegment, cp.product_code as productCode, ");
|
||||
sqlBuilder.append("cp.account_type as accountType, cp.customer_segment as customerSegment, cp.product_code as productCode, cp.gl_account_id as glAccountId, gla.name as glAccountName, ");
|
||||
sqlBuilder.append("cp.effective_date as effectiveDate, cp.effective_to as effectiveTo, cp.end_date as endDate, ");
|
||||
sqlBuilder.append("cp.introducer_required as introducerRequired, cp.share_linking_enabled as shareLinkingEnabled, ");
|
||||
sqlBuilder.append("cp.nomination_facility as nominationFacility, cp.dormancy_alert as dormancyAlert, ");
|
||||
@@ -202,6 +202,7 @@ public class CurrentProductReadPlatformServiceImpl implements CurrentProductRead
|
||||
sqlBuilder.append("from m_current_product cp ");
|
||||
sqlBuilder.append("join m_currency curr on curr.code = cp.currency_code ");
|
||||
sqlBuilder.append("left join m_tax_group tg on tg.id = cp.tax_group_id ");
|
||||
sqlBuilder.append("left join acc_gl_account gla on gla.id = cp.gl_account_id ");
|
||||
|
||||
this.schemaSql = sqlBuilder.toString();
|
||||
}
|
||||
@@ -297,6 +298,8 @@ public class CurrentProductReadPlatformServiceImpl implements CurrentProductRead
|
||||
productData.setAccountType(rs.getString("accountType"));
|
||||
productData.setCustomerSegment(rs.getString("customerSegment"));
|
||||
productData.setProductCode(rs.getString("productCode"));
|
||||
productData.setGlAccountId(JdbcSupport.getLong(rs, "glAccountId"));
|
||||
productData.setGlAccountName(rs.getString("glAccountName"));
|
||||
productData.setEffectiveDate(JdbcSupport.getLocalDate(rs, "effectiveDate"));
|
||||
productData.setEffectiveTo(JdbcSupport.getLocalDate(rs, "effectiveTo"));
|
||||
productData.setEndDate(JdbcSupport.getLocalDate(rs, "endDate"));
|
||||
|
||||
Reference in New Issue
Block a user