Skip to content

Commit

Permalink
FINERACT-708
Browse files Browse the repository at this point in the history
  • Loading branch information
vishwasbabu committed Mar 1, 2019
1 parent dba938b commit e22216e
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ public class LoanCharge extends AbstractPersistableCustom<Long> {

public static LoanCharge createNewFromJson(final Loan loan, final Charge chargeDefinition, final JsonCommand command) {
final LocalDate dueDate = command.localDateValueOfParameterNamed("dueDate");
if (dueDate == null) {
if (chargeDefinition.getChargeTimeType().equals(ChargeTimeType.SPECIFIED_DUE_DATE.getValue()) && dueDate == null) {
final String defaultUserMessage = "Loan charge is missing due date.";
throw new LoanChargeWithoutMandatoryFieldException("loanCharge", "dueDate", defaultUserMessage, chargeDefinition.getId(),
chargeDefinition.getName());
Expand Down

0 comments on commit e22216e

Please sign in to comment.