Added logic in rework of panel box validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 20s
Laravel Pint / pint (pull_request) Successful in 2m29s
Laravel Larastan / larastan (pull_request) Failing after 5m50s

This commit is contained in:
dhanabalan
2026-09-12 09:40:32 +05:30
parent be2e9027a1
commit d64f02fd5e

View File

@@ -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();