implement registration in backend

This commit is contained in:
Roland Schneider
2018-12-30 23:04:06 +01:00
parent b2bb210cee
commit e3b6bc08a7
32 changed files with 794 additions and 276 deletions

View File

@@ -8,7 +8,6 @@ use yii\data\ActiveDataProvider;
use common\models\Transfer;
use yii\db\Expression;
use yii\db\Query;
use yii\helpers\ArrayHelper;
use common\models\Account;
use common\components\Helper;
use common\components\RoleDefinition;
@@ -167,8 +166,6 @@ class TransferSearch extends Transfer
}
}
['like', 'name', ['test', 'sample']]
$query->andFilterWhere([
'transfer.id_account' => $this->id_account,
'transfer.status' => $this->status,
@@ -280,11 +277,12 @@ class TransferSearch extends Transfer
}
/**
* @throws \yii\db\Exception
*/
public function totalsTransfers()
{
$accounts = Account::read();
$accountMap = ArrayHelper::map($accounts, 'id_account', 'name');
$idUser = $this->id_user;
/**mk totals need date time format*/
@@ -293,8 +291,7 @@ class TransferSearch extends Transfer
$start .= ' 00:00';
}
$this->totals = Transfer::mkTotals($start, $this->timestampEnd, $idUser, $this->types, $this->id_account, $accounts, $accountMap);
$this->totals = Transfer::mkTotals($start, $this->timestampEnd, $idUser, $this->types, $this->id_account, $accounts);
}