Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
302f5eb68d
@ -3727,6 +3727,7 @@ class Commande extends CommonOrder
|
|||||||
{
|
{
|
||||||
global $conf, $langs, $user;
|
global $conf, $langs, $user;
|
||||||
|
|
||||||
|
$langs->load('orders');
|
||||||
$datas = [];
|
$datas = [];
|
||||||
$nofetch = !empty($params['nofetch']);
|
$nofetch = !empty($params['nofetch']);
|
||||||
|
|
||||||
|
|||||||
@ -114,22 +114,42 @@ class Facture extends CommonInvoice
|
|||||||
|
|
||||||
public $author;
|
public $author;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
* @deprecated
|
||||||
|
* @see $fk_user_author
|
||||||
|
*/
|
||||||
|
public $user_author;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var int ID
|
||||||
*/
|
*/
|
||||||
public $fk_user_author;
|
public $fk_user_author;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
* @deprecated
|
||||||
|
* @see $fk_user_valid
|
||||||
|
*/
|
||||||
|
public $user_valid;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var int ID
|
||||||
*/
|
*/
|
||||||
public $fk_user_valid;
|
public $fk_user_valid;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @var int ID
|
||||||
|
* @deprecated
|
||||||
|
* @see $fk_uesr_modif
|
||||||
|
*/
|
||||||
|
public $user_modification;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int ID
|
* @var int ID
|
||||||
*/
|
*/
|
||||||
public $fk_user_modif;
|
public $fk_user_modif;
|
||||||
|
|
||||||
|
|
||||||
public $date; // Date invoice
|
public $date; // Date invoice
|
||||||
public $datem;
|
public $datem;
|
||||||
|
|
||||||
|
|||||||
@ -336,7 +336,7 @@ function dolGetLdapPasswordHash($password, $type = 'md5')
|
|||||||
* @param string $features Features to check (it must be module name or $object->element. Can be a 'or' check with 'levela|levelb'.
|
* @param string $features Features to check (it must be module name or $object->element. Can be a 'or' check with 'levela|levelb'.
|
||||||
* Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...)
|
* Examples: 'societe', 'contact', 'produit&service', 'produit|service', ...)
|
||||||
* This is used to check permission $user->rights->features->...
|
* This is used to check permission $user->rights->features->...
|
||||||
* @param int|string|object $object Object or Object ID or list of Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
|
* @param int|string|Object $object Object or Object ID or list of Object ID if we want to check a particular record (optional) is linked to a owned thirdparty (optional).
|
||||||
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany module. Param not used if objectid is null (optional).
|
* @param string $tableandshare 'TableName&SharedElement' with Tablename is table where object is stored. SharedElement is an optional key to define where to check entity for multicompany module. Param not used if objectid is null (optional).
|
||||||
* @param string $feature2 Feature to check, second level of permission (optional). Can be a 'or' check with 'sublevela|sublevelb'.
|
* @param string $feature2 Feature to check, second level of permission (optional). Can be a 'or' check with 'sublevela|sublevelb'.
|
||||||
* This is used to check permission $user->rights->features->feature2...
|
* This is used to check permission $user->rights->features->feature2...
|
||||||
@ -401,11 +401,11 @@ function restrictedArea(User $user, $features, $object = 0, $tableandshare = '',
|
|||||||
if ($features == 'productbatch') {
|
if ($features == 'productbatch') {
|
||||||
$features = 'produit';
|
$features = 'produit';
|
||||||
}
|
}
|
||||||
if ($features == 'fournisseur') { // When vendor invoice and pruchase order are into module 'fournisseur'
|
if ($features == 'fournisseur') { // When vendor invoice and purchase order are into module 'fournisseur'
|
||||||
$features = 'fournisseur';
|
$features = 'fournisseur';
|
||||||
if ($object->element == 'invoice_supplier') {
|
if (is_object($object) && $object->element == 'invoice_supplier') {
|
||||||
$feature2 = 'facture';
|
$feature2 = 'facture';
|
||||||
} elseif ($object->element == 'order_supplier') {
|
} elseif (is_object($object) && $object->element == 'order_supplier') {
|
||||||
$feature2 = 'commande';
|
$feature2 = 'commande';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user