szollosil пре 9 месеци
родитељ
комит
9c3946189c
2 измењених фајлова са 3 додато и 2 уклоњено
  1. 2 2
      core/class/commonobject.class.php
  2. 1 0
      custom/rollerstorage/card.php

+ 2 - 2
core/class/commonobject.class.php

@@ -8381,7 +8381,7 @@ abstract class CommonObject
 									$entrepotObj = new Entrepot($this->db);
 									$entrepotObj->fetch($_REQUEST['inventory_id']);
 									if ($entrepotObj->array_options['options_entrepot_type'] == 1) {
-										$extrafields->attributes['inventory']['param'][$key]['options'] = array_slice($extrafields->attributes['inventory']['param'][$key]['options'], -2, 2, true);
+										$extrafields->attributes['inventory']['param'][$key]['options'] = array_slice($extrafields->attributes['inventory']['param'][$key]['options'], -4, 4, true);
 									}else{
 										$extrafields->attributes['inventory']['param'][$key]['options'] = array_slice($extrafields->attributes['inventory']['param'][$key]['options'], 0, 4, true);
 									}
@@ -8410,7 +8410,7 @@ abstract class CommonObject
 									$entrepotObj = new Entrepot($this->db);
 									$entrepotObj->fetch($_REQUEST['inventory_id']);
 									if ($entrepotObj->array_options['options_entrepot_type'] == 1) {
-										$extrafields->attributes['inventory']['param'][$key]['options'] = array_slice($extrafields->attributes['inventory']['param'][$key]['options'], -2, 2, true);
+										$extrafields->attributes['inventory']['param'][$key]['options'] = array_slice($extrafields->attributes['inventory']['param'][$key]['options'], -4, 4, true);
 									}else{
 										$extrafields->attributes['inventory']['param'][$key]['options'] = array_slice($extrafields->attributes['inventory']['param'][$key]['options'], 0, 4, true);									}
 									$out .= $extrafields->showInputField($key, $value, '', $keysuffix, '', 0, $this->id, $this->table_element);

+ 1 - 0
custom/rollerstorage/card.php

@@ -322,6 +322,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea
 
     // Confirmation to delete
     if ($action == 'delete') {
+        $backtopage .= '?id=' . $object->id . '&inventory_id=' . $inventory_id;
         $formconfirm = $form->formconfirm($_SERVER["PHP_SELF"] . '?id=' . $object->id. '&inventory_id='.$inventory_id.'&backtopage=' . $backtopage, $langs->trans('DeleteInventory'), $langs->trans('ConfirmDeleteObject'), 'confirm_delete', '', 0, 1);
     }