diff --git a/htdocs/bon-prelevement.class.php b/htdocs/bon-prelevement.class.php index 415db751eab..f26b00c33c5 100644 --- a/htdocs/bon-prelevement.class.php +++ b/htdocs/bon-prelevement.class.php @@ -120,7 +120,7 @@ class BonPrelevement { $error == 0; - if ($this->db->query("BEGIN")) + if ($this->db->begin()) { @@ -179,12 +179,12 @@ class BonPrelevement */ if ($error == 0) { - $this->db->query("COMMIT"); + $this->db->commit(); return 0; } else { - $this->db->query("ROLLBACK"); + $this->db->rollback(); dolibarr_syslog("bon-prelevment::set_credite ROLLBACK "); return -1; } @@ -206,7 +206,7 @@ class BonPrelevement { $error == 0; - if ($this->db->query("BEGIN")) + if ($this->db->begin()) { @@ -229,12 +229,12 @@ class BonPrelevement */ if ($error == 0) { - $this->db->query("COMMIT"); + $this->db->commit(); return 0; } else { - $this->db->query("ROLLBACK"); + $this->db->rollback(); dolibarr_syslog("bon-prelevment::set_infotrans ROLLBACK "); return -1; } @@ -254,7 +254,7 @@ class BonPrelevement { $error == 0; - if ($this->db->query("BEGIN")) + if ($this->db->begin()) { @@ -278,12 +278,12 @@ class BonPrelevement */ if ($error == 0) { - $this->db->query("COMMIT"); + $this->db->commit(); return 0; } else { - $this->db->query("ROLLBACK"); + $this->db->rollback(); dolibarr_syslog("bon-prelevment::set_infotrans ROLLBACK "); return -1; } diff --git a/htdocs/chargesociales.class.php b/htdocs/chargesociales.class.php index 3e8fc5d8786..6e4371f79e7 100644 --- a/htdocs/chargesociales.class.php +++ b/htdocs/chargesociales.class.php @@ -44,10 +44,13 @@ class PaiementCharge { function PaiementCharge($DB) { $this->db = $DB; - return 1; } + /** + * \brief Creation d'un paiement de charge sociale + * + */ function create($user) { $sql_err = 0; /* @@ -101,10 +104,10 @@ class PaiementCharge { } } - /* - * Mise a jour du lien entre le paiement de charge et la ligne dans llx_bank générée - * - */ + /** + * \brief Mise a jour du lien entre le paiement de charge et la ligne dans llx_bank générée + * + */ function update_fk_bank($id_bank) { $sql = "UPDATE llx_paiementcharge set fk_bank = ".$id_bank." where rowid = ".$this->id; $result = $this->db->query($sql); @@ -144,10 +147,10 @@ class ChargeSociales { return 1; } - /* - * Retrouve et charge une charge sociale - * Retour: 1 si trouve, 0 sinon - */ + /** + * \brief Retrouve et charge une charge sociale + * \return int 1 si trouve, 0 sinon + */ function fetch($id) { $sql = "SELECT cs.rowid,".$this->db->pdate("cs.date_ech")." as date_ech,".$this->db->pdate("cs.date_pai")." as date_pai"; $sql .=", cs.libelle as lib, cs.fk_type, cs.amount, cs.paye, ".$this->db->pdate("cs.periode")." as periode, c.libelle"; @@ -214,8 +217,8 @@ class ChargeSociales { } /** - * Tag la charge comme payée complètement - * + * \brief Tag la charge comme payée complètement + * \param rowid id de la ligne a modifier */ function set_payed($rowid) { @@ -225,16 +228,15 @@ class ChargeSociales { /** - * Renvoi le staut sous forme de libellé d'une charge - * + * \brief Renvoi le staut de la charge sous forme de libellé + * \return string libellé du statut */ function getLibStatut() { - if ($this->paye == 0) { return "Non Payé"; } - else { return "Payé"; } + global $langs; + + if ($this->paye == 0) { return $langs->trans("Unpayed"); } + else { return $langs->trans("Payed"); } } } -/* -* $Id$ -* $Source$ -*/ + ?> diff --git a/htdocs/compta/export/modules/compta.export.poivre.class.php b/htdocs/compta/export/modules/compta.export.poivre.class.php index e4bc964a0c2..eb316ccac25 100644 --- a/htdocs/compta/export/modules/compta.export.poivre.class.php +++ b/htdocs/compta/export/modules/compta.export.poivre.class.php @@ -82,7 +82,7 @@ class ComptaExportPoivre $this->Agregate($linec); - $this->db->query("BEGIN"); + $this->db->begin(); $dt = strftime('EC%y%m', time()); @@ -303,12 +303,12 @@ class ComptaExportPoivre if (!$error) { - $this->db->query("COMMIT"); + $this->db->commit(); dolibarr_syslog("ComptaExportPoivre::Export COMMIT"); } else { - $this->db->query("ROLLBACK"); + $this->db->rollback(); dolibarr_syslog("ComptaExportPoivre::Export ROLLBACK"); } diff --git a/htdocs/compta/sociales/charges.php b/htdocs/compta/sociales/charges.php index 3bff81ea35e..5ad88400744 100644 --- a/htdocs/compta/sociales/charges.php +++ b/htdocs/compta/sociales/charges.php @@ -1,5 +1,5 @@ +/* Copyright (C) 2004-2005 Laurent Destailleur * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -20,7 +20,7 @@ * */ -/*! +/** \file htdocs/compta/sociales/charges.php \ingroup compta \brief Fiche d'une charge sociale @@ -183,7 +183,7 @@ if ($chid > 0) // Supprimer if ($cha->paye == 0 && $totalpaye <=0 && $user->rights->compta->charges) { - print "id&action=delete\">".$langs->trans("Delete").""; + print "id&action=delete\">".$langs->trans("Delete").""; } // Emettre paiement diff --git a/htdocs/societe.class.php b/htdocs/societe.class.php index 160e6b5e070..29914d77b26 100644 --- a/htdocs/societe.class.php +++ b/htdocs/societe.class.php @@ -447,8 +447,8 @@ class Societe { } /** - * \brief Suppression d'une societe de la base - * \todo Cette fonction n'est pas utilisée. Attente des contraintes d'intégrité dans MySql + * \brief Suppression d'une societe de la base avec ses dépendances (contacts, rib...) + * \param id id de la societe à supprimer */ function delete($id) @@ -456,7 +456,7 @@ class Societe { dolibarr_syslog("Societe::Delete"); $sqr = 0; - if ( $this->db->query("BEGIN") ) + if ( $this->db->begin()) { $sql = "DELETE from ".MAIN_DB_PREFIX."socpeople "; $sql .= " WHERE fk_soc = " . $id .";"; @@ -500,7 +500,7 @@ class Societe { if ($sqr == 3) { - $this->db->query("COMMIT"); + $this->db->commit(); // Suppression du répertoire document $docdir = $conf->societe->dir_output . "/" . $id; @@ -514,7 +514,7 @@ class Societe { } else { - $this->db->query("ROLLBACK"); + $this->db->rollback(); return -1; } }