This commit is contained in:
Adisak 2026-04-24 16:15:47 +07:00
parent 2cbc6569e3
commit 8705d1abf5
2 changed files with 8 additions and 3 deletions

View file

@ -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('')}`;
}