From e22216e0cbd9a290c329977e128039bb3755b72a Mon Sep 17 00:00:00 2001 From: Vishwas Babu A J Date: Thu, 28 Feb 2019 23:56:23 -0800 Subject: [PATCH] FINERACT-708 --- .../fineract/portfolio/loanaccount/domain/LoanCharge.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java index 780057915f1..6be781c835d 100755 --- a/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java +++ b/fineract-provider/src/main/java/org/apache/fineract/portfolio/loanaccount/domain/LoanCharge.java @@ -134,7 +134,7 @@ public class LoanCharge extends AbstractPersistableCustom { 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());