fix detsta download, fix card move card update
This commit is contained in:
parent
16d25abd7c
commit
1d5a5be5bf
@ -142,11 +142,7 @@ class GiroKotegForm extends Model{
|
|||||||
|
|
||||||
public static function transliterate($string)
|
public static function transliterate($string)
|
||||||
{
|
{
|
||||||
// if (static::hasIntl()) {
|
|
||||||
// return transliterator_transliterate(BaseInflector::$transliterator, $string);
|
|
||||||
// } else {
|
|
||||||
return str_replace(array_keys(BaseInflector::$transliteration), BaseInflector::$transliteration, $string);
|
return str_replace(array_keys(BaseInflector::$transliteration), BaseInflector::$transliteration, $string);
|
||||||
// }
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -24,7 +24,7 @@ class GiroBase {
|
|||||||
$data = substr($data, 0, $hossz );
|
$data = substr($data, 0, $hossz );
|
||||||
}
|
}
|
||||||
$data = str_pad($data, $hossz, $pad_string, STR_PAD_RIGHT);
|
$data = str_pad($data, $hossz, $pad_string, STR_PAD_RIGHT);
|
||||||
echo $data;
|
//echo $data;
|
||||||
// echo strlen($data);
|
// echo strlen($data);
|
||||||
return $data;
|
return $data;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -71,7 +71,7 @@ class GiroBeszed extends GiroBase {
|
|||||||
$tetel->szamlaTulajdonosNeve = $customer->name;
|
$tetel->szamlaTulajdonosNeve = $customer->name;
|
||||||
$tetel->kozlemeny = "Fitness berlet. Megbizas azon: " . $request->id_ticket_installment_request;
|
$tetel->kozlemeny = "Fitness berlet. Megbizas azon: " . $request->id_ticket_installment_request;
|
||||||
|
|
||||||
return $tetel->toString();
|
return $tetel->toString();
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function createLab($requests) {
|
public static function createLab($requests) {
|
||||||
|
|||||||
@ -2,6 +2,7 @@
|
|||||||
namespace common\components\giro;
|
namespace common\components\giro;
|
||||||
|
|
||||||
use common\components\giro\GiroBase;
|
use common\components\giro\GiroBase;
|
||||||
|
use yii\helpers\VarDumper;
|
||||||
/**
|
/**
|
||||||
* @property common\components\giro\GiroUzenetsorszam $uzenetSorszam
|
* @property common\components\giro\GiroUzenetsorszam $uzenetSorszam
|
||||||
* @property common\components\giro\GiroBankszamla $kotelezettBankszamla
|
* @property common\components\giro\GiroBankszamla $kotelezettBankszamla
|
||||||
|
|||||||
@ -186,6 +186,12 @@ class Customer extends BaseFitnessActiveRecord
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function afterSave($insert, $changedAttributes){
|
||||||
|
if ( !$insert ){
|
||||||
|
Card::updateCardFlagTicket($this->id_customer_card);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -5,6 +5,7 @@ namespace common\models;
|
|||||||
use Yii;
|
use Yii;
|
||||||
use yii\helpers\Url;
|
use yii\helpers\Url;
|
||||||
use yii\helpers\VarDumper;
|
use yii\helpers\VarDumper;
|
||||||
|
use common\models\BaseFitnessActiveRecord;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the model class for table "log".
|
* This is the model class for table "log".
|
||||||
@ -28,7 +29,7 @@ use yii\helpers\VarDumper;
|
|||||||
* @property string $created_at
|
* @property string $created_at
|
||||||
* @property string $updated_at
|
* @property string $updated_at
|
||||||
*/
|
*/
|
||||||
class Log extends \yii\db\ActiveRecord
|
class Log extends BaseFitnessActiveRecord
|
||||||
{
|
{
|
||||||
|
|
||||||
public static $TYPE_INFO = 10;
|
public static $TYPE_INFO = 10;
|
||||||
|
|||||||
@ -90,6 +90,12 @@ class ContractForm extends Model {
|
|||||||
'string',
|
'string',
|
||||||
'max' => 24
|
'max' => 24
|
||||||
],
|
],
|
||||||
|
[
|
||||||
|
[
|
||||||
|
'bank_account'
|
||||||
|
],
|
||||||
|
'validateBankAccount',
|
||||||
|
],
|
||||||
[
|
[
|
||||||
[
|
[
|
||||||
'bank_name'
|
'bank_name'
|
||||||
@ -132,6 +138,18 @@ class ContractForm extends Model {
|
|||||||
[[ 'started_at', ], 'date', 'format' =>Yii::$app->formatter->dateFormat , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ,'timeZone' => 'UTC' ],
|
[[ 'started_at', ], 'date', 'format' =>Yii::$app->formatter->dateFormat , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ,'timeZone' => 'UTC' ],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function validateBankAccount($attribute, $params) {
|
||||||
|
if ( !is_numeric($this->bank_account)){
|
||||||
|
$this->addError( $attribute, "A bankszámlaszám csak számokat tartalmazhat!");
|
||||||
|
}else{
|
||||||
|
if ( !( strlen($this->bank_account) == 16 || strlen($this->bank_account) == 24 ) ){
|
||||||
|
$this->addError($attribute,"Bankszámlaszám 16 vagy 24 hosszú!");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public function validateTicketType($attribute, $params) {
|
public function validateTicketType($attribute, $params) {
|
||||||
$this->ticketType = TicketType::findOne ( $this->ticket_type );
|
$this->ticketType = TicketType::findOne ( $this->ticket_type );
|
||||||
if (! isset ( $this->ticketType )) {
|
if (! isset ( $this->ticketType )) {
|
||||||
|
|||||||
@ -9,6 +9,7 @@ use kartik\widgets\DatePicker;
|
|||||||
use common\models\Transfer;
|
use common\models\Transfer;
|
||||||
use common\models\Discount;
|
use common\models\Discount;
|
||||||
use frontend\assets\ContractMakeAsset;
|
use frontend\assets\ContractMakeAsset;
|
||||||
|
use yii\helpers\VarDumper;
|
||||||
|
|
||||||
/* @var $this yii\web\View */
|
/* @var $this yii\web\View */
|
||||||
/* @var $model common\models\Contract */
|
/* @var $model common\models\Contract */
|
||||||
@ -38,6 +39,7 @@ use frontend\assets\ContractMakeAsset;
|
|||||||
|
|
||||||
$this->registerJs(' contract_make.init( '. json_encode($options) .' );');
|
$this->registerJs(' contract_make.init( '. json_encode($options) .' );');
|
||||||
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
<h1>Szerződés létrehozása</h1>
|
<h1>Szerződés létrehozása</h1>
|
||||||
<div class="contract-form">
|
<div class="contract-form">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user