[fix] [minor] fiscal year fix
This commit is contained in:
parent
8cf9ab8188
commit
d333f20ca0
@ -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({
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user