Browse Source

Fix warnings

Laurent Destailleur 1 year ago
parent
commit
e9e6a8d0a8
2 changed files with 19 additions and 3 deletions
  1. 8 3
      htdocs/mrp/class/mo.class.php
  2. 11 0
      htdocs/partnership/class/partnership_type.class.php

+ 8 - 3
htdocs/mrp/class/mo.class.php

@@ -184,7 +184,6 @@ class Mo extends CommonObject
 	 */
 	public $date_end_planned;
 
-
 	/**
 	 * @var int ID bom
 	 */
@@ -200,6 +199,13 @@ class Mo extends CommonObject
 	 */
 	public $fk_project;
 
+	/**
+	 * @var double	New quantity. When we update the quantity to produce, we set this to save old value before calling the ->update that call the updateProduction that need this
+	 * 				to recalculate all the quantities in lines to consume and produce.
+	 */
+	public $oldQty;
+
+
 	// If this object has a subtable with lines
 
 	/**
@@ -247,6 +253,7 @@ class Mo extends CommonObject
 	 */
 	public $tpl = array();
 
+
 	/**
 	 * Constructor
 	 *
@@ -634,8 +641,6 @@ class Mo extends CommonObject
 	 */
 	public function update(User $user, $notrigger = false)
 	{
-		global $langs;
-
 		$error = 0;
 
 		$this->db->begin();

+ 11 - 0
htdocs/partnership/class/partnership_type.class.php

@@ -368,6 +368,17 @@ class PartnershipType extends CommonObject
 		return $result;
 	}
 
+	/**
+	 *  Return the label of the status
+	 *
+	 *  @param  int		$mode          0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
+	 *  @return	string 			       Label of status
+	 */
+	public function getLibStatut($mode = 0)
+	{
+		return '';
+	}
+
 	/**
 	 *	Load the info information in the object
 	 *