public function actionView($id = 200) { $transactions = new Transactions('search'); $transactions->unsetAttributes(); $transactions->num = $id; $this->render('index', array('model' => $transactions)); }
private function reach($type, $yaer) { $cheques = new Transactions('search'); $cheques->unsetAttributes(); $sums = array(); for ($x = 1; $x <= 12; $x++) { if ($x <= 9) { $a = "0{$x}"; } else { $a = $x; } $last = 31; while (!checkdate($x, $last, date("Y"))) { $last--; } $result = $this->sum($cheques, $type, $yaer . "-{$a}-01" . " 00:00:00", $yaer . "-{$a}-{$last}" . " 23:59:59"); if ($result == 0) { array_push($sums, "0"); } else { if ($type == 2) { $result = $result * -1; } array_push($sums, round($result)); } } return $sums; }
public function search($id) { //echo $id . uniqid(); $transactions = new Transactions('search'); $transactions->unsetAttributes(); $transactions->account_id = $id; $transactions->from_date = $this->from_date; $transactions->to_date = $this->to_date; return $transactions->search(); }
public function actionTransaction($id = 200) { $model = new Transactions('search'); $model->unsetAttributes(); if (isset($_POST['Transactions'])) { $model->attributes = $_POST['Transactions']; } $model->account_id = $id; $this->render('transaction', array('model' => $model, 'account' => $this->loadModel($id))); }
public function actionIndex($user_id = NULL) { Yii::import('application.modules.deposit.extensions.Deposit.Deposit'); $model = new Transactions('search'); $model->unsetAttributes(); if (isset($_GET['Transactions'])) { $model->setAttributes($_GET['Transactions']); } $dataProvider = $model->search(); $this->render('//transactions/index', array('dataProvider' => $dataProvider, 'model' => $model, 'aggregatorsList' => Deposit::getAggregatorsList())); }
/** * Просмотр транзакций юзера * * @param int $user_id */ public function actionTransactionHistory($user_id) { Yii::import('application.modules.deposit.extensions.Deposit.Deposit'); $model = new Transactions('search'); $model->unsetAttributes(); if (isset($_GET['Transactions'])) { $model->setAttributes($_GET['Transactions']); } $dataProvider = $model->search(); $dataProvider->criteria->mergeWith(array('condition' => 't.user_id = :user_id', 'params' => array('user_id' => $user_id))); $this->render('//users/transaction-history', array('user' => Users::model()->findByPk($user_id), 'model' => $model, 'dataProvider' => $dataProvider, 'aggregatorsList' => Deposit::getAggregatorsList())); }
public function actionIntmatchajax() { $in = new Transactions('search'); $out = new Transactions('search'); $in->unsetAttributes(); $out->unsetAttributes(); if (isset($_POST['FormIntmatch'])) { $in->attributes = $_POST['FormIntmatch']; $out->attributes = $_POST['FormIntmatch']; } $this->renderPartial('intmatchajax', array('in' => $in, 'out' => $out)); }
public function actionJournal() { $model = new Transactions('search'); $model->unsetAttributes(); $vl = 'transactions-grid'; //echo Yii::app()->request->isAjaxRequest; //Yii::app()->end(); if (isset($_POST['Transactions'])) { $model->attributes = $_POST['Transactions']; } if (Yii::app()->request->isAjaxRequest || isset($_POST['ajax']) && $_POST['ajax'] === $vl) { // Render partial file created in Step 1 $this->renderPartial('journal', array('model' => $model)); Yii::app()->end(); } $this->render('journal', array('model' => $model)); }
public function actionExtmatchajax() { $model = new Bankbook('search'); $trans = new Transactions('search'); $model->unsetAttributes(); $trans->unsetAttributes(); //$model->account_id=$account_id; if (isset($_POST['FormExtmatch'])) { $model->attributes = $_POST['FormExtmatch']; $trans->attributes = $_POST['FormExtmatch']; } $model->extCorrelation = 0; $trans->extCorrelation = 0; $this->renderPartial('extmatchajax', array('model' => $model, 'trans' => $trans)); }