add inventory admin fix, add procurement update
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user