Merge pull request #7769 from nabinhait/setup_fy_dates

Set fiscal year start and end date based on country
This commit is contained in:
Nabin Hait 2017-02-17 15:18:28 +05:30 committed by GitHub
commit 64e222697c

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]);
}