From fe1b8849667c77f3e9963d766ad50f63d8638d1e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 23 Apr 2019 12:20:59 +0200 Subject: [PATCH] Add missing methods --- .../inventory/class/inventory.class.php | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/htdocs/product/inventory/class/inventory.class.php b/htdocs/product/inventory/class/inventory.class.php index fabaaefb1a1..7f535a2eac0 100644 --- a/htdocs/product/inventory/class/inventory.class.php +++ b/htdocs/product/inventory/class/inventory.class.php @@ -577,4 +577,29 @@ class InventoryLine extends CommonObjectLine //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); + } }