This commit is contained in:
2024-07-22 10:42:32 +08:00
parent 6b1e74790b
commit a3f0288c92
6 changed files with 191 additions and 127 deletions

View File

@ -312,10 +312,15 @@ export default class CustomerCommunication {
const companyCode = div.querySelector('.title-company-code');
if (companyCode != null) {
if (nullOrEmpty(name)) {
div.querySelector('.title-company-name').innerText = r('P_WO_NOCUSTOMERASSIGNED', 'No Customer Assigned');
companyCode.innerText = ' /\n' + r('P_WO_SELECTCUSTOMER', 'Select Customer');
companyCode.style.display = '';
if (this._var.option.customerReadonly === true) {
div.style.display = 'none';
} else {
div.querySelector('.title-company-name').innerText = r('P_WO_NOCUSTOMERASSIGNED', 'No Customer Assigned');
companyCode.innerText = ' /\n' + r('P_WO_SELECTCUSTOMER', 'Select Customer');
companyCode.style.display = '';
}
} else {
div.style.display = '';
div.querySelector('.title-company-name').innerText = name;
companyCode.style.display = 'none';
}
@ -474,7 +479,9 @@ export default class CustomerCommunication {
}),
createElement('span', span => {
span.className = 'title-company-code';
if (nullOrEmpty(option.companyName)) {
if (option.customerReadonly === true) {
span.style.display = 'none';
} else if (nullOrEmpty(option.companyName)) {
span.innerText = ' /\n' + r('P_WO_SELECTCUSTOMER', 'Select Customer');
} else if (!nullOrEmpty(option.companyCode)) {
span.innerText = ' / ' + option.companyCode;