Currency names added in Dropdown box
This commit is contained in:
+10
-1
@@ -2,6 +2,8 @@ package org.mifosng.platform.api.data;
|
|||||||
|
|
||||||
import java.io.Serializable;
|
import java.io.Serializable;
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
|
||||||
@@ -18,6 +20,8 @@ public class SavingProductData implements Serializable {
|
|||||||
private DateTime createdOn;
|
private DateTime createdOn;
|
||||||
private DateTime lastModifedOn;
|
private DateTime lastModifedOn;
|
||||||
|
|
||||||
|
private List<CurrencyData> currencyOptions = new ArrayList<CurrencyData>();
|
||||||
|
|
||||||
public SavingProductData(){
|
public SavingProductData(){
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
@@ -97,6 +101,11 @@ public class SavingProductData implements Serializable {
|
|||||||
this.digitsAfterDecimal = digitsAfterDecimal;
|
this.digitsAfterDecimal = digitsAfterDecimal;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public List<CurrencyData> getCurrencyOptions() {
|
||||||
|
return currencyOptions;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setCurrencyOptions(List<CurrencyData> currencyOptions) {
|
||||||
|
this.currencyOptions = currencyOptions;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+11
@@ -4,8 +4,10 @@ import java.math.BigDecimal;
|
|||||||
import java.sql.ResultSet;
|
import java.sql.ResultSet;
|
||||||
import java.sql.SQLException;
|
import java.sql.SQLException;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
import org.joda.time.DateTime;
|
import org.joda.time.DateTime;
|
||||||
|
import org.mifosng.platform.api.data.CurrencyData;
|
||||||
import org.mifosng.platform.api.data.SavingProductData;
|
import org.mifosng.platform.api.data.SavingProductData;
|
||||||
import org.mifosng.platform.api.data.SavingProductLookup;
|
import org.mifosng.platform.api.data.SavingProductLookup;
|
||||||
import org.mifosng.platform.currency.service.CurrencyReadPlatformService;
|
import org.mifosng.platform.currency.service.CurrencyReadPlatformService;
|
||||||
@@ -69,6 +71,8 @@ public class SavingProductReadPlatformServiceImpl implements
|
|||||||
SavingProductData productData = this.jdbcTemplate.queryForObject(sql,
|
SavingProductData productData = this.jdbcTemplate.queryForObject(sql,
|
||||||
savingProductMapper, new Object[] { savingProductId });
|
savingProductMapper, new Object[] { savingProductId });
|
||||||
|
|
||||||
|
populateProductDataWithDropdownOptions(productData);
|
||||||
|
|
||||||
return productData;
|
return productData;
|
||||||
} catch (EmptyResultDataAccessException e) {
|
} catch (EmptyResultDataAccessException e) {
|
||||||
throw new LoanProductNotFoundException(savingProductId);
|
throw new LoanProductNotFoundException(savingProductId);
|
||||||
@@ -80,6 +84,8 @@ public class SavingProductReadPlatformServiceImpl implements
|
|||||||
|
|
||||||
SavingProductData productData=new SavingProductData();
|
SavingProductData productData=new SavingProductData();
|
||||||
|
|
||||||
|
populateProductDataWithDropdownOptions(productData);
|
||||||
|
|
||||||
return productData;
|
return productData;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,5 +142,10 @@ public class SavingProductReadPlatformServiceImpl implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
private void populateProductDataWithDropdownOptions(final SavingProductData productData) {
|
||||||
|
|
||||||
|
List<CurrencyData> currencyOptions = currencyReadPlatformService.retrieveAllowedCurrencies();
|
||||||
|
productData.setCurrencyOptions(currencyOptions);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
driverClassName="com.mysql.jdbc.Driver"
|
driverClassName="com.mysql.jdbc.Driver"
|
||||||
url="jdbc:mysql://localhost:3306/mifosplatform-tenants"
|
url="jdbc:mysql://localhost:3306/mifosplatform-tenants"
|
||||||
username="root"
|
username="root"
|
||||||
password="mysql"
|
password="mifos"
|
||||||
validationQuery="select 1"
|
validationQuery="select 1"
|
||||||
maxActive="10"
|
maxActive="10"
|
||||||
maxIdle="4"
|
maxIdle="4"
|
||||||
|
|||||||
Reference in New Issue
Block a user