Skip to content

Commit

Permalink
Standardize and update code
Browse files Browse the repository at this point in the history
  • Loading branch information
grandoc committed Sep 5, 2018
1 parent 38ca609 commit 11d7557
Show file tree
Hide file tree
Showing 17 changed files with 86 additions and 25 deletions.
10 changes: 7 additions & 3 deletions htdocs/contact/class/contact.class.php
Expand Up @@ -41,13 +41,17 @@ class Contact extends CommonObject
* @var string ID to identify managed object
*/
public $element='contact';

/**
* @var string Name of table without prefix where object is stored
*/
public $table_element='socpeople';

public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'contact';


Expand Down Expand Up @@ -726,7 +730,7 @@ function fetch($id, $user=0, $ref_ext='')

$this->date_creation = $this->db->jdate($obj->date_creation);
$this->date_modification = $this->db->jdate($obj->date_modification);

$this->fk_departement = $obj->fk_departement; // deprecated
$this->state_id = $obj->fk_departement;
$this->departement_code = $obj->state_code; // deprecated
Expand Down
5 changes: 4 additions & 1 deletion htdocs/contrat/class/contrat.class.php
Expand Up @@ -61,7 +61,10 @@ class Contrat extends CommonObject
*/
public $fk_element='fk_contrat';

public $picto='contract';
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto='contract';

/**
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
Expand Down
4 changes: 4 additions & 0 deletions htdocs/core/triggers/interface_20_all_Logevents.class.php
Expand Up @@ -31,7 +31,11 @@
*/
class InterfaceLogevents extends DolibarrTriggers
{
/**
* @var string Image of the trigger
*/
public $picto = 'technic';

public $family = 'core';
public $description = "Triggers of this module allows to add security event records inside Dolibarr.";
public $version = self::VERSION_DOLIBARR;
Expand Down
Expand Up @@ -32,7 +32,11 @@

class InterfaceWorkflowManager extends DolibarrTriggers
{
/**
* @var string Image of the trigger
*/
public $picto = 'technic';

public $family = 'core';
public $description = "Triggers of this module allows to manage workflows";
public $version = self::VERSION_DOLIBARR;
Expand Down
Expand Up @@ -37,6 +37,10 @@ class InterfaceActionsAuto extends DolibarrTriggers
public $family = 'agenda';
public $description = "Triggers of this module add actions in agenda according to setup made in agenda setup.";
public $version = self::VERSION_DOLIBARR;

/**
* @var string Image of the trigger
*/
public $picto = 'action';

/**
Expand Down
Expand Up @@ -33,6 +33,10 @@ class InterfaceActionsBlockedLog extends DolibarrTriggers
public $family = 'system';
public $description = "Triggers of this module add action for BlockedLog module.";
public $version = self::VERSION_DOLIBARR;

/**
* @var string Image of the trigger
*/
public $picto = 'technic';

/**
Expand Down
Expand Up @@ -34,6 +34,10 @@ class InterfaceLdapsynchro extends DolibarrTriggers
public $family = 'ldap';
public $description = "Triggers of this module allows to synchronize Dolibarr toward a LDAP database.";
public $version = self::VERSION_DOLIBARR;

/**
* @var string Image of the trigger
*/
public $picto = 'technic';

/**
Expand Down
Expand Up @@ -32,6 +32,10 @@ class InterfaceMailmanSpipsynchro extends DolibarrTriggers
public $family = 'mailmanspip';
public $description = "Triggers of this module allows to synchronize Mailman an Spip.";
public $version = self::VERSION_DOLIBARR;

/**
* @var string Image of the trigger
*/
public $picto = 'technic';

/**
Expand Down
Expand Up @@ -33,9 +33,13 @@ class InterfaceNotification extends DolibarrTriggers
public $family = 'notification';
public $description = "Triggers of this module send email notifications according to Notification module setup.";
public $version = self::VERSION_DOLIBARR;

/**
* @var string Image of the trigger
*/
public $picto = 'email';

var $listofmanagedevents=array(
public $listofmanagedevents=array(
'BILL_VALIDATE',
'BILL_PAYED',
'ORDER_VALIDATE',
Expand Down
5 changes: 4 additions & 1 deletion htdocs/cron/class/cronjob.class.php
Expand Up @@ -40,7 +40,10 @@ class Cronjob extends CommonObject
*/
public $table_element='cronjob';

public $picto = 'cron';
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'cron';

/**
* @var int Entity
Expand Down
6 changes: 5 additions & 1 deletion htdocs/don/class/don.class.php
Expand Up @@ -50,7 +50,11 @@ class Don extends CommonObject
public $fk_element = 'fk_donation';

public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
public $picto = 'generic';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'generic';

public $date;
public $amount;
Expand Down
5 changes: 4 additions & 1 deletion htdocs/don/class/paymentdonation.class.php
Expand Up @@ -39,7 +39,10 @@ class PaymentDonation extends CommonObject
*/
public $table_element='payment_donation';

public $picto = 'payment';
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'payment';

/**
* @var int ID
Expand Down
3 changes: 3 additions & 0 deletions htdocs/ecm/class/ecmdirectory.class.php
Expand Up @@ -37,6 +37,9 @@ class EcmDirectory // extends CommonObject
*/
//public $table_element='ecm_directories';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'dir';

/**
Expand Down
3 changes: 3 additions & 0 deletions htdocs/ecm/class/ecmfiles.class.php
Expand Up @@ -46,6 +46,9 @@ class EcmFiles extends CommonObject
*/
public $table_element = 'ecm_files';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'generic';

/**
Expand Down
4 changes: 4 additions & 0 deletions htdocs/expedition/class/expedition.class.php
Expand Up @@ -62,6 +62,10 @@ class Expedition extends CommonObject
public $table_element_line="expeditiondet";

public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'sending';

public $socid;
Expand Down
37 changes: 20 additions & 17 deletions htdocs/expensereport/class/paymentexpensereport.class.php
Expand Up @@ -40,24 +40,27 @@ class PaymentExpenseReport extends CommonObject
*/
public $table_element='payment_expensereport';

public $picto = 'payment';

var $rowid;

var $fk_expensereport;
var $datec='';
var $tms='';
var $datep='';
var $amount; // Total amount of payment
var $amounts=array(); // Array of amounts
var $fk_typepayment;
var $num_payment;
var $fk_bank;
var $fk_user_creat;
var $fk_user_modif;
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'payment';

public $rowid;

public $fk_expensereport;
public $datec='';
public $tms='';
public $datep='';
public $amount; // Total amount of payment
public $amounts=array(); // Array of amounts
public $fk_typepayment;
public $num_payment;
public $fk_bank;
public $fk_user_creat;
public $fk_user_modif;
//Unknow field
var $chid;
var $total;
public $chid;
public $total;

/**
* Constructor
Expand Down
3 changes: 3 additions & 0 deletions htdocs/fichinter/class/fichinter.class.php
Expand Up @@ -55,6 +55,9 @@ class Fichinter extends CommonObject
*/
public $table_element_line='fichinterdet';

/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'intervention';

/**
Expand Down

0 comments on commit 11d7557

Please sign in to comment.