add ticket installment

This commit is contained in:
2016-01-22 14:45:56 +01:00
parent bb5978c1df
commit a2a6b1f240
51 changed files with 1498 additions and 113 deletions

View File

@@ -3,8 +3,31 @@
use common\models\TicketInstallmentRequest;
use common\models\Ticket;
use yii\helpers\Html;
?>
<?php
$statusStyle = "";
if ( $model['request_status'] == TicketInstallmentRequest::$STATUS_ACCEPTED || $model['request_status'] == TicketInstallmentRequest::$STATUS_ACCEPTED_MANUAL ){
$statusStyle = "accepted";
}else if ($model['request_status'] == TicketInstallmentRequest::$STATUS_REJECTED ){
$statusStyle = "rejected";
}
?>
<style>
.accepted table td.status {
background-color: green;
}
.rejected table td.status {
background-color: #dd4b39;
}
</style>
<div class="panel panel-default">
<div class="panel-body">
<div class="request-view <?= $statusStyle ?>">
<table class="table table-striped">
<tr>
<th>
@@ -16,7 +39,7 @@ use common\models\Ticket;
<th>
Megbízás státusza
</th>
<td>
<td class="status">
<?php echo TicketInstallmentRequest::toStatusName( $model['request_status'] );?>
</td>
<th>
@@ -25,8 +48,7 @@ use common\models\Ticket;
<td>
<?php echo $model['request_money'] ." Ft";?>
</td>
<tr>
</tr>
<tr>
<th>
Megbízás inditására irányzott dátum
@@ -47,7 +69,7 @@ use common\models\Ticket;
<?php echo \Yii::$app->formatter->asDatetime( $model['request_processed_at'] );?>
</td>
<tr>
</tr>
<tr>
<th>
Megbízás prioritása
@@ -56,15 +78,17 @@ use common\models\Ticket;
<?php echo $model['request_priority'] ;?>
</td>
<th>
Köteg azonosító
</th>
<td>
<?php echo $model['ugiro_id_ugiro'] ;?>
</td>
<th>
</th>
<td>
</td>
<tr>
</tr>
<tr>
<th>
Vendég azonosító
@@ -82,7 +106,7 @@ use common\models\Ticket;
</th>
<td>
</td>
<tr>
</tr>
<tr>
<th>
Bérlet azonosító
@@ -102,7 +126,7 @@ use common\models\Ticket;
<td>
<?php echo Ticket::toStatusName( $model['ticket_status'] );?>
</td>
<tr>
</tr>
<tr>
<th>
Bérlet érvényességének kezdete
@@ -120,5 +144,19 @@ use common\models\Ticket;
</th>
<td>
</td>
<tr>
</table>
</tr>
</table>
<div >
<?php
if ( !empty( $model['ugiro_id_ugiro'] )){
echo Html::a("Köteg",['ugiro/view', 'id' => $model['ugiro_id_ugiro']] ,[ 'class' => 'btn btn-primary']);
}
echo Html::a("Megbízás részletek",['ticket-installment-request/view', 'id' => $model['request_id_ticket_installment_request']] ,[ 'class' => 'btn btn-primary']);
if ( !empty( $model['ticket_id_ticket'] )){
echo Html::a("Bérlet részletei",['ticket-installment-request/index', 'TicketInstallmentRequestSearch[id_ticket]' => $model['ticket_id_ticket']] ,[ 'class' => 'btn btn-primary']);
}
?>
</div>
</div>
</div>
</div>