Merge branch 'master' of github.com:webnotes/erpnext
This commit is contained in:
commit
666a8d50d5
@ -28,6 +28,11 @@ class DocType:
|
||||
self.doc = doc
|
||||
self.doclist = doclist
|
||||
|
||||
def on_submit(self):
|
||||
if self.doc.status=="Draft":
|
||||
webnotes.msgprint("""Please set status to 'Approved' or 'Rejected' before submitting""",
|
||||
raise_exception=1)
|
||||
|
||||
def validate_fiscal_year(self):
|
||||
fy=sql("select year_start_date from `tabFiscal Year` where name='%s'"%self.doc.fiscal_year)
|
||||
ysd=fy and fy[0][0] or ""
|
||||
|
@ -14,6 +14,8 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
cur_frm.add_fetch('employee','employee_name','employee_name');
|
||||
|
||||
cur_frm.cscript.onload = function(doc, dt, dn) {
|
||||
if(!doc.posting_date)
|
||||
set_multiple(dt,dn,{posting_date:get_today()});
|
||||
@ -51,8 +53,6 @@ cur_frm.cscript.refresh = function(doc, dt, dn) {
|
||||
}
|
||||
}
|
||||
|
||||
cur_frm.add_fetch('employee','employee_name','employee_name');
|
||||
|
||||
cur_frm.cscript.employee = function (doc, dt, dn){
|
||||
get_leave_balance(doc, dt, dn);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user