updating annual fee amount in savings product(exception) fixed
This commit is contained in:
committed by
Keith Woodlock
parent
b373458f57
commit
7478e17f3c
+5
-1
@@ -199,7 +199,11 @@ public final class JsonCommand {
|
|||||||
boolean differenceExists = false;
|
boolean differenceExists = false;
|
||||||
|
|
||||||
if (baseValue != null) {
|
if (baseValue != null) {
|
||||||
differenceExists = baseValue.compareTo(workingCopyValue) != 0;
|
if(workingCopyValue != null) {
|
||||||
|
differenceExists = baseValue.compareTo(workingCopyValue) != 0;
|
||||||
|
}else {
|
||||||
|
differenceExists = true;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
differenceExists = workingCopyValue != null;
|
differenceExists = workingCopyValue != null;
|
||||||
}
|
}
|
||||||
|
|||||||
+2
-2
@@ -353,7 +353,7 @@ public class SavingsProduct extends AbstractPersistable<Long> {
|
|||||||
if (command.isChangeInIntegerParameterNamed(annualFeeOnMonthDayParamName, this.annualFeeOnDay)) {
|
if (command.isChangeInIntegerParameterNamed(annualFeeOnMonthDayParamName, this.annualFeeOnDay)) {
|
||||||
final MonthDay monthDay = command.extractMonthDayNamed(annualFeeOnMonthDayParamName);
|
final MonthDay monthDay = command.extractMonthDayNamed(annualFeeOnMonthDayParamName);
|
||||||
final String actualValueEntered = command.stringValueOfParameterNamed(annualFeeOnMonthDayParamName);
|
final String actualValueEntered = command.stringValueOfParameterNamed(annualFeeOnMonthDayParamName);
|
||||||
final Integer newValue = monthDay.getDayOfMonth();
|
final Integer newValue = monthDay != null? monthDay.getDayOfMonth(): null;
|
||||||
actualChanges.put(annualFeeOnMonthDayParamName, actualValueEntered);
|
actualChanges.put(annualFeeOnMonthDayParamName, actualValueEntered);
|
||||||
actualChanges.put(localeParamName, localeAsInput);
|
actualChanges.put(localeParamName, localeAsInput);
|
||||||
this.annualFeeOnDay = newValue;
|
this.annualFeeOnDay = newValue;
|
||||||
@@ -362,7 +362,7 @@ public class SavingsProduct extends AbstractPersistable<Long> {
|
|||||||
if (command.isChangeInIntegerParameterNamed(annualFeeOnMonthDayParamName, this.annualFeeOnMonth)) {
|
if (command.isChangeInIntegerParameterNamed(annualFeeOnMonthDayParamName, this.annualFeeOnMonth)) {
|
||||||
final MonthDay monthDay = command.extractMonthDayNamed(annualFeeOnMonthDayParamName);
|
final MonthDay monthDay = command.extractMonthDayNamed(annualFeeOnMonthDayParamName);
|
||||||
final String actualValueEntered = command.stringValueOfParameterNamed(annualFeeOnMonthDayParamName);
|
final String actualValueEntered = command.stringValueOfParameterNamed(annualFeeOnMonthDayParamName);
|
||||||
final Integer newValue = monthDay.getMonthOfYear();
|
final Integer newValue = monthDay != null? monthDay.getMonthOfYear(): null;
|
||||||
actualChanges.put(annualFeeOnMonthDayParamName, actualValueEntered);
|
actualChanges.put(annualFeeOnMonthDayParamName, actualValueEntered);
|
||||||
actualChanges.put(localeParamName, localeAsInput);
|
actualChanges.put(localeParamName, localeAsInput);
|
||||||
this.annualFeeOnMonth = newValue;
|
this.annualFeeOnMonth = newValue;
|
||||||
|
|||||||
Reference in New Issue
Block a user