Function set_price_level() has been renamed into setPriceLevel() to

follow camelcase rules
This commit is contained in:
Laurent Destailleur 2021-04-01 10:05:37 +02:00
parent 39b71e1ea6
commit 9c92dfd3e1
4 changed files with 4 additions and 6 deletions

View File

@ -24,7 +24,7 @@ Following changes may create regressions for some external modules, but were nec
* Field "total" renamed into "total_ttc" for table lx_propal, llx_supplier_proposal for better field name consistency
* If your database is PostgreSql, you must use version 9.1.0 or more (Dolibarr need the SQL function CONCAT)
* If your database is MySql or MariaDB, you need at least version 5.1
* Function set_price_level() has been renamed into setPriceLevel() to follow camelcase rules
***** ChangeLog for 13.0.2 compared to 13.0.1 *****

View File

@ -56,7 +56,7 @@ $result = restrictedArea($user, 'societe', $id, '&societe', '', 'fk_soc', 'rowid
if ($action == 'setpricelevel') {
$soc = new Societe($db);
$soc->fetch($id);
$soc->set_price_level(GETPOST("price_level"), $user);
$soc->setPriceLevel(GETPOST("price_level"), $user);
header("Location: multiprix.php?id=".$id);
exit;

View File

@ -575,7 +575,7 @@ class Thirdparties extends DolibarrApi
throw new RestException(401, 'Access to thirdparty '.$id.' not allowed for login '.DolibarrApiAccess::$user->login);
}
$result = $this->company->set_price_level($priceLevel, DolibarrApiAccess::$user);
$result = $this->company->setPriceLevel($priceLevel, DolibarrApiAccess::$user);
if ($result <= 0) {
throw new RestException(500, 'Error setting new price level for thirdparty '.$id, array($this->company->db->lasterror()));
}

View File

@ -2272,7 +2272,6 @@ class Societe extends CommonObject
}
}
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
* Set the price level
*
@ -2280,9 +2279,8 @@ class Societe extends CommonObject
* @param User $user Use making change
* @return int <0 if KO, >0 if OK
*/
public function set_price_level($price_level, User $user)
public function setPriceLevel($price_level, User $user)
{
// phpcs:enable
if ($this->id) {
$now = dol_now();