Currency names added in Dropdown box
This commit is contained in:
+12
-3
@@ -2,6 +2,8 @@ package org.mifosng.platform.api.data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
@@ -18,6 +20,8 @@ public class SavingProductData implements Serializable {
|
||||
private DateTime createdOn;
|
||||
private DateTime lastModifedOn;
|
||||
|
||||
private List<CurrencyData> currencyOptions = new ArrayList<CurrencyData>();
|
||||
|
||||
public SavingProductData(){
|
||||
//
|
||||
}
|
||||
@@ -96,7 +100,12 @@ public class SavingProductData implements Serializable {
|
||||
public void setDigitsAfterDecimal(Integer 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.SQLException;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
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.SavingProductLookup;
|
||||
import org.mifosng.platform.currency.service.CurrencyReadPlatformService;
|
||||
@@ -68,6 +70,8 @@ public class SavingProductReadPlatformServiceImpl implements
|
||||
+ " where sp.id = ?";
|
||||
SavingProductData productData = this.jdbcTemplate.queryForObject(sql,
|
||||
savingProductMapper, new Object[] { savingProductId });
|
||||
|
||||
populateProductDataWithDropdownOptions(productData);
|
||||
|
||||
return productData;
|
||||
} catch (EmptyResultDataAccessException e) {
|
||||
@@ -80,6 +84,8 @@ public class SavingProductReadPlatformServiceImpl implements
|
||||
|
||||
SavingProductData productData=new SavingProductData();
|
||||
|
||||
populateProductDataWithDropdownOptions(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"
|
||||
url="jdbc:mysql://localhost:3306/mifosplatform-tenants"
|
||||
username="root"
|
||||
password="mysql"
|
||||
password="mifos"
|
||||
validationQuery="select 1"
|
||||
maxActive="10"
|
||||
maxIdle="4"
|
||||
|
||||
Reference in New Issue
Block a user