implement registration in backend
This commit is contained in:
@@ -3,15 +3,10 @@
|
||||
namespace frontend\models;
|
||||
|
||||
use Yii;
|
||||
use yii\base\Model;
|
||||
use yii\data\ActiveDataProvider;
|
||||
use common\models\Transfer;
|
||||
use yii\base\Object;
|
||||
use yii\db\Query;
|
||||
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`.
|
||||
@@ -96,23 +91,14 @@ class TransferSearch extends Transfer
|
||||
|
||||
return $dataProvider;
|
||||
}
|
||||
|
||||
public function totalsTransfers($params){
|
||||
$accountTotals = [];
|
||||
$fullTotal = [
|
||||
'label' => Yii::t('common/transfer', 'Total'),
|
||||
'money' => 0
|
||||
];
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @throws \yii\db\Exception
|
||||
*/
|
||||
public function totalsTransfers(){
|
||||
$accounts = Account::find()->orderBy("name asc")->all();
|
||||
$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);
|
||||
|
||||
|
||||
$this->totals = Transfer::mkTotals($this->timestampStart, $this->timestampEnd, $idUser, $this->types, $this->id_account, $accounts);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user