Set fiscal year start and end date based on country

This commit is contained in:
Nabin Hait 2017-02-17 14:47:25 +05:30
parent 801fa80b39
commit 6af7dd4e1b

View File

@ -100,7 +100,12 @@ function load_erpnext_slides() {
fy = ["01-01", "12-31"];
next_year = current_year;
}
var year_start_date = current_year + "-" + fy[0];
if(year_start_date > get_today()) {
next_year = current_year
current_year -= 1;
}
slide.get_field("fy_start_date").set_input(current_year + "-" + fy[0]);
slide.get_field("fy_end_date").set_input(next_year + "-" + fy[1]);
}