<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;

/* @var $this yii\web\View */
/* @var $model backend\models\Finesandchargesbe */
/* @var $form yii\widgets\ActiveForm */
$status = ['Active' => 'Active', 'Inactive' => 'Inactive', 'Deleted'=>'Deleted', 'Complete' => 'Complete', 'Disbuted' => 'Disbuted'];
?>

<div class="finesandchargesbe-form">
	<?php $form = ActiveForm::begin(); ?>
		<div class="card card-default">
			<div class="card-header">Fines and Charges</div>
			<div class="card-body">
				<div class="row">
					<div class='col-12 col-lg-2 data-label'>Employee</div>
					<div class='col-12 col-lg-4'><?= $form->field($model, 'employee')->dropdownlist($employees, ['prompt' => 'Please Select'])->label(false)  ?></div>
					<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'>Job No</div>
					<div class='col-12 col-lg-4'><?= $form->field($model, 'jobno')->textInput()->label(false) ?></div>
					<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, ['size' => 'sm', 'pluginOptions' => ['convertFormat' => true, 'format' => 'dd/mm/yyyy']])->label(false) ?></div>
				</div>
				<div class="row">
					<div class='col-12 col-lg-2 data-label'>Penalty Points Issued</div>
					<div class='col-12 col-lg-4'><?= $form->field($model, 'penalypointsissued')->radioList([0 => 'NO', 1 => 'YES'])->label(false) ?></div>
					<div class='col-12 col-lg-2 data-label'>Penalty Points</div>
					<div class='col-12 col-lg-4'><?= $form->field($model, 'penaltypoints')->textInput()->label(false) ?></div>
				</div>
				<div class="row">
					<div class='col-12 col-lg-2 data-label'>Issuing Body</div>
					<div class='col-12 col-lg-4'><?= $form->field($model, 'issuingbody')->textInput()->label(false) ?></div>
					<div class='col-12 col-lg-2 data-label'>Reference</div>
					<div class='col-12 col-lg-4'><?= $form->field($model, 'reference')->textInput()->label(false) ?></div>
				</div>
				<div class="row">
					<div class='col-12 col-lg-2 data-label'>Status</div>
					<div class='col-12 col-lg-4'><?= $form->field($model, 'status')->dropdownlist($status, ['prompt' => 'Please Select'])->label(false) ?></div>
					<div class='col-12 col-lg-2 data-label'>Location</div>
					<div class='col-12 col-lg-4'><?= $form->field($model, 'location')->textInput()->label(false) ?></div>	
				</div>
				<div class="row">
					<div class='col-12 col-lg-2 data-label'>Reason</div>
					<div class='col-12 col-lg-4'><?= $form->field($model, 'reason')->textArea()->label(false) ?></div>
					<div class='col-12 col-lg-2 data-label'>Value &pound;</div>
					<div class='col-12 col-lg-4'><?= $form->field($model, 'value')->textInput()->label(false) ?></div>
				</div>
			</div>
		</div>
		<div class="card card-default">
			<div class="card-header">Assiociated Files and Evidence</div>
			<div class="card-body">
				<?= $this->render('/uploads/dbupload', ['relatedto' => 'fines', 'relatedid' => $model->id ? $model->id : Yii::$app->session->get('finestempid')]); ?>
			</div>
		</div>
		<div class="row">
			<div class="col-12">
				<?= $this->render('/uploads/files', ['files' => $model->files]); ?>
			</div>
		</div>
		<div class="form-group">
			<?= Html::submitButton('Save', ['class' => 'btn btn-primary']) ?>
		</div>
	<?php ActiveForm::end(); ?>
</div>
