Merge pull request 'ranjith-dev' (#1589) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 1m17s

Reviewed-on: #1589
This commit was merged in pull request #1589.
This commit is contained in:
2026-12-02 09:17:34 +00:00
2 changed files with 21 additions and 18 deletions

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;
// }
}

View File

@@ -852,7 +852,7 @@ class InvoiceDataTable extends Component
$panelExistsInvoice = InvoiceValidation::where('plant_id', $this->plantId)
->where('panel_box_serial_number', $serialNumber)
// ->where('panel_box_code', $itemCode)
->where('panel_box_code', $itemCode)
->where('panel_box_supplier', $supplier)
->first();