deprecate non camelCaps functions
This commit is contained in:
parent
fe9ee5a398
commit
0da942210f
@ -953,7 +953,7 @@ if (empty($reshook))
|
|||||||
$object = new ExpenseReport($db);
|
$object = new ExpenseReport($db);
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
|
|
||||||
$result = $object->set_unpaid($user);
|
$result = $object->setUnpaid($user);
|
||||||
|
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -1492,6 +1492,8 @@ class ExpenseReport extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* set_unpaid
|
* set_unpaid
|
||||||
*
|
*
|
||||||
|
* @deprecated
|
||||||
|
* @see setUnpaid()
|
||||||
* @param User $fuser User
|
* @param User $fuser User
|
||||||
* @param int $notrigger Disable triggers
|
* @param int $notrigger Disable triggers
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
@ -1499,6 +1501,19 @@ class ExpenseReport extends CommonObject
|
|||||||
public function set_unpaid($fuser, $notrigger = 0)
|
public function set_unpaid($fuser, $notrigger = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
|
dol_syslog(get_class($this)."::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE);
|
||||||
|
return $this->setUnpaid($fuser, $notrigger);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* set_unpaid
|
||||||
|
*
|
||||||
|
* @param User $fuser User
|
||||||
|
* @param int $notrigger Disable triggers
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
|
*/
|
||||||
|
public function setUnpaid($fuser, $notrigger = 0)
|
||||||
|
{
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if ($this->paid)
|
if ($this->paid)
|
||||||
|
|||||||
@ -1261,7 +1261,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
dol_syslog(get_class($this)."::set_paid is deprecated, use setPaid instead", LOG_NOTICE);
|
dol_syslog(get_class($this)."::set_paid is deprecated, use setPaid instead", LOG_NOTICE);
|
||||||
$this->setPaid($user, $close_code, $close_note);
|
return $this->setPaid($user, $close_code, $close_note);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -1322,7 +1322,7 @@ class FactureFournisseur extends CommonInvoice
|
|||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
dol_syslog(get_class($this)."::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE);
|
dol_syslog(get_class($this)."::set_unpaid is deprecated, use setUnpaid instead", LOG_NOTICE);
|
||||||
$this->setUnpaid($user);
|
return $this->setUnpaid($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -277,7 +277,7 @@ if (empty($reshook))
|
|||||||
$discount->unlink_invoice();
|
$discount->unlink_invoice();
|
||||||
} elseif ($action == 'confirm_paid' && $confirm == 'yes' && $usercancreate) {
|
} elseif ($action == 'confirm_paid' && $confirm == 'yes' && $usercancreate) {
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->set_paid($user);
|
$result = $object->setPaid($user);
|
||||||
if ($result < 0) {
|
if ($result < 0) {
|
||||||
setEventMessages($object->error, $object->errors, 'errors');
|
setEventMessages($object->error, $object->errors, 'errors');
|
||||||
}
|
}
|
||||||
@ -605,7 +605,7 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
if ($object->type != FactureFournisseur::TYPE_DEPOSIT) {
|
if ($object->type != FactureFournisseur::TYPE_DEPOSIT) {
|
||||||
// Classe facture
|
// Classe facture
|
||||||
$result = $object->set_paid($user);
|
$result = $object->setPaid($user);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
@ -1545,7 +1545,7 @@ if (empty($reshook))
|
|||||||
if ($object->statut == FactureFournisseur::STATUS_CLOSED
|
if ($object->statut == FactureFournisseur::STATUS_CLOSED
|
||||||
|| ($object->statut == FactureFournisseur::STATUS_ABANDONED && $object->close_code != 'replaced'))
|
|| ($object->statut == FactureFournisseur::STATUS_ABANDONED && $object->close_code != 'replaced'))
|
||||||
{
|
{
|
||||||
$result = $object->set_unpaid($user);
|
$result = $object->setUnpaid($user);
|
||||||
if ($result > 0)
|
if ($result > 0)
|
||||||
{
|
{
|
||||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user