<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
$types = ['Scheduled' => 'Scheduled', 'Unscheduled' => 'Unscheduled'];
/* @var $this yii\web\View */
/* @var $model backend\models\Vehicleservicehistorybe */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="vehicleservicehistorybe-form">

    <?php $form = ActiveForm::begin(); ?>
	<div class="card card-default">
		<div class="card-header">Service</div>
		<div class="card-body">
			<div class="row">
				<div class="col-12 col-lg-2 data-label">Vehicle</div>
				<div class="col-12 col-lg-4"><?= $form->field($model, 'relatedid')->dropdownlist($vehicles, ['prompt' => 'Please Select...'])->label(false) ?></div>
			</div>
			<div class="row">
				<div class="col-12 col-lg-2 data-label">Date</div>
				<div class="col-12 col-lg-4"><?= $form->field($model, 'date')->widget(\kartik\date\DatePicker::class, ['pluginOptions' => ['showMeridian' =>true, 'convertFormat' => true, 'format' => 'dd/mm/yyyy']])->label(false) ?></div>
				<div class="col-12 col-lg-2 data-label">Mileage</div>
				<div class="col-12 col-lg-4"><?= $form->field($model, 'mileage')->textInput()->label(false) ?></div>
			</div>
			<div class="row">
				<div class="col-12 col-lg-2 data-label">Invoice No</div>
				<div class="col-12 col-lg-4"><?= $form->field($model, 'invoiceno')->textInput()->label(false) ?></div>
			</div>
			<div class="row">
				<div class="col-12 col-lg-2 data-label">Garage / Service location</div>
				<div class="col-12 col-lg-4"><?= $form->field($model, 'garage')->textInput()->label(false) ?></div>
				<div class="col-12 col-lg-2 data-label">Type</div>
				<div class="col-12 col-lg-4"><?= $form->field($model, 'type')->dropdownlist($types, ['prompt' => 'Please Select'])->label(false) ?></div>
			</div>
			<div class="row">
				<div class="col-12 data-label">Description</div>
				<div class="col-12"><?= $form->field($model, 'description')->textArea(['rows' => 6])->label(false) ?></div>
			</div>
			<div class="row">
				<div class="col-12 data-label">Warnings</div>
				<div class="col-12"><?= $form->field($model, 'warnings')->textArea(['rows' => 6])->label(false) ?></div>
			</div>
			<div class="row">
				<div class="col-12 data-label">Further Action</div>
				<div class="col-12"><?= $form->field($model, 'furtheractions')->textArea(['rows' => 6])->label(false) ?></div>
			</div>
			<div class="row">
				<div class="col-12 col-lg-2 data-label">Cost</div>
				<div class="col-12 col-lg-4"><?= $form->field($model, 'cost')->textInput()->label(false) ?></div>
				<div class="col-12 col-lg-2 data-label">Paid By</div>
				<div class="col-12 col-lg-4"><?= $form->field($model, 'paidby')->textInput()->label(false) ?></div>
			</div>
			
		</div>
	</div>
	<div class="card card-default">
		<div class="card-header">Files</div>
		<div class="card-body">
			<?= $this->render('/uploads/dbupload', ['relatedid' => $model->id, 'relatedto' => 'Service']); ?>
		</div>
	</div>
    <div class="form-group">
        <?= Html::submitButton('Save', ['class' => 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
