Added supplier number in panel box report
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 22s
Laravel Larastan / larastan (pull_request) Failing after 7m30s
Laravel Pint / pint (pull_request) Successful in 7m46s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 15s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 16s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 22s
Laravel Larastan / larastan (pull_request) Failing after 7m30s
Laravel Pint / pint (pull_request) Successful in 7m46s
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Console\Commands;
|
||||
|
||||
use App\Mail\PanelBoxReportMail;
|
||||
use App\Models\Machine;
|
||||
use App\Models\PanelBoxValidation;
|
||||
use App\Models\Plant;
|
||||
use App\Models\ProductionCharacteristic;
|
||||
use Illuminate\Console\Command;
|
||||
@@ -94,6 +95,15 @@ class SendPanelBoxReport extends Command
|
||||
->distinct()
|
||||
->get();
|
||||
|
||||
foreach ($records as $record) {
|
||||
|
||||
$supplierNumber = PanelBoxValidation::where('plant_id', $plantId)
|
||||
->where('serial_number', $record->serial_number)
|
||||
->first()?->panel_box_supplier;
|
||||
|
||||
$record->panel_box_supplier = $supplierNumber;
|
||||
}
|
||||
|
||||
if ($records->isEmpty()) {
|
||||
$this->info('No panel box records found.');
|
||||
return;
|
||||
|
||||
@@ -264,6 +264,7 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th width="12%">S.No</th>
|
||||
<th>Supplier Number</th>
|
||||
<th>Serial Number</th>
|
||||
<th width="20%">Status</th>
|
||||
</tr>
|
||||
@@ -279,6 +280,12 @@
|
||||
{{ $index + 1 }}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="supplier-number">
|
||||
{{ $record->panel_box_supplier }}
|
||||
</span>
|
||||
</td>
|
||||
|
||||
<td>
|
||||
<span class="serial-number">
|
||||
{{ $record->serial_number }}
|
||||
|
||||
Reference in New Issue
Block a user