changed logic in panel box inspection stock
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s

This commit is contained in:
dhanabalan
2026-12-02 14:45:51 +05:30
parent 30ae3db24d
commit 55d49e206a

View File

@@ -447,9 +447,12 @@ class PanelBoxInspectionStock extends Page
}
$panelExistsInvoice = InvoiceValidation::where('plant_id', $plantId)
->where('panel_box_serial_number', $serialNumber)
->where('panel_box_supplier', $supplier)
->first();
->where('panel_box_serial_number', $serialNumber)
->where('panel_box_supplier', $supplier)
->where('panel_box_code', $panelBoxCode)
->first();
// dd($panelExistsInvoice);
if ($panelExistsInvoice) {
Notification::make()
@@ -486,20 +489,20 @@ class PanelBoxInspectionStock extends Page
]);
return;
}
else{
Notification::make()
->title('Already Scanned In Stock')
->body("Serial number already scanned '$serialNumber' with supplier number '$supplier'.<br>Please scan this serial number in Invoice Validation.")
->success()
->send();
$this->dispatch('play-error-sound');
$this->form->fill([
'plant_id' => $plantId,
'line_id' => $lineId,
'item_id' => null,
]);
return;
}
// else{
// Notification::make()
// ->title('Already Scanned In Stock')
// ->body("Serial number already scanned '$serialNumber' with supplier number '$supplier'.<br>Please scan this serial number in Invoice Validation.")
// ->success()
// ->send();
// $this->dispatch('play-error-sound');
// $this->form->fill([
// 'plant_id' => $plantId,
// 'line_id' => $lineId,
// 'item_id' => null,
// ]);
// return;
// }
}