Fix inventory-item/update buttons save, save/next
This commit is contained in:
@@ -208,14 +208,9 @@ class InventoryItemController extends Controller
|
||||
|
||||
|
||||
|
||||
// if (isset($prev)) {
|
||||
// return $this->redirect($prev);
|
||||
// } else {
|
||||
// return $this->redirect(['index', 'id' => $inventory->id_inventory]);
|
||||
// }
|
||||
|
||||
$next = InventoryItem::findNextItemAlphabetical($model->id_inventory_item);
|
||||
if ( isset($next)){
|
||||
if ( isset($_POST['_next']) && isset($next)){
|
||||
return $this->redirect(['inventory-item/update', 'id' => $next]);
|
||||
}else{
|
||||
return $this->redirect(['index', 'id' => $inventory->id_inventory]);
|
||||
|
||||
Reference in New Issue
Block a user