add contract
This commit is contained in:
99
frontend/views/contract/view.php
Normal file
99
frontend/views/contract/view.php
Normal file
@@ -0,0 +1,99 @@
|
||||
<?php
|
||||
|
||||
use yii\helpers\Html;
|
||||
use yii\widgets\DetailView;
|
||||
use common\models\TicketInstallmentRequest;
|
||||
|
||||
/* @var $this yii\web\View */
|
||||
/* @var $model common\models\Contract */
|
||||
|
||||
$this->title = $model->id_contract;
|
||||
$this->params['breadcrumbs'][] = ['label' => Yii::t('common/contract', 'Szerződések'), 'url' => ['index', 'id_card' => $card->id_card]];
|
||||
$this->params['breadcrumbs'][] = $this->title;
|
||||
?>
|
||||
<div class="contract-view">
|
||||
|
||||
<h1><?= Html::encode($this->title) ?></h1>
|
||||
|
||||
|
||||
<?= DetailView::widget([
|
||||
'model' => $model,
|
||||
'attributes' => [
|
||||
'id_contract',
|
||||
[
|
||||
'attribute' => 'id_user',
|
||||
'value' => $model->userName
|
||||
],
|
||||
[
|
||||
'attribute' => 'id_customer',
|
||||
'value' => $model->customerName
|
||||
],
|
||||
[
|
||||
'attribute' => 'flag',
|
||||
'value' => $model->flagName
|
||||
],
|
||||
[
|
||||
'attribute' => 'status',
|
||||
'value' => $model->statusName
|
||||
],
|
||||
'part_paid',
|
||||
'part_required',
|
||||
'part_count',
|
||||
'expired_at:datetime',
|
||||
'created_at:datetime',
|
||||
],
|
||||
]) ?>
|
||||
<?php if ( $model->canCancel() ){?>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<?php
|
||||
echo Html::a("Szerződés felbontása ",['contract/cancel' , 'id' => $model->id_contract], [ 'data-method' => 'post', 'class' => 'btn btn-danger']);
|
||||
?>
|
||||
Szerződés felbontása esetén a már megkezdett hónapokra hónaponként 3000 Ft büntetést írunk fel a vásárló kosarába
|
||||
</div>
|
||||
</div>
|
||||
<br>
|
||||
<?php }?>
|
||||
<?php foreach ($intstallments as $inst) {?>
|
||||
<?php
|
||||
/** @var common\models\TicketInstallmentRequest $inst */
|
||||
$panelClass = 'panel-info';
|
||||
if ( $inst->isStatusAccepted() ){
|
||||
$panelClass = "panel-success";
|
||||
}else if ( $inst->isStatusRejected() ){
|
||||
$panelClass = "panel-danger";
|
||||
}
|
||||
?>
|
||||
|
||||
<div class="panel panel-default <?php echo $panelClass?>">
|
||||
<div class="panel-heading">Bérlet <?php echo $inst->priority?></div>
|
||||
<div class="panel-body">
|
||||
<table class="table table-striped">
|
||||
<tr>
|
||||
<td>Esedékességi dátum</td>
|
||||
<td><?php echo \Yii::$app->formatter->asDate($inst->request_target_time_at)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Fizetendő</td>
|
||||
<td><?php echo ($inst->money)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Státusz</td>
|
||||
<td><?php echo ($inst->statusName)?></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bérlet vége</td>
|
||||
<td><?php echo \Yii::$app->formatter->asDate($inst->ticketExpirationDate)?></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
<?php
|
||||
if ( $inst->isStatusPending() || $inst->isStatusRejected() ){
|
||||
echo Html::a("Fizetettnek jelölés és bérlet vásárló kásrba helyezése",['contract/payout' , 'id' => $inst->id_ticket_installment_request], [ 'data-method' => 'post', 'class' => 'btn btn-danger']);
|
||||
}
|
||||
?>
|
||||
</div>
|
||||
</div>
|
||||
<?php }?>
|
||||
|
||||
</div>
|
||||
Reference in New Issue
Block a user