|
|
|
@ -1188,13 +1188,13 @@ const generateBatchNo = (type, hardwareIdCompany) => {
|
|
|
|
|
const companyPrefix = hardwareIdCompany.slice(0, 2).toUpperCase();
|
|
|
|
|
const randomNumbers = Math.floor(100 + Math.random() * 900).toString(); // 3 random digits
|
|
|
|
|
|
|
|
|
|
if (type === 'slave') {
|
|
|
|
|
if (type === 'SLAVE') {
|
|
|
|
|
return `SL${ddmmyy}${companyPrefix}${randomNumbers}`;
|
|
|
|
|
}
|
|
|
|
|
if (type === 'master') {
|
|
|
|
|
if (type === 'MASTER') {
|
|
|
|
|
return `MA${ddmmyy}${companyPrefix}${randomNumbers}`;
|
|
|
|
|
}
|
|
|
|
|
if (type === 'motor_switch') {
|
|
|
|
|
if (type === 'MOTOR_SWITCH') {
|
|
|
|
|
return `MS${ddmmyy}${companyPrefix}${randomNumbers}`;
|
|
|
|
|
}
|
|
|
|
|
// Add other type conditions if needed
|
|
|
|
|