diff --git a/src/components/PaymentPlanForm.js b/src/components/PaymentPlanForm.js index d385498..cd03a55 100644 --- a/src/components/PaymentPlanForm.js +++ b/src/components/PaymentPlanForm.js @@ -85,11 +85,12 @@ class PaymentPlanForm extends Component { return true; }; - canSave = () => + canSave = () => !this.isMandatoryFieldsEmpty() && this.isPeriodicityValid() && !!this.state.jsonExtValid && - this.doesPaymentPlanChange(); + this.doesPaymentPlanChange() && + this.props.isCodeValid; save = paymentPlan => this.props.save(paymentPlan); diff --git a/src/translations/en.json b/src/translations/en.json index 189a129..a00be30 100644 --- a/src/translations/en.json +++ b/src/translations/en.json @@ -60,6 +60,7 @@ "contributionPlan.paymentPlans.page.title": "Payment Plans", "contributionPlan.paymentPlans.searcher.results.title": "{paymentPlansTotalCount} Payment Plans Found", "paymentPlan.code": "Code", + "paymentPlan.codeTaken": "Payment plan code already exists", "paymentPlan.name": "Name", "paymentPlan.calculation": "Calculation Rule", "paymentPlan.benefitPlan": "Benefit Product",