Pārlūkot izejas kodu

JIRA: 388 fixes

szollosil 1 gadu atpakaļ
vecāks
revīzija
369d543a89

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

@@ -7544,7 +7544,7 @@ abstract class CommonObject
 				$value = $this->getNomUrl(1, '', 0, '', 1);
 			}
 		} elseif ($key == 'status' && method_exists($this, 'getLibStatut')) {
-			$value = $this->getLibStatut(3);
+			$value = $this->getLibStatut(2);
 		} elseif ($type == 'date') {
 			if (!empty($value)) {
 				$value = dol_print_date($value, 'day');	// We suppose dates without time are always gmt (storage of course + output)
@@ -8381,9 +8381,9 @@ 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);
+										$extrafields->attributes['inventory']['param'][$key]['options'] = array_slice($extrafields->attributes['inventory']['param'][$key]['options'], -2, true);
 									}else{
-										$extrafields->attributes['inventory']['param'][$key]['options'] = array_slice($extrafields->attributes['inventory']['param'][$key]['options'], 0, 4);
+										$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);
 								} else {

+ 2 - 2
custom/rollerstorage/tpl/commonfields_add.tpl.php

@@ -103,7 +103,7 @@ foreach ($object->fields as $key => $val) {
 ?>
 <!-- END PHP TEMPLATE commonfields_add.tpl.php -->
 <script>
-	var warehouses = ['1', '2', '3'];
+	/* var warehouses = ['1', '2', '3'];
 	var mySelect = document.getElementById('fk_warehouse');
 	mySelect.onchange = (event) => {
 		var warehouse_id = event.target.value;
@@ -116,5 +116,5 @@ foreach ($object->fields as $key => $val) {
 			$("#select2-status-container").html("Szervízben");
 			$('span.select2-selection__rendered').attr('title', 'Szervízben');
 		}
-	}
+	} */
 </script>

+ 2 - 2
custom/rollerstorage/tpl/commonfields_edit.tpl.php

@@ -111,7 +111,7 @@ foreach ($object->fields as $key => $val) {
 ?>
 <!-- END PHP TEMPLATE commonfields_edit.tpl.php -->
 <script>
-	var warehouses = ['1', '2', '3'];
+	/* var warehouses = ['1', '2', '3'];
 	var mySelect = document.getElementById('fk_warehouse');
 	mySelect.onchange = (event) => {
 		var warehouse_id = event.target.value;
@@ -124,5 +124,5 @@ foreach ($object->fields as $key => $val) {
 			$("#select2-status-container").html("Szervízben");
 			$('span.select2-selection__rendered').attr('title', 'Szervízben');
 		}
-	}
+	} */
 </script>

+ 2 - 2
custom/rollerstorage/tpl/commonfields_view.tpl.php

@@ -51,7 +51,7 @@ foreach ($object->fields as $key => $val) {
 	if (array_key_exists('enabled', $val) && isset($val['enabled']) && !verifCond($val['enabled'])) {
 		continue; // We don't want this field
 	}
-	if (in_array($key, array('ref', 'status'))) {
+	if (in_array($key, array('ref'/*, 'status'*/))) {
 		continue; // Ref and status are already in dol_banner
 	}
 
@@ -143,7 +143,7 @@ foreach ($object->fields as $key => $val) {
 	if (array_key_exists('enabled', $val) && isset($val['enabled']) && !$val['enabled']) {
 		continue; // We don't want this field
 	}
-	if (in_array($key, array('ref', 'status'))) {
+	if (in_array($key, array('ref'/*, 'status'*/))) {
 		continue; // Ref and status are already in dol_banner
 	}
 

+ 4 - 5
product/inventory/class/inventory.class.php

@@ -634,18 +634,18 @@ class Inventory extends CommonObject
 		global $langs;
 		global $db;
 
-		/*$statusObj = new Statuses($db);
-			  $statuses = $statusObj::getStatusids($db);*/
+		$statusObj = new Statuses($db);
+		$statuses = $statusObj::getStatusids($db);
 
 		$labelStatus = array();
 		$labelStatus[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft');
 		$labelStatus[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('Validated') . ' (' . $langs->transnoentitiesnoconv('InventoryStartedShort') . ')';
 		$labelStatus[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled');
 		$labelStatus[self::STATUS_RECORDED] = $langs->transnoentitiesnoconv('Closed');
-		/*foreach($statuses as $key => $val){
+		foreach($statuses as $key => $val){
 				  $labelStatus[$key] = $val;	
 				  $labelStatusShort[$key] = $val;	
-			  }*/
+			  }
 		$labelStatusShort[self::STATUS_DRAFT] = $langs->transnoentitiesnoconv('Draft');
 		$labelStatusShort[self::STATUS_VALIDATED] = $langs->transnoentitiesnoconv('InventoryStartedShort');
 		$labelStatusShort[self::STATUS_CANCELED] = $langs->transnoentitiesnoconv('Canceled');
@@ -655,7 +655,6 @@ class Inventory extends CommonObject
 		if ($status == self::STATUS_RECORDED) {
 			$statusType = 'status6';
 		}
-
 		return dolGetStatus($labelStatus[$status], $labelStatusShort[$status], '', $statusType, $mode);
 	}