diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index d6a4aead2ec..adc4b5b04aa 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -789,7 +789,7 @@ if (empty($reshook)) { $filter = array('t.fk_product' => $prod->id, 't.fk_soc' => $object->thirdparty->id); - $result = $prodcustprice->fetch_all('', '', 0, 0, $filter); + $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); if ($result >= 0) { if (count($prodcustprice->lines) > 0) { $pu_ht = price($prodcustprice->lines[0]->price); diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 8be014b8959..05a828417b8 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -1534,7 +1534,6 @@ abstract class CommonObject } } - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps /** * Return array with list of possible values for type of contacts * @@ -1548,7 +1547,6 @@ abstract class CommonObject */ public function listeTypeContacts($source = 'internal', $option = 0, $activeonly = 0, $code = '', $element = '', $excludeelement = '') { - // phpcs:enable global $langs, $conf; $langs->loadLangs(array('bills', 'contracts', 'interventions', 'orders', 'projects', 'propal', 'ticket', 'agenda')); diff --git a/htdocs/product/class/productcustomerprice.class.php b/htdocs/product/class/productcustomerprice.class.php index ff000462567..197816f48ca 100644 --- a/htdocs/product/class/productcustomerprice.class.php +++ b/htdocs/product/class/productcustomerprice.class.php @@ -354,11 +354,31 @@ class Productcustomerprice extends CommonObject * @param int $limit page * @param int $offset offset * @param array $filter Filter for select + * @deprecated since dolibarr v17 use fetchAll * @return int <0 if KO, >0 if OK */ + public function fetch_all($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = array()) + { + // phpcs:enable + + dol_syslog(get_class($this)."::fetch_all is deprecated, use fetchAll instead", LOG_NOTICE); + + return $this->fetchAll($sortorder, $sortfield, $limit, $offset, $filter); + } + + /** + * Load all customer prices in memory from database + * + * @param string $sortorder order + * @param string $sortfield field + * @param int $limit page + * @param int $offset offset + * @param array $filter Filter for select + * @return int <0 if KO, >0 if OK + * @since dolibarr v17 + */ public function fetchAll($sortorder = '', $sortfield = '', $limit = 0, $offset = 0, $filter = array()) { - // phpcs:enable global $langs; if (empty($sortfield)) {