ranjith-dev #1299

Merged
jothi merged 2 commits from ranjith-dev into master 2026-10-23 11:54:28 +00:00
Showing only changes of commit baf41cfea1 - Show all commits

View File

@@ -288,11 +288,11 @@ class PanelBoxInspectionStock extends Page
{
$parts = explode('/', $itemId);
if (count($parts) < 4) {
if (!preg_match('/^\d+\/\d+\/\d{4}\/\d+$/', $itemId) || preg_match('/[a-zA-Z]/', $itemId)) {
Notification::make()
->title('Invalid QR Format')
->body('Expected format: plantcode/itemcode/yearmm/serialnumber')
->body("Expected format: plantcode/itemcode/yearmm/serialnumber : Format Received : $itemId")
->danger()
->send();
$this->form->fill([
@@ -358,10 +358,11 @@ class PanelBoxInspectionStock extends Page
return;
}
}
else {
else
{
Notification::make()
->title('Invalid QR Format')
->body('Expected format: plantcode/itemcode/yearmm/serialnumber (Or) plantcode/panelboxcode/serialnumber')
->body('Expected format: plantcode/itemcode/yearmm/serialnumber')
->danger()
->send();
$this->form->fill([