Update and standardize code

This commit is contained in:
Philippe GRAND 2018-08-22 18:12:44 +02:00
parent 6542dcf0bd
commit 449ef9c464
16 changed files with 78 additions and 6 deletions

View File

@ -35,14 +35,17 @@ class BookKeeping extends CommonObject
* @var string Error code (or message)
*/
public $error;
/**
* @var string[] Error codes (or messages)
*/
public $errors = array ();
public $errors = array();
/**
* @var string Id to identify managed objects
*/
public $element = 'accountingbookkeeping';
/**
* @var string Name of table without prefix where object is stored
*/

View File

@ -42,7 +42,12 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
class Adherent extends CommonObject
{
public $element='member';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='adherent';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
var $mesgs;

View File

@ -32,7 +32,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
*/
class AdherentType extends CommonObject
{
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'adherent_type';
public $element = 'adherent_type';
public $picto = 'group';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe

View File

@ -32,7 +32,10 @@ include_once DOL_DOCUMENT_ROOT . '/adherents/class/subscription.class.php';
*/
class AdherentStats extends Stats
{
public $table_element;
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element;
var $socid;
var $userid;

View File

@ -33,7 +33,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
class Subscription extends CommonObject
{
public $element='subscription';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='subscription';
public $picto='payment';
var $datec; // Date creation

View File

@ -35,18 +35,22 @@ class Asset extends CommonObject
* @var string ID to identify managed object
*/
public $element = 'asset';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'asset';
/**
* @var int Does module support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
*/
public $ismultientitymanaged = 0;
/**
* @var int Does asset support extrafields ? 0=No, 1=Yes
*/
public $isextrafieldmanaged = 1;
/**
* @var string String with name of icon for asset. Must be the part after the 'object_' into object_asset.png
*/

View File

@ -29,7 +29,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
*/
class AssetType extends CommonObject
{
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'asset_type';
public $element = 'asset_type';
public $picto = 'group';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe

View File

@ -29,7 +29,12 @@
class Bookmark extends CommonObject
{
public $element='bookmark';
public $table_element='bookmark';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='bookmark';
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $picto = 'bookmark';

View File

@ -149,6 +149,10 @@ class Categorie extends CommonObject
);
public $element='category';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='categorie';
public $fk_parent;

View File

@ -35,7 +35,12 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
class ActionComm extends CommonObject
{
public $element='action';
public $table_element = 'actioncomm';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'actioncomm';
public $table_rowid = 'id';
public $picto='action';

View File

@ -34,14 +34,17 @@ class ActionCommReminder extends CommonObject
* @var string ID to identify managed object
*/
public $element = 'actioncomm_reminder';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element = 'actioncomm_reminder';
/**
* @var array Does actioncommreminder support multicompany module ? 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
*/
public $ismultientitymanaged = 0;
/**
* @var string String with name of icon for actioncommreminder. Must be the part after the 'object_' into object_actioncommreminder.png
*/

View File

@ -32,7 +32,12 @@ require_once DOL_DOCUMENT_ROOT .'/core/class/commonobject.class.php';
class Mailing extends CommonObject
{
public $element='mailing';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='mailing';
public $picto='email';
var $titre;

View File

@ -46,15 +46,22 @@ require_once DOL_DOCUMENT_ROOT .'/multicurrency/class/multicurrency.class.php';
class Propal extends CommonObject
{
public $element='propal';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='propal';
public $table_element_line='propaldet';
public $fk_element='fk_propal';
public $picto='propal';
/**
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
* @var int
*/
public $ismultientitymanaged = 1;
/**
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
* @var integer
@ -3650,6 +3657,10 @@ class Propal extends CommonObject
class PropaleLigne extends CommonObjectLine
{
public $element='propaldet';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='propaldet';
var $oldline;

View File

@ -35,7 +35,10 @@ include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
*/
class PropaleStats extends Stats
{
public $table_element;
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element;
var $socid;
var $userid;

View File

@ -43,7 +43,12 @@ require_once DOL_DOCUMENT_ROOT .'/multicurrency/class/multicurrency.class.php';
class Commande extends CommonOrder
{
public $element='commande';
public $table_element='commande';
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='commande';
public $table_element_line = 'commandedet';
public $class_element_line = 'OrderLine';
public $fk_element = 'fk_commande';

View File

@ -34,6 +34,9 @@ include_once DOL_DOCUMENT_ROOT . '/core/lib/date.lib.php';
*/
class CommandeStats extends Stats
{
/**
* @var string Name of table without prefix where object is stored
*/
public $table_element;
var $socid;