Merge pull request 'added duplicate panel box in invoice validation' (#1217) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s

Reviewed-on: #1217
This commit was merged in pull request #1217.
This commit is contained in:
2026-10-10 05:54:39 +00:00

View File

@@ -863,18 +863,21 @@ class InvoiceDataTable extends Component
return;
}
}
if($categoryExist?->category == 'Panel Box'){
$panelExistInvoice = InvoiceValidation::where('plant_id', $this->plantId)->where('panel_box_serial_number', $serialNumber)->where('panel_box_code', $itemCode)->where('panel_box_supplier', $supplier)->first();
$panelExistsInvoice = InvoiceValidation::where('plant_id', $this->plantId)
->where('panel_box_serial_number', $serialNumber)
->where('panel_box_code', $itemCode)
->where('panel_box_supplier', $supplier)
->first();
if($panelExistInvoice){
if ($panelExistsInvoice) {
Notification::make()
->title('Duplicate Panel')
->body("Duplicate panel already exist.<br>Panel Box Code: $itemCode, Item Code: {$this->currentItemCode}, Serial Number: $serialNumber.</br>")
->body("Duplicate panel already exists.<br>Panel Box Code: $itemCode, Item Code: {$this->currentItemCode}, Serial Number: $serialNumber.")
->danger()
->seconds(2)
->send();
$this->capacitorInput = '';
return;