fix(setup wizard): Validate FY dates (#15473)
This commit is contained in:
parent
056ecdca6a
commit
7a8c5b0c2c
@ -138,10 +138,15 @@ erpnext.setup.slides_settings = [
|
|||||||
|
|
||||||
validate: function () {
|
validate: function () {
|
||||||
// validate fiscal year start and end dates
|
// validate fiscal year start and end dates
|
||||||
if (this.values.fy_start_date == 'Invalid date' || this.values.fy_end_date == 'Invalid date') {
|
const invalid = this.values.fy_start_date == 'Invalid date' ||
|
||||||
|
this.values.fy_end_date == 'Invalid date';
|
||||||
|
const start_greater_than_end = this.values.fy_start_date > this.values.fy_end_date;
|
||||||
|
|
||||||
|
if (invalid || start_greater_than_end) {
|
||||||
frappe.msgprint(__("Please enter valid Financial Year Start and End Dates"));
|
frappe.msgprint(__("Please enter valid Financial Year Start and End Dates"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user