Merge pull request 'ranjith-dev' (#947) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 12s
Reviewed-on: #947
This commit was merged in pull request #947.
This commit is contained in:
@@ -808,14 +808,7 @@ class PanelBoxValidationResource extends Resource
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// $okSerialExists = ProductionCharacteristic::where('serial_number', $serialNumber)->where('plant_id', $plantId)->get();
|
$serialExists = PanelBoxValidation::where('serial_number', $serialNumber)->where('plant_id', $plantId)->first();
|
||||||
|
|
||||||
|
|
||||||
// if($okSerialExists){
|
|
||||||
|
|
||||||
// }
|
|
||||||
|
|
||||||
$serialExists = PanelBoxValidation::where('serial_number', $serialNumber)->where('plant_id', $plantId)->latest()->first();
|
|
||||||
|
|
||||||
// if ($serialExists) {
|
// if ($serialExists) {
|
||||||
// $set('serial_exists', true);
|
// $set('serial_exists', true);
|
||||||
@@ -995,28 +988,6 @@ class PanelBoxValidationResource extends Resource
|
|||||||
$pOrder = $get('production_order');
|
$pOrder = $get('production_order');
|
||||||
$inspecLotNo = $get('inspection_lot_number');
|
$inspecLotNo = $get('inspection_lot_number');
|
||||||
|
|
||||||
// $serialRecords = PanelBoxValidation::where('serial_number', $serialNumber)->where('plant_id', $plantId)->get();
|
|
||||||
|
|
||||||
// if ($serialRecords->isNotEmpty()) {
|
|
||||||
|
|
||||||
// $alreadyExists = $serialRecords->contains(function ($record) use ($pOrder, $inspecLotNo) {
|
|
||||||
// return $record->production_order == $pOrder
|
|
||||||
// && $record->inspection_lot_number == $inspecLotNo;
|
|
||||||
// });
|
|
||||||
|
|
||||||
// if ($alreadyExists) {
|
|
||||||
// Notification::make()
|
|
||||||
// ->title('Invalid Rework')
|
|
||||||
// ->body(
|
|
||||||
// 'This document number and inspection lot number have already been used for this serial number. Please provide a new document number and inspection lot number.'
|
|
||||||
// )
|
|
||||||
// ->danger()
|
|
||||||
// ->send();
|
|
||||||
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
$alreadyExists = PanelBoxValidation::where('serial_number', $serialNumber)
|
$alreadyExists = PanelBoxValidation::where('serial_number', $serialNumber)
|
||||||
->where('plant_id', $plantId)
|
->where('plant_id', $plantId)
|
||||||
->where('production_order', $pOrder)
|
->where('production_order', $pOrder)
|
||||||
@@ -1034,19 +1005,37 @@ class PanelBoxValidationResource extends Resource
|
|||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else
|
$data = $get();
|
||||||
{
|
|
||||||
// $livewire->showChecklist = true;
|
|
||||||
// $data = $livewire->data;
|
|
||||||
$data = $get();
|
|
||||||
|
|
||||||
if ($livewire->checkIfHasCharacteristics($data)) {
|
$hasCharacteristics = $livewire->checkIfHasCharacteristics($data);
|
||||||
|
|
||||||
$livewire->showChecklist = true;
|
\Log::info('CHARACTERISTICS RESULT', [
|
||||||
$livewire->dispatch('close-modal');
|
'hasCharacteristics' => $hasCharacteristics,
|
||||||
return;
|
]);
|
||||||
}
|
|
||||||
|
if ($hasCharacteristics) {
|
||||||
|
|
||||||
|
\Log::info('SETTING SHOW CHECKLIST TRUE');
|
||||||
|
|
||||||
|
$livewire->showChecklist = true;
|
||||||
|
|
||||||
|
$livewire->dispatch('close-modal');
|
||||||
|
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// // $livewire->showChecklist = true;
|
||||||
|
// // $data = $livewire->data;
|
||||||
|
// $data = $get();
|
||||||
|
|
||||||
|
// if ($livewire->checkIfHasCharacteristics($data)) {
|
||||||
|
|
||||||
|
// $livewire->showChecklist = true;
|
||||||
|
// $livewire->dispatch('close-modal');
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
// }
|
||||||
}),
|
}),
|
||||||
]),
|
]),
|
||||||
Forms\Components\Hidden::make('part_validation_type_options')
|
Forms\Components\Hidden::make('part_validation_type_options')
|
||||||
|
|||||||
@@ -846,24 +846,24 @@ class InvoiceDataTable extends Component
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$categoryExist = Item::where('code', $itemCode)->first();
|
// $categoryExist = Item::where('code', $itemCode)->first();
|
||||||
|
|
||||||
if($categoryExist?->category == 'Panel Box'){
|
// if($categoryExist?->category == 'Panel Box'){
|
||||||
|
|
||||||
$panelExist = PanelBoxValidation::where('panel_box_serial_number', $serialNumber)->where('panel_box_code', $itemCode)->where('panel_box_supplier', $supplier)->first();
|
// $panelExist = PanelBoxValidation::where('panel_box_serial_number', $serialNumber)->where('panel_box_code', $itemCode)->where('panel_box_supplier', $supplier)->first();
|
||||||
|
|
||||||
if(!$panelExist){
|
// if(!$panelExist){
|
||||||
Notification::make()
|
// Notification::make()
|
||||||
->title('Panel Not Verified')
|
// ->title('Panel Not Verified')
|
||||||
->body("Panel Quality Inspection failed.<br>Panel Box Code: $itemCode, Item Code: {$this->currentItemCode}, Serial Number: $serialNumber.</br>")
|
// ->body("Panel Quality Inspection failed.<br>Panel Box Code: $itemCode, Item Code: {$this->currentItemCode}, Serial Number: $serialNumber.</br>")
|
||||||
->danger()
|
// ->danger()
|
||||||
->seconds(2)
|
// ->seconds(2)
|
||||||
->send();
|
// ->send();
|
||||||
$this->capacitorInput = '';
|
// $this->capacitorInput = '';
|
||||||
|
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
$this->package = InvoiceValidation::with('stickerMasterRelation')
|
$this->package = InvoiceValidation::with('stickerMasterRelation')
|
||||||
->where('invoice_number', $this->invoiceNumber)
|
->where('invoice_number', $this->invoiceNumber)
|
||||||
|
|||||||
Reference in New Issue
Block a user