From 5f8b70b772409b41ca66f5e17bc1f94be5d6165a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Tue, 9 Feb 2021 09:03:29 +0100 Subject: [PATCH] use camelCaps name --- htdocs/compta/tva/card.php | 4 ++-- htdocs/compta/tva/class/paymentvat.class.php | 2 +- htdocs/compta/tva/class/tva.class.php | 12 ++++++------ 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index 37ef7d689ab..a961d4f1994 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -111,14 +111,14 @@ if ($action == 'setbankaccount' && $user->rights->tax->charges->creer) { if ($action == 'confirm_paid' && $user->rights->tax->charges->creer && $confirm == 'yes') { $object->fetch($id); - $result = $object->set_paid($user); + $result = $object->setPaid($user); } if ($action == 'reopen' && $user->rights->tax->charges->creer) { $result = $object->fetch($id); if ($object->paye) { - $result = $object->set_unpaid($user); + $result = $object->setUnpaid($user); if ($result > 0) { header('Location: '.$_SERVER["PHP_SELF"].'?id='.$id); diff --git a/htdocs/compta/tva/class/paymentvat.class.php b/htdocs/compta/tva/class/paymentvat.class.php index 35178dbc0ee..9c1e7f6f32e 100644 --- a/htdocs/compta/tva/class/paymentvat.class.php +++ b/htdocs/compta/tva/class/paymentvat.class.php @@ -194,7 +194,7 @@ class PaymentVAT extends CommonObject $remaintopay = price2num($contrib->amount - $paiement - $creditnotes - $deposits, 'MT'); if ($remaintopay == 0) { - $result = $contrib->set_paid($user); + $result = $contrib->setPaid($user); } else dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing."); } diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index 8a817e6575f..a39a00d8b01 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -246,14 +246,14 @@ class Tva extends CommonObject * @param User $user Object user making change * @return int <0 if KO, >0 if OK */ - public function set_paid($user) + public function setPaid($user) { // phpcs:enable $sql = "UPDATE ".MAIN_DB_PREFIX."tva SET"; $sql .= " paye = 1"; $sql .= " WHERE rowid = ".$this->id; - $return = $this->db->query($sql); - if ($return) return 1; + $resql = $this->db->query($sql); + if ($resql) return 1; else return -1; } @@ -263,14 +263,14 @@ class Tva extends CommonObject * @param User $user Object user making change * @return int <0 if KO, >0 if OK */ - public function set_unpaid($user) + public function setUnpaid($user) { // phpcs:enable $sql = "UPDATE ".MAIN_DB_PREFIX."tva SET"; $sql .= " paye = 0"; $sql .= " WHERE rowid = ".$this->id; - $return = $this->db->query($sql); - if ($return) return 1; + $resql = $this->db->query($sql); + if ($resql) return 1; else return -1; }