add admin edit ticket date
This commit is contained in:
@@ -63,6 +63,11 @@ class DetStatTetelProcessor extends Object {
|
||||
return;
|
||||
}
|
||||
|
||||
if ( !isset($this->tetel)){
|
||||
\Yii::info('A megbízás feldolgozásának megszakítása. Nincs valaszsor a detsta üzenetben');
|
||||
return;
|
||||
}
|
||||
|
||||
$this->rememberEredetiMegbizasStatus();
|
||||
$this->readContract();
|
||||
$this->extractKodAndStatus ();
|
||||
|
||||
@@ -4,7 +4,7 @@ return [
|
||||
'supportEmail' => 'rocho02@gmail.com',
|
||||
'infoEmail' => 'info@rocho-net.hu',
|
||||
'user.passwordResetTokenExpire' => 3600,
|
||||
'version' => 'v0.0.62',
|
||||
'version' => 'v0.0.63',
|
||||
'company' => 'movar',//gyor
|
||||
'company_name' => "Freimann Kft.",
|
||||
'product_visiblity' => 'account',// on reception which products to display. account or global
|
||||
|
||||
@@ -171,6 +171,9 @@ class Card extends \common\models\BaseFitnessActiveRecord
|
||||
}
|
||||
|
||||
public static function updateCardFlagTicket($id){
|
||||
if ( !isset($id)){
|
||||
return ;
|
||||
}
|
||||
$db = \Yii::$app->db;
|
||||
$command = $db->createCommand(Ticket::$SQL_UPDATE_CARD,[':id' => $id]);
|
||||
$command->execute();
|
||||
|
||||
@@ -4,6 +4,7 @@ namespace common\models;
|
||||
|
||||
use Yii;
|
||||
use common\components\giro\GiroDETSTA;
|
||||
use yii\db\BaseActiveRecord;
|
||||
|
||||
/**
|
||||
* This is the model class for table "message_detsta".
|
||||
@@ -14,7 +15,7 @@ use common\components\giro\GiroDETSTA;
|
||||
* @property string $created_at
|
||||
* @property string $updated_at
|
||||
*/
|
||||
class MessageDetsta extends \yii\db\ActiveRecord
|
||||
class MessageDetsta extends BaseFitnessActiveRecord
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
|
||||
@@ -85,7 +85,12 @@ class Ticket extends \common\models\BaseFitnessActiveRecord
|
||||
[[ 'id_user', 'id_ticket_type', 'id_account', 'id_discount', 'max_usage_count', 'usage_count', 'status', 'price_brutto'], 'integer'],
|
||||
[['start', 'end', 'created_at', 'updated_at'], 'safe'],
|
||||
[['comment'], 'required'],
|
||||
[['comment'], 'string', 'max' => 255]
|
||||
[['comment'], 'string', 'max' => 255],
|
||||
|
||||
[[ 'start', ], 'date' , 'timestampAttribute' => 'timestampStart' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
|
||||
[[ 'end' , ], 'date' , 'timestampAttribute' => 'timestampEnd' ,'timestampAttributeFormat' => 'yyyy-MM-dd' ],
|
||||
|
||||
|
||||
];
|
||||
}
|
||||
|
||||
@@ -215,20 +220,7 @@ class Ticket extends \common\models\BaseFitnessActiveRecord
|
||||
|
||||
|
||||
public static function mkStatisticQuery($start,$end,$id_card = null){
|
||||
// $sql = "select
|
||||
// ticket_type.name,
|
||||
// count(ticket.id_ticket) as total ,
|
||||
// sum(case when ticket.end > '2015-11-05' and ticket.start <= '2015-11-05' then 1 else 0 end) as valid,
|
||||
// sum(case when ticket.created_at < '2015-11-06' and ticket.created_at >= '2015-11-05' then 1 else 0 end) as created,
|
||||
// sum(case when ticket.created_at < '2015-11-06' and ticket.created_at >= '2015-11-05' then transfer.money else 0 end) as created_money,
|
||||
// sum(case when ticket.created_at < '2015-11-06' and ticket.created_at >= '2015-11-05' and transfer.paid_at is not null then transfer.money else 0 end) as created_money_paid,
|
||||
// sum(case when ticket.created_at < '2015-11-06' and ticket.created_at >= '2015-11-05' and transfer.paid_at is null then transfer.money else 0 end) as created_money_not_paid,
|
||||
// sum(case when ticket.created_at >= '2015-11-06' and ticket.created_at < '2015-11-05' and transfer.paid_at < '2015-11-06' and transfer.paid_at >= '2015-11-05' then transfer.money else 0 end) as dept_paid,
|
||||
// sum(case when ticket.end < '2015-11-06' and ticket.created_at >= '2015-11-05' then 1 else 0 end) as expired
|
||||
// from ticket_type
|
||||
// inner join ticket on ticket.id_ticket_type = ticket_type.id_ticket_type
|
||||
// inner join transfer on ticket.id_ticket = transfer.id_object and transfer.type = 20
|
||||
// group by ticket_type.name;";
|
||||
|
||||
|
||||
$query = new Query();
|
||||
$query->addSelect( [
|
||||
@@ -353,4 +345,6 @@ class Ticket extends \common\models\BaseFitnessActiveRecord
|
||||
Card::updateCardFlagTicket($this->id_card);;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user