add changes procurement

This commit is contained in:
2015-09-25 18:43:23 +02:00
parent 5c9db98110
commit fe61803670
5 changed files with 42 additions and 28 deletions

View File

@@ -41,6 +41,14 @@ class ProcurementController extends Controller
$users = User::read(null);
$searchModel = new ProcurementSearch();
$today = time();
$tomorrow = time()+86400;
$searchModel->timestampStart = date("Y-m-d" , $today );
$searchModel->timestampEnd = date("Y-m-d" , $tomorrow );
$searchModel->date_start = Yii::$app->formatter->asDate($today);
$searchModel->date_end = Yii::$app->formatter->asDate($tomorrow);
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('index', [
@@ -108,7 +116,7 @@ class ProcurementController extends Controller
}
return $this->redirect(['view', 'id' => $model->id_procurement]);
return $this->redirect(['index' ]);
} else {
return $this->render('create', [
'model' => $model,