Merge pull request #15263 from frederic34/patch-6

doxygen
This commit is contained in:
Laurent Destailleur 2020-11-02 20:13:00 +01:00 committed by GitHub
commit a876c59587
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,6 +1,6 @@
<?php <?php
/* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr> /* Copyright (C) 2015 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2020 Frédéric France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -75,6 +75,9 @@ class Establishment extends CommonObject
*/ */
public $rowid; public $rowid;
/**
* @var string Label
*/
public $label; public $label;
/** /**
@ -82,9 +85,21 @@ class Establishment extends CommonObject
*/ */
public $address; public $address;
/**
* @var string Zip
*/
public $zip; public $zip;
/**
* @var string Town
*/
public $town; public $town;
/**
* @var int country id
*/
public $country_id;
/** /**
* @var int Status 0=open, 1=closed * @var int Status 0=open, 1=closed
*/ */
@ -95,8 +110,20 @@ class Establishment extends CommonObject
*/ */
public $entity; public $entity;
public $country_id; /**
* @var int user mod id
*/
public $fk_user_mod;
/**
* @var int user author id
*/
public $fk_user_author;
/**
* @var int date create
*/
public $datec;
const STATUS_OPEN = 1; const STATUS_OPEN = 1;
const STATUS_CLOSED = 0; const STATUS_CLOSED = 0;
@ -148,6 +175,7 @@ class Establishment extends CommonObject
$now = dol_now(); $now = dol_now();
// Clean parameters // Clean parameters
$this->label = trim($this->label);
$this->address = trim($this->address); $this->address = trim($this->address);
$this->zip = trim($this->zip); $this->zip = trim($this->zip);
$this->town = trim($this->town); $this->town = trim($this->town);
@ -189,10 +217,6 @@ class Establishment extends CommonObject
$this->errors[] = "Error ".$this->db->lasterror(); $this->errors[] = "Error ".$this->db->lasterror();
} }
if (!$error) {
$this->id = $this->db->last_insert_id(MAIN_DB_PREFIX."establishment");
}
// Commit or rollback // Commit or rollback
if ($error) { if ($error) {
foreach ($this->errors as $errmsg) { foreach ($this->errors as $errmsg) {