diff --git a/htdocs/accountancy/class/bookkeeping.class.php b/htdocs/accountancy/class/bookkeeping.class.php index 6291790d008..a3a760b0570 100644 --- a/htdocs/accountancy/class/bookkeeping.class.php +++ b/htdocs/accountancy/class/bookkeeping.class.php @@ -221,7 +221,7 @@ class BookKeeping * Insert line into bookkeeping * * @param User $user User who inserted operation - * @return $result Result + * @return int <0 KO >0 OK */ function create($user='') { @@ -276,8 +276,9 @@ class BookKeeping } $now = dol_now(); - if (empty($this->date_create)) - $this->date_create = $now(); + if (empty($this->date_create)) { + $this->date_create = $now; + } $sql = "INSERT INTO " . MAIN_DB_PREFIX . "accounting_bookkeeping (doc_date, "; $sql .= "doc_type, doc_ref,fk_doc,fk_docdet,code_tiers,numero_compte,label_compte,"; @@ -330,23 +331,19 @@ class BookKeeping $sql .= " WHERE import_key = '" . $importkey . "'"; $resql = $this->db->query($sql); - if (! $resql) { - $error ++; - $this->errors[] = "Error " . $this->db->lasterror(); - } - // Commit or rollback - if ($error) { + if (! $resql) { + $this->errors[] = "Error " . $this->db->lasterror(); foreach ( $this->errors as $errmsg ) { dol_syslog(get_class($this) . "::delete " . $errmsg, LOG_ERR); $this->error .= ($this->error ? ', ' . $errmsg : $errmsg); } $this->db->rollback(); - return - 1 * $error; - } else { - $this->db->commit(); - return 1; + return - 1; } + + $this->db->commit(); + return 1; } /** @@ -595,16 +592,13 @@ class BookKeeping $this->db->begin(); - if (! $error) - { - if (! $notrigger) - { - // Call trigger - $result=$this->call_trigger('ACCOUNTING_NUMPIECE_DELETE',$user); - if ($result < 0) $error++; - // End call triggers - } - } +// if (! $notrigger) +// { +// // Call trigger +// $result=$this->call_trigger('ACCOUNTING_NUMPIECE_DELETE',$user); +// if ($result < 0) $error++; +// // End call triggers +// } if (! $error) { $sql = "DELETE FROM " . MAIN_DB_PREFIX . "accounting_bookkeeping"; diff --git a/htdocs/adherents/class/adherent.class.php b/htdocs/adherents/class/adherent.class.php index 8c8c2d604ca..8b1a456ee79 100644 --- a/htdocs/adherents/class/adherent.class.php +++ b/htdocs/adherents/class/adherent.class.php @@ -45,7 +45,10 @@ class Adherent extends CommonObject var $mesgs; var $id; + var $ref; + public $ref_ext; + var $civility_id; var $firstname; var $lastname; @@ -107,6 +110,7 @@ class Adherent extends CommonObject var $oldcopy; // To contains a clone of this when we need to save old properties of object + public $entity; /** * Constructor @@ -1237,7 +1241,7 @@ class Adherent extends CommonObject /** * Insert subscription into database and eventually add links to banks, mailman, etc... * - * @param timestamp $date Date of effect of subscription + * @param int $date Date of effect of subscription * @param double $montant Amount of subscription (0 accepted for some members) * @param int $accountid Id bank account * @param string $operation Type operation (if Id bank account provided) @@ -1245,7 +1249,7 @@ class Adherent extends CommonObject * @param string $num_chq Numero cheque (if Id bank account provided) * @param string $emetteur_nom Name of cheque writer * @param string $emetteur_banque Name of bank of cheque - * @param timestamp $datesubend Date end subscription + * @param int $datesubend Date end subscription * @return int rowid of record added, <0 if KO */ function cotisation($date, $montant, $accountid=0, $operation='', $label='', $num_chq='', $emetteur_nom='', $emetteur_banque='', $datesubend=0) @@ -1601,7 +1605,7 @@ class Adherent extends CommonObject * * @param int $statut Id statut * @param int $need_subscription 1 si type adherent avec cotisation, 0 sinon - * @param timestamp $date_end_subscription Date fin adhesion + * @param int $date_end_subscription Date fin adhesion * @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto * @return string Label */ diff --git a/htdocs/adherents/class/adherent_type.class.php b/htdocs/adherents/class/adherent_type.class.php index 2d5f3d835be..5c340de1fdf 100644 --- a/htdocs/adherents/class/adherent_type.class.php +++ b/htdocs/adherents/class/adherent_type.class.php @@ -60,7 +60,7 @@ class AdherentType extends CommonObject * Fonction qui permet de creer le status de l'adherent * * @param User $user User making creation - * @return >0 if OK, < 0 if KO + * @return int >0 if OK, < 0 if KO */ function create($user) { @@ -248,13 +248,13 @@ class AdherentType extends CommonObject $i++; } } - return $projets; } else { print $this->db->error(); } + return $projets; } @@ -287,7 +287,7 @@ class AdherentType extends CommonObject /** * getMailOnValid * - * @return Return mail model + * @return string Return mail model */ function getMailOnValid() { @@ -306,7 +306,7 @@ class AdherentType extends CommonObject /** * getMailOnSubscription * - * @return Return mail model + * @return string Return mail model */ function getMailOnSubscription() { @@ -325,7 +325,7 @@ class AdherentType extends CommonObject /** * getMailOnResiliate * - * @return Return mail model + * @return string Return mail model */ function getMailOnResiliate() { diff --git a/htdocs/core/class/html.formfile.class.php b/htdocs/core/class/html.formfile.class.php index 34f6418de34..4f1de4cfbb0 100644 --- a/htdocs/core/class/html.formfile.class.php +++ b/htdocs/core/class/html.formfile.class.php @@ -307,10 +307,6 @@ class FormFile include_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php'; $modellist=ModeleThirdPartyDoc::liste_modeles($this->db); } - } - else if ($modulepart == 'agenda') - { - null; } else if ($modulepart == 'propal') { @@ -442,7 +438,7 @@ class FormFile { $modellist=''; } - else + else if ($modulepart != 'agenda') { // For normalized standard modules $file=dol_buildpath('/core/modules/'.$modulepart.'/modules_'.$modulepart.'.php',0);