diff --git a/changelog.txt b/changelog.txt index 3413a82..caf42e5 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,8 @@ +-0.0.41 + - add button kulcs "visszaad" + - fix ReceptionFomr#getFirstKey method + - reception read card/key number field : if card with key is read, + then redirect to product/sale -0.0.40 - fix contract pdf design -0.0.39 diff --git a/common/config/params.php b/common/config/params.php index 3b8f7c8..8d032d6 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.40', + 'version' => 'v0.0.41', 'company' => 'movar',//gyor 'company_name' => "Freimann Kft.", 'product_visiblity' => 'account',// on reception which products to display. account or global diff --git a/frontend/controllers/CustomerController.php b/frontend/controllers/CustomerController.php index 0ac81bf..db1c268 100644 --- a/frontend/controllers/CustomerController.php +++ b/frontend/controllers/CustomerController.php @@ -60,6 +60,8 @@ class CustomerController extends Controller if ( $model->isFreeCard() ){ return $this->redirect([ 'create', 'number' => $model->card->number ]); + }else if ( $model->isCardWithKey()){ + return $this->redirect([ 'product/sale', 'number' => $model->card->number ]); }else if ( $model->isCustomerWithTicket()){ // return $this->redirect([ 'product/sale', 'number' => $model->card->number ]); // return $this->redirect([ 'customer/reception', 'number' => $model->card->number ]); diff --git a/frontend/models/ReceptionForm.php b/frontend/models/ReceptionForm.php index 9286a38..5b03262 100644 --- a/frontend/models/ReceptionForm.php +++ b/frontend/models/ReceptionForm.php @@ -130,7 +130,7 @@ class ReceptionForm extends Model public function getFirstKey(){ $result = null; if ( isset($this->keys) && is_array($this->keys) && count($this->keys) > 0 ){ - $esut = $this->keys[0]; + $result = $this->keys[0]; } return $result; } @@ -209,6 +209,21 @@ class ReceptionForm extends Model return $result; } + public function isCardWithKey(){ + $result = false; + + if ( $this->isCardWithCustomer() ){ + \Yii::info("isCardWithKey - customer is with card"); + $key = $this->getFirstKey(); + \Yii::info("isCardWithKey - key: " . print_r($key, true)); + if ( isset($key)){ + $result = true; + } + } + + return $result; + } + /** * @return true, if no card and customer found * */ diff --git a/frontend/views/common/_reception_customer.php b/frontend/views/common/_reception_customer.php index c768a71..89eb646 100644 --- a/frontend/views/common/_reception_customer.php +++ b/frontend/views/common/_reception_customer.php @@ -38,7 +38,15 @@ if ( $model->isCardWithCustomer() ){ ], [ 'label' => 'Kulcsok', - 'value' => $model->keysText, + 'value' => + empty($model->keysText) ? '' : ( + "
") + , + 'format' => 'raw' ], [ 'label' => 'Fénykép',