add customer ticket statistics
This commit is contained in:
@@ -19,7 +19,7 @@
|
||||
return [
|
||||
'Card' => 'Bérlet kártya',
|
||||
'Customer' => 'Vendég',
|
||||
'Created in interval' => 'Létrehozva az időszakban',
|
||||
'Created in interval' => 'Kiadva az időszakban',
|
||||
'End of interval' => 'Időszak vége',
|
||||
'Expire in interval' => 'Lejár az időszakban',
|
||||
'Start of interval' => 'Idászak kezdete',
|
||||
|
||||
@@ -16,6 +16,7 @@ use common\components\Helper;
|
||||
* @property integer $id_ticket_type
|
||||
* @property integer $id_account
|
||||
* @property integer $id_discount
|
||||
* @property integer $id_card
|
||||
* @property string $start
|
||||
* @property string $end
|
||||
* @property integer $max_usage_count
|
||||
@@ -175,7 +176,7 @@ class Ticket extends \common\models\BaseFitnessActiveRecord
|
||||
}
|
||||
|
||||
|
||||
public static function mkStatisticQuery($start,$end){
|
||||
public static function mkStatisticQuery($start,$end,$id_card = null){
|
||||
// $sql = "select
|
||||
// ticket_type.name,
|
||||
// count(ticket.id_ticket) as total ,
|
||||
@@ -211,6 +212,8 @@ class Ticket extends \common\models\BaseFitnessActiveRecord
|
||||
|
||||
Helper::queryAccountConstraint($query, 'ticket.id_account');
|
||||
|
||||
$query->andFilterWhere(['id_card' =>$id_card]);
|
||||
|
||||
$query->andWhere(
|
||||
[
|
||||
'or',
|
||||
|
||||
Reference in New Issue
Block a user