From 5c3469a01e447d1f87f0e1ff433b7c1818c881b6 Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 24 Nov 2015 17:06:54 +0530 Subject: [PATCH] [fix] validate fiscal year dates and company name --- erpnext/public/js/setup_wizard.js | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/erpnext/public/js/setup_wizard.js b/erpnext/public/js/setup_wizard.js index bb3d272ac4..c139f8a717 100644 --- a/erpnext/public/js/setup_wizard.js +++ b/erpnext/public/js/setup_wizard.js @@ -163,6 +163,21 @@ function load_erpnext_slides() { erpnext.wiz.org.set_fy_dates(slide); }, + validate: function() { + // validate fiscal year start and end dates + if (this.values.fy_start_date=='Invalid date' || this.values.fy_end_date=='Invalid date') { + msgprint(__("Please enter valid Financial Year Start and End Dates")); + return false; + } + + if ((this.values.company_name || "").toLowerCase() == "company") { + msgprint(__("Company Name cannot be Company")); + return false; + } + + return true; + }, + css_class: "single-column", set_fy_dates: function(slide) {