diff --git a/src/controllers/CommandController.ts b/src/controllers/CommandController.ts index e0b3240b..6724eabb 100644 --- a/src/controllers/CommandController.ts +++ b/src/controllers/CommandController.ts @@ -6658,8 +6658,8 @@ export class CommandController extends Controller { createdAt: new Date(), lastUpdatedAt: new Date(), commandNo: firstRef.commandNo ?? null, - refCommandNo: `${firstRef.commandNo ?? ""}/${firstRef.commandYear ?? ""}`, - commandYear: firstRef.commandYear ?? null, + refCommandNo: `${firstRef.commandNo ?? ""}/${firstRef.commandYear ? Extension.ToThaiYear(firstRef.commandYear) : ""}`, + commandYear: firstRef.commandYear ? Extension.ToThaiYear(firstRef.commandYear) : null, posNo: orgShortName && item.posMaster?.posMasterNo ? `${orgShortName} ${item.posMaster.posMasterNo}`