From c15454e62b51179f84bb5a75d1175b6a7a666f9d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 Sep 2017 13:09:26 +0200 Subject: [PATCH] Fix method to delete a bookkeeping record --- htdocs/accountancy/class/bookkeeping.class.php | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 799ebf85a34..52f7a473bed 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -1224,18 +1224,17 @@ class BookKeeping extends CommonObject /** * Delete bookkepping by piece number * - * @param int $piecenum peicenum to delete - * @param string $mode Mode - * @return int Result + * @param int $piecenum Piecenum to delete + * @return int Result */ - function deleteMvtNum($piecenum, $mode) { + function deleteMvtNum($piecenum) { global $conf; $this->db->begin(); // first check if line not yet in bookkeeping $sql = "DELETE"; - $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element. $mode; + $sql .= " FROM " . MAIN_DB_PREFIX . $this->table_element; $sql .= " WHERE piece_num = " . $piecenum; $sql .= " AND entity IN (" . getEntity('accountancy') . ")";