From 7d07da527d2c2a93a0d3a938ed2dff3c8f8e4801 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 1 Nov 2021 03:30:22 +0100 Subject: [PATCH] Debug v15 --- htdocs/core/db/DoliDB.class.php | 17 +++++++++-------- htdocs/hrm/compare.php | 5 ++++- htdocs/takepos/invoice.php | 2 +- 3 files changed, 14 insertions(+), 10 deletions(-) diff --git a/htdocs/core/db/DoliDB.class.php b/htdocs/core/db/DoliDB.class.php index 29ced10dc35..a30fa5f4f7e 100644 --- a/htdocs/core/db/DoliDB.class.php +++ b/htdocs/core/db/DoliDB.class.php @@ -318,14 +318,14 @@ abstract class DoliDB implements Database /** * Return first result from query as object * Note : This method executes a given SQL query and retrieves the first row of results as an object. It should only be used with SELECT queries - * Dont add LIMIT to your query, it will be added by this method - * @param string $sql the sql query string - * @return bool| object - * @deprecated + * Dont add LIMIT to your query, it will be added by this method. + * + * @param string $sql The sql query string + * @return bool|object Result of fetch_object */ public function getRow($sql) { - $sql .= ' LIMIT 1;'; + $sql .= ' LIMIT 1'; $res = $this->query($sql); if ($res) { @@ -338,9 +338,10 @@ abstract class DoliDB implements Database /** * return all results from query as an array of objects * Note : This method executes a given SQL query and retrieves all row of results as an array of objects. It should only be used with SELECT queries - * be carefull with this method use it only with some limit of results to avoid performences loss - * @param string $sql the sql query string - * @return bool| array + * be carefull with this method use it only with some limit of results to avoid performences loss. + * + * @param string $sql The sql query string + * @return bool|array Result * @deprecated */ public function getRows($sql) diff --git a/htdocs/hrm/compare.php b/htdocs/hrm/compare.php index 13b83af9737..07097443628 100644 --- a/htdocs/hrm/compare.php +++ b/htdocs/hrm/compare.php @@ -256,10 +256,13 @@ $fk_usergroup1 = GETPOST('fk_usergroup1'); update_note_public($desc); + $invoice->update_note($desc, '_public'); } else foreach ($invoice->lines as $line) { if ($line->id == $idline) { $result = $invoice->updateline($line->id, $desc, $line->subprice, $line->qty, $line->remise_percent, $line->date_start, $line->date_end, $line->tva_tx, $line->localtax1_tx, $line->localtax2_tx, 'HT', $line->info_bits, $line->product_type, $line->fk_parent_line, 0, $line->fk_fournprice, $line->pa_ht, $line->label, $line->special_code, $line->array_options, $line->situation_percent, $line->fk_unit);