move phpcs:ignore
This commit is contained in:
parent
04c1a7d4af
commit
2a5c994009
@ -132,6 +132,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function sending an email has the adherent with the text supplied in parameter.
|
||||
*
|
||||
@ -147,9 +148,9 @@ class Adherent extends CommonObject
|
||||
* @param string $errors_to erros to
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function send_an_email($text, $subject, $filename_list=array(), $mimetype_list=array(), $mimefilename_list=array(), $addr_cc="", $addr_bcc="", $deliveryreceipt=0, $msgishtml=-1, $errors_to='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
|
||||
// Detect if message is HTML
|
||||
@ -638,6 +639,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Update denormalized last subscription date.
|
||||
* This function is called when we delete a subscription for example.
|
||||
@ -645,9 +647,9 @@ class Adherent extends CommonObject
|
||||
* @param User $user User making change
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function update_end_date($user)
|
||||
{
|
||||
// phpcs:enable
|
||||
$this->db->begin();
|
||||
|
||||
// Search for last subscription id and end date
|
||||
@ -993,15 +995,16 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Method to load member from its login
|
||||
*
|
||||
* @param string $login login of member
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function fetch_login($login)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent";
|
||||
@ -1023,6 +1026,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Method to load member from its name
|
||||
*
|
||||
@ -1030,9 +1034,9 @@ class Adherent extends CommonObject
|
||||
* @param string $lastname Lastname
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function fetch_name($firstname,$lastname)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$sql = "SELECT rowid FROM ".MAIN_DB_PREFIX."adherent";
|
||||
@ -1195,6 +1199,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fonction qui recupere pour un adherent les parametres
|
||||
* first_subscription_date
|
||||
@ -1204,9 +1209,9 @@ class Adherent extends CommonObject
|
||||
*
|
||||
* @return int <0 si KO, >0 si OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function fetch_subscriptions()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
|
||||
@ -1750,14 +1755,15 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to add member into external tools mailing-list, spip, etc.
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function add_to_abo()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
|
||||
@ -1808,14 +1814,15 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Function to delete a member from external tools like mailing-list, spip, etc.
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function del_to_abo()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/mailmanspip/class/mailmanspip.class.php';
|
||||
@ -1988,6 +1995,7 @@ class Adherent extends CommonObject
|
||||
return $this->LibStatut($this->statut,$this->need_subscription,$this->datefin,$mode);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoi le libelle d'un statut donne
|
||||
*
|
||||
@ -1997,9 +2005,9 @@ class Adherent extends CommonObject
|
||||
* @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
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LibStatut($statut,$need_subscription,$date_end_subscription,$mode=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
$langs->load("members");
|
||||
if ($mode == 0)
|
||||
@ -2013,7 +2021,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
if ($statut == 0) return $langs->trans("MemberStatusResiliated");
|
||||
}
|
||||
if ($mode == 1)
|
||||
elseif ($mode == 1)
|
||||
{
|
||||
if ($statut == -1) return $langs->trans("MemberStatusDraftShort");
|
||||
if ($statut >= 1)
|
||||
@ -2024,7 +2032,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
if ($statut == 0) return $langs->trans("MemberStatusResiliatedShort");
|
||||
}
|
||||
if ($mode == 2)
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraftShort");
|
||||
if ($statut >= 1)
|
||||
@ -2035,7 +2043,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliatedShort");
|
||||
}
|
||||
if ($mode == 3)
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0');
|
||||
if ($statut >= 1)
|
||||
@ -2046,7 +2054,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5');
|
||||
}
|
||||
if ($mode == 4)
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($statut == -1) return img_picto($langs->trans('MemberStatusDraft'),'statut0').' '.$langs->trans("MemberStatusDraft");
|
||||
if ($statut >= 1)
|
||||
@ -2057,7 +2065,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
if ($statut == 0) return img_picto($langs->trans('MemberStatusResiliated'),'statut5').' '.$langs->trans("MemberStatusResiliated");
|
||||
}
|
||||
if ($mode == 5)
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0');
|
||||
if ($statut >= 1)
|
||||
@ -2068,7 +2076,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
if ($statut == 0) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusResiliated").' </span>'.img_picto($langs->trans('MemberStatusResiliated'),'statut5');
|
||||
}
|
||||
if ($mode == 6)
|
||||
elseif ($mode == 6)
|
||||
{
|
||||
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'),'statut0');
|
||||
if ($statut >= 1)
|
||||
@ -2082,14 +2090,15 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Charge indicateurs this->nb de tableau de bord
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function load_state_board()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$this->nb=array();
|
||||
@ -2117,15 +2126,16 @@ class Adherent extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Load indicators for dashboard (this->nbtodo and this->nbtodolate)
|
||||
*
|
||||
* @param User $user Objet user
|
||||
* @return WorkboardResponse|int <0 if KO, WorkboardResponse if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function load_board($user)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
if ($user->societe_id) return -1; // protection pour eviter appel par utilisateur externe
|
||||
@ -2260,6 +2270,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
|
||||
*
|
||||
@ -2269,9 +2280,9 @@ class Adherent extends CommonObject
|
||||
* 2=Return key only (uid=qqq)
|
||||
* @return string DN
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _load_ldap_dn($info,$mode=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$dn='';
|
||||
if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS."=".$info[$conf->global->LDAP_KEY_MEMBERS].",".$conf->global->LDAP_MEMBER_DN;
|
||||
@ -2281,14 +2292,15 @@ class Adherent extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Initialise tableau info (tableau des attributs LDAP)
|
||||
*
|
||||
* @return array Tableau info des attributs
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _load_ldap_info()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
|
||||
$info=array();
|
||||
|
||||
@ -36,12 +36,12 @@ class AdherentType extends CommonObject
|
||||
* @var string Name of table without prefix where object is stored
|
||||
*/
|
||||
public $table_element = 'adherent_type';
|
||||
|
||||
|
||||
/**
|
||||
* @var string ID to identify managed object
|
||||
*/
|
||||
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
|
||||
|
||||
@ -290,14 +290,15 @@ class AdherentType extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of members' type
|
||||
*
|
||||
* @return array List of types of members
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function liste_array()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
|
||||
$adherenttypes = array();
|
||||
@ -422,6 +423,7 @@ class AdherentType extends CommonObject
|
||||
return '';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Retourne chaine DN complete dans l'annuaire LDAP pour l'objet
|
||||
*
|
||||
@ -431,9 +433,9 @@ class AdherentType extends CommonObject
|
||||
* 2=Return key only (uid=qqq)
|
||||
* @return string DN
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _load_ldap_dn($info,$mode=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
$dn='';
|
||||
if ($mode==0) $dn=$conf->global->LDAP_KEY_MEMBERS_TYPES."=".$info[$conf->global->LDAP_KEY_MEMBERS_TYPES].",".$conf->global->LDAP_MEMBER_TYPE_DN;
|
||||
@ -443,14 +445,15 @@ class AdherentType extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Initialize the info array (array of LDAP values) that will be used to call LDAP functions
|
||||
*
|
||||
* @return array Tableau info des attributs
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function _load_ldap_info()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
|
||||
$info=array();
|
||||
|
||||
@ -36,12 +36,12 @@ class Subscription extends CommonObject
|
||||
* @var string ID to identify managed object
|
||||
*/
|
||||
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
|
||||
@ -363,15 +363,16 @@ class Subscription extends CommonObject
|
||||
return '';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoi le libelle d'un statut donne
|
||||
*
|
||||
* @param int $statut Id statut
|
||||
* @return string Label
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LibStatut($statut)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
$langs->load("members");
|
||||
return '';
|
||||
|
||||
@ -163,15 +163,16 @@ class Dolistore
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return tree of Dolistore categories. $this->categories must have been loaded before.
|
||||
*
|
||||
* @param int $parent Id of parent category
|
||||
* @return string
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_categories($parent = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (!isset($this->categories)) die('not possible');
|
||||
if ($parent != 0) {
|
||||
$html = '<ul>';
|
||||
@ -211,14 +212,15 @@ class Dolistore
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of product formated for output
|
||||
*
|
||||
* @return string HTML output
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_products()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs, $conf;
|
||||
$html = "";
|
||||
$parity = "pair";
|
||||
@ -293,38 +295,41 @@ class Dolistore
|
||||
return $html;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* get previous link
|
||||
*
|
||||
* @param string $text symbol previous
|
||||
* @return string html previous link
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_previous_link($text = '<<')
|
||||
{
|
||||
// phpcs:enable
|
||||
return '<a href="'.$this->get_previous_url().'" class="button">'.$text.'</a>';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* get next link
|
||||
*
|
||||
* @param string $text symbol next
|
||||
* @return string html next link
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_next_link($text = '>>')
|
||||
{
|
||||
// phpcs:enable
|
||||
return '<a href="'.$this->get_next_url().'" class="button">'.$text.'</a>';
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* get previous url
|
||||
*
|
||||
* @return string previous url
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_previous_url()
|
||||
function get_previous_url()
|
||||
{
|
||||
// phpcs:enable
|
||||
$param_array = array();
|
||||
if ($this->start < $this->per_page) {
|
||||
$sub = 0;
|
||||
@ -340,14 +345,15 @@ class Dolistore
|
||||
return $this->url."&".$param;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* get next url
|
||||
*
|
||||
* @return string next url
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function get_next_url()
|
||||
{
|
||||
// phpcs:enable
|
||||
$param_array = array();
|
||||
if (count($this->products) < $this->per_page) {
|
||||
$add = 0;
|
||||
@ -363,6 +369,7 @@ class Dolistore
|
||||
return $this->url."&".$param;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* version compare
|
||||
*
|
||||
@ -370,9 +377,9 @@ class Dolistore
|
||||
* @param string $v2 version 2
|
||||
* @return int result of compare
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function version_compare($v1, $v2)
|
||||
{
|
||||
// phpcs:enable
|
||||
$v1 = explode('.', $v1);
|
||||
$v2 = explode('.', $v2);
|
||||
$ret = 0;
|
||||
|
||||
@ -344,15 +344,16 @@ class Localtax extends CommonObject
|
||||
return $solde;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Total de la localtax des factures emises par la societe.
|
||||
*
|
||||
* @param int $year Year
|
||||
* @return int ???
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function localtax_sum_collectee($year = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = "SELECT sum(f.localtax) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture as f WHERE f.paye = 1";
|
||||
if ($year)
|
||||
@ -383,15 +384,16 @@ class Localtax extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* localtax payed
|
||||
*
|
||||
* @param int $year Year
|
||||
* @return int ???
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function localtax_sum_payee($year = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
|
||||
$sql = "SELECT sum(f.total_localtax) as total_localtax";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."facture_fourn as f";
|
||||
@ -424,6 +426,7 @@ class Localtax extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* localtax payed
|
||||
* Total de la localtax payed
|
||||
@ -431,9 +434,9 @@ class Localtax extends CommonObject
|
||||
* @param int $year Year
|
||||
* @return int ???
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function localtax_sum_reglee($year = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
|
||||
$sql = "SELECT sum(f.amount) as amount";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."localtax as f";
|
||||
@ -579,15 +582,16 @@ class Localtax extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Update the link betwen localtax payment and the line into llx_bank
|
||||
*
|
||||
* @param int $id Id bank account
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function update_fk_bank($id)
|
||||
{
|
||||
// phpcs:enable
|
||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'localtax SET fk_bank = '.$id;
|
||||
$sql.= ' WHERE rowid = '.$this->id;
|
||||
$result = $this->db->query($sql);
|
||||
@ -639,6 +643,7 @@ class Localtax extends CommonObject
|
||||
return $this->LibStatut($this->statut,$mode);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Renvoi le libelle d'un statut donne
|
||||
*
|
||||
@ -646,9 +651,9 @@ class Localtax extends CommonObject
|
||||
* @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 Libelle du statut
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LibStatut($status, $mode=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs; // TODO Renvoyer le libelle anglais et faire traduction a affichage
|
||||
|
||||
return '';
|
||||
|
||||
@ -36,12 +36,12 @@ class Holiday extends CommonObject
|
||||
* @var string ID to identify managed object
|
||||
*/
|
||||
public $element='holiday';
|
||||
|
||||
|
||||
/**
|
||||
* @var string Name of table without prefix where object is stored
|
||||
*/
|
||||
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 $picto = 'holiday';
|
||||
@ -921,6 +921,7 @@ class Holiday extends CommonObject
|
||||
return $this->LibStatut($this->statut, $mode, $this->date_debut);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Returns the label of a statut
|
||||
*
|
||||
@ -929,9 +930,9 @@ class Holiday extends CommonObject
|
||||
* @param date $startdate Date holiday should start
|
||||
* @return string Label
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LibStatut($statut, $mode=0, $startdate='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
if ($mode == 0)
|
||||
@ -942,7 +943,7 @@ class Holiday extends CommonObject
|
||||
if ($statut == 4) return $langs->trans('CancelCP');
|
||||
if ($statut == 5) return $langs->trans('RefuseCP');
|
||||
}
|
||||
if ($mode == 2)
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
$pictoapproved='statut6';
|
||||
if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
|
||||
@ -952,7 +953,7 @@ class Holiday extends CommonObject
|
||||
if ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5').' '.$langs->trans('CancelCP');
|
||||
if ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5').' '.$langs->trans('RefuseCP');
|
||||
}
|
||||
if ($mode == 3)
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
$pictoapproved='statut6';
|
||||
if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
|
||||
@ -962,7 +963,7 @@ class Holiday extends CommonObject
|
||||
if ($statut == 4) return img_picto($langs->trans('CancelCP'),'statut5');
|
||||
if ($statut == 5) return img_picto($langs->trans('RefuseCP'),'statut5');
|
||||
}
|
||||
if ($mode == 5)
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
$pictoapproved='statut6';
|
||||
if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
|
||||
@ -972,7 +973,7 @@ class Holiday extends CommonObject
|
||||
if ($statut == 4) return $langs->trans('CancelCP').' '.img_picto($langs->trans('CancelCP'),'statut5');
|
||||
if ($statut == 5) return $langs->trans('RefuseCP').' '.img_picto($langs->trans('RefuseCP'),'statut5');
|
||||
}
|
||||
if ($mode == 6)
|
||||
elseif ($mode == 6)
|
||||
{
|
||||
$pictoapproved='statut6';
|
||||
if (! empty($startdate) && $startdate > dol_now()) $pictoapproved='statut4';
|
||||
@ -1580,15 +1581,16 @@ class Holiday extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Return list of people with permission to validate leave requests.
|
||||
* Search for permission "approve leave requests"
|
||||
*
|
||||
* @return array Array of user ids
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function fetch_users_approver_holiday()
|
||||
{
|
||||
// phpcs:enable
|
||||
$users_validator=array();
|
||||
|
||||
$sql = "SELECT DISTINCT ur.fk_user";
|
||||
|
||||
@ -32,12 +32,12 @@ class Establishment extends CommonObject
|
||||
* @var string ID to identify managed object
|
||||
*/
|
||||
public $element='establishment';
|
||||
|
||||
|
||||
/**
|
||||
* @var string Name of table without prefix where object is stored
|
||||
*/
|
||||
public $table_element='establishment';
|
||||
|
||||
|
||||
public $table_element_line = '';
|
||||
public $fk_element = 'fk_establishment';
|
||||
public $ismultientitymanaged = 1; // 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
|
||||
@ -265,6 +265,7 @@ class Establishment extends CommonObject
|
||||
return $this->LibStatut($this->status,$mode);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Give a label from a status
|
||||
*
|
||||
@ -272,35 +273,35 @@ class Establishment extends CommonObject
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto
|
||||
* @return string Label
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LibStatut($status,$mode=0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $langs;
|
||||
|
||||
if ($mode == 0)
|
||||
{
|
||||
return $langs->trans($this->statuts[$status]);
|
||||
}
|
||||
if ($mode == 1)
|
||||
elseif ($mode == 1)
|
||||
{
|
||||
return $langs->trans($this->statuts_short[$status]);
|
||||
}
|
||||
if ($mode == 2)
|
||||
elseif ($mode == 2)
|
||||
{
|
||||
if ($status==0) return img_picto($langs->trans($this->statuts_short[$status]),'statut5').' '.$langs->trans($this->statuts_short[$status]);
|
||||
if ($status==1) return img_picto($langs->trans($this->statuts_short[$status]),'statut4').' '.$langs->trans($this->statuts_short[$status]);
|
||||
}
|
||||
if ($mode == 3)
|
||||
elseif ($mode == 3)
|
||||
{
|
||||
if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut5');
|
||||
if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut4');
|
||||
}
|
||||
if ($mode == 4)
|
||||
elseif ($mode == 4)
|
||||
{
|
||||
if ($status==0 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut5').' '.$langs->trans($this->statuts[$status]);
|
||||
if ($status==1 && ! empty($this->statuts_short[$status])) return img_picto($langs->trans($this->statuts_short[$status]),'statut4').' '.$langs->trans($this->statuts[$status]);
|
||||
}
|
||||
if ($mode == 5)
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($status==0 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut5');
|
||||
if ($status==1 && ! empty($this->statuts_short[$status])) return $langs->trans($this->statuts_short[$status]).' '.img_picto($langs->trans($this->statuts_short[$status]),'statut4');
|
||||
|
||||
@ -64,6 +64,7 @@ class ActionsCardProduct
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Assign custom values for canvas (for example into this->tpl to be used by templates)
|
||||
*
|
||||
@ -72,9 +73,9 @@ class ActionsCardProduct
|
||||
* @param string $ref Ref of object
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function assign_values(&$action, $id=0, $ref='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $limit, $offset, $sortfield, $sortorder;
|
||||
global $conf, $langs, $user, $mysoc, $canvas;
|
||||
global $form, $formproduct;
|
||||
@ -295,6 +296,7 @@ class ActionsCardProduct
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fetch datas list and save into ->list_datas
|
||||
*
|
||||
@ -304,9 +306,9 @@ class ActionsCardProduct
|
||||
* @param string $sortorder Sort order ('ASC' or 'DESC')
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
|
||||
$this->getFieldList();
|
||||
|
||||
@ -63,6 +63,7 @@ class ActionsCardService
|
||||
}
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Assign custom values for canvas (for example into this->tpl to be used by templates)
|
||||
*
|
||||
@ -71,9 +72,9 @@ class ActionsCardService
|
||||
* @param string $ref Ref of object
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function assign_values(&$action, $id=0, $ref='')
|
||||
{
|
||||
// phpcs:enable
|
||||
global $limit, $offset, $sortfield, $sortorder;
|
||||
global $conf, $langs, $user, $mysoc, $canvas;
|
||||
global $form, $formproduct;
|
||||
@ -273,6 +274,7 @@ class ActionsCardService
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
/**
|
||||
* Fetch datas list and save into ->list_datas
|
||||
*
|
||||
@ -282,9 +284,9 @@ class ActionsCardService
|
||||
* @param string $sortorder Sort order ('ASC' or 'DESC')
|
||||
* @return void
|
||||
*/
|
||||
// phpcs:ignore PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
||||
function LoadListDatas($limit, $offset, $sortfield, $sortorder)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
global $search_categ,$sall,$sref,$search_barcode,$snom,$catid;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user