Skip to content

Commit

Permalink
Add missing methods
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Apr 23, 2019
1 parent c0c723a commit fe1b884
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions htdocs/product/inventory/class/inventory.class.php
Expand Up @@ -577,4 +577,29 @@ public function fetch($id, $ref = null)
//if ($result > 0 && ! empty($this->table_element_line)) $this->fetchLines();
return $result;
}

/**
* Update object into database
*
* @param User $user User that modifies
* @param bool $notrigger false=launch triggers after, true=disable triggers
* @return int <0 if KO, >0 if OK
*/
public function update(User $user, $notrigger = false)
{
return $this->updateCommon($user, $notrigger);
}

/**
* Delete object in database
*
* @param User $user User that deletes
* @param bool $notrigger false=launch triggers after, true=disable triggers
* @return int <0 if KO, >0 if OK
*/
public function delete(User $user, $notrigger = false)
{
return $this->deleteCommon($user, $notrigger);
//return $this->deleteCommon($user, $notrigger, 1);
}
}

0 comments on commit fe1b884

Please sign in to comment.