<?php

use yii\helpers\Html;

/* @var $this yii\web\View */
/* @var $model modules\forms\models\Dttmz */

$this->title = $model->id;
$this->params['breadcrumbs'][] = ['label' => 'DT192', 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<div class="dttmz-view">


    <table class="table table-borderless">
        <tr>
            <td class="notbb nolrb nolb" align="right" style="padding:none;">
                <?= $this->render('//common/_viewheader', ['title' => 'SITE RECORD OF TRI-METAL WELD AND ZONE REPAIRS']) ?>
                <?= $model->padno ?></td>
        </tr>
    </table>
    <table class="table table-borderless">
        <tbody>
            <tr>
                <th class="DarkerBlue">Date</th>
                <td><?= date('d/m/Y', strtotime($model->date)) ?></td>
                <th class="DarkerBlue">Delivery Unit</th>
                <td><?= $model->deliveryunit ?></td>
            </tr>

            <tr>
                <th class="DarkerBlue">Site location</th>
                <td><?= $model->sitelocation ?></td>
                <th class="DarkerBlue">Route</th>
                <td><?= $model->route ?></td>
                <th class="DarkerBlue">Defect No.</th>
                <td><?= $model->defectno ?></td>
                
            </tr>
            <tr>
                <th class="DarkerBlue">Line</th>
                <td><?= $model->line ?></td>
                <th class="DarkerBlue">Mileage/Yards </th>
                <td><?= $model->miles ?><?= $model->yards ?></td>
                <th class="DarkerBlue">Point No.</th>
                <td><?= $model->pointno ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue">Crossing Manufacturer</th>
                <td><?= $model->crossingmanufacturer ?></td>
                <th class="DarkerBlue">Crossing No.</th>
                <td><?= $model->crossingno ?></td>
                <th class="DarkerBlue" rowspan="2">Leg end Front/Rear Rh/Lh</th>
                <td><?= $model->legendfr ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue">Type, Common/Obtuse</th>
                <td><?= $model->type ?></td>
                <th class="DarkerBlue">Angle</th>
                <td><?= $model->angle ?></td>
                <td><?= $model->legendlhrh ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue" colspan="6">Area that the repair has took place</th>
            </tr>
            <tr>
                <th colspan="6" style="text-align: center">Manganese only</th>

            </tr>
            <tr>
                <th class="DarkerBlue">Length</th>
                <td><?= $model->mlength ?></td>
                <th class="DarkerBlue">Depth</th>
                <td><?= $model->mdepth ?></td>
                <th class="DarkerBlue">Width</th>
                <td><?= $model->mwidth ?></td>
            </tr>
            <tr>
                <th colspan="6" style="text-align: center">Manganese + Tri-metal Weld</th>

            </tr>
            <tr>
                <th class="DarkerBlue">Length</th>
                <td><?= $model->mtlength ?></td>
                <th class="DarkerBlue">Depth</th>
                <td><?= $model->mtdepth ?></td>
                <th class="DarkerBlue">Width</th>
                <td><?= $model->mtwidth ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue" colspan="5">Did the repair encroach within 5mm of the Normal Grade rail?</th>
                <td><?= $model->encrouch5mm ?></td>
            </tr>
            <tr>
                <th colspan="6" style="text-align: center">Normal Grade + Tri-metal Weld + Manganese</th>

            </tr>
            <tr>
                <th class="DarkerBlue" colspan="2">Distance from TMW Normal grade</th>
                <td><?= $model->distancefromtmwnorm ?></td>
                <th class="DarkerBlue" colspan="2">Distance from TMW Manganese</th>
                <td><?= $model->distancefromtmwmang ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue" colspan="2">Length</th>
                <td><?= $model->overall ?></td>
                <th class="DarkerBlue" colspan="2">Depth</th>
                <td><?= $model->depth ?></td>
            </tr>
            <tr>
                <th colspan="6" style="text-align: center">Normal Grade + Tri-metal weld</th>
            </tr>
            <tr>
                <th class="DarkerBlue">Length</th>
                <td><?= $model->nglength ?></td>
                <th class="DarkerBlue">Depth</th>
                <td><?= $model->ngdepth ?></td>
                <th class="DarkerBlue">Width</th>
                <td><?= $model->ngwidth ?></td>
            </tr>
            <tr>
                <th colspan="6" style="text-align: center">Electrodes/Processes</th>
            </tr>
            <tr>
                <th class="DarkerBlue" rowspan="2">Electrode/wire used</th>
                <td></td>
                <th class="DarkerBlue" rowspan="2">Processes used</th>
                <th class="DarkerBlue">MMA</th>
                <th class="DarkerBlue">Semi-Auto</th>
                <th class="DarkerBlue">Fully Auto</th>

            </tr>
            <tr>
                <td><?= $model->electrodeused ?></td>
                <td><?= $model->processmma ?></td>
                <td><?= $model->processsemiauto ?></td>
                <td><?= $model->processfullyauto ?></td>
            </tr>
            <tr>
                <td colspan="6" align="center" style="padding:none;">
                    <img height="auto" width="50%"
                        src="<?= Yii::$app->controller->action->id == 'view' ? '/' : '' ?>images/dt192.jpg"></img>
                </td>
            </tr>
            <tr>
                <th class="DarkerBlue">Welders name </th>
                <td colspan="2"><?= $model->weldersname ?></td>
                <th class="DarkerBlue">Supervisors name</th>
                <td colspan="2"><?= $model->supervisorname ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue">Stamp No </th>
                <td colspan="2"><?= $model->weldersstamp ?></td>
            </tr>
            <tr>
                <th class="DarkerBlue">Signature </th>
                <td colspan="2"><img height="75px" src="<?= $model->signature ?>"></img></td>
            </tr>
        </tbody>
    </table>
</div>
<style>
.dttmz-view td, .dttmz-view th{
    padding:9px 10px;
}
</style>