add feature payout_later

This commit is contained in:
2016-03-25 19:05:42 +01:00
parent b84ebf0177
commit 51b28134c1
14 changed files with 193 additions and 35 deletions

View File

@@ -16,6 +16,7 @@ use common\models\ProductCategory;
use common\models\Product;
use backend\models\TransferListUserGroupedSearch;
use backend\models\TransferLaterSearch;
use yii\helpers\Url;
/**
* TransferController implements the CRUD actions for Transfer model.
@@ -50,6 +51,15 @@ class TransferController extends \backend\controllers\BackendController
public function actionPaymentLater(){
$searchModel = new TransferLaterSearch();
if ( \Yii::$app->request->isPost){
$searchModel->load(Yii::$app->request->post());
if ( $searchModel->doPayout()) {
return $this->redirect(['transfer/payment-later' ]);
}
}
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
$accounts = Account::read();
@@ -57,6 +67,8 @@ class TransferController extends \backend\controllers\BackendController
$users = User::read();
Url::remember("payment_later",Url::current());
return $this->render('payment_later', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,