add contraint , that everybody expect admin is limited to 3 days, Add card package
This commit is contained in:
@@ -12,6 +12,7 @@ use yii\db\Expression;
|
||||
use common\models\Account;
|
||||
|
||||
use yii\helpers\ArrayHelper;
|
||||
use common\components\Helper;
|
||||
/**
|
||||
* TransferSearch represents the model behind the search form about `common\models\Transfer`.
|
||||
*/
|
||||
@@ -91,6 +92,8 @@ class TransferSearch extends Transfer
|
||||
|
||||
$query->andFilterWhere(['or' , $created_condition , $paid_condition]);
|
||||
|
||||
Helper::restrictIfNotAdminTheStartDate($query, $this->timestampStart);
|
||||
|
||||
return $dataProvider;
|
||||
}
|
||||
|
||||
@@ -106,6 +109,7 @@ class TransferSearch extends Transfer
|
||||
$accountMap = ArrayHelper::map( $accounts ,'id_account','name' );
|
||||
$idUser = Yii::$app->user->id;
|
||||
|
||||
|
||||
$this->totals = Transfer::mkTotals($this->timestampStart, $this->timestampEnd, $idUser, $this->types, $this->id_account, $accounts, $accountMap);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user