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

@@ -2,49 +2,207 @@
use yii\helpers\Html;
use yii\widgets\DetailView;
use common\models\TicketInstallmentRequest;
use common\models\Ticket;
use yii\widgets\ActiveForm;
/* @var $this yii\web\View */
/* @var $model common\models\TicketInstallmentRequest */
$this->title = $model->id_ticket_installment_request;
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/ticket_installment_request', 'Ticket Installment Requests'), 'url' => ['index']];
$this->title = "Megbízás: " . $model->id_ticket_installment_request;
$this->params['breadcrumbs'][] = ['label' => "Megbízások", 'url' => ['index']];
$this->params['breadcrumbs'][] = $this->title;
?>
<?php
$statusStyle = "";
if ( $model->isStatusAccepted() ){
$statusStyle = "accepted";
}else if ( $model->isStatusRejected() ){
$statusStyle = "rejected";
}
?>
<style>
.accepted table td.status {
background-color: green;
}
.rejected table td.status {
background-color: #dd4b39;
}
a.btn{
margin-right: 6px;
}
</style>
<div class="ticket-installment-request-view">
<h1><?= Html::encode($this->title) ?></h1>
<p>
<?= Html::a(Yii::t('common/ticket_installment_request', 'Update'), ['update', 'id' => $model->id_ticket_installment_request], ['class' => 'btn btn-primary']) ?>
<?= Html::a(Yii::t('common/ticket_installment_request', 'Delete'), ['delete', 'id' => $model->id_ticket_installment_request], [
'class' => 'btn btn-danger',
'data' => [
'confirm' => Yii::t('common/ticket_installment_request', 'Are you sure you want to delete this item?'),
'method' => 'post',
],
]) ?>
</p>
<?= DetailView::widget([
'model' => $model,
'attributes' => [
'id_ticket_installment_request',
'id_ticket',
'id_customer',
'id_transfer',
'status',
'money',
'customer_name',
'bank_name',
'bank_address',
'bank_account',
'priority',
'request_sent_at',
'request_processed_at',
'request_target_time_at',
'created_at',
'updated_at',
],
]) ?>
<div class="panel panel-default">
<div class="panel-body">
<?php
if ( $model->isStatusRejected()){
echo Html::a("Teljesítettnek jelölés",['accept', 'id' => $model->id_ticket_installment_request] ,['data-method' =>'post', 'class' => 'btn btn-danger']);
}
?>
<div class="request-view <?= $statusStyle ?>">
<table class="table table-striped">
<tr>
<th>
Megbízás azonosító
</th>
<td>
<?php echo "".$model->id_ticket_installment_request;?>
</td>
<th>
Megbízás státusza
</th>
<td class="status">
<?php echo TicketInstallmentRequest::toStatusName( $model->status );?>
</td>
<th>
Megbízás összege
</th>
<td>
<?php echo $model->money." Ft";?>
</td>
</tr>
<tr>
<th>
Megbízás inditására irányzott dátum
</th>
<td>
<?php echo \Yii::$app->formatter->asDatetime( $model->request_target_time_at );?>
</td>
<th>
Megbízás elindításának ideje
</th>
<td>
<?php echo \Yii::$app->formatter->asDatetime( $model->request_sent_at);?>
</td>
<th>
Megbízás feldoglozásának ideje
</th>
<td>
<?php echo \Yii::$app->formatter->asDatetime( $model->request_processed_at );?>
</td>
</tr>
<tr>
<th>
Megbízás prioritása (Sorszám)
</th>
<td>
<?php echo $model->priority ;?>
</td>
<th>
Köteg azonosító
</th>
<td>
<?php echo $model->idGiro ;?>
</td>
<th>
</th>
<td>
</td>
</tr>
<tr>
<th>
Vendég azonosító
</th>
<td>
<?php echo "". $model->customer->id_customer;?>
</td>
<th>
Vendég neve
</th>
<td>
<?php echo "". $model->customer->name;?>
</td>
<th>
</th>
<td>
</td>
</tr>
<tr>
<th>
Bérlet azonosító
</th>
<td>
<?php echo "". $model->ticket->id_ticket;?>
</td>
<th>
Bérlet típus
</th>
<td>
<?php echo $model->ticket->ticketTypeName;?>
</td>
<th>
Bérlet státusza
</th>
<td>
<?php echo Ticket::toStatusName( $model->ticket->status );?>
</td>
</tr>
<tr>
<th>
Bérlet érvényességének kezdete
</th>
<td>
<?php echo \Yii::$app->formatter->asDate( $model->ticket->start) ;?>
</td>
<th>
Bérlet érvényességének vége
</th>
<td>
<?php echo \Yii::$app->formatter->asDate( $model->ticket->end ) ;?>
</td>
<th>
</th>
<td>
</td>
</tr>
<tr>
<th>
Bérlet részletek száma
</th>
<td>
<?php echo $model->ticket->part_count ;?>
</td>
<th>
Bérlet esedékes részlet
</th>
<td>
<?php echo $model->ticket->part ;?>
</td>
<th>
Bérlet utoljára fizetett részlet
</th>
<td>
<?php echo $model->ticket->part_paid ;?>
</td>
</tr>
</table>
<?php
if ( !empty( $model->idGiro )){
echo Html::a("Köteg",['ugiro/view', 'id' => $model->idGiro] ,[ 'class' => 'btn btn-primary']);
echo Html::a("Részletek a kötegben",['ticket-installment-request/index', 'TicketInstallmentRequestSearch[id_ugiro]' => $model->idGiro] ,[ 'class' => 'btn btn-primary']);
}
echo Html::a("Bérlet fizetési részletei",['ticket-installment-request/index', 'TicketInstallmentRequestSearch[id_ticket]' => $model->id_ticket] ,[ 'class' => 'btn btn-primary']);
?>
</div>
</div>
</div>
</div>