mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-17 18:45:20 +00:00
@@ -397,7 +397,7 @@ erpnext.TransactionController = class TransactionController extends erpnext.taxe
|
||||
|
||||
refresh() {
|
||||
erpnext.toggle_naming_series();
|
||||
erpnext.hide_company();
|
||||
erpnext.hide_company(this.frm);
|
||||
this.set_dynamic_labels();
|
||||
this.setup_sms();
|
||||
this.setup_quality_inspection();
|
||||
|
||||
@@ -26,14 +26,14 @@ $.extend(erpnext, {
|
||||
}
|
||||
},
|
||||
|
||||
hide_company: function() {
|
||||
if(cur_frm?.fields_dict.company) {
|
||||
hide_company: function(frm) {
|
||||
if(frm?.fields_dict.company) {
|
||||
var companies = Object.keys(locals[":Company"] || {});
|
||||
if(companies.length === 1) {
|
||||
if(!cur_frm.doc.company) cur_frm.set_value("company", companies[0]);
|
||||
cur_frm.toggle_display("company", false);
|
||||
if(!frm.doc.company) frm.set_value("company", companies[0]);
|
||||
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);
|
||||
if(!frm.doc.company) frm.set_value("company", erpnext.last_selected_company);
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user