Merge pull request 'Added logic in rework of panel box validation' (#1022) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Reviewed-on: #1022
This commit was merged in pull request #1022.
This commit is contained in:
@@ -1003,16 +1003,14 @@ class PanelBoxValidationResource extends Resource
|
||||
->where('inspection_lot_number', $inspecLotNo)
|
||||
->first();
|
||||
|
||||
$alreadyExistsSupplier = PanelBoxValidation::where('serial_number', $serialNumber)
|
||||
->where('plant_id', $plantId)
|
||||
$alreadyExistsSupplier = PanelBoxValidation::where('plant_id', $plantId)->where('serial_number', $serialNumber)
|
||||
->where('panel_box_supplier', $supplierNo)
|
||||
->first();
|
||||
|
||||
if ($alreadyExists) {
|
||||
Notification::make()
|
||||
->title('Duplicate Found')
|
||||
->body(
|
||||
'This document number and inspection lot number have already been used for this serial number. Please provide a new document number and inspection lot number for rework...'
|
||||
)
|
||||
->body('This document number and inspection lot number have already been used for this serial number. Please provide a new document number and inspection lot number for rework...')
|
||||
->danger()
|
||||
->send();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user