1
0
forked from poc/pds

removed logic against the production order

This commit is contained in:
dhanabalan
2025-07-29 11:47:26 +05:30
parent 48942307e1
commit 0bde54cf1a

View File

@@ -544,76 +544,76 @@ class StickerReprint extends Page implements HasForms
->send(); ->send();
return; return;
} }
else if (!$this->prodOrder) { // else if (!$this->prodOrder) {
$this->form->fill([ // $this->form->fill([
'plant_id'=> $this->pId, // 'plant_id'=> $this->pId,
'block_name'=> $this->bId, // 'block_name'=> $this->bId,
'shift_id'=> $this->sId, // 'shift_id'=> $this->sId,
'line_id'=> $this->lId, // 'line_id'=> $this->lId,
'item_id'=> null, // 'item_id'=> null,
'serial_number'=> null, // 'serial_number'=> null,
'success_msg'=> null, // 'success_msg'=> null,
'production_order'=> null, // 'production_order'=> null,
'sap_msg_status' => null, // 'sap_msg_status' => null,
'sap_msg_description' => null, // 'sap_msg_description' => null,
'operator_id'=> $operatorName, // 'operator_id'=> $operatorName,
'recent_qr' => $this->recQr, // 'recent_qr' => $this->recQr,
]); // ]);
Notification::make() // Notification::make()
->title('Please scan the production order first.') // ->title('Please scan the production order first.')
->danger() // ->danger()
->send(); // ->send();
return; // return;
} // }
if(!is_numeric($this->prodOrder)) // if(!is_numeric($this->prodOrder))
{ // {
$this->form->fill([ // $this->form->fill([
'plant_id'=> $this->pId, // 'plant_id'=> $this->pId,
'block_name'=> $this->bId, // 'block_name'=> $this->bId,
'shift_id'=> $this->sId, // 'shift_id'=> $this->sId,
'line_id'=> $this->lId, // 'line_id'=> $this->lId,
'item_id'=> null, // 'item_id'=> null,
'serial_number'=> null, // 'serial_number'=> null,
'success_msg'=> null, // 'success_msg'=> null,
'production_order'=> null, // 'production_order'=> null,
'sap_msg_status' => null, // 'sap_msg_status' => null,
'sap_msg_description' => null, // 'sap_msg_description' => null,
'operator_id'=> $operatorName, // 'operator_id'=> $operatorName,
'recent_qr' => $this->recQr, // 'recent_qr' => $this->recQr,
]); // ]);
Notification::make() // Notification::make()
->title('Invalid Production Order') // ->title('Invalid Production Order')
->body("Must contain numeric values only.") // ->body("Must contain numeric values only.")
->danger() // ->danger()
->send(); // ->send();
return; // return;
} // }
else if (!preg_match('/^[1-9][0-9]{6,}$/', $this->prodOrder)) // else if (!preg_match('/^[1-9][0-9]{6,}$/', $this->prodOrder))
{ // {
$this->form->fill([ // $this->form->fill([
'plant_id'=> $this->pId, // 'plant_id'=> $this->pId,
'block_name'=> $this->bId, // 'block_name'=> $this->bId,
'shift_id'=> $this->sId, // 'shift_id'=> $this->sId,
'line_id'=> $this->lId, // 'line_id'=> $this->lId,
'item_id'=> null, // 'item_id'=> null,
'serial_number'=> null, // 'serial_number'=> null,
'success_msg'=> null, // 'success_msg'=> null,
'production_order'=> null, // 'production_order'=> null,
'sap_msg_status' => null, // 'sap_msg_status' => null,
'sap_msg_description' => null, // 'sap_msg_description' => null,
'operator_id'=> $operatorName, // 'operator_id'=> $operatorName,
'recent_qr' => $this->recQr, // 'recent_qr' => $this->recQr,
]); // ]);
Notification::make() // Notification::make()
->title('Invalid Production Order') // ->title('Invalid Production Order')
->body("Must contain at least 7 digits.<br>Must start with a non-zero digit.") // ->body("Must contain at least 7 digits.<br>Must start with a non-zero digit.")
->danger() // ->danger()
->send(); // ->send();
return; // return;
} // }
// ******************************** // ********************************