Correct bug in abbr cause by missing " " separator (#19605)
Only 1 letter ABBR is generated after typing in a COMPANY NAME separated by spaces. This is due to missing " " value in split method. For example: Company Name: ABC Multiple Industries Generates Abbr: A Correct Abbr should be: AMI This is caused by mission " " in split method.
This commit is contained in:
parent
776ff2f75d
commit
2578d49b84
@ -29,7 +29,8 @@ frappe.ui.form.on("Company", {
|
||||
|
||||
company_name: function(frm) {
|
||||
if(frm.doc.__islocal) {
|
||||
let parts = frm.doc.company_name.split();
|
||||
# add missing " " arg in split method
|
||||
let parts = frm.doc.company_name.split(" ");
|
||||
let abbr = $.map(parts, function (p) {
|
||||
return p? p.substr(0, 1) : null;
|
||||
}).join("");
|
||||
|
Loading…
Reference in New Issue
Block a user