changed logic in invoice data table #1311

Merged
jothi merged 1 commits from ranjith-dev into master 2026-10-26 13:36:25 +00:00
Showing only changes of commit e3c07011ba - Show all commits

View File

@@ -850,20 +850,6 @@ class InvoiceDataTable extends Component
if($categoryExist?->category == 'Panel Box'){
$panelExist = PanelBoxValidation::where('plant_id', $this->plantId)->where('panel_box_serial_number', $serialNumber)->where('panel_box_code', $itemCode)->where('panel_box_supplier', $supplier)->first();
if(!$panelExist){
Notification::make()
->title('Panel Not Verified')
->body("Panel Quality Inspection failed.<br>Panel Box Code: $itemCode, Item Code: {$this->currentItemCode}, Serial Number: $serialNumber.</br>")
->danger()
->seconds(2)
->send();
$this->capacitorInput = '';
return;
}
$panelExistsInvoice = InvoiceValidation::where('plant_id', $this->plantId)
->where('panel_box_serial_number', $serialNumber)
// ->where('panel_box_code', $itemCode)
@@ -882,6 +868,20 @@ class InvoiceDataTable extends Component
return;
}
$panelExist = PanelBoxValidation::where('plant_id', $this->plantId)->where('panel_box_serial_number', $serialNumber)->where('panel_box_code', $itemCode)->where('panel_box_supplier', $supplier)->first();
if(!$panelExist){
Notification::make()
->title('Panel Not Verified')
->body("Panel Quality Inspection failed.<br>Panel Box Code: $itemCode, Item Code: {$this->currentItemCode}, Serial Number: $serialNumber.</br>")
->danger()
->seconds(2)
->send();
$this->capacitorInput = '';
return;
}
}
$this->package = InvoiceValidation::with('stickerMasterRelation')