From d333f20ca0dd384feed930807777474387ed34cf Mon Sep 17 00:00:00 2001 From: Akhilesh Darjee Date: Tue, 26 Nov 2013 14:57:03 +0530 Subject: [PATCH] [fix] [minor] fiscal year fix --- accounts/doctype/fiscal_year/fiscal_year.js | 3 --- accounts/doctype/fiscal_year/fiscal_year.py | 2 -- 2 files changed, 5 deletions(-) diff --git a/accounts/doctype/fiscal_year/fiscal_year.js b/accounts/doctype/fiscal_year/fiscal_year.js index feae286100..5cd672bab6 100644 --- a/accounts/doctype/fiscal_year/fiscal_year.js +++ b/accounts/doctype/fiscal_year/fiscal_year.js @@ -11,9 +11,6 @@ $.extend(cur_frm.cscript, { this.frm.add_custom_button(wn._("Set as Default"), this.frm.cscript.set_as_default); this.frm.set_intro(wn._("To set this Fiscal Year as Default, click on 'Set as Default'")); } else this.frm.set_intro(""); - - if (doc.__islocal && this.frm.doc.year_start_date) - this.frm.script_manager.trigger("year_start_date", dt, dn); }, set_as_default: function() { return wn.call({ diff --git a/accounts/doctype/fiscal_year/fiscal_year.py b/accounts/doctype/fiscal_year/fiscal_year.py index 1cc659a97d..891c0a57c3 100644 --- a/accounts/doctype/fiscal_year/fiscal_year.py +++ b/accounts/doctype/fiscal_year/fiscal_year.py @@ -27,8 +27,6 @@ class DocType: webnotes.throw(_("Year Start Date should not be greater than Year End Date")) if (getdate(self.doc.year_end_date) - getdate(self.doc.year_start_date)).days > 366: - webnotes.throw([getdate(self.doc.year_end_date), getdate(self.doc.year_start_date)]) - webnotes.throw((getdate(self.doc.year_end_date) - getdate(self.doc.year_start_date)).days) webnotes.throw(_("Year Start Date and Year End Date are not within Fiscal Year.")) year_start_end_dates = webnotes.conn.sql("""select name, year_start_date, year_end_date