Merge pull request #9677 from grandoc/new_branch_04_10_2018

Standardize and update code
This commit is contained in:
Laurent Destailleur 2018-10-04 18:33:24 +02:00 committed by GitHub
commit 20f45db6b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
10 changed files with 89 additions and 79 deletions

View File

@ -38,18 +38,18 @@ class AccountancySystem
*/
public $error='';
var $rowid;
var $fk_pcg_version;
var $pcg_type;
var $pcg_subtype;
public $rowid;
public $fk_pcg_version;
public $pcg_type;
public $pcg_subtype;
/**
* @var string Accountancy System label
*/
public $label;
var $account_number;
var $account_parent;
public $account_number;
public $account_parent;
/**
* Constructor

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2012 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2012-2018 Philippe Grand <philippe.grand@atoo-net.com>
*
* 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,20 +20,20 @@
/**
* \file htdocs/adherents/canvas/default/actions_adherentcard_default.class.php
* \ingroup member
* \brief Fichier de la classe Thirdparty adherent card controller (default canvas)
* \brief File of class Thirdparty member card controller (default canvas)
*/
include_once DOL_DOCUMENT_ROOT.'/adherents/canvas/actions_adherentcard_common.class.php';
/**
* \class ActionsAdherentCardDefault
* \brief Classe permettant la gestion des adherents par defaut
* \brief Class allowing the management of the members by default
*/
class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
{
/**
* Constructor
*
* @param DoliDB $db Handler acces base de donnees
* @param DoliDB $db Handler acces data base
* @param string $dirmodule Name of directory of module
* @param string $targetmodule Name of directory of module where canvas is stored
* @param string $canvas Name of canvas
@ -51,7 +51,7 @@ class ActionsAdherentCardDefault extends ActionsAdherentCardCommon
/**
* Return the title of card
*
* @param string $action Code action
* @param string $action Action code
* @return string Title
*/
private function getTitle($action)

View File

@ -216,7 +216,7 @@ class Facture extends CommonInvoice
const TYPE_SITUATION = 5;
/**
* Draft
* Draft status
*/
const STATUS_DRAFT = 0;

View File

@ -62,7 +62,7 @@ abstract class CommonInvoice extends CommonObject
const TYPE_SITUATION = 5;
/**
* Draft
* Draft status
*/
const STATUS_DRAFT = 0;

View File

@ -59,10 +59,10 @@ class Events // extends CommonObject
*/
public $error='';
var $tms;
var $type;
var $entity;
var $dateevent;
public $tms;
public $type;
public $entity;
public $dateevent;
/**
* @var string description
@ -70,7 +70,7 @@ class Events // extends CommonObject
public $description;
// List of all Audit/Security events supported by triggers
var $eventstolog=array(
public $eventstolog=array(
/*array('id'=>'USER_LOGIN', 'test'=>1),
array('id'=>'USER_LOGIN_FAILED', 'test'=>1),
array('id'=>'USER_LOGOUT', 'test'=>1),*/

View File

@ -117,9 +117,19 @@ class Expedition extends CommonObject
public $meths;
public $listmeths; // List of carriers
/**
* Draft status
*/
const STATUS_DRAFT = 0;
/**
* Validated status
*/
const STATUS_VALIDATED = 1;
/**
* Closed status
*/
const STATUS_CLOSED = 2;

View File

@ -104,8 +104,8 @@ class ExpenseReport extends CommonObject
END ACTIONS
*/
/**
* Draft
/**
* Draft status
*/
const STATUS_DRAFT = 0;

View File

@ -43,50 +43,50 @@ class Holiday extends CommonObject
public $table_element='holiday';
public $ismultientitymanaged = 0; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
var $fk_element = 'fk_holiday';
public $fk_element = 'fk_holiday';
public $picto = 'holiday';
/**
* @deprecated
* @see id
*/
var $rowid;
public $rowid;
/**
* @var int User ID
*/
public $fk_user;
var $date_create='';
public $date_create='';
/**
* @var string description
*/
public $description;
var $date_debut=''; // Date start in PHP server TZ
var $date_fin=''; // Date end in PHP server TZ
var $date_debut_gmt=''; // Date start in GMT
var $date_fin_gmt=''; // Date end in GMT
var $halfday=''; // 0:Full days, 2:Start afternoon end morning, -1:Start afternoon end afternoon, 1:Start morning end morning
var $statut=''; // 1=draft, 2=validated, 3=approved
var $fk_validator;
var $date_valid='';
var $fk_user_valid;
var $date_refuse='';
var $fk_user_refuse;
var $date_cancel='';
var $fk_user_cancel;
var $detail_refuse='';
var $fk_type;
public $date_debut=''; // Date start in PHP server TZ
public $date_fin=''; // Date end in PHP server TZ
public $date_debut_gmt=''; // Date start in GMT
public $date_fin_gmt=''; // Date end in GMT
public $halfday=''; // 0:Full days, 2:Start afternoon end morning, -1:Start afternoon end afternoon, 1:Start morning end morning
public $statut=''; // 1=draft, 2=validated, 3=approved
public $fk_validator;
public $date_valid='';
public $fk_user_valid;
public $date_refuse='';
public $fk_user_refuse;
public $date_cancel='';
public $fk_user_cancel;
public $detail_refuse='';
public $fk_type;
var $holiday = array();
var $events = array();
var $logs = array();
public $holiday = array();
public $events = array();
public $logs = array();
var $optName = '';
var $optValue = '';
var $optRowid = '';
public $optName = '';
public $optValue = '';
public $optRowid = '';
/**
* Draft status

View File

@ -60,23 +60,23 @@ class Entrepot extends CommonObject
*/
const STATUS_OPEN_INTERNAL = 2;
var $libelle;
public $libelle;
/**
* @var string description
*/
public $description;
var $statut;
var $lieu;
var $address;
public $statut;
public $lieu;
public $address;
//! Code Postal
var $zip;
var $town;
var $fk_parent;
public $zip;
public $town;
public $fk_parent;
// List of short language codes for status
var $statuts = array();
public $statuts = array();
/**
* Constructor

View File

@ -61,37 +61,37 @@ class Task extends CommonObject
*/
public $description;
var $duration_effective; // total of time spent on this task
var $planned_workload;
var $date_c;
var $date_start;
var $date_end;
var $progress;
var $fk_statut;
var $priority;
var $fk_user_creat;
var $fk_user_valid;
var $rang;
public $duration_effective; // total of time spent on this task
public $planned_workload;
public $date_c;
public $date_start;
public $date_end;
public $progress;
public $fk_statut;
public $priority;
public $fk_user_creat;
public $fk_user_valid;
public $rang;
var $timespent_min_date;
var $timespent_max_date;
var $timespent_total_duration;
var $timespent_total_amount;
var $timespent_nblinesnull;
var $timespent_nblines;
public $timespent_min_date;
public $timespent_max_date;
public $timespent_total_duration;
public $timespent_total_amount;
public $timespent_nblinesnull;
public $timespent_nblines;
// For detail of lines of timespent record, there is the property ->lines in common
// Var used to call method addTimeSpent(). Bad practice.
var $timespent_id;
var $timespent_duration;
var $timespent_old_duration;
var $timespent_date;
var $timespent_datehour; // More accurate start date (same than timespent_date but includes hours, minutes and seconds)
var $timespent_withhour; // 1 = we entered also start hours for timesheet line
var $timespent_fk_user;
var $timespent_note;
public $timespent_id;
public $timespent_duration;
public $timespent_old_duration;
public $timespent_date;
public $timespent_datehour; // More accurate start date (same than timespent_date but includes hours, minutes and seconds)
public $timespent_withhour; // 1 = we entered also start hours for timesheet line
public $timespent_fk_user;
public $timespent_note;
var $comments = array();
public $comments = array();
public $oldcopy;