219 lines
9.6 KiB
PHP
219 lines
9.6 KiB
PHP
|
|
|
|
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<style>
|
|
@page { size: A4 landscape; margin: 30px 8px 8px 8px; }
|
|
body { font-family: Arial, sans-serif; font-size: 8px; }
|
|
body {
|
|
font-family: Arial, sans-serif;
|
|
font-size: 8px;
|
|
counter-reset: page;
|
|
}
|
|
|
|
/* Page number fixed at top-right, slightly above the content */
|
|
.page-number {
|
|
position: fixed;
|
|
top: -15px; /* Adjust as needed to appear above the border */
|
|
right: 0;
|
|
font-size: 10px;
|
|
}
|
|
|
|
.page-number:after {
|
|
content: "Page " counter(page);
|
|
}
|
|
.header-table { width: 100%; border-collapse: collapse;}
|
|
.header-table td { vertical-align: middle; border-collapse: collapse; border: 1px solid #222; }
|
|
.company-title { font-size: 16px; font-weight: bold; text-align: center; }
|
|
.company-subtitle { font-size: 12px; text-align: center; }
|
|
.company-address { font-size: 10px; text-align: center; }
|
|
.register-title { font-size: 12px; font-weight: bold; text-align: center; }
|
|
.data-table { width: 100%; border-collapse: collapse; margin-top: 6px; }
|
|
.data-table th, .data-table td { border: 1px solid #222; padding: 2px 2px; text-align: center; font-size: 7px; }
|
|
.data-table td:last-child {border-right: 1px solid #222 !important;}
|
|
/* .highlight { color: #0072c6; font-weight: bold; } */
|
|
thead { display: table-header-group; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<div class="page-number"></div>
|
|
<table class="data-table">
|
|
<tr>
|
|
<td colspan="39" style="padding:0;">
|
|
<table width="100%" style="border-collapse:collapse;">
|
|
<tr>
|
|
<td style="width:13%; text-align:left; border:none; border-bottom:1px solid #222;">
|
|
<img src="{{ public_path('images/cripumps.logo.png') }}" alt="Left Logo" height="45" style="position: relative; left: 5mm;">
|
|
</td>
|
|
<td style="width:74%; border:none; border-bottom:1px solid #222;">
|
|
<div class="company-title">C.R.I. Pumps Private Limited</div>
|
|
<div class="company-subtitle">Unit : {{ $plant?->name ?? '' }}</div>
|
|
<div class="company-address">{{ $plant?->address ?? '' }}</div>
|
|
<div class="register-title">MOTOR FREE RUN TEST REGISTER</div>
|
|
</td>
|
|
{{-- <td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
|
|
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
|
|
</td> --}}
|
|
@php
|
|
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
|
|
@endphp
|
|
|
|
@if ($showIsiLogo)
|
|
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
|
|
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
|
|
</td>
|
|
@else
|
|
<td style="width:13%; border:none; border-bottom:1px solid #222;"></td>
|
|
@endif
|
|
</tr>
|
|
<tr>
|
|
{{-- @php
|
|
$firstRecord = $records->first();
|
|
$kw = $firstRecord['kw'] ?? '-';
|
|
$hp = $firstRecord['hp'] ?? '-';
|
|
$phase = $firstRecord['phase'] ?? '-';
|
|
@endphp --}}
|
|
|
|
@php
|
|
$uniqueItemCodes = $records->pluck('Item Code')->unique();
|
|
|
|
//Default values
|
|
$kw = '-';
|
|
$hp = '-';
|
|
$phase = '-';
|
|
|
|
// If there's exactly one unique item code, extract values from the first record
|
|
if ($uniqueItemCodes->count() === 1) {
|
|
$firstRecord = $records->first();
|
|
$kw = $firstRecord['kw'] ?? '-';
|
|
$hp = $firstRecord['hp'] ?? '-';
|
|
$phase = $firstRecord['phase'] ?? '-';
|
|
}
|
|
@endphp
|
|
<td colspan="3" style="text-align:left; font-size:10px; font-weight:bold; border:none; padding-left:230mm;">
|
|
MOTOR KW / HP : {{ $kw }} / {{ $hp }} and PHASE : {{ $phase }}
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
</td>
|
|
</tr>
|
|
<thead>
|
|
<!-- Table Column Headers -->
|
|
<tr>
|
|
{{-- <th rowspan="3">Date</th> --}}
|
|
<th rowspan="3" style="width: 40px; white-space: nowrap;">Date</th>
|
|
<th rowspan="3">Output</th>
|
|
<th rowspan="3">Motor SNo</th>
|
|
<th rowspan="3">Item Code</th>
|
|
{{-- <th rowspan="3">Motor Type</th> --}}
|
|
<th rowspan="3" style="white-space: nowrap;">Motor Type</th>
|
|
|
|
<th colspan="11">BEFORE FREE RUN</th>
|
|
<th colspan="12">AFTER FREE RUN</th>
|
|
<th colspan="3">LOCKED ROTOR TEST</th>
|
|
<th rowspan="3">No Load Pickup Voltage (V)</th>
|
|
<th rowspan="3">Room Temp. (°C)</th>
|
|
<th rowspan="3">High Voltage Test (V)</th>
|
|
<th rowspan="3">Batch Number</th>
|
|
<th rowspan="3">Batch Count</th>
|
|
<th rowspan="3">Result</th>
|
|
<th rowspan="3">Remark</th>
|
|
<th rowspan="3">Tested By</th>
|
|
</tr>
|
|
<tr>
|
|
<th rowspan="2">Voltage (V)</th>
|
|
<th rowspan="2">Current (A)</th>
|
|
<th rowspan="2">Power (W)</th>
|
|
<th colspan="3">Resistance (Ohm)</th>
|
|
<th colspan="3">Insulation Resistance (Ohm)</th>
|
|
<th rowspan="2">Frequency (Hz)</th>
|
|
<th rowspan="2">Speed (Rpm)</th>
|
|
|
|
<th rowspan="2">Voltage (V)</th>
|
|
<th rowspan="2">Current (A)</th>
|
|
<th rowspan="2">Power (W)</th>
|
|
<th colspan="3">IR.Hot (Ohm)</th>
|
|
<th colspan="3">IR.Cool (Ohm)</th>
|
|
<th rowspan="2">Frequency (Hz)</th>
|
|
<th rowspan="2">Speed (Rpm)</th>
|
|
|
|
<th rowspan="2">Leakage Current (mA)</th>
|
|
<th rowspan="2">Voltage (V)</th>
|
|
<th rowspan="2">Current (A)</th>
|
|
<th rowspan="2">Power (W)</th>
|
|
</tr>
|
|
<tr>
|
|
<th>RY</th>
|
|
<th>YB</th>
|
|
<th>BR</th>
|
|
<th>R</th>
|
|
<th>Y</th>
|
|
<th>B</th>
|
|
<th>R</th>
|
|
<th>Y</th>
|
|
<th>B</th>
|
|
<th>R</th>
|
|
<th>Y</th>
|
|
<th>B</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
@foreach ($records as $record)
|
|
<tr>
|
|
<td>{{ $record['Date'] ?? '' }}</td>
|
|
<td>{{ $record['Output'] ?? '' }}</td>
|
|
<td>{{ $record['Motor SNo'] ?? '' }}</td>
|
|
<td>{{ $record['Item Code'] ?? '' }}</td>
|
|
{{-- <td>{{ $record['Motor Type'] ?? '' }}</td> --}}
|
|
<td style="white-space: nowrap;">{{ $record['Motor Type'] ?? '' }}</td>
|
|
|
|
{{-- BEFORE FREE RUN --}}
|
|
<td>{{ $record['Voltage_Before'] ?? '' }}</td>
|
|
<td>{{ $record['Current_Before'] ?? '' }}</td>
|
|
<td>{{ $record['Power_Before'] ?? '' }}</td>
|
|
<td>{{ $record['Resistance_RY'] ?? '' }}</td>
|
|
<td>{{ $record['Resistance_YB'] ?? '' }}</td>
|
|
<td>{{ $record['Resistance_BR'] ?? '' }}</td>
|
|
<td>{{ $record['Insulation_Resistance_R'] ?? '' }}</td>
|
|
<td>{{ $record['Insulation_Resistance_Y'] ?? '' }}</td>
|
|
<td>{{ $record['Insulation_Resistance_B'] ?? '' }}</td>
|
|
<td>{{ $record['Frequency_Before'] ?? '' }}</td>
|
|
<td>{{ $record['Speed_Before'] ?? '' }}</td>
|
|
|
|
{{-- AFTER FREE RUN --}}
|
|
<td>{{ $record['Voltage_After'] ?? '' }}</td>
|
|
<td>{{ $record['Current_After'] ?? '' }}</td>
|
|
<td>{{ $record['Power_After'] ?? '' }}</td>
|
|
<td>{{ $record['IR_Hot_R'] ?? '' }}</td>
|
|
<td>{{ $record['IR_Hot_Y'] ?? '' }}</td>
|
|
<td>{{ $record['IR_Hot_B'] ?? '' }}</td>
|
|
<td>{{ $record['IR_Cool_R'] ?? '' }}</td>
|
|
<td>{{ $record['IR_Cool_Y'] ?? '' }}</td>
|
|
<td>{{ $record['IR_Cool_B'] ?? '' }}</td>
|
|
<td>{{ $record['Frequency_After'] ?? '' }}</td>
|
|
<td>{{ $record['Speed_After'] ?? '' }}</td>
|
|
<td>{{ $record['Leakage_Current'] ?? '' }}</td>
|
|
|
|
{{-- LOCKED ROTOR TEST --}}
|
|
<td>{{ $record['Voltage_Locked'] ?? '' }}</td>
|
|
<td>{{ $record['Current_Locked'] ?? '' }}</td>
|
|
<td>{{ $record['Power_Locked'] ?? '' }}</td>
|
|
|
|
{{-- Other Info --}}
|
|
<td>{{ $record['No_Load_Pickup_Voltage'] ?? '' }}</td>
|
|
<td>{{ $record['Room_Temp'] ?? '' }}</td>
|
|
<td>{{ $record['High_Voltage_Test'] ?? '' }}</td>
|
|
<td>{{ $record['Batch_Number'] ?? '' }}</td>
|
|
<td>{{ $record['Batch_Count'] ?? '' }}</td>
|
|
<td>{{ $record['Result'] ?? '' }}</td>
|
|
<td>{{ $record['Remark'] ?? '' }}</td>
|
|
<td>{{ $record['Tested_By'] ?? '' }}</td>
|
|
</tr>
|
|
@endforeach
|
|
|
|
</tbody>
|
|
</table>
|
|
</body>
|
|
</html>
|