add inventory admin fix, add procurement update

This commit is contained in:
2016-03-30 20:04:49 +02:00
parent 19761cb0cc
commit a12b87d3be
22 changed files with 853 additions and 245 deletions

View File

@@ -12,6 +12,7 @@ use backend\models\InventoryItemForm;
use common\models\Inventory;
use yii\helpers\Url;
use common\models\Product;
use yii\web\NotAcceptableHttpException;
/**
* InventoryItemController implements the CRUD actions for InventoryItem model.
@@ -177,7 +178,11 @@ class InventoryItemController extends Controller
{
$model = $this->findModel($id);
$inventory = Inventory::findOne($model->id_inventory);
if ( !$inventory->isOpen()){
throw new NotAcceptableHttpException("A leltár elem nem található");
}
if ($model->load(Yii::$app->request->post()) && $model->save()) {
$prev = Url::previous("inventory-item-index");