[minor] set applicant name automatically

This commit is contained in:
Rushabh Mehta
2016-07-15 16:43:25 +05:30
parent 95383bb281
commit 55ea7b1f61
3 changed files with 16 additions and 7 deletions

View File

@@ -128,7 +128,7 @@ erpnext.utils.map_current_doc = function(opts) {
}
var _map = function() {
// remove first item row if empty
if($.isArray(cur_frm.doc.items)) {
if($.isArray(cur_frm.doc.items) && cur_frm.doc.items.length > 0) {
if(!cur_frm.doc.items[0].item_code) {
cur_frm.doc.items = cur_frm.doc.items.splice(1);
}