Qual: Normalize code

This commit is contained in:
Laurent Destailleur 2010-07-21 17:14:50 +00:00
parent 3388764b14
commit c5af0b9770
2 changed files with 13 additions and 13 deletions

View File

@ -117,7 +117,7 @@ class RemiseCheque extends CommonObject
* \param account_id Compte bancaire concerne * \param account_id Compte bancaire concerne
* \return int <0 if KO, >0 if OK * \return int <0 if KO, >0 if OK
*/ */
function create($user, $account_id) function Create($user, $account_id)
{ {
global $conf; global $conf;
@ -220,7 +220,7 @@ class RemiseCheque extends CommonObject
if ($this->id > 0 && $this->errno == 0) if ($this->id > 0 && $this->errno == 0)
{ {
if ($this->updateAmount() <> 0) if ($this->UpdateAmount() <> 0)
{ {
$this->errno = -1027; $this->errno = -1027;
dol_syslog("RemiseCheque::Create ERREUR ($this->errno)"); dol_syslog("RemiseCheque::Create ERREUR ($this->errno)");
@ -254,7 +254,7 @@ class RemiseCheque extends CommonObject
\brief Supprime la remise en base \brief Supprime la remise en base
\param user utilisateur qui effectue l'operation \param user utilisateur qui effectue l'operation
*/ */
function delete($user='') function Delete($user='')
{ {
global $conf; global $conf;
@ -308,7 +308,7 @@ class RemiseCheque extends CommonObject
* \brief Validate receipt * \brief Validate receipt
* \param user User * \param user User
*/ */
function validate($user) function Validate($user)
{ {
global $langs,$conf; global $langs,$conf;
@ -530,7 +530,7 @@ class RemiseCheque extends CommonObject
* \brief Mets a jour le montant total * \brief Mets a jour le montant total
* \return int, 0 en cas de succes * \return int, 0 en cas de succes
*/ */
function updateAmount() function UpdateAmount()
{ {
global $conf; global $conf;
@ -563,13 +563,13 @@ class RemiseCheque extends CommonObject
if (!$resql) if (!$resql)
{ {
$this->errno = -1030; $this->errno = -1030;
dol_syslog("RemiseCheque::updateAmount ERREUR UPDATE ($this->errno)"); dol_syslog("RemiseCheque::UpdateAmount ERREUR UPDATE ($this->errno)");
} }
} }
else else
{ {
$this->errno = -1031; $this->errno = -1031;
dol_syslog("RemiseCheque::updateAmount ERREUR SELECT ($this->errno)"); dol_syslog("RemiseCheque::UpdateAmount ERREUR SELECT ($this->errno)");
} }
if ($this->errno === 0) if ($this->errno === 0)
@ -579,7 +579,7 @@ class RemiseCheque extends CommonObject
else else
{ {
$this->db->rollback(); $this->db->rollback();
dol_syslog("RemiseCheque::updateAmount ROLLBACK ($this->errno)"); dol_syslog("RemiseCheque::UpdateAmount ROLLBACK ($this->errno)");
} }
return $this->errno; return $this->errno;
@ -590,7 +590,7 @@ class RemiseCheque extends CommonObject
\param user utilisateur qui effectue l'operation \param user utilisateur qui effectue l'operation
\param account_id Compte bancaire concerne \param account_id Compte bancaire concerne
*/ */
function removeCheck($account_id) function RemoveCheck($account_id)
{ {
$this->errno = 0; $this->errno = 0;
@ -604,12 +604,12 @@ class RemiseCheque extends CommonObject
$resql = $this->db->query($sql); $resql = $this->db->query($sql);
if ($resql) if ($resql)
{ {
$this->updateAmount(); $this->UpdateAmount();
} }
else else
{ {
$this->errno = -1032; $this->errno = -1032;
dol_syslog("RemiseCheque::removeCheck ERREUR UPDATE ($this->errno)"); dol_syslog("RemiseCheque::RemoveCheck ERREUR UPDATE ($this->errno)");
} }
} }
return 0; return 0;

View File

@ -111,7 +111,7 @@ if ($_REQUEST['action'] == 'confirm_delete' && $_REQUEST['confirm'] == 'yes' &&
if ($_REQUEST['action'] == 'confirm_valide' && $_REQUEST['confirm'] == 'yes' && $user->rights->banque->cheque) if ($_REQUEST['action'] == 'confirm_valide' && $_REQUEST['confirm'] == 'yes' && $user->rights->banque->cheque)
{ {
$remisecheque = new RemiseCheque($db); $remisecheque = new RemiseCheque($db);
$result = $remisecheque->fetch($_GET["id"]); $result = $remisecheque->Fetch($_GET["id"]);
$result = $remisecheque->Validate($user); $result = $remisecheque->Validate($user);
if ($result >= 0) if ($result >= 0)
{ {
@ -127,7 +127,7 @@ if ($_REQUEST['action'] == 'confirm_valide' && $_REQUEST['confirm'] == 'yes' &&
if ($_POST['action'] == 'builddoc' && $user->rights->banque->cheque) if ($_POST['action'] == 'builddoc' && $user->rights->banque->cheque)
{ {
$remisecheque = new RemiseCheque($db); $remisecheque = new RemiseCheque($db);
$result = $remisecheque->fetch($_GET["id"]); $result = $remisecheque->Fetch($_GET["id"]);
/*if ($_REQUEST['model']) /*if ($_REQUEST['model'])
{ {