Doxygen
This commit is contained in:
parent
4f23be1b50
commit
66bad9ea04
@ -219,6 +219,7 @@ abstract class DolibarrModules
|
|||||||
/**
|
/**
|
||||||
* Retourne le nom traduit du module si la traduction existe dans admin.lang,
|
* Retourne le nom traduit du module si la traduction existe dans admin.lang,
|
||||||
* sinon le nom defini par defaut dans le module.
|
* sinon le nom defini par defaut dans le module.
|
||||||
|
*
|
||||||
* @return string Nom du module traduit
|
* @return string Nom du module traduit
|
||||||
*/
|
*/
|
||||||
function getName()
|
function getName()
|
||||||
@ -297,6 +298,7 @@ abstract class DolibarrModules
|
|||||||
/**
|
/**
|
||||||
* Return translated label of a export dataset
|
* Return translated label of a export dataset
|
||||||
*
|
*
|
||||||
|
* @param int $r Index of dataset
|
||||||
* @return string Label of databaset
|
* @return string Label of databaset
|
||||||
*/
|
*/
|
||||||
function getExportDatasetLabel($r)
|
function getExportDatasetLabel($r)
|
||||||
@ -320,6 +322,7 @@ abstract class DolibarrModules
|
|||||||
/**
|
/**
|
||||||
* Return translated label of an import dataset
|
* Return translated label of an import dataset
|
||||||
*
|
*
|
||||||
|
* @param int $r Index of dataset
|
||||||
* @return string Label of databaset
|
* @return string Label of databaset
|
||||||
*/
|
*/
|
||||||
function getImportDatasetLabel($r)
|
function getImportDatasetLabel($r)
|
||||||
@ -470,6 +473,7 @@ abstract class DolibarrModules
|
|||||||
* commands must be stored in directory reldir='/module/sql/'
|
* commands must be stored in directory reldir='/module/sql/'
|
||||||
* This function is called by this->init
|
* This function is called by this->init
|
||||||
*
|
*
|
||||||
|
* @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
|
||||||
*/
|
*/
|
||||||
function _load_tables($reldir)
|
function _load_tables($reldir)
|
||||||
@ -849,7 +853,7 @@ abstract class DolibarrModules
|
|||||||
/**
|
/**
|
||||||
* Insert permissions definitions related to the module into llx_rights_def
|
* Insert permissions definitions related to the module into llx_rights_def
|
||||||
*
|
*
|
||||||
* @param $reinitadminperms If 1, we also grant them to all admin users
|
* @param int $reinitadminperms If 1, we also grant them to all admin users
|
||||||
* @return int Number of error (0 if OK)
|
* @return int Number of error (0 if OK)
|
||||||
*/
|
*/
|
||||||
function insert_permissions($reinitadminperms=0)
|
function insert_permissions($reinitadminperms=0)
|
||||||
@ -1188,6 +1192,8 @@ abstract class DolibarrModules
|
|||||||
/**
|
/**
|
||||||
* Insert directories in llx_const
|
* Insert directories in llx_const
|
||||||
*
|
*
|
||||||
|
* @param string $name Name
|
||||||
|
* @param string $dir Directory
|
||||||
* @return int Nb of errors (0 if OK)
|
* @return int Nb of errors (0 if OK)
|
||||||
*/
|
*/
|
||||||
function insert_dirs($name,$dir)
|
function insert_dirs($name,$dir)
|
||||||
|
|||||||
@ -38,6 +38,7 @@ abstract class ModeleBarCode
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if a module can be used or not
|
* Return if a module can be used or not
|
||||||
|
*
|
||||||
* @return boolean true if module can be used
|
* @return boolean true if module can be used
|
||||||
*/
|
*/
|
||||||
function isEnabled()
|
function isEnabled()
|
||||||
|
|||||||
@ -76,6 +76,7 @@ class modPhpbarcode extends ModeleBarCode
|
|||||||
/**
|
/**
|
||||||
* Return true if encodinf is supported
|
* Return true if encodinf is supported
|
||||||
*
|
*
|
||||||
|
* @param string $encoding Encoding norm
|
||||||
* @return int >0 if supported, 0 if not
|
* @return int >0 if supported, 0 if not
|
||||||
*/
|
*/
|
||||||
function encodingIsSupported($encoding)
|
function encodingIsSupported($encoding)
|
||||||
@ -104,6 +105,7 @@ class modPhpbarcode extends ModeleBarCode
|
|||||||
* @param string $code Value to encode
|
* @param string $code Value to encode
|
||||||
* @param string $encoding Mode of encoding
|
* @param string $encoding Mode of encoding
|
||||||
* @param string $readable Code can be read
|
* @param string $readable Code can be read
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function buildBarCode($code,$encoding,$readable='Y')
|
function buildBarCode($code,$encoding,$readable='Y')
|
||||||
{
|
{
|
||||||
@ -142,6 +144,7 @@ class modPhpbarcode extends ModeleBarCode
|
|||||||
* @param string $code Value to encode
|
* @param string $code Value to encode
|
||||||
* @param string $encoding Mode of encoding
|
* @param string $encoding Mode of encoding
|
||||||
* @param string $readable Code can be read
|
* @param string $readable Code can be read
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
*/
|
*/
|
||||||
function writeBarCode($code,$encoding,$readable='Y')
|
function writeBarCode($code,$encoding,$readable='Y')
|
||||||
{
|
{
|
||||||
|
|||||||
@ -39,10 +39,13 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator
|
|||||||
var $error='';
|
var $error='';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return list of active generation modules
|
* Return list of active generation modules
|
||||||
* \param $db Database handler
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -50,7 +53,7 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
// TODO Remove this to use getListOfModels only
|
// TODO Remove this to use getListOfModels only
|
||||||
$liste = array('blochet'=>'blochet');
|
$liste = array('blochet'=>'blochet');
|
||||||
|
|
||||||
@ -60,13 +63,14 @@ abstract class ModeleChequeReceipts extends CommonDocGenerator
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Cree un bordereau remise de cheque
|
* Cree un bordereau remise de cheque
|
||||||
* \param db objet base de donnee
|
*
|
||||||
* \param id Object invoice (or id of invoice)
|
* @param DoliDB $db Database handler
|
||||||
* \param message message
|
* @param int $id Object invoice (or id of invoice)
|
||||||
* \param modele force le modele a utiliser ('' to not force)
|
* @param string $message Message
|
||||||
* \param outputlangs objet lang a utiliser pour traduction
|
* @param string $modele Force le modele a utiliser ('' to not force)
|
||||||
* \return int <0 if KO, >0 if OK
|
* @param Translate $outputlangs Object lang a utiliser pour traduction
|
||||||
|
* @return int <0 if KO, >0 if OK
|
||||||
* TODO
|
* TODO
|
||||||
*/
|
*/
|
||||||
function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
|
function chequereceipt_pdf_create($db, $id, $message, $modele, $outputlangs)
|
||||||
|
|||||||
@ -79,9 +79,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
/**
|
/**
|
||||||
* Fonction generant le rapport sur le disque
|
* Fonction generant le rapport sur le disque
|
||||||
*
|
*
|
||||||
* @param _dir Directory
|
* @param string $_dir Directory
|
||||||
* @param number Number
|
* @param string $number Number
|
||||||
* @param outputlangs Lang output object
|
* @param Translate $outputlangs Lang output object
|
||||||
* @return int 1=ok, 0=ko
|
* @return int 1=ok, 0=ko
|
||||||
*/
|
*/
|
||||||
function write_file($_dir, $number, $outputlangs)
|
function write_file($_dir, $number, $outputlangs)
|
||||||
@ -282,6 +282,12 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Output array
|
* Output array
|
||||||
|
*
|
||||||
|
* @param PDF &$pdf PDF object
|
||||||
|
* @param int $pagenb Page nb
|
||||||
|
* @param int $pages Pages
|
||||||
|
* @param Translate $outputlangs Object lang
|
||||||
|
* @return void
|
||||||
*/
|
*/
|
||||||
function Body(&$pdf, $pagenb, $pages, $outputlangs)
|
function Body(&$pdf, $pagenb, $pages, $outputlangs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -91,6 +91,7 @@ class doc_generic_order_odt extends ModelePDFCommandes
|
|||||||
*
|
*
|
||||||
* @param Object $object Main object to use as data source
|
* @param Object $object Main object to use as data source
|
||||||
* @param Translate $outputlangs Lang object to use for output
|
* @param Translate $outputlangs Lang object to use for output
|
||||||
|
* @return array Array of substitution
|
||||||
*/
|
*/
|
||||||
function get_substitutionarray_object($object,$outputlangs)
|
function get_substitutionarray_object($object,$outputlangs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -45,8 +45,10 @@ abstract class ModelePDFCommandes extends CommonDocGenerator
|
|||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -54,7 +56,7 @@ abstract class ModelePDFCommandes extends CommonDocGenerator
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -33,6 +33,7 @@ class ModelNumRefContracts
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return if a module can be used or not
|
* Return if a module can be used or not
|
||||||
|
*
|
||||||
* @return boolean true if module can be used
|
* @return boolean true if module can be used
|
||||||
*/
|
*/
|
||||||
function isEnabled()
|
function isEnabled()
|
||||||
@ -42,6 +43,7 @@ class ModelNumRefContracts
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return default description of numbering model
|
* Return default description of numbering model
|
||||||
|
*
|
||||||
* @return string text description
|
* @return string text description
|
||||||
*/
|
*/
|
||||||
function info()
|
function info()
|
||||||
@ -53,6 +55,7 @@ class ModelNumRefContracts
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return numbering example
|
* Return numbering example
|
||||||
|
*
|
||||||
* @return string Example
|
* @return string Example
|
||||||
*/
|
*/
|
||||||
function getExample()
|
function getExample()
|
||||||
@ -64,6 +67,7 @@ class ModelNumRefContracts
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Test if existing numbers make problems with numbering
|
* Test if existing numbers make problems with numbering
|
||||||
|
*
|
||||||
* @return boolean false if conflit, true if ok
|
* @return boolean false if conflit, true if ok
|
||||||
*/
|
*/
|
||||||
function canBeActivated()
|
function canBeActivated()
|
||||||
@ -73,6 +77,7 @@ class ModelNumRefContracts
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return next value
|
* Return next value
|
||||||
|
*
|
||||||
* @return string Value
|
* @return string Value
|
||||||
*/
|
*/
|
||||||
function getNextValue()
|
function getNextValue()
|
||||||
@ -83,6 +88,7 @@ class ModelNumRefContracts
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return numbering version module
|
* Return numbering version module
|
||||||
|
*
|
||||||
* @return string Value
|
* @return string Value
|
||||||
*/
|
*/
|
||||||
function getVersion()
|
function getVersion()
|
||||||
|
|||||||
@ -40,9 +40,10 @@ abstract class ModeleDon extends CommonDocGenerator
|
|||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @return array List of donation templates
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -50,7 +51,7 @@ abstract class ModeleDon extends CommonDocGenerator
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -43,9 +43,12 @@ class ModeleShippingMethod
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
* @param $db Database handler
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -53,7 +56,7 @@ class ModeleShippingMethod
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,10 +39,13 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return list of active generation modules
|
* Return list of active generation modules
|
||||||
* \param $db Database handler
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -50,7 +53,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -41,12 +41,15 @@ class ModeleExports extends CommonDocGenerator // This class can't be abstrac
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Charge en memoire et renvoie la liste des modeles actifs
|
* Charge en memoire et renvoie la liste des modeles actifs
|
||||||
* \param db Handler de base
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
dol_syslog("ModeleExport::liste_modeles");
|
dol_syslog(get_class($this)."::liste_modeles");
|
||||||
|
|
||||||
$dir=DOL_DOCUMENT_ROOT."/core/modules/export/";
|
$dir=DOL_DOCUMENT_ROOT."/core/modules/export/";
|
||||||
$handle=opendir($dir);
|
$handle=opendir($dir);
|
||||||
|
|||||||
@ -88,8 +88,9 @@ class doc_generic_invoice_odt extends ModelePDFFactures
|
|||||||
/**
|
/**
|
||||||
* Define array with couple substitution key => substitution value
|
* Define array with couple substitution key => substitution value
|
||||||
*
|
*
|
||||||
* @param $object Main object to use as data source
|
* @param Object $object Main object to use as data source
|
||||||
* @param $outputlangs Lang object to use for output
|
* @param Translate $outputlangs Lang object to use for output
|
||||||
|
* @return array Array of substitution
|
||||||
*/
|
*/
|
||||||
function get_substitutionarray_object($object,$outputlangs)
|
function get_substitutionarray_object($object,$outputlangs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -41,9 +41,12 @@ abstract class ModelePDFFactures extends CommonDocGenerator
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
* @param $db Database handler
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -51,7 +54,7 @@ abstract class ModelePDFFactures extends CommonDocGenerator
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -32,8 +32,7 @@ require_once(DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php');
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class pdf_soleil
|
* Class to build interventions documents with model Soleil
|
||||||
* \brief Class to build interventions documents with model Soleil
|
|
||||||
*/
|
*/
|
||||||
class pdf_soleil extends ModelePDFFicheinter
|
class pdf_soleil extends ModelePDFFicheinter
|
||||||
{
|
{
|
||||||
@ -211,10 +210,10 @@ class pdf_soleil extends ModelePDFFicheinter
|
|||||||
$pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0);
|
$pdf->MultiCell(190,8,$outputlangs->transnoentities("Description"),0,'L',0);
|
||||||
$pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8 );
|
$pdf->line($this->marge_gauche, $tab_top + 8, $this->page_largeur-$this->marge_droite, $tab_top + 8 );
|
||||||
|
|
||||||
$pdf->SetFont('','', $default_font_size - 1);
|
$pdf->SetFont('', '', $default_font_size - 1);
|
||||||
|
|
||||||
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
$pdf->MultiCell(0, 3, ''); // Set interline to 3
|
||||||
$pdf->SetXY($this->marge_gauche, $tab_top + 8 );
|
$pdf->SetXY($this->marge_gauche, $tab_top + 8);
|
||||||
$text=$object->description;
|
$text=$object->description;
|
||||||
if ($object->duree > 0)
|
if ($object->duree > 0)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -41,8 +41,10 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator
|
|||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -50,7 +52,7 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -62,11 +62,13 @@ class ModeleImports
|
|||||||
/**
|
/**
|
||||||
* Charge en memoire et renvoie la liste des modeles actifs
|
* Charge en memoire et renvoie la liste des modeles actifs
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Handler de base
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
dol_syslog("ModeleImport::liste_modeles");
|
dol_syslog(get_class($this)."::liste_modeles");
|
||||||
|
|
||||||
$dir=DOL_DOCUMENT_ROOT."/core/modules/import/";
|
$dir=DOL_DOCUMENT_ROOT."/core/modules/import/";
|
||||||
$handle=opendir($dir);
|
$handle=opendir($dir);
|
||||||
|
|||||||
@ -38,10 +38,13 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator
|
|||||||
var $error='';
|
var $error='';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return list of active generation modules
|
* Return list of active generation modules
|
||||||
* \param $db Database handler
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -49,7 +52,7 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -39,10 +39,13 @@ class ModelePDFCards
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \brief Return list of active generation modules
|
* Return list of active generation modules
|
||||||
* \param $db Database handler
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -50,7 +53,7 @@ class ModelePDFCards
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -42,8 +42,10 @@ class ModelePDFLabels
|
|||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -51,7 +53,7 @@ class ModelePDFLabels
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -149,6 +149,7 @@ class modCashDesk extends DolibarrModules
|
|||||||
* Remove from database constants, boxes and permissions from Dolibarr database.
|
* Remove from database constants, boxes and permissions from Dolibarr database.
|
||||||
* Data directories are not deleted.
|
* Data directories are not deleted.
|
||||||
*
|
*
|
||||||
|
* @param string $options Options
|
||||||
* @return int 1 if OK, 0 if KO
|
* @return int 1 if OK, 0 if KO
|
||||||
*/
|
*/
|
||||||
function remove($options='')
|
function remove($options='')
|
||||||
|
|||||||
@ -133,12 +133,12 @@ class modProduct extends DolibarrModules
|
|||||||
$this->export_permission[$r]=array(array("produit","export"));
|
$this->export_permission[$r]=array(array("produit","export"));
|
||||||
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.customcode'=>'CustomCode','p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.tobuy'=>"OnBuy",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.length'=>"Length",'p.surface'=>"Surface",'p.volume'=>"Volume",'p.weight'=>"Weight",'p.customcode'=>'CustomCode','p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.tobuy'=>"OnBuy",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
||||||
//if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge ($this->export_fields_array[$r],array('p.stock'=>'Stock','p.pmp'=>'PMPValue'));
|
//if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge ($this->export_fields_array[$r],array('p.stock'=>'Stock','p.pmp'=>'PMPValue'));
|
||||||
if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge ($this->export_fields_array[$r],array('p.pmp'=>'PMPValue'));
|
if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.pmp'=>'PMPValue'));
|
||||||
if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge ($this->export_fields_array[$r],array('p.barcode'=>'Barcode'));
|
if (! empty($conf->barcode->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.barcode'=>'Barcode'));
|
||||||
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.label'=>"product",'p.description'=>"product",'p.accountancy_code_sell'=>'product','p.accountancy_code_sell'=>'product','p.note'=>"product",'p.length'=>"product",'p.surface'=>"product",'p.volume'=>"product",'p.weight'=>"product",'p.customcode'=>'product','p.price_base_type'=>"product",'p.price'=>"product",'p.price_ttc'=>"product",'p.tva_tx'=>"product",'p.tosell'=>"product",'p.tobuy'=>"product",'p.datec'=>"product",'p.tms'=>"product");
|
$this->export_entities_array[$r]=array('p.rowid'=>"product",'p.ref'=>"product",'p.label'=>"product",'p.description'=>"product",'p.accountancy_code_sell'=>'product','p.accountancy_code_sell'=>'product','p.note'=>"product",'p.length'=>"product",'p.surface'=>"product",'p.volume'=>"product",'p.weight'=>"product",'p.customcode'=>'product','p.price_base_type'=>"product",'p.price'=>"product",'p.price_ttc'=>"product",'p.tva_tx'=>"product",'p.tosell'=>"product",'p.tobuy'=>"product",'p.datec'=>"product",'p.tms'=>"product");
|
||||||
//if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge ($this->export_entities_array[$r],array('p.stock'=>'product','p.pmp'=>'product'));
|
//if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge ($this->export_entities_array[$r],array('p.stock'=>'product','p.pmp'=>'product'));
|
||||||
if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge ($this->export_entities_array[$r],array('p.pmp'=>'product'));
|
if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.pmp'=>'product'));
|
||||||
if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge ($this->export_entities_array[$r],array('p.barcode'=>'product'));
|
if (! empty($conf->barcode->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.barcode'=>'product'));
|
||||||
// Add extra fields
|
// Add extra fields
|
||||||
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'";
|
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'";
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
|
|||||||
@ -122,9 +122,9 @@ class modService extends DolibarrModules
|
|||||||
$this->export_label[$r]="Services"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
$this->export_label[$r]="Services"; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||||
$this->export_permission[$r]=array(array("service","export"));
|
$this->export_permission[$r]=array(array("service","export"));
|
||||||
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
$this->export_fields_array[$r]=array('p.rowid'=>"Id",'p.ref'=>"Ref",'p.label'=>"Label",'p.description'=>"Description",'p.accountancy_code_sell'=>"ProductAccountancySellCode",'p.accountancy_code_buy'=>"ProductAccountancyBuyCode",'p.note'=>"Note",'p.price_base_type'=>"PriceBase",'p.price'=>"UnitPriceHT",'p.price_ttc'=>"UnitPriceTTC",'p.tva_tx'=>'VATRate','p.tosell'=>"OnSell",'p.duration'=>"Duration",'p.datec'=>'DateCreation','p.tms'=>'DateModification');
|
||||||
if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge ($this->export_fields_array[$r],array('p.stock'=>'Stock'));
|
if (! empty($conf->stock->enabled)) $this->export_fields_array[$r]=array_merge($this->export_fields_array[$r],array('p.stock'=>'Stock'));
|
||||||
$this->export_entities_array[$r]=array('p.rowid'=>"service",'p.ref'=>"service",'p.label'=>"service",'p.description'=>"service",'p.accountancy_code_sell'=>'service','p.accountancy_code_sell'=>'service','p.note'=>"service",'p.price_base_type'=>"service",'p.price'=>"service",'p.price_ttc'=>"service",'p.tva_tx'=>"service",'p.tosell'=>"service",'p.duration'=>"service",'p.datec'=>"service",'p.tms'=>"service");
|
$this->export_entities_array[$r]=array('p.rowid'=>"service",'p.ref'=>"service",'p.label'=>"service",'p.description'=>"service",'p.accountancy_code_sell'=>'service','p.accountancy_code_sell'=>'service','p.note'=>"service",'p.price_base_type'=>"service",'p.price'=>"service",'p.price_ttc'=>"service",'p.tva_tx'=>"service",'p.tosell'=>"service",'p.duration'=>"service",'p.datec'=>"service",'p.tms'=>"service");
|
||||||
if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge ($this->export_entities_array[$r],array('p.stock'=>'product'));
|
if (! empty($conf->stock->enabled)) $this->export_entities_array[$r]=array_merge($this->export_entities_array[$r],array('p.stock'=>'product'));
|
||||||
// Add extra fields
|
// Add extra fields
|
||||||
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'";
|
$sql="SELECT name, label FROM ".MAIN_DB_PREFIX."extrafields WHERE elementtype = 'product'";
|
||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
|
|||||||
@ -37,8 +37,10 @@ abstract class ModelePDFProjects extends CommonDocGenerator
|
|||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -46,7 +48,7 @@ abstract class ModelePDFProjects extends CommonDocGenerator
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -91,6 +91,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales
|
|||||||
*
|
*
|
||||||
* @param Object $object Main object to use as data source
|
* @param Object $object Main object to use as data source
|
||||||
* @param Translate $outputlangs Lang object to use for output
|
* @param Translate $outputlangs Lang object to use for output
|
||||||
|
* @return array Array of substitution
|
||||||
*/
|
*/
|
||||||
function get_substitutionarray_object($object,$outputlangs)
|
function get_substitutionarray_object($object,$outputlangs)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -42,8 +42,10 @@ abstract class ModelePDFPropales extends CommonDocGenerator
|
|||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -51,7 +53,7 @@ abstract class ModelePDFPropales extends CommonDocGenerator
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -40,6 +40,7 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator
|
|||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
* @param string $maxfilenamelength Max length of value to show
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of templates
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db,$maxfilenamelength=0)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
@ -140,9 +141,10 @@ abstract class ModeleThirdPartyCode
|
|||||||
* Renvoi la liste des modeles de numéroation
|
* Renvoi la liste des modeles de numéroation
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
* @return array List of numbers
|
* @return array List of numbers
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
$liste=array();
|
$liste=array();
|
||||||
$sql ="";
|
$sql ="";
|
||||||
@ -172,7 +174,7 @@ abstract class ModeleThirdPartyCode
|
|||||||
* @param Translate $langs Output language
|
* @param Translate $langs Output language
|
||||||
* @param Societe $soc Third party object
|
* @param Societe $soc Third party object
|
||||||
* @param int $type -1=Nothing, 0=Customer, 1=Supplier
|
* @param int $type -1=Nothing, 0=Customer, 1=Supplier
|
||||||
* @return tring HTML translated description
|
* @return string HTML translated description
|
||||||
*/
|
*/
|
||||||
function getToolTip($langs,$soc,$type)
|
function getToolTip($langs,$soc,$type)
|
||||||
{
|
{
|
||||||
|
|||||||
@ -38,8 +38,10 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator
|
|||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of numbers
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -47,7 +49,7 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -44,8 +44,10 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator
|
|||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
*
|
*
|
||||||
* @param DoliDB $db Database handler
|
* @param DoliDB $db Database handler
|
||||||
|
* @param string $maxfilenamelength Max length of value to show
|
||||||
|
* @return array List of numbers
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db,$maxfilenamelength=0)
|
||||||
{
|
{
|
||||||
global $conf;
|
global $conf;
|
||||||
|
|
||||||
@ -53,7 +55,7 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator
|
|||||||
$liste=array();
|
$liste=array();
|
||||||
|
|
||||||
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
include_once(DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php');
|
||||||
$liste=getListOfModels($db,$type,'');
|
$liste=getListOfModels($db,$type,$maxfilenamelength);
|
||||||
|
|
||||||
return $liste;
|
return $liste;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user