diff --git a/backend/components/AdminMenuStructure.php b/backend/components/AdminMenuStructure.php
index 62bfbdc..9119d51 100644
--- a/backend/components/AdminMenuStructure.php
+++ b/backend/components/AdminMenuStructure.php
@@ -122,6 +122,18 @@ class AdminMenuStructure{
'items' => $items
];
}
+ /////////////////////////////
+ // Kap lug megbízások
+ /////////////////////////////
+ $items = [];
+ $items[] = ['label' => 'Mozgások', 'url' => ['/door-log/index' , 'DoorLogSearch[start]' =>$today,'DoorLogSearch[end]' => $tomorrow ] ];
+// $items[] = ['label' => 'Részletek aktiválása', 'url' => ['/ugiro/parts' ] ];
+// $items[] = ['label' => 'Bevétel', 'url' => ['/transfer/summary' , 'TransferSummarySearch[start]' =>$today,'TransferSummarySearch[end]' => $tomorrow ] ];
+// $items[] = ['label' => 'Napi bevételek', 'url' => ['/transfer/list', 'TransferListSearch[start]' =>$todayDatetime,'TransferListSearch[end]' => $tomorrowDatetime ] ];
+// $items[] = ['label' => 'Kassza müveletek', 'url' => ['/account-state/index'] ];
+ $this->menuItems[] = ['label' => 'Forgóvilla', 'url' => $this->emptyUrl,
+ 'items' => $items
+ ];
}
diff --git a/backend/controllers/DoorLogController.php b/backend/controllers/DoorLogController.php
new file mode 100644
index 0000000..ed97c17
--- /dev/null
+++ b/backend/controllers/DoorLogController.php
@@ -0,0 +1,121 @@
+ [
+ 'class' => VerbFilter::className(),
+ 'actions' => [
+ 'delete' => ['post'],
+ ],
+ ],
+ ];
+ }
+
+ /**
+ * Lists all DoorLog models.
+ * @return mixed
+ */
+ public function actionIndex()
+ {
+ $searchModel = new DoorLogSearch();
+ $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
+
+ return $this->render('index', [
+ 'searchModel' => $searchModel,
+ 'dataProvider' => $dataProvider,
+ ]);
+ }
+
+ /**
+ * Displays a single DoorLog model.
+ * @param integer $id
+ * @return mixed
+ */
+ public function actionView($id)
+ {
+ return $this->render('view', [
+ 'model' => $this->findModel($id),
+ ]);
+ }
+
+ /**
+ * Creates a new DoorLog model.
+ * If creation is successful, the browser will be redirected to the 'view' page.
+ * @return mixed
+ */
+ public function actionCreate()
+ {
+ $model = new DoorLog();
+
+ if ($model->load(Yii::$app->request->post()) && $model->save()) {
+ return $this->redirect(['view', 'id' => $model->id_door_log]);
+ } else {
+ return $this->render('create', [
+ 'model' => $model,
+ ]);
+ }
+ }
+
+ /**
+ * Updates an existing DoorLog model.
+ * If update is successful, the browser will be redirected to the 'view' page.
+ * @param integer $id
+ * @return mixed
+ */
+ public function actionUpdate($id)
+ {
+ $model = $this->findModel($id);
+
+ if ($model->load(Yii::$app->request->post()) && $model->save()) {
+ return $this->redirect(['view', 'id' => $model->id_door_log]);
+ } else {
+ return $this->render('update', [
+ 'model' => $model,
+ ]);
+ }
+ }
+
+ /**
+ * Deletes an existing DoorLog model.
+ * If deletion is successful, the browser will be redirected to the 'index' page.
+ * @param integer $id
+ * @return mixed
+ */
+ public function actionDelete($id)
+ {
+ $this->findModel($id)->delete();
+
+ return $this->redirect(['index']);
+ }
+
+ /**
+ * Finds the DoorLog model based on its primary key value.
+ * If the model is not found, a 404 HTTP exception will be thrown.
+ * @param integer $id
+ * @return DoorLog the loaded model
+ * @throws NotFoundHttpException if the model cannot be found
+ */
+ protected function findModel($id)
+ {
+ if (($model = DoorLog::findOne($id)) !== null) {
+ return $model;
+ } else {
+ throw new NotFoundHttpException('The requested page does not exist.');
+ }
+ }
+}
diff --git a/backend/models/DoorLogSearch.php b/backend/models/DoorLogSearch.php
new file mode 100644
index 0000000..6bad50b
--- /dev/null
+++ b/backend/models/DoorLogSearch.php
@@ -0,0 +1,147 @@
+ 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
+ [[ 'end' , ], 'date' , 'timestampAttribute' => 'timestampEnd' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
+
+ ];
+ }
+
+ public function attributeLabels(){
+ return [
+ 'searchCardNumber' => 'Kártya szám',
+ 'searchCustomerName' => 'Vendég',
+ 'searchKeyName' => 'Kulcs szám',
+ 'type' => 'Típus',
+ 'direction' => 'Irány',
+ 'start' => 'Időszak kezdete',
+ 'end' => 'Időszak vége'
+ ];
+ }
+
+ /**
+ * @inheritdoc
+ */
+ public function scenarios()
+ {
+ // bypass scenarios() implementation in the parent class
+ return Model::scenarios();
+ }
+
+ /**
+ * Creates data provider instance with search query applied
+ *
+ * @param array $params
+ *
+ * @return ActiveDataProvider
+ */
+ public function search($params)
+ {
+ $query = DoorLog::find();
+
+ $dataProvider = new ActiveDataProvider([
+ 'query' => $query,
+ 'sort' =>[
+ 'attributes' => [
+// 'age',
+ 'id_card' => [
+ 'asc' => ['card.number' => SORT_ASC ],
+ 'desc' => ['card.number' => SORT_DESC],
+ ],
+ 'id_key' => [
+ 'asc' => ['key.number' => SORT_ASC ],
+ 'desc' => ['key.number' => SORT_DESC],
+ ],
+ 'id_customer' => [
+ 'asc' => ['customer.name' => SORT_ASC ],
+ 'desc' => ['customer.name' => SORT_DESC],
+ ],
+ 'direction' => [
+ 'asc' => ['door_log.direction' => SORT_ASC ],
+ 'desc' => ['door_log.direction' => SORT_DESC],
+ ],
+ 'created_at' => [
+ 'asc' => ['door_log.created_at' => SORT_ASC ],
+ 'desc' => ['door_log.created_at' => SORT_DESC],
+ ],
+ ],
+ ]
+ ]);
+
+ $this->load($params);
+
+ if (!$this->validate()) {
+ // uncomment the following line if you do not want to return any records when validation fails
+ // $query->where('0=1');
+ return $dataProvider;
+ }
+
+ $query->andFilterWhere([
+// 'id_door_log' => $this->id_door_log,
+// 'id_card' => $this->id_card,
+// 'id_customer' => $this->id_customer,
+// 'id_key' => $this->id_key,
+ 'direction' => $this->direction,
+// 'type' => $this->type,
+// 'created_at' => $this->created_at,
+ ]);
+
+ $query->andFilterWhere(['>=', 'door_log.created_at', $this->timestampStart]);
+ $query->andFilterWhere(['<', 'door_log.created_at', $this->timestampEnd]);
+
+ $query->innerJoin('card','card.id_card = door_log.id_card');
+ $query->leftJoin('key','key.id_key = door_log.id_key');
+ $query->leftJoin('customer','customer.id_customer = door_log.id_customer');
+
+ if ( !empty($this->searchCardNumber)){
+ $query->andWhere(['or',
+ ['and',[ 'in','card.number' , [$this->searchCardNumber]],"trim(coalesce(card.number, '')) <>'' " ],
+ ['and', ['in','card.rfid_key' ,[ $this->searchCardNumber] ],"trim(coalesce(card.rfid_key, '')) <>'' "],
+
+ ]);
+ }
+
+ if ( !empty($this->searchKeyName)){
+ $query->andWhere(['or',
+ ['and',[ 'in','key.number' , [$this->searchKeyName]],"trim(coalesce(key.number, '')) <>'' " ],
+ ['and', ['in','key.rfid_key' ,[ $this->searchKeyName] ],"trim(coalesce(key.rfid_key, '')) <>'' "]
+
+ ]);
+ }
+
+ $query->andFilterWhere(['like', 'customer.name', $this->searchCustomerName]);
+
+ return $dataProvider;
+ }
+}
diff --git a/backend/models/TicketInstallmentRequestSearch.php b/backend/models/TicketInstallmentRequestSearch.php
index 0d5ce27..b73cd39 100644
--- a/backend/models/TicketInstallmentRequestSearch.php
+++ b/backend/models/TicketInstallmentRequestSearch.php
@@ -38,7 +38,7 @@ class TicketInstallmentRequestSearch extends TicketInstallmentRequest
public function rules()
{
return [
- [['id_ticket_installment_request', 'id_ticket', 'id_customer', 'status' ,'id_ticket_type','id_ugiro'], 'integer'],
+ [[ 'id_contract', 'id_ticket_installment_request', 'id_ticket', 'id_customer', 'status' ,'id_ticket_type','id_ugiro'], 'integer'],
[['customer_name' ], 'safe'],
[[ 'start', ], 'date' , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
[[ 'end' , ], 'date' , 'timestampAttribute' => 'timestampEnd' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
@@ -83,7 +83,9 @@ class TicketInstallmentRequestSearch extends TicketInstallmentRequest
'ticket_installment_request.status as request_status',//status
'ticket_installment_request.request_sent_at as request_sent_at',//sent_at
'ticket_installment_request.priority as request_priority',//sent_at
+ 'ticket_installment_request.number as request_number',//sent_at
'ticket_installment_request.request_processed_at as request_processed_at',//request_processed_at
+ 'ticket_installment_request.id_contract as request_id_contract',//request_processed_at
'customer.id_customer as customer_id_customer',//id_customer
'customer.name as customer_name',//customer_name
'ticket_type.name as ticket_type_name',//ticket_type_name
@@ -95,8 +97,8 @@ class TicketInstallmentRequestSearch extends TicketInstallmentRequest
]);
$query->from("ticket_installment_request");
$query->innerJoin("customer","customer.id_customer = ticket_installment_request.id_customer");
- $query->innerJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
- $query->innerJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
+ $query->leftJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
+ $query->leftJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
$query->leftJoin("ugiro_request_assignment","ticket_installment_request.id_ticket_installment_request = ugiro_request_assignment.id_request");
$query->orderBy(["ticket_installment_request.request_target_time_at" => SORT_ASC]);
@@ -107,6 +109,7 @@ class TicketInstallmentRequestSearch extends TicketInstallmentRequest
'customer.id_customer' => $this->id_customer,
'ticket_installment_request.status' => $this->status,
'ticket_type.id_ticket_type' => $this->id_ticket_type,
+ 'ticket_installment_request.id_contract' => $this->id_contract,
]);
$query->andFilterWhere(['like', 'customer.name', $this->customer_name]);
//target time
diff --git a/backend/models/TicketInstallmentRequestSearchDownloadGiro.php b/backend/models/TicketInstallmentRequestSearchDownloadGiro.php
index 303d38b..b834383 100644
--- a/backend/models/TicketInstallmentRequestSearchDownloadGiro.php
+++ b/backend/models/TicketInstallmentRequestSearchDownloadGiro.php
@@ -80,8 +80,8 @@ class TicketInstallmentRequestSearchDownloadGiro extends TicketInstallmentReques
]);
$query->from("ticket_installment_request");
$query->innerJoin("customer","customer.id_customer = ticket_installment_request.id_customer");
- $query->innerJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
- $query->innerJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
+ $query->leftJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
+ $query->leftJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
$query->andWhere(['ticket_installment_request.status' => TicketInstallmentRequest::$STATUS_MARKED_TO_SEND]);
diff --git a/backend/models/TicketInstallmentRequestSearchPending.php b/backend/models/TicketInstallmentRequestSearchPending.php
index 4a69ddd..dd25d74 100644
--- a/backend/models/TicketInstallmentRequestSearchPending.php
+++ b/backend/models/TicketInstallmentRequestSearchPending.php
@@ -28,7 +28,7 @@ class TicketInstallmentRequestSearchPending extends TicketInstallmentRequest
public function rules()
{
return [
- [['id_ticket_installment_request', 'id_ticket', 'id_customer', 'status' ,'id_ticket_type'], 'integer'],
+ [[ 'id_contract', 'id_ticket_installment_request', 'id_ticket', 'id_customer', 'status' ,'id_ticket_type'], 'integer'],
[['customer_name' ], 'safe'],
[[ 'start', ], 'date' , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
[[ 'end' , ], 'date' , 'timestampAttribute' => 'timestampEnd' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
@@ -69,6 +69,7 @@ class TicketInstallmentRequestSearchPending extends TicketInstallmentRequest
'ticket_installment_request.status as request_status',//status
'ticket_installment_request.request_sent_at as request_sent_at',//sent_at
'ticket_installment_request.priority as request_priority',//sent_at
+ 'ticket_installment_request.id_contract as request_id_contract',//sent_at
'ticket_installment_request.request_processed_at as request_processed_at',//request_processed_at
'customer.id_customer as customer_id_customer',//id_customer
'customer.name as customer_name',//customer_name
@@ -80,8 +81,8 @@ class TicketInstallmentRequestSearchPending extends TicketInstallmentRequest
]);
$query->from("ticket_installment_request");
$query->innerJoin("customer","customer.id_customer = ticket_installment_request.id_customer");
- $query->innerJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
- $query->innerJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
+ $query->leftJoin("ticket","ticket.id_ticket = ticket_installment_request.id_ticket");
+ $query->leftJoin("ticket_type","ticket.id_ticket_type = ticket_type.id_ticket_type");
$query->andWhere(['ticket_installment_request.status' => TicketInstallmentRequest::$STATUS_PENDING]);
@@ -93,6 +94,7 @@ class TicketInstallmentRequestSearchPending extends TicketInstallmentRequest
'customer.id_customer' => $this->id_customer,
'ticket_installment_request.status' => $this->status,
'ticket_type.id_ticket_type' => $this->id_ticket_type,
+ 'ticket_installment_request.id_contract' => $this->id_contract,
]);
$query->andFilterWhere(['like', 'customer.name', $this->customer_name]);
//target time
diff --git a/backend/views/customer/index.php b/backend/views/customer/index.php
index a4c7a25..8fdb96b 100644
--- a/backend/views/customer/index.php
+++ b/backend/views/customer/index.php
@@ -23,6 +23,7 @@ $this->params['breadcrumbs'][] = $this->title;
= GridView::widget([
'dataProvider' => $dataProvider,
'columns' => [
+ 'id_customer',
[
'attribute' => 'customerCardNumber' ,
],
diff --git a/backend/views/door-log/_form.php b/backend/views/door-log/_form.php
new file mode 100644
index 0000000..7f13743
--- /dev/null
+++ b/backend/views/door-log/_form.php
@@ -0,0 +1,33 @@
+
+
+
diff --git a/backend/views/door-log/_search.php b/backend/views/door-log/_search.php
new file mode 100644
index 0000000..5313484
--- /dev/null
+++ b/backend/views/door-log/_search.php
@@ -0,0 +1,66 @@
+
+
+
+
+ ['index'],
+ 'method' => 'get',
+ ]); ?>
+
+
+
+ = $form->field($model, 'searchCardNumber') ?>
+
+
+
+ = $form->field($model, 'searchCustomerName') ?>
+
+
+
+ = $form->field($model, 'searchKeyName') ?>
+
+
+
+ = $form->field($model, 'direction')->dropDownList(['' => 'Mind' ] + []) ?>
+
+
+
+ field($model, 'type') ?>
+
+ field($model, 'created_at') ?>
+
+
+
+ = $form->field($model, 'start')->widget(DatePicker::classname(), [
+ 'pluginOptions' => [
+ 'autoclose'=>true,
+ 'format' => 'yyyy.mm.dd'
+ ]
+ ]) ?>
+
+
+ = $form->field($model, 'end') ->widget(DatePicker::classname(), [
+ 'pluginOptions' => [
+ 'autoclose'=>true,
+ 'format' => 'yyyy.mm.dd'
+ ]
+ ]) ?>
+
+
+
+
+ = Html::submitButton(Yii::t('common/door_log', 'Search'), ['class' => 'btn btn-primary']) ?>
+
+
+
+
+
diff --git a/backend/views/door-log/create.php b/backend/views/door-log/create.php
new file mode 100644
index 0000000..538a34e
--- /dev/null
+++ b/backend/views/door-log/create.php
@@ -0,0 +1,21 @@
+title = Yii::t('common/door_log', 'Create Door Log');
+$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Door Logs'), 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/door-log/index.php b/backend/views/door-log/index.php
new file mode 100644
index 0000000..a1b0f01
--- /dev/null
+++ b/backend/views/door-log/index.php
@@ -0,0 +1,45 @@
+title = Yii::t('common/door_log', 'Mozgások');
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+ render('_search', ['model' => $searchModel]); ?>
+
+
+ = GridView::widget([
+ 'dataProvider' => $dataProvider,
+ 'columns' => [
+ ['class' => 'yii\grid\SerialColumn'],
+ [
+ 'attribute' => 'id_card',
+ 'value' => 'cardNumber'
+ ],
+ [
+ 'attribute' => 'id_key',
+ 'value' => 'keyNumber'
+ ],
+ [
+ 'attribute' => 'id_customer',
+ 'value' => 'customerName'
+ ],
+ [
+ 'attribute' => 'direction',
+ 'value' => 'directionName'
+ ],
+ // 'type',
+ 'created_at:datetime',
+
+ ],
+ ]); ?>
+
+
diff --git a/backend/views/door-log/update.php b/backend/views/door-log/update.php
new file mode 100644
index 0000000..752240f
--- /dev/null
+++ b/backend/views/door-log/update.php
@@ -0,0 +1,23 @@
+title = Yii::t('common/door_log', 'Update {modelClass}: ', [
+ 'modelClass' => 'Door Log',
+]) . ' ' . $model->id_door_log;
+$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Door Logs'), 'url' => ['index']];
+$this->params['breadcrumbs'][] = ['label' => $model->id_door_log, 'url' => ['view', 'id' => $model->id_door_log]];
+$this->params['breadcrumbs'][] = Yii::t('common/door_log', 'Update');
+?>
+
+
+
= Html::encode($this->title) ?>
+
+ = $this->render('_form', [
+ 'model' => $model,
+ ]) ?>
+
+
diff --git a/backend/views/door-log/view.php b/backend/views/door-log/view.php
new file mode 100644
index 0000000..c1ccb50
--- /dev/null
+++ b/backend/views/door-log/view.php
@@ -0,0 +1,41 @@
+title = $model->id_door_log;
+$this->params['breadcrumbs'][] = ['label' => Yii::t('common/door_log', 'Door Logs'), 'url' => ['index']];
+$this->params['breadcrumbs'][] = $this->title;
+?>
+
+
+
= Html::encode($this->title) ?>
+
+
+ = Html::a(Yii::t('common/door_log', 'Update'), ['update', 'id' => $model->id_door_log], ['class' => 'btn btn-primary']) ?>
+ = Html::a(Yii::t('common/door_log', 'Delete'), ['delete', 'id' => $model->id_door_log], [
+ 'class' => 'btn btn-danger',
+ 'data' => [
+ 'confirm' => Yii::t('common/door_log', 'Are you sure you want to delete this item?'),
+ 'method' => 'post',
+ ],
+ ]) ?>
+
+
+ = DetailView::widget([
+ 'model' => $model,
+ 'attributes' => [
+ 'id_door_log',
+ 'id_card',
+ 'id_customer',
+ 'id_key',
+ 'direction',
+ 'type',
+ 'created_at',
+ ],
+ ]) ?>
+
+
diff --git a/backend/views/ticket-installment-request/_index_view.php b/backend/views/ticket-installment-request/_index_view.php
index f793404..ddd8adf 100644
--- a/backend/views/ticket-installment-request/_index_view.php
+++ b/backend/views/ticket-installment-request/_index_view.php
@@ -51,7 +51,7 @@ use yii\helpers\Html;
|
- Megbízás inditására irányzott dátum
+ Megbízás esedékességének dátuma
|
formatter->asDatetime( $model['request_request_target_time_at'] );?>
@@ -84,8 +84,10 @@ use yii\helpers\Html;
|
+ Szerződés azonosító
|
+
|
@@ -145,6 +147,22 @@ use yii\helpers\Html;
|
+
+ |
+ Sorszám a kötegben belül
+ |
+
+
+ |
+
+ |
+
+ |
+
+ |
+
+ |
+
$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']);
+ echo Html::a("Szerződés megbízásai",['ticket-installment-request/index', 'TicketInstallmentRequestSearch[id_contract]' => $model['request_id_contract']] ,[ 'class' => 'btn btn-primary']);
}
?>
diff --git a/backend/views/ticket-installment-request/_pending_view.php b/backend/views/ticket-installment-request/_pending_view.php
index ab4ed8d..d69b0c9 100644
--- a/backend/views/ticket-installment-request/_pending_view.php
+++ b/backend/views/ticket-installment-request/_pending_view.php
@@ -47,10 +47,10 @@ use yii\helpers\Html;
|
- Megbízás inditására irányzott dátum
+ Megbízás esedékességének dátuma
|
- formatter->asDatetime( $model['request_request_target_time_at'] );?>
+ formatter->asDate( $model['request_request_target_time_at'] );?>
|
Megbízás elindításának ideje
@@ -78,8 +78,10 @@ use yii\helpers\Html;
|
|
+ Szerződés azonosíót
|
+
|
diff --git a/backend/views/ticket-installment-request/_search.php b/backend/views/ticket-installment-request/_search.php
index d4a7091..55fef46 100644
--- a/backend/views/ticket-installment-request/_search.php
+++ b/backend/views/ticket-installment-request/_search.php
@@ -39,6 +39,9 @@ $ticketTypeOptions = ['' => 'Mind'] + ArrayHelper::map(TicketType::read(), 'i
+
+ = $form->field($model, 'id_contract')->label("Szerződés azonosító") ?>
+
= $form->field($model, 'customer_name')->label("Vendég neve") ?>
@@ -56,7 +59,7 @@ $ticketTypeOptions = ['' => 'Mind'] + ArrayHelper::map(TicketType::read(), 'i
'autoclose'=>true,
'format' => 'yyyy.mm.dd'
]
- ])->label('Megbízás inditására irányzott kezdete ( inklúzív )') ?>
+ ])->label('Megbízás esedékességének kezdete ( inklúzív )') ?>
= $form->field($model, 'end') ->widget(DatePicker::classname(), [
@@ -64,7 +67,7 @@ $ticketTypeOptions = ['' => 'Mind'] + ArrayHelper::map(TicketType::read(), 'i
'autoclose'=>true,
'format' => 'yyyy.mm.dd'
]
- ])->label('Megbízás inditására irányzott dátum vége ( exklúzív )') ?>
+ ])->label('Megbízás esedékességének vége ( exklúzív )') ?>
diff --git a/backend/views/ticket-installment-request/_search_pending.php b/backend/views/ticket-installment-request/_search_pending.php
index c2443c9..a46d9b9 100644
--- a/backend/views/ticket-installment-request/_search_pending.php
+++ b/backend/views/ticket-installment-request/_search_pending.php
@@ -37,6 +37,9 @@ $ticketTypeOptions = ['' => 'Mind'] + ArrayHelper::map(TicketType::read(), 'i
+
+ = $form->field($model, 'id_contract')->label("Szerződés azonosító") ?>
+
= $form->field($model, 'customer_name')->label("Vendég neve") ?>
@@ -68,7 +71,6 @@ $ticketTypeOptions = ['' => 'Mind'] + ArrayHelper::map(TicketType::read(), 'i
= Html::submitButton(Yii::t('common/ticket_installment_request', 'Search'), ['class' => 'btn btn-primary']) ?>
- = Html::resetButton(Yii::t('common/ticket_installment_request', 'Reset'), ['class' => 'btn btn-default']) ?>
diff --git a/backend/views/ticket-installment-request/view.php b/backend/views/ticket-installment-request/view.php
index bf931e9..111e534 100644
--- a/backend/views/ticket-installment-request/view.php
+++ b/backend/views/ticket-installment-request/view.php
@@ -48,7 +48,9 @@ $this->params['breadcrumbs'][] = $this->title;
isStatusRejected()){
- echo Html::a("Teljesítettnek jelölés",['accept', 'id' => $model->id_ticket_installment_request] ,['data-method' =>'post', 'class' => 'btn btn-danger']);
+ //echo Html::a("Teljesítettnek jelölés",['accept', 'id' => $model->id_ticket_installment_request] ,['data-method' =>'post', 'class' => 'btn btn-danger']);
+
+ echo "Teljesítettnek jelölés a recepciós felületen lehetséges!";
}
?>
@@ -132,6 +134,7 @@ $this->params['breadcrumbs'][] = $this->title;
|
+ ticket)) {?>
|
Bérlet azonosító
@@ -170,24 +173,25 @@ $this->params['breadcrumbs'][] = $this->title;
|
|
+
|
- Bérlet részletek száma
+ Szerződés részletek száma
|
- ticket->part_count ;?>
+ contract->part_count ;?>
|
- Bérlet esedékes részlet
+ Szerződés esedékes részlet
|
- ticket->part ;?>
+ contract->part_required ;?>
|
- Bérlet utoljára fizetett részlet
+ Szerződés utoljára fizetett részlet
|
- ticket->part_paid ;?>
+ contract->part_paid ;?>
|
@@ -216,7 +220,7 @@ 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']);
+echo Html::a("Szerzőés megbízásai",['ticket-installment-request/index', 'TicketInstallmentRequestSearch[id_contract]' => $model->id_contract] ,[ 'class' => 'btn btn-primary']);
?>
diff --git a/changelog.txt b/changelog.txt
index 219b59b..d22144b 100644
--- a/changelog.txt
+++ b/changelog.txt
@@ -1,3 +1,6 @@
+-0.0.27
+ - Add contract (szerződés )
+ - Add door_log ( mozgások )
-0.0.26
- Fix GiroUzenetsorszam case sensitive class/file name match
-0.0.25
diff --git a/common/components/DetStatProcessor.php b/common/components/DetStatProcessor.php
index 0e864f5..1bf782b 100644
--- a/common/components/DetStatProcessor.php
+++ b/common/components/DetStatProcessor.php
@@ -66,9 +66,9 @@ class DetStatProcessor extends Object{
-
+ /*
$this->detstatUzenet = new GiroDETSTA();
- $this->idKoteg = 37;
+ $this->idKoteg = 38;
$fej = new GiroDETSTAFej();
@@ -81,8 +81,16 @@ class DetStatProcessor extends Object{
$this->detstatUzenet->tetelek[] = $tetel;
+ $tetel = new GiroDETSTATetel();
+ $tetel->tetelSorszam = 2;
+ $tetel->visszajelzesInformacio = "00";
+ $tetel->visszajelzesInformacio = "02";
+
+ $this->detstatUzenet->tetelek[] = $tetel;
+
$lab = new GiroDETSTALab();
$this->detstatUzenet->lab = $lab;
+ */
}
diff --git a/common/components/giro/GiroBeszed.php b/common/components/giro/GiroBeszed.php
index 1fe8c86..a3e6681 100644
--- a/common/components/giro/GiroBeszed.php
+++ b/common/components/giro/GiroBeszed.php
@@ -69,7 +69,7 @@ class GiroBeszed extends GiroBase {
// $tetel->ugyfelNeve = "Schneider Roland";
// $tetel->ugyfelCime = "Mosonmagyarovar, Gardonyi 31";
$tetel->szamlaTulajdonosNeve = $customer->name;
- $tetel->kozlemeny = "Berlet:" . $request->id_ticket .";MegbizasAzo:" . $request->id_ticket_installment_request;
+ $tetel->kozlemeny = "Fitness berlet. Megbizas azon: " . $request->id_ticket_installment_request;
return $tetel->toString();
}
diff --git a/common/config/params.php b/common/config/params.php
index 01154ac..5de3f85 100644
--- a/common/config/params.php
+++ b/common/config/params.php
@@ -4,7 +4,7 @@ return [
'supportEmail' => 'rocho02@gmail.com',
'infoEmail' => 'info@rocho-net.hu',
'user.passwordResetTokenExpire' => 3600,
- 'version' => 'v0.0.26',
+ 'version' => 'v0.0.27',
'company' => 'movar',//gyor
'company_name' => "Freimann Kft.",
'product_visiblity' => 'account',// on reception which products to display. account or global
diff --git a/common/models/DoorLog.php b/common/models/DoorLog.php
new file mode 100644
index 0000000..d17a128
--- /dev/null
+++ b/common/models/DoorLog.php
@@ -0,0 +1,96 @@
+ Yii::t('common/door_log', 'Id Door Log'),
+ 'id_card' => Yii::t('common/door_log', 'Bérlet kártya'),
+ 'id_customer' => Yii::t('common/door_log', 'Vendég'),
+ 'id_key' => Yii::t('common/door_log', 'Kulcs'),
+ 'direction' => Yii::t('common/door_log', 'Irány'),
+ 'type' => Yii::t('common/door_log', 'Típus'),
+ 'created_at' => Yii::t('common/door_log', 'Időpont'),
+ ];
+ }
+
+ public function getCustomer(){
+ return $this->hasOne( Customer::className(), ["id_customer" =>"id_customer" ] );
+ }
+
+ public function getCustomerName(){
+ $result = "";
+ if (isset($this->customer)){
+ $result = $this->customer->name;
+ }
+ return $result;
+ }
+ public function getCard(){
+ return $this->hasOne( Card::className(), ["id_card" =>"id_card" ] );
+ }
+
+ public function getCardNumber(){
+ $result = "";
+ if (isset($this->card)){
+ $result = $this->card->number;
+ }
+ return $result;
+ }
+ public function getKey(){
+ return $this->hasOne( Key::className(), ["id_key" =>"id_key" ] );
+ }
+
+ public function getKeyNumber(){
+ $result = "";
+ if (isset($this->key)){
+ $result = $this->key->number;
+ }
+ return $result;
+ }
+ public function getDirectionName(){
+ $result = "";
+ if (isset($this->direction)){
+ $result = $this->direction;
+ }
+ return $result;
+ }
+}
diff --git a/common/models/TicketInstallmentRequest.php b/common/models/TicketInstallmentRequest.php
index 3e8415f..fe166ec 100644
--- a/common/models/TicketInstallmentRequest.php
+++ b/common/models/TicketInstallmentRequest.php
@@ -192,6 +192,7 @@ class TicketInstallmentRequest extends \yii\db\ActiveRecord
$this->comment = $comment;
$this->request_processed_at = Helper::getDateTimeString();
$this->save(false);
+ $contract->status = Contract::$STATUS_NOT_PAID;
$contract->save(false);
// $this->applyNewTicketState($partRequired);
\Yii::info("Megbízás visszautasítva: " . $this->id_ticket_installment_request);
@@ -257,7 +258,7 @@ class TicketInstallmentRequest extends \yii\db\ActiveRecord
public static function createInstallment($ticket,$type,$customer,$contract,$money,$ticketCreated,$index){
$request = new TicketInstallmentRequest();
- $request->id_ticket = $ticket->id_ticket;
+// $request->id_ticket = $ticket->id_ticket;
$request->id_customer = $customer->id_customer;
$request->status = TicketInstallmentRequest::$STATUS_PENDING;
$request->priority = $index;
diff --git a/common/models/Transfer.php b/common/models/Transfer.php
index 2359eeb..082b0b4 100644
--- a/common/models/Transfer.php
+++ b/common/models/Transfer.php
@@ -977,7 +977,7 @@ class Transfer extends \common\models\BaseFitnessActiveRecord {
$ticket->price_brutto = $request->money;
$ticket->id_card = $card->id_card;
$ticket->part = $request->priority;
- $this->id_contract = $contract->id_contract;
+ $ticket->id_contract = $contract->id_contract;
$ticket->save ( false );
$transfer = new Transfer ();
diff --git a/console/migrations/m160125_094224_add__table__door_log.php b/console/migrations/m160125_094224_add__table__door_log.php
new file mode 100644
index 0000000..fe76b80
--- /dev/null
+++ b/console/migrations/m160125_094224_add__table__door_log.php
@@ -0,0 +1,44 @@
+db->driverName === 'mysql') {
+ // http://stackoverflow.com/questions/766809/whats-the-difference-between-utf8-general-ci-and-utf8-unicode-ci
+ $tableOptions = 'CHARACTER SET utf8 COLLATE utf8_unicode_ci ENGINE=InnoDB';
+ }
+
+ $this->createTable('{{%door_log}}', [
+ 'id_door_log' => $this->primaryKey(),
+ 'id_card' => $this->integer(11),
+ 'id_customer' => $this->integer(11),
+ 'id_key' => $this->integer(11),
+ 'direction' => $this->integer(11),
+ 'type' => $this->integer(11),
+ 'created_at' => $this->dateTime()->notNull(),
+ ], $tableOptions);
+ }
+
+ public function down()
+ {
+ echo "m160125_094224_add__table__door_log cannot be reverted.\n";
+
+ return false;
+ }
+
+ /*
+ // Use safeUp/safeDown to run migration code within a transaction
+ public function safeUp()
+ {
+ }
+
+ public function safeDown()
+ {
+ }
+ */
+}
diff --git a/frontend/controllers/ContractController.php b/frontend/controllers/ContractController.php
index cd81d69..bd6a4ef 100644
--- a/frontend/controllers/ContractController.php
+++ b/frontend/controllers/ContractController.php
@@ -178,6 +178,7 @@ class ContractController extends Controller {
$part->status = TicketInstallmentRequest::$STATUS_ACCEPTED_MANUAL;
$part->id_transfer = $transfer->id_transfer;
$part->request_processed_at = Helper::getDateTimeString ();
+ $part->id_ticket = $ticket->id_ticket;
$part->save ( false );
$transaction->commit ();