align loan product data with field names used for create. return enumerations with extra information that describe it better.
This commit is contained in:
+2
-2
@@ -32,14 +32,14 @@ $(document).ready(function() {
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "n" + digits);
|
||||
},
|
||||
moneyWithCurrency: function(monetaryObj) {
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "c" + digits);
|
||||
},
|
||||
decimal: function(number, digits) {
|
||||
|
||||
@@ -26,14 +26,14 @@
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "n" + digits);
|
||||
},
|
||||
moneyWithCurrency: function(monetaryObj) {
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "c" + digits);
|
||||
},
|
||||
decimal: function(number, digits) {
|
||||
|
||||
@@ -25,14 +25,14 @@ $(document).ready(function() {
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "n" + digits);
|
||||
},
|
||||
moneyWithCurrency: function(monetaryObj) {
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "c" + digits);
|
||||
},
|
||||
decimal: function(number, digits) {
|
||||
|
||||
+15
-15
@@ -37,8 +37,8 @@
|
||||
<legend><spring:message code="form.legend.loan.product.currency"/></legend>
|
||||
<label for="currencyCode"><spring:message code="form.label.loan.product.currency"/></label>
|
||||
<select id="currencyCode" name="currencyCode" title="" style="width: 300px;">
|
||||
{{#each possibleCurrencies}}
|
||||
{{#if $parent.parent.data.principalMoney.currencyCode===code}}
|
||||
{{#each currencyOptions}}
|
||||
{{#if $parent.parent.data.principal.currencyCode===code}}
|
||||
<option value="{{=code}}" selected="selected">{{=name}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=code}}">{{=name}}</option>
|
||||
@@ -46,7 +46,7 @@
|
||||
{{/each}}
|
||||
</select>
|
||||
<label for="digitsAfterDecimal"><spring:message code="form.label.loan.product.decimalplaces"/></label>
|
||||
<input id="digitsAfterDecimal" name="digitsAfterDecimal" title="" style="width: 300px;" value="{{=$ctx.number(principalMoney.currencyDigitsAfterDecimal)}}" />
|
||||
<input id="digitsAfterDecimal" name="digitsAfterDecimal" title="" style="width: 300px;" value="{{=$ctx.number(principal.digitsAfterDecimal)}}" />
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend><spring:message code="form.legend.loan.product.loan.terms"/></legend>
|
||||
@@ -58,17 +58,17 @@
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.loan.amount"/></td>
|
||||
<td>
|
||||
<input id="principal" name="principal" title="" style="width: 125px;" value="{{=$ctx.money(principalMoney)}}" />
|
||||
<input id="principal" name="principal" title="" style="width: 125px;" value="{{=$ctx.money(principal)}}" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.repaidevery"/></td>
|
||||
<td>
|
||||
<input id="repaymentEvery" name="repaymentEvery" title="" style="width: 50px;" value="{{=$ctx.number(repaidEvery)}}"/>
|
||||
<input id="repaymentEvery" name="repaymentEvery" title="" style="width: 50px;" value="{{=$ctx.number(repaymentEvery)}}"/>
|
||||
|
||||
<select id="repaymentFrequencyType" name="repaymentFrequencyType" title="" style="width: 121px;">
|
||||
{{#each repaymentFrequencyOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.repaymentPeriodFrequency)===$ctx.number(id)}}
|
||||
{{#each repaymentFrequencyTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.repaymentFrequencyType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
@@ -93,8 +93,8 @@
|
||||
<input id="interestRatePerPeriod" name="interestRatePerPeriod" title="" style="width: 70px;" value="{{=$ctx.decimal(interestRatePerPeriod, 4)}}" />
|
||||
|
||||
<select id="interestRateFrequencyType" name="interestRateFrequencyType" title="" style="width: 139px;">
|
||||
{{#each interestFrequencyOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.interestRatePeriod)===$ctx.number(id)}}
|
||||
{{#each interestRateFrequencyTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.interestRateFrequencyType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
@@ -107,8 +107,8 @@
|
||||
<td><spring:message code="form.label.loan.product.amortization"/></td>
|
||||
<td>
|
||||
<select id="amortizationType" name="amortizationType" title="" style="width: 220px;">
|
||||
{{#each possibleAmortizationOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.amortizationMethod)===$ctx.number(id)}}
|
||||
{{#each amortizationTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.amortizationType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
@@ -121,8 +121,8 @@
|
||||
<td><spring:message code="form.label.loan.product.interest.method"/></td>
|
||||
<td>
|
||||
<select id="interestType" name="interestType" title="" style="width: 220px;">
|
||||
{{#each possibleInterestOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.interestMethod)===$ctx.number(id)}}
|
||||
{{#each interestTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.interestType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
@@ -135,8 +135,8 @@
|
||||
<td><spring:message code="form.label.loan.product.interest.rate.calcutated.in.period"/></td>
|
||||
<td>
|
||||
<select id="interestCalculationPeriodType" name="interestCalculationPeriodType" title="" style="width: 220px;">
|
||||
{{#each possibleInterestRateCalculatedInPeriodOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.interestRateCalculatedInPeriod)===$ctx.number(id)}}
|
||||
{{#each interestCalculationPeriodTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.interestCalculationPeriodType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
|
||||
+2
-2
@@ -32,14 +32,14 @@ $(document).ready(function() {
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "n" + digits);
|
||||
},
|
||||
moneyWithCurrency: function(monetaryObj) {
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "c" + digits);
|
||||
},
|
||||
decimal: function(number, digits) {
|
||||
|
||||
@@ -24,14 +24,14 @@ $(document).ready(function() {
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "n" + digits);
|
||||
},
|
||||
moneyWithCurrency: function(monetaryObj) {
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "c" + digits);
|
||||
},
|
||||
decimal: function(number, digits) {
|
||||
|
||||
@@ -23,14 +23,14 @@ $(document).ready(function() {
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "n" + digits);
|
||||
},
|
||||
moneyWithCurrency: function(monetaryObj) {
|
||||
|
||||
Globalize.culture().numberFormat.currency.symbol = monetaryObj.displaySymbol;
|
||||
|
||||
var digits = monetaryObj.currencyDigitsAfterDecimal.toFixed(0);
|
||||
var digits = monetaryObj.digitsAfterDecimal.toFixed(0);
|
||||
return Globalize.format(monetaryObj.amount, "c" + digits);
|
||||
},
|
||||
decimal: function(number, digits) {
|
||||
|
||||
@@ -55,8 +55,8 @@
|
||||
<div id="formerrors"></div>
|
||||
|
||||
<input type="hidden" id="clientId" name="clientId" value="{{=clientId}}" />
|
||||
<input type="hidden" id="currencyCode" name="currencyCode" value="{{=selectedProduct.principalMoney.currencyCode}}" />
|
||||
<input type="hidden" id="digitsAfterDecimal" name="digitsAfterDecimal" value="{{=$ctx.number(selectedProduct.principalMoney.currencyDigitsAfterDecimal)}}" />
|
||||
<input type="hidden" id="currencyCode" name="currencyCode" value="{{=selectedProduct.principal.currencyCode}}" />
|
||||
<input type="hidden" id="digitsAfterDecimal" name="digitsAfterDecimal" value="{{=$ctx.number(selectedProduct.principal.digitsAfterDecimal)}}" />
|
||||
|
||||
<fieldset>
|
||||
<legend><spring:message code="form.legend.loan.information"/></legend>
|
||||
@@ -103,18 +103,18 @@
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.loan.amount"/></td>
|
||||
<td>
|
||||
<input id="principal" name="principal" title="" type="text" value="{{=$ctx.money(selectedProduct.principalMoney)}}" style="width: 125px;" />
|
||||
<input id="principalCurrencyCode" name="principalCurrencyCode" title="" type="text" value="{{=selectedProduct.principalMoney.displaySymbol}}" style="width: 40px;" disabled="disabled" />
|
||||
<input id="principal" name="principal" title="" type="text" value="{{=$ctx.money(selectedProduct.principal)}}" style="width: 125px;" />
|
||||
<input id="principalCurrencyCode" name="principalCurrencyCode" title="" type="text" value="{{=selectedProduct.principal.displaySymbol}}" style="width: 40px;" disabled="disabled" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><spring:message code="form.label.loan.product.repaidevery"/></td>
|
||||
<td>
|
||||
<input id="repaymentEvery" name="repaymentEvery" title="" type="text" value="{{=$ctx.number(selectedProduct.repaidEvery)}}" style="width: 50px;" />
|
||||
<input id="repaymentEvery" name="repaymentEvery" title="" type="text" value="{{=$ctx.number(selectedProduct.repaymentEvery)}}" style="width: 50px;" />
|
||||
|
||||
<select name="repaymentFrequencyType" id="repaymentFrequencyType" title="" style="width: 121px;">
|
||||
{{#each selectedProduct.repaymentFrequencyOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.selectedProduct.repaymentPeriodFrequency)===$ctx.number(id)}}
|
||||
{{#each selectedProduct.repaymentFrequencyTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.selectedProduct.repaymentFrequencyType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
@@ -152,8 +152,8 @@
|
||||
<input id="interestRatePerPeriod" name="interestRatePerPeriod" title="" type="text" value="{{=$ctx.decimal(selectedProduct.interestRatePerPeriod, 4)}}" style="width: 60px;" />
|
||||
|
||||
<select name="interestRateFrequencyType" id="interestRateFrequencyType" title="" style="width: 115px;">
|
||||
{{#each selectedProduct.interestFrequencyOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.selectedProduct.interestRatePeriod)===$ctx.number(id)}}
|
||||
{{#each selectedProduct.interestRateFrequencyTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.selectedProduct.interestRateFrequencyType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
@@ -172,8 +172,8 @@
|
||||
<td><spring:message code="form.label.loan.product.amortization"/></td>
|
||||
<td>
|
||||
<select name="amortizationType" id="amortizationType" title="" style="width: 178px;">
|
||||
{{#each selectedProduct.possibleAmortizationOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.selectedProduct.amortizationMethod)===$ctx.number(id)}}
|
||||
{{#each selectedProduct.amortizationTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.selectedProduct.amortizationType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
@@ -186,8 +186,8 @@
|
||||
<td><spring:message code="form.label.loan.product.interest.method"/></td>
|
||||
<td>
|
||||
<select name="interestType" id="interestType" title="" style="width: 180px;">
|
||||
{{#each selectedProduct.possibleInterestOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.selectedProduct.interestMethod)===$ctx.number(id)}}
|
||||
{{#each selectedProduct.interestTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.selectedProduct.interestType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
@@ -200,8 +200,8 @@
|
||||
<td><spring:message code="form.label.loan.product.interest.rate.calcutated.in.period"/></td>
|
||||
<td>
|
||||
<select id="interestCalculationPeriodType" name="interestCalculationPeriodType" title="" style="width: 220px;">
|
||||
{{#each selectedProduct.possibleInterestRateCalculatedInPeriodOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.selectedProduct.interestRateCalculatedInPeriod)===$ctx.number(id)}}
|
||||
{{#each selectedProduct.interestCalculationPeriodTypeOptions}}
|
||||
{{#if $ctx.number($parent.parent.data.selectedProduct.interestCalculationPeriodType.id)===$ctx.number(id)}}
|
||||
<option value="{{=$ctx.number(id)}}" selected="selected">{{=value}}</option>
|
||||
{{#else}}
|
||||
<option value="{{=$ctx.number(id)}}">{{=value}}</option>
|
||||
|
||||
Reference in New Issue
Block a user