Add contract parts

add procurement create prevent enter to product field
This commit is contained in:
2016-01-30 11:48:39 +01:00
parent a00331ce7c
commit 7b4fe04229
8 changed files with 225 additions and 0 deletions

View File

@@ -10,6 +10,8 @@ use yii\web\NotFoundHttpException;
use yii\filters\VerbFilter;
use backend\models\ContractCustomerSearch;
use common\models\Customer;
use yii\db\Query;
use backend\models\ContractRequestSearch;
/**
* ContractController implements the CRUD actions for Contract model.
@@ -124,6 +126,31 @@ class ContractController extends Controller
return $this->redirect(['index']);
}
public function actionDetails( $id )
{
$contract = Contract::findOne($id);
//ticket_installment_request
if ( !isset($contract)){
throw new NotFoundHttpException('The requested page does not exist.');
}
$searchModel = new ContractRequestSearch(
['contract' => $contract]
);
// $searchModel->contract = $contract;
$dataProvider = $searchModel->search(Yii::$app->request->queryParams);
return $this->render('details', [
'searchModel' => $searchModel,
'dataProvider' => $dataProvider,
]);
}
/**
* Finds the Contract model based on its primary key value.