add contraint , that everybody expect admin is limited to 3 days, Add card package

This commit is contained in:
2016-02-13 17:23:43 +01:00
parent 556bdc3066
commit 70f43468af
37 changed files with 1418 additions and 19 deletions

View File

@@ -7,6 +7,7 @@ use yii\base\Model;
use yii\data\ActiveDataProvider;
use common\models\MoneyMovement;
use yii\helpers\ArrayHelper;
use common\components\Helper;
/**
* MoneyMovementSearch represents the model behind the search form about `common\models\MoneyMovement`.
@@ -67,6 +68,8 @@ class MoneyMovementSearch extends MoneyMovement
$query->andFilterWhere([ '>=', 'money_movement.created_at', $this->timestampStart ] );
$query->andFilterWhere([ '<', 'money_movement.created_at', $this->timestampEnd ] );
Helper::restrictIfNotAdminTheStartDate($query, $this->timestampStart,['money_movement.created_at']);
return $dataProvider;
}