use camelCaps name
This commit is contained in:
parent
5966e63120
commit
5f8b70b772
@ -111,14 +111,14 @@ if ($action == 'setbankaccount' && $user->rights->tax->charges->creer) {
|
|||||||
if ($action == 'confirm_paid' && $user->rights->tax->charges->creer && $confirm == 'yes')
|
if ($action == 'confirm_paid' && $user->rights->tax->charges->creer && $confirm == 'yes')
|
||||||
{
|
{
|
||||||
$object->fetch($id);
|
$object->fetch($id);
|
||||||
$result = $object->set_paid($user);
|
$result = $object->setPaid($user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'reopen' && $user->rights->tax->charges->creer) {
|
if ($action == 'reopen' && $user->rights->tax->charges->creer) {
|
||||||
$result = $object->fetch($id);
|
$result = $object->fetch($id);
|
||||||
if ($object->paye)
|
if ($object->paye)
|
||||||
{
|
{
|
||||||
$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);
|
||||||
|
|||||||
@ -194,7 +194,7 @@ class PaymentVAT extends CommonObject
|
|||||||
$remaintopay = price2num($contrib->amount - $paiement - $creditnotes - $deposits, 'MT');
|
$remaintopay = price2num($contrib->amount - $paiement - $creditnotes - $deposits, 'MT');
|
||||||
if ($remaintopay == 0)
|
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.");
|
else dol_syslog("Remain to pay for conrib ".$contribid." not null. We do nothing.");
|
||||||
}
|
}
|
||||||
|
|||||||
@ -246,14 +246,14 @@ class Tva extends CommonObject
|
|||||||
* @param User $user Object user making change
|
* @param User $user Object user making change
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function set_paid($user)
|
public function setPaid($user)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."tva SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."tva SET";
|
||||||
$sql .= " paye = 1";
|
$sql .= " paye = 1";
|
||||||
$sql .= " WHERE rowid = ".$this->id;
|
$sql .= " WHERE rowid = ".$this->id;
|
||||||
$return = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($return) return 1;
|
if ($resql) return 1;
|
||||||
else return -1;
|
else return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -263,14 +263,14 @@ class Tva extends CommonObject
|
|||||||
* @param User $user Object user making change
|
* @param User $user Object user making change
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
public function set_unpaid($user)
|
public function setUnpaid($user)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
$sql = "UPDATE ".MAIN_DB_PREFIX."tva SET";
|
$sql = "UPDATE ".MAIN_DB_PREFIX."tva SET";
|
||||||
$sql .= " paye = 0";
|
$sql .= " paye = 0";
|
||||||
$sql .= " WHERE rowid = ".$this->id;
|
$sql .= " WHERE rowid = ".$this->id;
|
||||||
$return = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($return) return 1;
|
if ($resql) return 1;
|
||||||
else return -1;
|
else return -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user