[minor] save last company in multi-company scenario

This commit is contained in:
Rushabh Mehta
2015-04-28 16:02:09 +05:30
parent b1b95526c6
commit 45ca8a4d31
4 changed files with 20 additions and 10 deletions

View File

@@ -41,6 +41,8 @@ $.extend(erpnext, {
if(companies.length === 1) {
if(!cur_frm.doc.company) cur_frm.set_value("company", companies[0]);
cur_frm.toggle_display("company", false);
} else if(erpnext.last_selected_company) {
if(!cur_frm.doc.company) cur_frm.set_value("company", erpnext.last_selected_company);
}
}
},
@@ -76,8 +78,8 @@ $.extend(erpnext, {
"options": "Serial No",
"label": __("Serial No"),
"get_query": function () {
return {
filters: {
return {
filters: {
item_code:grid_row.doc.item_code ,
warehouse:grid_row.doc.warehouse
}