wip
This commit is contained in:
parent
675a17a74c
commit
e6c3eb0ba1
@ -94,7 +94,7 @@ class DolibarrApi
|
|||||||
* @param object $object Object to clean
|
* @param object $object Object to clean
|
||||||
* @return array Array of cleaned object properties
|
* @return array Array of cleaned object properties
|
||||||
*/
|
*/
|
||||||
private function _cleanObjectDatas($object)
|
protected function _cleanObjectDatas($object)
|
||||||
{
|
{
|
||||||
|
|
||||||
// Remove $db object property for object
|
// Remove $db object property for object
|
||||||
@ -222,7 +222,7 @@ class DolibarrApi
|
|||||||
* @return bool
|
* @return bool
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
private static function _checkAccessToResource($resource, $resource_id = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid')
|
protected static function _checkAccessToResource($resource, $resource_id = 0, $dbtablename = '', $feature2 = '', $dbt_keyfield = 'fk_soc', $dbt_select = 'rowid')
|
||||||
{
|
{
|
||||||
|
|
||||||
// Features/modules to check
|
// Features/modules to check
|
||||||
@ -248,7 +248,7 @@ class DolibarrApi
|
|||||||
* @param string $sqlfilters sqlfilter string
|
* @param string $sqlfilters sqlfilter string
|
||||||
* @return boolean True if valid, False if not valid
|
* @return boolean True if valid, False if not valid
|
||||||
*/
|
*/
|
||||||
private function _checkFilters($sqlfilters)
|
protected function _checkFilters($sqlfilters)
|
||||||
{
|
{
|
||||||
//$regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
|
//$regexstring='\(([^:\'\(\)]+:[^:\'\(\)]+:[^:\(\)]+)\)';
|
||||||
//$tmp=preg_replace_all('/'.$regexstring.'/', '', $sqlfilters);
|
//$tmp=preg_replace_all('/'.$regexstring.'/', '', $sqlfilters);
|
||||||
@ -278,7 +278,7 @@ class DolibarrApi
|
|||||||
* @param array $matches Array of found string by regex search
|
* @param array $matches Array of found string by regex search
|
||||||
* @return string Forged criteria. Example: "t.field like 'abc%'"
|
* @return string Forged criteria. Example: "t.field like 'abc%'"
|
||||||
*/
|
*/
|
||||||
private static function _forge_criteria_callback($matches)
|
protected static function _forge_criteria_callback($matches)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $db;
|
global $db;
|
||||||
|
|||||||
@ -370,6 +370,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
// We need constructor into function unActivateModule into admin.lib.php
|
// We need constructor into function unActivateModule into admin.lib.php
|
||||||
|
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||||
/**
|
/**
|
||||||
* Enables a module.
|
* Enables a module.
|
||||||
* Inserts all informations into database
|
* Inserts all informations into database
|
||||||
@ -384,6 +385,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
*/
|
*/
|
||||||
protected function _init($array_sql, $options = '')
|
protected function _init($array_sql, $options = '')
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
$err=0;
|
$err=0;
|
||||||
|
|
||||||
@ -476,6 +478,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||||
/**
|
/**
|
||||||
* Disable function. Deletes the module constants and boxes from the database.
|
* Disable function. Deletes the module constants and boxes from the database.
|
||||||
*
|
*
|
||||||
@ -486,6 +489,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
*/
|
*/
|
||||||
protected function _remove($array_sql, $options = '')
|
protected function _remove($array_sql, $options = '')
|
||||||
{
|
{
|
||||||
|
// phpcs:enable
|
||||||
$err=0;
|
$err=0;
|
||||||
|
|
||||||
$this->db->begin();
|
$this->db->begin();
|
||||||
@ -1044,7 +1048,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
* @param string $reldir Relative directory where to scan files
|
* @param string $reldir Relative directory where to scan files
|
||||||
* @return int <=0 if KO, >0 if OK
|
* @return int <=0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
protected function _load_tables($reldir)
|
private function _load_tables($reldir)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $conf;
|
global $conf;
|
||||||
@ -1052,7 +1056,8 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||||||
$error=0;
|
$error=0;
|
||||||
$dirfound=0;
|
$dirfound=0;
|
||||||
|
|
||||||
if (empty($reldir)) { return 1;
|
if (empty($reldir)) {
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
include_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
include_once DOL_DOCUMENT_ROOT . '/core/lib/admin.lib.php';
|
||||||
|
|||||||
@ -145,7 +145,7 @@ class mod_chequereceipt_mint extends ModeleNumRefChequeReceipts
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return next free value
|
* Return next free value
|
||||||
*
|
*
|
||||||
|
|||||||
@ -133,7 +133,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Return next free value
|
* Return next free value
|
||||||
*
|
*
|
||||||
|
|||||||
@ -382,7 +382,7 @@ class modAdherent extends DolibarrModules
|
|||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove($options);
|
$this->removeFromChild(array(), $options);
|
||||||
|
|
||||||
//ODT template
|
//ODT template
|
||||||
/*
|
/*
|
||||||
@ -408,6 +408,6 @@ class modAdherent extends DolibarrModules
|
|||||||
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape($this->const[0][2])."','member',".$conf->entity.")"
|
"INSERT INTO ".MAIN_DB_PREFIX."document_model (nom, type, entity) VALUES('".$this->db->escape($this->const[0][2])."','member',".$conf->entity.")"
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->_init($sql, $options);
|
return $this->initFromChild($sql, $options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -204,7 +204,8 @@ class modAgenda extends DolibarrModules
|
|||||||
// 'target'=>'',
|
// 'target'=>'',
|
||||||
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
// 'user'=>2); // 0=Menu for internal users, 1=external users, 2=both
|
||||||
// $r++;
|
// $r++;
|
||||||
$this->menu[$r]=array('fk_menu'=>0,
|
$this->menu[$r]=array(
|
||||||
|
'fk_menu'=>0,
|
||||||
'type'=>'top',
|
'type'=>'top',
|
||||||
'titre'=>'TMenuAgenda',
|
'titre'=>'TMenuAgenda',
|
||||||
'mainmenu'=>'agenda',
|
'mainmenu'=>'agenda',
|
||||||
@ -214,7 +215,8 @@ class modAgenda extends DolibarrModules
|
|||||||
'perms'=>'$user->rights->agenda->myactions->read',
|
'perms'=>'$user->rights->agenda->myactions->read',
|
||||||
'enabled'=>'$conf->agenda->enabled',
|
'enabled'=>'$conf->agenda->enabled',
|
||||||
'target'=>'',
|
'target'=>'',
|
||||||
'user'=>2);
|
'user'=>2,
|
||||||
|
);
|
||||||
$r++;
|
$r++;
|
||||||
|
|
||||||
$this->menu[$r]=array('fk_menu'=>'r=0',
|
$this->menu[$r]=array('fk_menu'=>'r=0',
|
||||||
|
|||||||
@ -224,13 +224,13 @@ class modApi extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
$result=$this->_load_tables('/api/sql/');
|
$result = $this->_load_tables('/api/sql/');
|
||||||
|
|
||||||
return $this->_init($sql, $options);
|
return $this->initFromChild($sql, $options);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -241,7 +241,7 @@ class modApi extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove($options = '')
|
public function remove($options = '')
|
||||||
{
|
{
|
||||||
// Remove old constants with entity fields different of 0
|
// Remove old constants with entity fields different of 0
|
||||||
$sql = array(
|
$sql = array(
|
||||||
@ -249,6 +249,6 @@ class modApi extends DolibarrModules
|
|||||||
"DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = ".$this->db->encrypt('API_PRODUCTION_MODE', 1)
|
"DELETE FROM ".MAIN_DB_PREFIX."const WHERE name = ".$this->db->encrypt('API_PRODUCTION_MODE', 1)
|
||||||
);
|
);
|
||||||
|
|
||||||
return $this->_remove($sql, $options);
|
return $this->removeFromChild($sql, $options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -325,10 +325,10 @@ class modAsset extends DolibarrModules
|
|||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove($options);
|
$this->removeFromChild(array(), $options);
|
||||||
|
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
return $this->_init($sql, $options);
|
return $this->initFromChild($sql, $options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -210,7 +210,7 @@ class modBanque extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -129,7 +129,7 @@ class modBarcode extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove($options);
|
$this->remove($options);
|
||||||
|
|||||||
@ -145,9 +145,8 @@ class modBlockedLog extends DolibarrModules
|
|||||||
*
|
*
|
||||||
* @return boolean True if already used, otherwise False
|
* @return boolean True if already used, otherwise False
|
||||||
*/
|
*/
|
||||||
function alreadyUsed()
|
public function alreadyUsed()
|
||||||
{
|
{
|
||||||
|
|
||||||
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
require_once DOL_DOCUMENT_ROOT.'/blockedlog/class/blockedlog.class.php';
|
||||||
$b=new BlockedLog($this->db);
|
$b=new BlockedLog($this->db);
|
||||||
return $b->alreadyUsed(1);
|
return $b->alreadyUsed(1);
|
||||||
@ -162,7 +161,7 @@ class modBlockedLog extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf, $user;
|
global $conf, $user;
|
||||||
|
|
||||||
@ -205,7 +204,7 @@ class modBlockedLog extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove($options = '')
|
public function remove($options = '')
|
||||||
{
|
{
|
||||||
|
|
||||||
global $conf, $user;
|
global $conf, $user;
|
||||||
|
|||||||
@ -132,7 +132,7 @@ class modCashDesk extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
|
|||||||
@ -483,7 +483,7 @@ class modCategorie extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove($options);
|
$this->remove($options);
|
||||||
|
|||||||
@ -269,7 +269,7 @@ class modCommande extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes')
|
* @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
|
|||||||
@ -109,7 +109,7 @@ class modComptabilite extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -212,7 +212,7 @@ class modContrat extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -152,7 +152,7 @@ class modDeplacement extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove($options);
|
$this->remove($options);
|
||||||
|
|||||||
@ -103,7 +103,7 @@ class modDocumentGeneration extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -151,7 +151,7 @@ class modDon extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -315,7 +315,7 @@ class modExpedition extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
|
|||||||
@ -210,7 +210,7 @@ class modExpenseReport extends DolibarrModules
|
|||||||
* @param string $options Options
|
* @param string $options Options
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -86,7 +86,7 @@ class modExternalRss extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -126,7 +126,7 @@ class modExternalRss extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove($options = '')
|
public function remove($options = '')
|
||||||
{
|
{
|
||||||
$sql = array();
|
$sql = array();
|
||||||
|
|
||||||
|
|||||||
@ -354,7 +354,7 @@ class modFacture extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes')
|
* @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
|
|||||||
@ -208,7 +208,7 @@ class modFicheinter extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -131,7 +131,7 @@ class modHRM extends DolibarrModules
|
|||||||
* @param string $options Enabling module ('', 'noboxes')
|
* @param string $options Enabling module ('', 'noboxes')
|
||||||
* @return int if OK, 0 if KO
|
* @return int if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove($options);
|
$this->remove($options);
|
||||||
|
|||||||
@ -156,7 +156,7 @@ class modLoan extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -149,7 +149,7 @@ class modMailing extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove($options);
|
$this->remove($options);
|
||||||
|
|||||||
@ -130,7 +130,7 @@ class modOauth extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -310,7 +310,7 @@ class modProjet extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
|
|||||||
@ -265,7 +265,7 @@ class modPropale extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
|
|||||||
@ -130,7 +130,7 @@ class modReceiptPrinter extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
// Clean before activation
|
// Clean before activation
|
||||||
|
|||||||
@ -363,7 +363,7 @@ class modService extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes')
|
* @param string $options Options when enabling module ('', 'newboxdefonly', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
$this->remove($options);
|
$this->remove($options);
|
||||||
|
|
||||||
|
|||||||
@ -358,7 +358,7 @@ class modStock extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
|
|||||||
@ -185,7 +185,7 @@ class modTax extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
|
|||||||
@ -145,7 +145,7 @@ class modWebsite extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
global $conf,$langs;
|
global $conf,$langs;
|
||||||
|
|
||||||
|
|||||||
@ -139,7 +139,7 @@ class modWorkflow extends DolibarrModules
|
|||||||
* @param string $options Options when enabling module ('', 'noboxes')
|
* @param string $options Options when enabling module ('', 'noboxes')
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function init($options = '')
|
public function init($options = '')
|
||||||
{
|
{
|
||||||
// Permissions
|
// Permissions
|
||||||
$this->remove($options);
|
$this->remove($options);
|
||||||
|
|||||||
@ -47,7 +47,7 @@ class PrintingDriver
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
public function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
}
|
}
|
||||||
@ -59,7 +59,7 @@ class PrintingDriver
|
|||||||
* @param integer $maxfilenamelength Max length of value to show
|
* @param integer $maxfilenamelength Max length of value to show
|
||||||
* @return array List of drivers
|
* @return array List of drivers
|
||||||
*/
|
*/
|
||||||
static function listDrivers($db, $maxfilenamelength = 0)
|
public static function listDrivers($db, $maxfilenamelength = 0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -80,7 +80,7 @@ class PrintingDriver
|
|||||||
*
|
*
|
||||||
* @return string Return translation of key PrintingModuleDescXXX where XXX is module name, or $this->desc if not exists
|
* @return string Return translation of key PrintingModuleDescXXX where XXX is module name, or $this->desc if not exists
|
||||||
*/
|
*/
|
||||||
function getDesc()
|
public function getDesc()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
$langs->load("printing");
|
$langs->load("printing");
|
||||||
|
|||||||
@ -70,7 +70,7 @@ class printing_printgcp extends PrintingDriver
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
public function __construct($db)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $dolibarr_main_url_root;
|
global $conf, $langs, $dolibarr_main_url_root;
|
||||||
|
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class printing_printipp extends PrintingDriver
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
public function __construct($db)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ class printing_printipp extends PrintingDriver
|
|||||||
*
|
*
|
||||||
* @return int 0 if OK, >0 if KO
|
* @return int 0 if OK, >0 if KO
|
||||||
*/
|
*/
|
||||||
function listAvailablePrinters()
|
public function listAvailablePrinters()
|
||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|||||||
@ -62,7 +62,7 @@ class mod_propale_marbre extends ModeleNumRefPropales
|
|||||||
*
|
*
|
||||||
* @return string Text with description
|
* @return string Text with description
|
||||||
*/
|
*/
|
||||||
function info()
|
public function info()
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
|
return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
|
||||||
@ -74,7 +74,7 @@ class mod_propale_marbre extends ModeleNumRefPropales
|
|||||||
*
|
*
|
||||||
* @return string Example
|
* @return string Example
|
||||||
*/
|
*/
|
||||||
function getExample()
|
public function getExample()
|
||||||
{
|
{
|
||||||
return $this->prefix."0501-0001";
|
return $this->prefix."0501-0001";
|
||||||
}
|
}
|
||||||
@ -86,7 +86,7 @@ class mod_propale_marbre extends ModeleNumRefPropales
|
|||||||
*
|
*
|
||||||
* @return boolean false si conflit, true si ok
|
* @return boolean false si conflit, true si ok
|
||||||
*/
|
*/
|
||||||
function canBeActivated()
|
public function canBeActivated()
|
||||||
{
|
{
|
||||||
global $conf,$langs,$db;
|
global $conf,$langs,$db;
|
||||||
|
|
||||||
@ -124,7 +124,7 @@ class mod_propale_marbre extends ModeleNumRefPropales
|
|||||||
* @param Propal $propal Object commercial proposal
|
* @param Propal $propal Object commercial proposal
|
||||||
* @return string Next value
|
* @return string Next value
|
||||||
*/
|
*/
|
||||||
function getNextValue($objsoc, $propal)
|
public function getNextValue($objsoc, $propal)
|
||||||
{
|
{
|
||||||
global $db,$conf;
|
global $db,$conf;
|
||||||
|
|
||||||
@ -165,7 +165,7 @@ class mod_propale_marbre extends ModeleNumRefPropales
|
|||||||
* @param Object $objforref Object for number to search
|
* @param Object $objforref Object for number to search
|
||||||
* @return string Next free value
|
* @return string Next free value
|
||||||
*/
|
*/
|
||||||
function getNumRef($objsoc, $objforref)
|
public function getNumRef($objsoc, $objforref)
|
||||||
{
|
{
|
||||||
return $this->getNextValue($objsoc, $objforref);
|
return $this->getNextValue($objsoc, $objforref);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class SupplierInvoices extends DolibarrApi
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
@ -61,7 +61,7 @@ class SupplierInvoices extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function get($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->fournisseur->facture->lire) {
|
if(! DolibarrApiAccess::$user->rights->fournisseur->facture->lire) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@ -96,7 +96,7 @@ class SupplierInvoices extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '')
|
public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '')
|
||||||
{
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ class SupplierInvoices extends DolibarrApi
|
|||||||
* @param array $request_data Request datas
|
* @param array $request_data Request datas
|
||||||
* @return int ID of supplier invoice
|
* @return int ID of supplier invoice
|
||||||
*/
|
*/
|
||||||
function post($request_data = null)
|
public function post($request_data = null)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) {
|
if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) {
|
||||||
throw new RestException(401, "Insuffisant rights");
|
throw new RestException(401, "Insuffisant rights");
|
||||||
@ -218,7 +218,7 @@ class SupplierInvoices extends DolibarrApi
|
|||||||
* @param array $request_data Datas
|
* @param array $request_data Datas
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function put($id, $request_data = null)
|
public function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) {
|
if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@ -250,7 +250,7 @@ class SupplierInvoices extends DolibarrApi
|
|||||||
* @param int $id Supplier invoice ID
|
* @param int $id Supplier invoice ID
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->fournisseur->facture->supprimer) {
|
if(! DolibarrApiAccess::$user->rights->fournisseur->facture->supprimer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@ -296,7 +296,7 @@ class SupplierInvoices extends DolibarrApi
|
|||||||
* "notrigger": 0
|
* "notrigger": 0
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
function validate($id, $idwarehouse = 0, $notrigger = 0)
|
public function validate($id, $idwarehouse = 0, $notrigger = 0)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) {
|
if(! DolibarrApiAccess::$user->rights->fournisseur->facture->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@ -332,7 +332,7 @@ class SupplierInvoices extends DolibarrApi
|
|||||||
* @param Object $object Object to clean
|
* @param Object $object Object to clean
|
||||||
* @return array Array of cleaned object properties
|
* @return array Array of cleaned object properties
|
||||||
*/
|
*/
|
||||||
function _cleanObjectDatas($object)
|
private function _cleanObjectDatas($object)
|
||||||
{
|
{
|
||||||
|
|
||||||
$object = parent::_cleanObjectDatas($object);
|
$object = parent::_cleanObjectDatas($object);
|
||||||
@ -354,7 +354,7 @@ class SupplierInvoices extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function _validate($data)
|
private function _validate($data)
|
||||||
{
|
{
|
||||||
$invoice = array();
|
$invoice = array();
|
||||||
foreach (SupplierInvoices::$FIELDS as $field) {
|
foreach (SupplierInvoices::$FIELDS as $field) {
|
||||||
|
|||||||
@ -44,7 +44,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
/**
|
/**
|
||||||
* Constructor
|
* Constructor
|
||||||
*/
|
*/
|
||||||
function __construct()
|
public function __construct()
|
||||||
{
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
@ -61,7 +61,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function get($id)
|
public function get($id)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->fournisseur->commande->lire) {
|
if(! DolibarrApiAccess::$user->rights->fournisseur->commande->lire) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@ -96,7 +96,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '')
|
public function index($sortfield = "t.rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $thirdparty_ids = '', $status = '', $sqlfilters = '')
|
||||||
{
|
{
|
||||||
global $db, $conf;
|
global $db, $conf;
|
||||||
|
|
||||||
@ -187,7 +187,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
* @param array $request_data Request datas
|
* @param array $request_data Request datas
|
||||||
* @return int ID of supplier order
|
* @return int ID of supplier order
|
||||||
*/
|
*/
|
||||||
function post($request_data = null)
|
public function post($request_data = null)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) {
|
if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) {
|
||||||
throw new RestException(401, "Insuffisant rights");
|
throw new RestException(401, "Insuffisant rights");
|
||||||
@ -223,7 +223,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
* @param array $request_data Datas
|
* @param array $request_data Datas
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
function put($id, $request_data = null)
|
public function put($id, $request_data = null)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) {
|
if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@ -255,7 +255,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
* @param int $id Supplier order ID
|
* @param int $id Supplier order ID
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
function delete($id)
|
public function delete($id)
|
||||||
{
|
{
|
||||||
if (! DolibarrApiAccess::$user->rights->fournisseur->commande->supprimer) {
|
if (! DolibarrApiAccess::$user->rights->fournisseur->commande->supprimer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@ -300,7 +300,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
* "notrigger": 0
|
* "notrigger": 0
|
||||||
* }
|
* }
|
||||||
*/
|
*/
|
||||||
function validate($id, $idwarehouse = 0, $notrigger = 0)
|
public function validate($id, $idwarehouse = 0, $notrigger = 0)
|
||||||
{
|
{
|
||||||
if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) {
|
if(! DolibarrApiAccess::$user->rights->fournisseur->commande->creer) {
|
||||||
throw new RestException(401);
|
throw new RestException(401);
|
||||||
@ -336,7 +336,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
* @param Object $object Object to clean
|
* @param Object $object Object to clean
|
||||||
* @return array Array of cleaned object properties
|
* @return array Array of cleaned object properties
|
||||||
*/
|
*/
|
||||||
function _cleanObjectDatas($object)
|
private function _cleanObjectDatas($object)
|
||||||
{
|
{
|
||||||
|
|
||||||
$object = parent::_cleanObjectDatas($object);
|
$object = parent::_cleanObjectDatas($object);
|
||||||
@ -358,7 +358,7 @@ class SupplierOrders extends DolibarrApi
|
|||||||
*
|
*
|
||||||
* @throws RestException
|
* @throws RestException
|
||||||
*/
|
*/
|
||||||
function _validate($data)
|
private function _validate($data)
|
||||||
{
|
{
|
||||||
$order = array();
|
$order = array();
|
||||||
foreach (SupplierOrders::$FIELDS as $field) {
|
foreach (SupplierOrders::$FIELDS as $field) {
|
||||||
|
|||||||
@ -48,7 +48,7 @@ class PaiementFourn extends Paiement
|
|||||||
|
|
||||||
public $picto = 'payment';
|
public $picto = 'payment';
|
||||||
|
|
||||||
var $statut; //Status of payment. 0 = unvalidated; 1 = validated
|
public $statut; //Status of payment. 0 = unvalidated; 1 = validated
|
||||||
// fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...)
|
// fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...)
|
||||||
// fk_paiement dans llx_paiement_facture est le rowid du paiement
|
// fk_paiement dans llx_paiement_facture est le rowid du paiement
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ class PaiementFourn extends Paiement
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function __construct($db)
|
public function __construct($db)
|
||||||
{
|
{
|
||||||
$this->db = $db;
|
$this->db = $db;
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ class PaiementFourn extends Paiement
|
|||||||
* @param int $fk_bank Id of bank line associated to payment
|
* @param int $fk_bank Id of bank line associated to payment
|
||||||
* @return int <0 if KO, -2 if not found, >0 if OK
|
* @return int <0 if KO, -2 if not found, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch($id, $ref = '', $fk_bank = '')
|
public function fetch($id, $ref = '', $fk_bank = '')
|
||||||
{
|
{
|
||||||
$error=0;
|
$error=0;
|
||||||
|
|
||||||
@ -146,7 +146,7 @@ class PaiementFourn extends Paiement
|
|||||||
* @param Societe $thirdparty Thirdparty
|
* @param Societe $thirdparty Thirdparty
|
||||||
* @return int id of created payment, < 0 if error
|
* @return int id of created payment, < 0 if error
|
||||||
*/
|
*/
|
||||||
function create($user, $closepaidinvoices = 0, $thirdparty = null)
|
public function create($user, $closepaidinvoices = 0, $thirdparty = null)
|
||||||
{
|
{
|
||||||
global $langs,$conf;
|
global $langs,$conf;
|
||||||
|
|
||||||
@ -319,7 +319,7 @@ class PaiementFourn extends Paiement
|
|||||||
* @param int $notrigger No trigger
|
* @param int $notrigger No trigger
|
||||||
* @return int <0 si ko, >0 si ok
|
* @return int <0 si ko, >0 si ok
|
||||||
*/
|
*/
|
||||||
function delete($notrigger = 0)
|
public function delete($notrigger = 0)
|
||||||
{
|
{
|
||||||
global $conf, $user, $langs;
|
global $conf, $user, $langs;
|
||||||
|
|
||||||
@ -421,7 +421,7 @@ class PaiementFourn extends Paiement
|
|||||||
* @param int $id Id du paiement dont il faut afficher les infos
|
* @param int $id Id du paiement dont il faut afficher les infos
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function info($id)
|
public function info($id)
|
||||||
{
|
{
|
||||||
$sql = 'SELECT c.rowid, datec, fk_user_author as fk_user_creat, tms';
|
$sql = 'SELECT c.rowid, datec, fk_user_author as fk_user_creat, tms';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiementfourn as c';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiementfourn as c';
|
||||||
@ -465,7 +465,7 @@ class PaiementFourn extends Paiement
|
|||||||
* @param string $filter SQL filter
|
* @param string $filter SQL filter
|
||||||
* @return array Array of supplier invoice id
|
* @return array Array of supplier invoice id
|
||||||
*/
|
*/
|
||||||
function getBillsArray($filter = '')
|
public function getBillsArray($filter = '')
|
||||||
{
|
{
|
||||||
$sql = 'SELECT fk_facturefourn';
|
$sql = 'SELECT fk_facturefourn';
|
||||||
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf, '.MAIN_DB_PREFIX.'facture_fourn as f';
|
$sql.= ' FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf, '.MAIN_DB_PREFIX.'facture_fourn as f';
|
||||||
@ -503,12 +503,12 @@ class PaiementFourn extends Paiement
|
|||||||
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
* @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
|
* @return string Libelle
|
||||||
*/
|
*/
|
||||||
function getLibStatut($mode = 0)
|
public function getLibStatut($mode = 0)
|
||||||
{
|
{
|
||||||
return $this->LibStatut($this->statut, $mode);
|
return $this->LibStatut($this->statut, $mode);
|
||||||
}
|
}
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Renvoi le libelle d'un statut donne
|
* Renvoi le libelle d'un statut donne
|
||||||
*
|
*
|
||||||
@ -516,7 +516,7 @@ class PaiementFourn extends Paiement
|
|||||||
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
* @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
|
* @return string Libelle du statut
|
||||||
*/
|
*/
|
||||||
function LibStatut($status, $mode = 0)
|
public function LibStatut($status, $mode = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
global $langs;
|
global $langs;
|
||||||
@ -570,7 +570,7 @@ class PaiementFourn extends Paiement
|
|||||||
* @param int $notooltip 1=Disable tooltip
|
* @param int $notooltip 1=Disable tooltip
|
||||||
* @return string Chaine avec URL
|
* @return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0)
|
public function getNomUrl($withpicto = 0, $option = '', $mode = 'withlistofinvoices', $notooltip = 0)
|
||||||
{
|
{
|
||||||
global $langs;
|
global $langs;
|
||||||
|
|
||||||
@ -606,7 +606,7 @@ class PaiementFourn extends Paiement
|
|||||||
* @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines
|
* @param string $option ''=Create a specimen invoice with lines, 'nolines'=No lines
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function initAsSpecimen($option = '')
|
public function initAsSpecimen($option = '')
|
||||||
{
|
{
|
||||||
global $user,$langs,$conf;
|
global $user,$langs,$conf;
|
||||||
|
|
||||||
@ -631,7 +631,7 @@ class PaiementFourn extends Paiement
|
|||||||
* @param string $mode 'next' for next value or 'last' for last value
|
* @param string $mode 'next' for next value or 'last' for last value
|
||||||
* @return string free ref or last ref
|
* @return string free ref or last ref
|
||||||
*/
|
*/
|
||||||
function getNextNumRef($soc, $mode = 'next')
|
public function getNextNumRef($soc, $mode = 'next')
|
||||||
{
|
{
|
||||||
global $conf, $db, $langs;
|
global $conf, $db, $langs;
|
||||||
$langs->load("bills");
|
$langs->load("bills");
|
||||||
@ -755,7 +755,7 @@ class PaiementFourn extends Paiement
|
|||||||
*
|
*
|
||||||
* @return string 'dolibarr' if standard comportment or paid in dolibarr currency, 'customer' if payment received from multicurrency inputs
|
* @return string 'dolibarr' if standard comportment or paid in dolibarr currency, 'customer' if payment received from multicurrency inputs
|
||||||
*/
|
*/
|
||||||
function getWay()
|
public function getWay()
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -776,14 +776,14 @@ class PaiementFourn extends Paiement
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||||
/**
|
/**
|
||||||
* Load the third party of object, from id into this->thirdparty
|
* Load the third party of object, from id into this->thirdparty
|
||||||
*
|
*
|
||||||
* @param int $force_thirdparty_id Force thirdparty id
|
* @param int $force_thirdparty_id Force thirdparty id
|
||||||
* @return int <0 if KO, >0 if OK
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function fetch_thirdparty($force_thirdparty_id = 0)
|
public function fetch_thirdparty($force_thirdparty_id = 0)
|
||||||
{
|
{
|
||||||
// phpcs:enable
|
// phpcs:enable
|
||||||
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
|
require_once DOL_DOCUMENT_ROOT . '/fourn/class/fournisseur.facture.class.php';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user