update
This commit is contained in:
parent
2cbc6569e3
commit
8705d1abf5
2 changed files with 8 additions and 3 deletions
|
|
@ -64,7 +64,7 @@ SET p.posMasterNo = TRIM(CONCAT(
|
|||
ELSE c4.orgChild4ShortName
|
||||
END,
|
||||
' ',
|
||||
pm.posMasterNo
|
||||
CONCAT_WS('', pm.posMasterNoPrefix, pm.posMasterNo, pm.posMasterNoSuffix)
|
||||
))
|
||||
WHERE p.posMasterNo IS NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -101,9 +101,14 @@ export function getOrgFullName(posMaster: PosMaster): string {
|
|||
}
|
||||
|
||||
/**
|
||||
* สร้างเลขที่ตำแหน่ง เช่น "กทม. 1234"
|
||||
* สร้างเลขที่ตำแหน่ง เช่น "กทม. กบ.1234ช"
|
||||
*/
|
||||
export function getPosMasterNo(posMaster: PosMaster): string {
|
||||
const orgShortName = getOrgShortName(posMaster);
|
||||
return `${orgShortName} ${posMaster.posMasterNo}`;
|
||||
const parts = [
|
||||
posMaster.posMasterNoPrefix,
|
||||
posMaster.posMasterNo,
|
||||
posMaster.posMasterNoSuffix,
|
||||
].filter((part) => part !== null && part !== undefined);
|
||||
return `${orgShortName} ${parts.join('')}`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue