Added export testing_panel_readings pdf templates and images
This commit is contained in:
BIN
public/images/cripumps.logo.png
Normal file
BIN
public/images/cripumps.logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 7.5 KiB |
BIN
public/images/isi_logo1.PNG
Normal file
BIN
public/images/isi_logo1.PNG
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
175
resources/views/exports/export-isi-pdf.blade.php
Normal file
175
resources/views/exports/export-isi-pdf.blade.php
Normal file
@@ -0,0 +1,175 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
@page { size: A4 landscape; margin: 30px 8px 8px 8px; }
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 8px;
|
||||||
|
counter-reset: page;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-number {
|
||||||
|
position: fixed;
|
||||||
|
top: -15px;
|
||||||
|
right: 0;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-number:after {
|
||||||
|
content: "Page " counter(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table th, .data-table td {
|
||||||
|
border: 1px solid #222;
|
||||||
|
padding: 2px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead { display: table-header-group; }
|
||||||
|
.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; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="page-number"></div>
|
||||||
|
|
||||||
|
<table class="data-table">
|
||||||
|
<tr>
|
||||||
|
<td colspan="20" 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="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>
|
||||||
|
@php
|
||||||
|
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
|
||||||
|
@endphp
|
||||||
|
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
|
||||||
|
@if ($showIsiLogo)
|
||||||
|
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
@php
|
||||||
|
$uniqueItemCodes = $records->pluck('Item Code')->unique();
|
||||||
|
$kw = $hp = $phase = '-';
|
||||||
|
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>
|
||||||
|
<!-- Row 1: Main Group Headings -->
|
||||||
|
<tr>
|
||||||
|
<th rowspan="3">Date</th>
|
||||||
|
<th rowspan="3">Motor SNo</th>
|
||||||
|
<th rowspan="3">Item Code</th>
|
||||||
|
<th rowspan="3">Motor Type</th>
|
||||||
|
|
||||||
|
<th colspan="8">AFTER FREE RUN</th>
|
||||||
|
<th colspan="3">LOCKED ROTOR TEST</th>
|
||||||
|
|
||||||
|
<th rowspan="3">No Load Pickup Voltage</th>
|
||||||
|
<th rowspan="3">Room Temp.</th>
|
||||||
|
<th rowspan="3">High Voltage Test</th>
|
||||||
|
<th rowspan="3">Result</th>
|
||||||
|
<th rowspan="3">Remark</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- Row 2: Sub-Headers (Column Names) -->
|
||||||
|
<tr>
|
||||||
|
<!-- AFTER FREE RUN -->
|
||||||
|
<th>Voltage</th>
|
||||||
|
<th>Current</th>
|
||||||
|
<th>Power</th>
|
||||||
|
<th>IR.Hot</th>
|
||||||
|
<th>IR.Cool</th>
|
||||||
|
<th>Frequency</th>
|
||||||
|
<th>Speed</th>
|
||||||
|
<th>Leakage Current</th>
|
||||||
|
|
||||||
|
<!-- LOCKED ROTOR TEST -->
|
||||||
|
<th>Voltage</th>
|
||||||
|
<th>Current</th>
|
||||||
|
<th>Power</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<!-- AFTER FREE RUN -->
|
||||||
|
<td>(V)</td>
|
||||||
|
<td>(A)</td>
|
||||||
|
<td>(W)</td>
|
||||||
|
<td>(Ohm)</td>
|
||||||
|
<td>(Ohm)</td>
|
||||||
|
<td>(Hz)</td>
|
||||||
|
<td>(Rpm)</td>
|
||||||
|
<td>(mA)</td>
|
||||||
|
<!-- LOCKED ROTOR TEST -->
|
||||||
|
<td>(V)</td>
|
||||||
|
<td>(A)</td>
|
||||||
|
<td>(W)</td>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
|
@foreach($records as $record)
|
||||||
|
<tr>
|
||||||
|
<td>{{ $record['Date'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Motor SNo'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Item Code'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Motor Type'] ?? '' }}</td>
|
||||||
|
|
||||||
|
{{-- AFTER FREE RUN --}}
|
||||||
|
<td>{{ $record['Voltage_After'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Current_After'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Power_After'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['IR_Hot'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['IR_Cool'] ?? '' }}</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>
|
||||||
|
|
||||||
|
{{-- OTHERS --}}
|
||||||
|
<td>{{ $record['No_Load_Pickup_Voltage'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Room_Temp'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['High_Voltage_Test'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Result'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Remark'] ?? '' }}</td>
|
||||||
|
</tr>
|
||||||
|
@endforeach
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
200
resources/views/exports/export-isi-three-phase-pdf.blade.php
Normal file
200
resources/views/exports/export-isi-three-phase-pdf.blade.php
Normal file
@@ -0,0 +1,200 @@
|
|||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<style>
|
||||||
|
@page { size: A4 landscape; margin: 30px 8px 8px 8px; }
|
||||||
|
body {
|
||||||
|
font-family: Arial, sans-serif;
|
||||||
|
font-size: 8px;
|
||||||
|
counter-reset: page;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-number {
|
||||||
|
position: fixed;
|
||||||
|
top: -15px;
|
||||||
|
right: 0;
|
||||||
|
font-size: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.page-number:after {
|
||||||
|
content: "Page " counter(page);
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table {
|
||||||
|
width: 100%;
|
||||||
|
border-collapse: collapse;
|
||||||
|
margin-top: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.data-table th, .data-table td {
|
||||||
|
border: 1px solid #222;
|
||||||
|
padding: 2px;
|
||||||
|
text-align: center;
|
||||||
|
font-size: 7px;
|
||||||
|
}
|
||||||
|
|
||||||
|
thead { display: table-header-group; }
|
||||||
|
.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; }
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
|
||||||
|
<div class="page-number"></div>
|
||||||
|
|
||||||
|
<table class="data-table">
|
||||||
|
<tr>
|
||||||
|
<td colspan="24" 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="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>
|
||||||
|
@php
|
||||||
|
$showIsiLogo = $records->every(fn ($record) => $record['isi_model']);
|
||||||
|
@endphp
|
||||||
|
<td style="width:13%; text-align:right; border:none; border-bottom:1px solid #222;">
|
||||||
|
@if ($showIsiLogo)
|
||||||
|
<img src="{{ public_path('images/isi_logo1.PNG') }}" alt="ISI Logo" height="35" style="position: relative; left: -20mm;">
|
||||||
|
@endif
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
@php
|
||||||
|
$uniqueItemCodes = $records->pluck('Item Code')->unique();
|
||||||
|
$kw = $hp = $phase = '-';
|
||||||
|
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>
|
||||||
|
<!-- Row 1: Main Group Headings -->
|
||||||
|
<tr>
|
||||||
|
<th rowspan="4">Date</th>
|
||||||
|
<th rowspan="4">Motor SNo</th>
|
||||||
|
<th rowspan="4">Item Code</th>
|
||||||
|
<th rowspan="4">Motor Type</th>
|
||||||
|
|
||||||
|
<th colspan="12">AFTER FREE RUN</th>
|
||||||
|
<th colspan="3">LOCKED ROTOR TEST</th>
|
||||||
|
|
||||||
|
<th rowspan="4">No Load Pickup Voltage</th>
|
||||||
|
<th rowspan="4">Room Temp.</th>
|
||||||
|
<th rowspan="4">High Voltage Test</th>
|
||||||
|
<th rowspan="4">Result</th>
|
||||||
|
<th rowspan="4">Remark</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- Row 2: AFTER FREE RUN main columns -->
|
||||||
|
<tr>
|
||||||
|
<th rowspan="2">Voltage</th>
|
||||||
|
<th rowspan="2">Current</th>
|
||||||
|
<th rowspan="2">Power</th>
|
||||||
|
<th colspan="3">IR.Hot</th>
|
||||||
|
<th colspan="3">IR.Cool</th>
|
||||||
|
<th rowspan="2">Frequency</th>
|
||||||
|
<th rowspan="2">Speed</th>
|
||||||
|
<th rowspan="2">Leakage Current</th>
|
||||||
|
|
||||||
|
<!-- LOCKED ROTOR TEST -->
|
||||||
|
<th rowspan="2">Voltage</th>
|
||||||
|
<th rowspan="2">Current</th>
|
||||||
|
<th rowspan="2">Power</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- Row 3: Sub-columns for IR.Hot and IR.Cool -->
|
||||||
|
<tr>
|
||||||
|
<th>R</th>
|
||||||
|
<th>Y</th>
|
||||||
|
<th>B</th>
|
||||||
|
<th>R</th>
|
||||||
|
<th>Y</th>
|
||||||
|
<th>B</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<!-- Row 4: Units -->
|
||||||
|
<tr>
|
||||||
|
<td>(V)</td> <!-- Voltage -->
|
||||||
|
<td>(A)</td> <!-- Current -->
|
||||||
|
<td>(W)</td> <!-- Power -->
|
||||||
|
<td>(Ohm)</td> <!-- IR.Hot R -->
|
||||||
|
<td>(Ohm)</td> <!-- IR.Hot Y -->
|
||||||
|
<td>(Ohm)</td> <!-- IR.Hot B -->
|
||||||
|
<td>(Ohm)</td> <!-- IR.Cool R -->
|
||||||
|
<td>(Ohm)</td> <!-- IR.Cool Y -->
|
||||||
|
<td>(Ohm)</td> <!-- IR.Cool B -->
|
||||||
|
<td>(Hz)</td> <!-- Frequency -->
|
||||||
|
<td>(Rpm)</td> <!-- Speed -->
|
||||||
|
<td>(mA)</td> <!-- Leakage Current -->
|
||||||
|
|
||||||
|
<td>(V)</td> <!-- Locked Voltage -->
|
||||||
|
<td>(A)</td> <!-- Locked Current -->
|
||||||
|
<td>(W)</td> <!-- Locked Power -->
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@foreach($records as $record)
|
||||||
|
<tr>
|
||||||
|
{{-- COMMON FIELDS --}}
|
||||||
|
<td>{{ $record['Date'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Motor SNo'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Item Code'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Motor Type'] ?? '' }}</td>
|
||||||
|
|
||||||
|
{{-- AFTER FREE RUN --}}
|
||||||
|
<td>{{ $record['Voltage_After'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Current_After'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Power_After'] ?? '' }}</td>
|
||||||
|
|
||||||
|
{{-- IR Hot: R, Y, B --}}
|
||||||
|
<td>{{ $record['IR_Hot_R'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['IR_Hot_Y'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['IR_Hot_B'] ?? '' }}</td>
|
||||||
|
|
||||||
|
{{-- IR Cool: R, Y, B --}}
|
||||||
|
<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 FIELDS --}}
|
||||||
|
<td>{{ $record['No_Load_Pickup_Voltage'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Room_Temp'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['High_Voltage_Test'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Result'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['Remark'] ?? '' }}</td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
@endforeach
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
213
resources/views/exports/export-three-phase-pdf.blade.php
Normal file
213
resources/views/exports/export-three-phase-pdf.blade.php
Normal file
@@ -0,0 +1,213 @@
|
|||||||
|
|
||||||
|
|
||||||
|
<!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>
|
||||||
|
<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">Output</th>
|
||||||
|
<th rowspan="3">Motor SNo</th>
|
||||||
|
<th rowspan="3">Item Code</th>
|
||||||
|
<th rowspan="3">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>
|
||||||
|
|
||||||
|
{{-- 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>
|
||||||
231
resources/views/exports/testingpanel-pdf.blade.php
Normal file
231
resources/views/exports/testingpanel-pdf.blade.php
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
<!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>
|
||||||
|
<!-- Header Row with Logos and Company Info -->
|
||||||
|
<table class="data-table">
|
||||||
|
<tr>
|
||||||
|
<td colspan="33" 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>
|
||||||
|
<tr>
|
||||||
|
<!-- Combine first 5 columns into one cell with rowspan 4 -->
|
||||||
|
<th rowspan="4">Date</th>
|
||||||
|
<th rowspan="4">Output</th>
|
||||||
|
<th rowspan="4">Motor SNo</th>
|
||||||
|
<th rowspan="4">Item Code</th>
|
||||||
|
<th rowspan="4">Motor Type</th>
|
||||||
|
|
||||||
|
<!-- Grouped columns -->
|
||||||
|
<th colspan="9">BEFORE FREE RUN</th>
|
||||||
|
<th colspan="8">AFTER FREE RUN</th>
|
||||||
|
<th colspan="3">LOCKED ROTOR TEST</th>
|
||||||
|
|
||||||
|
<!-- Last 8 columns with rowspan 4 -->
|
||||||
|
<th rowspan="4">No Load Pickup Voltage</th>
|
||||||
|
<th rowspan="4">Room Temp.</th>
|
||||||
|
<th rowspan="4">High Voltage Test</th>
|
||||||
|
<th rowspan="4">Batch Number</th>
|
||||||
|
<th rowspan="4">Batch Count</th>
|
||||||
|
<th rowspan="4">Result</th>
|
||||||
|
<th rowspan="4">Remark</th>
|
||||||
|
<th rowspan="4">Tested By</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<!-- BEFORE FREE RUN -->
|
||||||
|
<th rowspan="2">Voltage</th>
|
||||||
|
<th rowspan="2">Current</th>
|
||||||
|
<th rowspan="2">Power</th>
|
||||||
|
<th colspan="3">Resistance</th>
|
||||||
|
<th rowspan="2">Insulation Resistance</th>
|
||||||
|
<th rowspan="2">Frequency</th>
|
||||||
|
<th rowspan="2">Speed</th>
|
||||||
|
|
||||||
|
<!-- AFTER FREE RUN -->
|
||||||
|
<th rowspan="2">Voltage</th>
|
||||||
|
<th rowspan="2">Current</th>
|
||||||
|
<th rowspan="2">Power</th>
|
||||||
|
<th rowspan="2">IR.Hot</th>
|
||||||
|
<th rowspan="2">IR.Cool</th>
|
||||||
|
<th rowspan="2">Frequency</th>
|
||||||
|
<th rowspan="2">Speed</th>
|
||||||
|
<th rowspan="2">Leakage Current</th>
|
||||||
|
|
||||||
|
<!-- LOCKED ROTOR TEST -->
|
||||||
|
<th rowspan="2">Voltage</th>
|
||||||
|
<th rowspan="2">Current</th>
|
||||||
|
<th rowspan="2">Power</th>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<th>RY</th>
|
||||||
|
<th>YB</th>
|
||||||
|
<th>BR</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>(V)</th>
|
||||||
|
<th>(A)</th>
|
||||||
|
<th>(W)</th>
|
||||||
|
<th>(Ohm)</th>
|
||||||
|
<th>(Ohm)</th>
|
||||||
|
<th>(Ohm)</th>
|
||||||
|
<th>(Ohm)</th>
|
||||||
|
<th>(Hz)</th>
|
||||||
|
<th>(Rpm)</th>
|
||||||
|
|
||||||
|
<th>(V)</th>
|
||||||
|
<th>(A)</th>
|
||||||
|
<th>(W)</th>
|
||||||
|
<th>(Ohm)</th>
|
||||||
|
<th>(Ohm)</th>
|
||||||
|
<th>(Hz)</th>
|
||||||
|
<th>(Rpm)</th>
|
||||||
|
<th>(mA)</th>
|
||||||
|
|
||||||
|
<th>(V)</th>
|
||||||
|
<th>(A)</th>
|
||||||
|
<th>(W)</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
@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>
|
||||||
|
|
||||||
|
{{-- 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_BBR'] ?? '' }}</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'] ?? '' }}</td>
|
||||||
|
<td>{{ $record['IR_Cool'] ?? '' }}</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
|
||||||
|
</table>
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
Reference in New Issue
Block a user