added duplicate panel box in invoice validation
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m27s
Laravel Larastan / larastan (pull_request) Failing after 6m53s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 14s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 18s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 15s
Laravel Pint / pint (pull_request) Successful in 2m27s
Laravel Larastan / larastan (pull_request) Failing after 6m53s
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user