<?php
use yii\helpers\Html;
$title = 'Welders Work Return - Crossing Repair/Maintenance: TEF/3009/V3 June 2008';
?>

<style>
    .nolb {
        border-left-width: 0;
    }

    .norb {
        border-right: none;
    }

    .nolrb {
        border-left-width: 0;
        border-right-width: 0;
    }
    .nobb {
        border-bottom-width: 0;
    }

    .notb {
        border-top-width: 0;
    }

    .notbb {
        border-bottom-width: 0;
        border-top-width: 0;
    }
    .table td{
        padding: 2.5px !important;
        text-transform: unset !important;
        text-align: left !important; 	
        font-size: x-small !important;
    }
    .table th{  
        padding: 2.5px !important;
        text-transform:  !important;
        text-align: left !important; 	
        font-size: x-small !important;
    }
    .DarkerBlue{
        border-color: #000000;
        background-color: #8DB4E2 !important;
        font-family: "Gill Sans MT";
        font-size: x-small !important;
    }
</style>




<table class="table table-outline">
    <tr>
        <td rowspan="2" colspan="9" class="text-left">
            <img height="65px" width="auto"  src="https://my.inlinetrack.co.uk/images/InlineLogo.png" alt="<?= Yii::$app->params['settings']['company_name'] ?>"></img> <br />
            <span class="h5"> <?= $title ?> </span>
        </td>
        <td rowspan="2" class="text-right">
            <?= Yii::$app->params['settings']['company_name'] ?><br />
            <?= Yii::$app->params['settings']['address1'] ?><br />
            <?= Yii::$app->params['settings']['address2'] ?><br />
            <?= Yii::$app->params['settings']['town'] ?><br />
            <?= Yii::$app->params['settings']['county'] ?><br />
            <?= Yii::$app->params['settings']['postcode'] ?>
        </td>
        <td class="DarkerBlue" colspan="3">Pad no</td>
    </tr>
    <tr>
        <td colspan="3"><?= $model->padno ?></td>
    </tr>
    <tr>
        <td class="DarkerBlue">Sheet</td>
        <td colspan="2"><?= $model->sheet ?></td>
        <td class="DarkerBlue">Area</td>
        <td colspan="2"><?= $model->area ?></td>
        <td class="DarkerBlue">Week No</td>
        <td colspan="2"><?= $model->weekno ?></td>
        <td class="DarkerBlue">Job Cost No.</td>
        <td colspan="2"><?= $model->jobcostno ?></td>
    </tr>

    <tr>
        <td class="DarkerBlue">From</td>
        <td colspan="2"><?= $model->_from ?></td>
        <td class="DarkerBlue">TME/TSM</td>
        <td colspan="2"><?= $model->tmetsm ?></td>
        <td class="DarkerBlue">Date</td>
        <td colspan="2"><?= $model->date ?></td>
        <td class="DarkerBlue">Ellipse No.</td>
        <td colspan="2"><?= $model->ellipseno ?></td>
    </tr>

    <tr>
        <td class="DarkerBlue">Tel No</td>
        <td colspan="2"><?= $model->telno ?></td>
        <td class="DarkerBlue">Welder Name<br><br>Stamp No</td>

        <td colspan="2"><?= is_array($model->weldersname) ? implode(',', $model->weldersname) :$model->weldersname ?><br><?= $model->stampno ?></td>


        <td class="DarkerBlue">Welders Signature</td>
        <td colspan="2">
            <img height="50px" width="auto" src="<?= $model->wsignatureloc ?>" />
        </td>
        <td class="DarkerBlue">Inline Job No.</td>
        <td colspan="2"><?= $model->inlineno ?></td>
    </tr>
    <tr>
        <td class="DarkerBlue">Start Time</td>
        <td colspan="2"><?= $model->starttime ?></td>
        <td class="DarkerBlue">Travel Time </td>
        <td colspan="2"><?= $model->starttraveltime ?></td>
        <td class="DarkerBlue">Finish Time</td>
        <td colspan="2"><?= $model->finishtime ?></td>
        <td class="DarkerBlue">Travel Time</td>
        <td colspan="2"><?=   date("H:i", strtotime($model->finishtraveltime));?></td>

    </tr>
    <tr>
        <td class="DarkerBlue">Client</td>
        <td colspan="2"><?= ($model->accountl != null ? $model->accountl->account_name : $model->client);  ?></td>

        <td class="DarkerBlue">Site Rep Signature</td>
        <td colspan="2">
            <img height="50px" width="auto" src="<?= $model->signatureloc ?>" />
        </td>
        <td class="DarkerBlue">Site Rep Print</td>
        <td colspan="2"><?= $model->siterepprint ?></td>
        <td class="DarkerBlue"> Site Rep Date</td>
        <td colspan="2"><?= $model->siterepdate ?></td>
    </tr>
    <tr>
        <td class="DarkerBlueC" colspan="6">SITE DETAILS</td>
        <td class="DarkerBlueC" colspan="6">CROSSING DETAILS</td>
    </tr>
    <tr>
        <td colspan="2" class="DarkerBlueC">LOCATION</td>
        <td class="DarkerBlueC">ACCESS</td>
        <td class="DarkerBlueC">ELR</td>
        <td class="DarkerBlueC">TRACK ID</td>
        <td colspan="2" class="DarkerBlueC">MILEAGE</td>
        <td class="DarkerBlueC">POINTS No</td>
        <td class="DarkerBlueC">GRADE</td>
        <td class="DarkerBlueC">TYPE</td>
        <td class="DarkerBlueC">DESIGN</td>
        <td class="DarkerBlueC">ANGLE</td>
    </tr>
    <tr>
        <td colspan="2"><?= $model->location ?></td>
        <td><?= $model->access ?></td>
        <td><?= $model->elr ?></td>
        <td><?= $model->trackid ?></td>
        <td colspan="2"><?= $model->mileage ." ". $model->mileageb." ".$model->mileagec." ".$model->mileaged ?></td>
        <td><?= $model->pointsno ?></td>
        <td><?= $model->grade ?></td>
        <td><?= $model->type ?></td>
        <td><?= $model->design ?></td>
        <td><?= $model->angle ?></td>

    </tr>

    <tr>
        <td class="DarkerBlueC" colspan="6">WELDING REQUIREMENT</td>
        <td class="DarkerBlueC" colspan="6">WELDING DETAILS</td>
    </tr>
    <tr>
        <td class="DarkerBlueC" rowspan="2">REPAIR No.</td>
        <td class="DarkerBlueC" rowspan="2">COMPONENT</td>
        <td class="DarkerBlueC" rowspan="2">DEFECT TYPE</td>
        <td class="DarkerBlueC" rowspan="2">LENGTH</td>
        <td class="DarkerBlueC" rowspan="2">WIDTH</td>
        <td class="DarkerBlueC" rowspan="2">DEPTH</td>
        <td class="DarkerBlueC" rowspan="2">DEFECT NO.</td>
        <td class="DarkerBlueC" colspan="2">EXCAVATION</td>
        <td class="DarkerBlueC" rowspan="2">PREHEAT TEMP</td>
        <td class="DarkerBlueC" colspan="2">CONSUMABLE</td>
    </tr>
    <tr>
        <td class="DarkerBlueC">LENGTH</td>
        <td class="DarkerBlueC">DEPTH</td>
        <td class="DarkerBlueC">TYPE</td>
        <td class="DarkerBlueC">DIAMETER</td>
    </tr>
    <tr>
        <td class="DarkerBlueC">1</td>
        <td><?= $model->component1 ?></td>
        <td><?= $model->defecttype1 ?></td>
        <td><?= $model->length1 ?></td>
        <td><?= $model->width1 ?></td>
        <td><?= $model->depth1 ?></td>
        <td><?= $model->defectno1 ?></td>
        <td><?= $model->exclength1 ?></td>
        <td><?= $model->excdepth1 ?></td>
        <td><?= $model->preheattemp1 ?></td>
        <td><?= $model->consumetype1 ?></td>
        <td><?= $model->consumedia1 ?></td>
    </tr>
    <tr>
        <td class="DarkerBlueC">2</td>
        <td><?= $model->component2 ?></td>
        <td><?= $model->defecttype2 ?></td>
        <td><?= $model->length2 ?></td>
        <td><?= $model->width2 ?></td>
        <td><?= $model->depth2 ?></td>
        <td><?= $model->defectno2 ?></td>
        <td><?= $model->exclength2 ?></td>
        <td><?= $model->excdepth2 ?></td>
        <td><?= $model->preheattemp2 ?></td>
        <td><?= $model->consumetype2 ?></td>
        <td><?= $model->consumedia2 ?></td>
    </tr>
    <tr>
        <td class="DarkerBlueC">3</td>
        <td><?= $model->component3 ?></td>
        <td><?= $model->defecttype3 ?></td>
        <td><?= $model->length3 ?></td>
        <td><?= $model->width3 ?></td>
        <td><?= $model->depth3 ?></td>
        <td><?= $model->defectno3 ?></td>
        <td><?= $model->exclength3 ?></td>
        <td><?= $model->excdepth3 ?></td>
        <td><?= $model->preheattemp3 ?></td>
        <td><?= $model->consumetype3 ?></td>
        <td><?= $model->consumedia3 ?></td>
    </tr>
    <tr>
        <td class="DarkerBlueC" colspan="8">WELDER COMMENTS</td>
        <td class="DarkerBlueC" colspan="4">EQUIPMENT SERIAL Nos</td>
    </tr>
    <tr>
        <td colspan="8" rowspan="2" style="word-wrap:break-word;"><?= $model->dt125comments ?></td>
        <td class="LighterBlueC">Weld Completed?</td>
        <td class="DarkerBlueC">PREHEATER</td>
        <td class="DarkerBlueC">GENERATOR</td>
        <td class="DarkerBlueC">WFU</td>
    </tr>
    <tr>
        <td><?= strlen($model->weldcompleted) > 0 ? $model->weldcompleted : '&nbsp;' ?></td>
        <td><?= $model->preheater ?></td>
        <td><?= $model->generator ?></td>
        <td><?= $model->wfu ?></td>
    </tr>
    <tr>
        <td>Indicate location and extent of repairs</td>
        <td colspan="11">
            <img 
                width="auto" 
                height="75px" 
                style="border:1pt solid black;margin:auto;cursor:crosshair;clear:both;"
                src="<?= $model->drawingloc ?>" 
            />
        </td>
    </tr>
    <tr>
        <td class="DarkerBlueC" colspan="12">INSPECTION</td>
    </tr>
    <tr>
        <td colspan="1" class="DarkerBlueC">
            REPAIR
        </td>
        <td colspan="2" class="DarkerBlueC">
            DATE INSPECTED
        </td>
        <td colspan="2" class="DarkerBlueC">
            INSPECTED BY
        </td>
        <td colspan="3" class="DarkerBlueC">
            RESULT
        </td>
        <td colspan="2" class="DarkerBlueC">
            COMMENTS
        </td>
        <td colspan="2" class="DarkerBlueC">
            DATABASE No
        </td>
    </tr>
    <tr>
        <td colspan="1" class="DarkerBlueC">1</td>
        <td colspan="2"><?= $model->dateinspected1 ?></td>
        <td colspan="2"><?= $model->inspectedby1 ?></td>
        <td colspan="3"><?= $model->result1 ?></td>
        <td colspan="2" style="word-wrap:break-word;"><?= $model->comments1 ?></td>
        <td colspan="2"><?= $model->databaseno1 ?></td>

    </tr>
    <tr>
        <td colspan="1" class="DarkerBlueC">2</td>
        <td colspan="2"><?= $model->dateinspected2 ?></td>
        <td colspan="2"><?= $model->inspectedby2 ?></td>
        <td colspan="3"></td><?= $model->result2 ?></td>
        <td colspan="2" style="word-wrap:break-word;"><?= $model->comments2 ?></td>
        <td colspan="2"><?= $model->databaseno2 ?></td>
    </tr>
    <tr>
        <td colspan="1" class="DarkerBlueC">3</td>
        <td colspan="2"><?= $model->dateinspected3 ?></td>
        <td colspan="2"><?= $model->inspectedby3 ?></td>
        <td colspan="3"><?= $model->result3 ?></td>
        <td colspan="2" style="word-wrap:break-word;"><?= $model->comments3 ?></td>
        <td colspan="2"><?= $model->databaseno3 ?></td>

    </tr>
    <tr>
        <td class="WhiteCenter" colspan="7">OFFICE USE ONLY</td>
        <td colspan="5" rowspan="2" class="DarkerBlueC">THIS RECORD TO BE COMPLETED ON SITE AT THE TIME OF WELDING</td>
    </tr>

    <tr>
        <td class="DarkerBlueC" colspan="3">Input into Arc Welding Database</td>
        <td colspan="1" class="DarkerBlue">By</td>
        <td colspan="1"><?= $model->arcby ?></td>
        <td colspan="1" class="DarkerBlue">Date</td>
        <td colspan="1"><?= $model->arcdate ?></td>

    </tr>
    <tr>
        <td class="DarkerBlueC" colspan="3">Database References No.s</td>
        <td><?= $model->databasenos ?></td>
    </tr>
    <tr>
        <td class="DarkerBlueC" colspan="3">Inspection Planned for</td>
        <td class="DarkerBlue">Name</td>
        <td><?= $model->insname ?></td>
        <td class="DarkerBlue">Date</td>
        <td><?= $model->insdate ?></td>
        <td colspan="5" class="DarkerBlueC" rowspan="3">AS A MINIMUM, ONE COPY EACH TO BE GIVEN TO SITE SUPERVISOR AND
            WELDING
            MANAGER</td>

    </tr>
    <tr>
        <td colspan="3" class="DarkerBlueC">(B) Form No.s (where applicable) </td>
        <td colspan="4"><?= $model->formnos ?></td>

    </tr>
    <tr>
        <td colspan="3" class="DarkerBlueC">Input into Ellipse</td>
        <td class="DarkerBlue">By</td>
        <td><?= $model->ellipseby ?></td>
        <td class="DarkerBlue">Date</td>
        <td><?= $model->ellipsedate ?></td>

    </tr>
</table>
<div align="center">DT125 / <?= $model->id ?> / <?= is_array($model->weldersname) ? implode(',', $model->weldersname) :$model->weldersname  ?> </div>