From ebb38e1e4dd01a0fb00af1813902459133ad1e10 Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 4 Nov 2020 17:44:02 +0100 Subject: [PATCH] Add OK return value to reception->addline --- htdocs/reception/class/reception.class.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 3c9ea03d246..766db0e3479 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -704,7 +704,7 @@ class Reception extends CommonObject * @param integer $eatby eat-by date * @param integer $sellby sell-by date * @param string $batch Lot number - * @return int <0 if KO, >0 if OK + * @return int <0 if KO, index of line if OK */ public function addline($entrepot_id, $id, $qty, $array_options = 0, $comment = '', $eatby = '', $sellby = '', $batch = '') { @@ -752,6 +752,8 @@ class Reception extends CommonObject $line->fk_reception = $this->id; $this->lines[$num] = $line; + + return $num; }