add kulcsok, add tartós beszedés, add ticket type with intallments
This commit is contained in:
@@ -18,6 +18,9 @@ use yii\helpers\ArrayHelper;
|
||||
* @property integer $id_account
|
||||
* @property integer $flag_student
|
||||
* @property integer $status
|
||||
* @property integer installment_enabled
|
||||
* @property integer installment_count
|
||||
* @property integer installment_money
|
||||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
@@ -33,6 +36,9 @@ class TicketType extends \common\models\BaseFitnessActiveRecord {
|
||||
const FLAG_STUDENT_OFF = 0;
|
||||
const FLAG_STUDENT_ON = 1;
|
||||
|
||||
const INSTALLMENT_OFF = 0;
|
||||
const INSTALLMENT_ON = 1;
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
*/
|
||||
@@ -89,6 +95,15 @@ class TicketType extends \common\models\BaseFitnessActiveRecord {
|
||||
////////////////
|
||||
[['id_account',], 'integer'],
|
||||
[['id_account',], 'validateIdAccount'],
|
||||
|
||||
/////////////////////
|
||||
//INSTALLMENT ENABLED
|
||||
/////////////////////
|
||||
[['installment_enabled',], 'integer'],
|
||||
[['installment_enabled',], 'in', 'range' => [ self::INSTALLMENT_ON, self::INSTALLMENT_OFF ]],
|
||||
|
||||
[['installment_money',], 'integer'],
|
||||
[['installment_count',], 'integer'],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -110,6 +125,9 @@ class TicketType extends \common\models\BaseFitnessActiveRecord {
|
||||
'status' => Yii::t('common/ticket_type', 'Status'),
|
||||
'created_at' => Yii::t('common/ticket_type', 'Created At'),
|
||||
'updated_at' => Yii::t('common/ticket_type', 'Updated At'),
|
||||
'installment_enabled' => Yii::t('common/ticket_type', 'Részlet fizetés a brutto áron felül'),
|
||||
'installment_count' => Yii::t('common/ticket_type', 'Havi részletek száma'),
|
||||
'installment_money' => Yii::t('common/ticket_type', 'Havi részlet összege'),
|
||||
];
|
||||
}
|
||||
|
||||
@@ -170,6 +188,9 @@ class TicketType extends \common\models\BaseFitnessActiveRecord {
|
||||
public function isStudent(){
|
||||
return $this->flag_student == ( self::FLAG_STUDENT_ON);
|
||||
}
|
||||
public function isInstallment(){
|
||||
return $this->installment_enabled == ( self::INSTALLMENT_ON);
|
||||
}
|
||||
|
||||
|
||||
public function validateIdAccount($attribute,$params){
|
||||
|
||||
Reference in New Issue
Block a user