mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-13 13:01:27 +01:00
NEW Factorize a lot of code for numbering modules
This commit is contained in:
@@ -54,6 +54,27 @@ abstract class CommonNumRefGenerator
|
||||
protected $db;
|
||||
|
||||
|
||||
/** Return model name
|
||||
* TODO Replace with getName()
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Model name
|
||||
*/
|
||||
public function getNom($langs)
|
||||
{
|
||||
return empty($this->name) ? get_class($this) : $this->name;
|
||||
}
|
||||
|
||||
/** Return model name
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Model name
|
||||
*/
|
||||
public function getName($langs)
|
||||
{
|
||||
return empty($this->name) ? get_class($this) : $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
|
||||
|
||||
@@ -37,42 +38,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFAsset extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -99,98 +64,7 @@ abstract class ModelePDFAsset extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class to manage numbering of Asset
|
||||
*/
|
||||
abstract class ModeleNumRefAsset
|
||||
abstract class ModeleNumRefAsset extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering template
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("asset@asset");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("asset@asset");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated($object)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of numbering module
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -31,12 +31,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
*/
|
||||
abstract class ModeleBankAccountDoc extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
* \brief File with parent classes for barcode document modules and numbering modules
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@@ -50,50 +51,8 @@ abstract class ModeleBarCode
|
||||
/**
|
||||
* Parent class for barcode numbering models
|
||||
*/
|
||||
abstract class ModeleNumRefBarCode
|
||||
abstract class ModeleNumRefBarCode extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/** Return default description of numbering model
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info($langs)
|
||||
{
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/** Return model name
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Model name
|
||||
*/
|
||||
public function getNom($langs)
|
||||
{
|
||||
return empty($this->name) ? get_class($this) : $this->name;
|
||||
}
|
||||
|
||||
/** Return a numbering example
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample($langs)
|
||||
{
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return next value available
|
||||
*
|
||||
@@ -107,30 +66,6 @@ abstract class ModeleNumRefBarCode
|
||||
return $langs->trans("Function_getNextValue_InModuleNotWorking");
|
||||
}
|
||||
|
||||
/** Return version of module
|
||||
*
|
||||
* @return string Version
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return description of module parameters
|
||||
*
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
|
||||
|
||||
@@ -38,7 +39,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFBom extends CommonDocGenerator
|
||||
{
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -65,98 +65,7 @@ abstract class ModelePDFBom extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class to manage numbering of BOMs
|
||||
*/
|
||||
abstract class ModeleNumRefBoms
|
||||
abstract class ModeleNumRefBoms extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering template
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("mrp");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("mrp");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of numbering module
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
|
||||
|
||||
@@ -37,43 +38,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFBooking extends CommonDocGenerator
|
||||
{
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -102,93 +66,7 @@ abstract class ModelePDFBooking extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class to manage numbering of MyObject
|
||||
*/
|
||||
abstract class ModeleNumRefBooking
|
||||
abstract class ModeleNumRefBooking extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering template
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("mymodule@mymodule");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("mymodule@mymodule");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated($object)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of numbering module
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -27,107 +27,16 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Requis car utilise dans les classes qui heritent
|
||||
|
||||
/**
|
||||
* \class ModeleNumRefChequeReceipts
|
||||
* \brief Cheque Receipts numbering references mother class
|
||||
* Class parent for cheque Receipts numbering references mother class
|
||||
*/
|
||||
abstract class ModeleNumRefChequeReceipts
|
||||
abstract class ModeleNumRefChequeReceipts extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the default description of numbering module
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return numbering example
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the next value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the module numbering version
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
||||
|
||||
@@ -83,98 +84,7 @@ abstract class ModelePDFCommandes extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class to manage numbering of Sale Orders
|
||||
*/
|
||||
abstract class ModeleNumRefCommandes
|
||||
abstract class ModeleNumRefCommandes extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering pattern
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("orders");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoie un exemple de numerotation
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("orders");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of numbering module
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@@ -37,12 +38,6 @@
|
||||
*/
|
||||
abstract class ModelePDFContract extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -68,92 +63,7 @@ abstract class ModelePDFContract extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class for all contract numbering modules
|
||||
*/
|
||||
class ModelNumRefContracts
|
||||
class ModelNumRefContracts extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return default description of numbering model
|
||||
*
|
||||
* @return string text description
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("contracts");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return numbering example
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("contracts");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if existing numbers make problems with numbering
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
* @param Societe $objsoc third party object
|
||||
* @param Object $contract contract object
|
||||
* @return string Value
|
||||
*/
|
||||
public function getNextValue($objsoc, $contract)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return numbering version module
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@@ -36,11 +37,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
*/
|
||||
abstract class ModelePDFDeliveryOrder extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -63,101 +59,10 @@ abstract class ModelePDFDeliveryOrder extends CommonDocGenerator
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* \class ModeleNumRefDeliveryOrder
|
||||
* \brief Classe mere des modeles de numerotation des references de bon de livraison
|
||||
* Classe mere des modeles de numerotation des references de bon de livraison
|
||||
*/
|
||||
abstract class ModeleNumRefDeliveryOrder
|
||||
abstract class ModeleNumRefDeliveryOrder extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering pattern
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("deliveries");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("deliveries");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Object $object Object delivery
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
} else {
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
* \brief File of class to manage donation document generation
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||
|
||||
|
||||
@@ -34,11 +35,6 @@ require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php';
|
||||
*/
|
||||
abstract class ModeleDon extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -64,96 +60,7 @@ abstract class ModeleDon extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class of donation numbering templates
|
||||
*/
|
||||
abstract class ModeleNumRefDons
|
||||
abstract class ModeleNumRefDons extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering pattern
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue()
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -29,19 +29,16 @@
|
||||
* \brief File that contains parent class for sending receipts models
|
||||
* and parent class for sending receipts numbering models
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Parent class of sending receipts models
|
||||
*/
|
||||
abstract class ModelePdfExpedition extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation models
|
||||
@@ -67,94 +64,7 @@ abstract class ModelePdfExpedition extends CommonDocGenerator
|
||||
/**
|
||||
* Parent Class of numbering models of sending receipts references
|
||||
*/
|
||||
abstract class ModelNumRefExpedition
|
||||
abstract class ModelNumRefExpedition extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
public $version;
|
||||
|
||||
|
||||
/** Return if a model can be used or not
|
||||
*
|
||||
* @return boolean true if model can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return default description of numbering model
|
||||
*
|
||||
* @return string text description
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("sendings");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns numbering example
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("sendings");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if existing numbers make problems with numbering
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next value assigned
|
||||
*
|
||||
* @param Societe $objsoc Third party object
|
||||
* @param Object $shipment Shipment object
|
||||
* @return string Value
|
||||
*/
|
||||
public function getNextValue($objsoc, $shipment)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of the numbering model
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -16,6 +16,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@@ -23,47 +24,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
*/
|
||||
abstract class ModeleExpenseReport extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active models generation
|
||||
@@ -104,99 +64,9 @@ function expensereport_pdf_create(DoliDB $db, ExpenseReport $object, $message, $
|
||||
}
|
||||
|
||||
/**
|
||||
* \class ModeleNumRefExpenseReport
|
||||
* \brief Parent class for numbering masks of expense reports
|
||||
* Parent class for numbering masks of expense reports
|
||||
*/
|
||||
|
||||
abstract class ModeleNumRefExpenseReport
|
||||
abstract class ModeleNumRefExpenseReport extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a model can be used or not
|
||||
*
|
||||
* @return boolean true if model can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering model
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("orders");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("trips");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Test whether the numbers already in force in the base do not cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Value
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the version of the numbering module
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
} else {
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/product/class/product.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Required because used in classes that inherit
|
||||
|
||||
@@ -39,11 +40,6 @@ use Sprain\SwissQrBill;
|
||||
*/
|
||||
abstract class ModelePDFFactures extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
public $posxpicture;
|
||||
public $posxtva;
|
||||
public $posxup;
|
||||
@@ -61,6 +57,7 @@ abstract class ModelePDFFactures extends CommonDocGenerator
|
||||
public $atleastonediscount = 0;
|
||||
public $atleastoneratenotnull = 0;
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -251,98 +248,7 @@ abstract class ModelePDFFactures extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class of invoice reference numbering templates
|
||||
*/
|
||||
abstract class ModeleNumRefFactures
|
||||
abstract class ModeleNumRefFactures extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering pattern
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param Societe $objsoc Objet societe
|
||||
* @param Facture $invoice Objet facture
|
||||
* @param string $mode 'next' for next value or 'last' for last value
|
||||
* @return string Value
|
||||
*/
|
||||
public function getNextValue($objsoc, $invoice, $mode = 'next')
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi version du modele de numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
} else {
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@@ -34,12 +35,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
*/
|
||||
abstract class ModelePDFFicheinter extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -65,99 +60,9 @@ abstract class ModelePDFFicheinter extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class numbering models of intervention sheet references
|
||||
*/
|
||||
abstract class ModeleNumRefFicheinter
|
||||
abstract class ModeleNumRefFicheinter extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering template
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("ficheinter");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a numbering example
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("ficheinter");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the next assigned value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Value if KO, <0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc = 0, $object = '')
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the version of the numbering module
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
} else {
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
|
||||
@@ -177,7 +82,7 @@ abstract class ModeleNumRefFicheinter
|
||||
function fichinter_create($db, $object, $modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs, $user;
|
||||
global $conf, $langs;
|
||||
$langs->load("ficheinter");
|
||||
|
||||
$error = 0;
|
||||
|
||||
@@ -31,6 +31,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@@ -38,12 +39,6 @@
|
||||
*/
|
||||
abstract class ModelePDFHoliday extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -69,90 +64,7 @@ abstract class ModelePDFHoliday extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class for all holidays numbering modules
|
||||
*/
|
||||
class ModelNumRefHolidays
|
||||
class ModelNumRefHolidays extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return default description of numbering model
|
||||
*
|
||||
* @return string text description
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("holiday");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return numbering example
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("holiday");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if existing numbers make problems with numbering
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return next value
|
||||
*
|
||||
* @param Societe $objsoc third party object
|
||||
* @param Object $holiday Holiday object
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $holiday)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return numbering version module
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
} else {
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
|
||||
|
||||
@@ -37,7 +38,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFEvaluation extends CommonDocGenerator
|
||||
{
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -64,99 +64,7 @@ abstract class ModelePDFEvaluation extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class to manage numbering of Evaluation
|
||||
*/
|
||||
abstract class ModeleNumRefEvaluation
|
||||
abstract class ModeleNumRefEvaluation extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering template
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("hrm");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("hrm");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated($object)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of numbering module
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -28,18 +28,14 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Parent class to manage intervention document templates
|
||||
*/
|
||||
abstract class ModelePDFMember extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -65,13 +61,8 @@ abstract class ModelePDFMember extends CommonDocGenerator
|
||||
/**
|
||||
* Classe mere des modeles de numerotation des references de members
|
||||
*/
|
||||
abstract class ModeleNumRefMembers
|
||||
abstract class ModeleNumRefMembers extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
public $code_modifiable; // Editable code
|
||||
|
||||
public $code_modifiable_invalide; // Modified code if it is invalid
|
||||
@@ -80,101 +71,6 @@ abstract class ModeleNumRefMembers
|
||||
|
||||
public $code_null; //
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering pattern
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("members");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return name of module
|
||||
*
|
||||
* @return string Module name
|
||||
*/
|
||||
public function getName()
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("members");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
} else {
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return description of module parameters
|
||||
@@ -197,10 +93,10 @@ abstract class ModeleNumRefMembers
|
||||
}
|
||||
|
||||
$s = '';
|
||||
$s .= $langs->trans("Name").': <b>'.$this->getName().'</b><br>';
|
||||
$s .= $langs->trans("Name").': <b>'.$this->getName($langs).'</b><br>';
|
||||
$s .= $langs->trans("Version").': <b>'.$this->getVersion().'</b><br>';
|
||||
$s .= $langs->trans("MemberCodeDesc").'<br>';
|
||||
$s .= $langs->trans("ValidityControledByModule").': <b>'.$this->getName().'</b><br>';
|
||||
$s .= $langs->trans("ValidityControledByModule").': <b>'.$this->getName($langs).'</b><br>';
|
||||
$s .= '<br>';
|
||||
$s .= '<u>'.$langs->trans("ThisIsModuleRules").':</u><br>';
|
||||
|
||||
|
||||
@@ -30,47 +30,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
*/
|
||||
abstract class ModelePDFMovement extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
public $option_codestockservice;
|
||||
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
|
||||
|
||||
@@ -38,7 +39,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFMo extends CommonDocGenerator
|
||||
{
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -61,103 +61,10 @@ abstract class ModelePDFMo extends CommonDocGenerator
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Parent class to manage numbering of MOs
|
||||
*/
|
||||
abstract class ModeleNumRefMos
|
||||
abstract class ModeleNumRefMos extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering template
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("mrp");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("mrp");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of numbering module
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -16,102 +16,12 @@
|
||||
* or see https://www.gnu.org/
|
||||
*/
|
||||
|
||||
/**
|
||||
* \class ModeleNumRefPayments
|
||||
* \brief Payment numbering references mother class
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
abstract class ModeleNumRefPayments
|
||||
/**
|
||||
* Payment numbering references mother class
|
||||
*/
|
||||
abstract class ModeleNumRefPayments extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the default description of numbering module
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return numbering example
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the next value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the module numbering version
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
} else {
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -27,53 +27,14 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Parent class to manage intervention document templates
|
||||
*/
|
||||
abstract class ModelePDFProduct extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -97,56 +58,8 @@ abstract class ModelePDFProduct extends CommonDocGenerator
|
||||
/**
|
||||
* Class template for classes of numbering product
|
||||
*/
|
||||
abstract class ModeleProductCode
|
||||
abstract class ModeleProductCode extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/** Returns the default description of the numbering pattern
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info($langs)
|
||||
{
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/** Renvoi nom module
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Nom du module
|
||||
*/
|
||||
public function getNom($langs)
|
||||
{
|
||||
return empty($this->name) ? $this->nom : $this->name;
|
||||
}
|
||||
|
||||
|
||||
/** Return an example of numbering
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample($langs)
|
||||
{
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return next value available
|
||||
*
|
||||
@@ -160,31 +73,6 @@ abstract class ModeleProductCode
|
||||
return $langs->trans("Function_getNextValue_InModuleNotWorking");
|
||||
}
|
||||
|
||||
|
||||
/** Return version of module
|
||||
*
|
||||
* @return string Version
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Renvoi la liste des modeles de numérotation
|
||||
|
||||
@@ -32,18 +32,14 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Parent class to manage intervention document templates
|
||||
*/
|
||||
abstract class ModelePDFProductBatch extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -67,90 +63,7 @@ abstract class ModelePDFProductBatch extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class to manage numbering of batch products
|
||||
*/
|
||||
abstract class ModeleNumRefBatch
|
||||
abstract class ModeleNumRefBatch extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering template
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("productbatch");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("productbatch");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Productlot $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of numbering module
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
|
||||
if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
|
||||
if ($this->version == 'dolibarr') return DOL_VERSION;
|
||||
if ($this->version) return $this->version;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
* and parent class for projects numbering models
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@@ -36,61 +37,11 @@ abstract class ModelePDFProjects extends CommonDocGenerator
|
||||
*/
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
public $name;
|
||||
|
||||
/**
|
||||
* @var string model description (short text)
|
||||
*/
|
||||
public $description;
|
||||
|
||||
/**
|
||||
* @var string document type
|
||||
*/
|
||||
public $type;
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
@@ -118,96 +69,7 @@ abstract class ModelePDFProjects extends CommonDocGenerator
|
||||
/**
|
||||
* Classe mere des modeles de numerotation des references de projets
|
||||
*/
|
||||
abstract class ModeleNumRefProjects
|
||||
abstract class ModeleNumRefProjects extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering pattern
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("projects");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("projects");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Project $project Object project
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $project)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
} else {
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Requis car utilise dans les classes qui heritent
|
||||
|
||||
|
||||
@@ -36,11 +37,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Requis
|
||||
*/
|
||||
abstract class ModelePDFPropales extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
public $posxpicture;
|
||||
public $posxtva;
|
||||
public $posxup;
|
||||
@@ -84,99 +80,7 @@ abstract class ModelePDFPropales extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class for numbering rules of proposals
|
||||
*/
|
||||
abstract class ModeleNumRefPropales
|
||||
abstract class ModeleNumRefPropales extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering pattern
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("propale");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("propale");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Propal $propal Object commercial proposal
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $propal)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -22,16 +22,15 @@
|
||||
* \brief File that contains parent class for sending receipts models
|
||||
* and parent class for sending receipts numbering models
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
/**
|
||||
* Parent class of sending receipts models
|
||||
*/
|
||||
abstract class ModelePdfReception extends CommonDocGenerator
|
||||
{
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -57,89 +56,7 @@ abstract class ModelePdfReception extends CommonDocGenerator
|
||||
/**
|
||||
* Parent Class of numbering models of sending receipts references
|
||||
*/
|
||||
abstract class ModelNumRefReception
|
||||
abstract class ModelNumRefReception extends CommonNumRefGenerator
|
||||
{
|
||||
public $error = '';
|
||||
|
||||
public $version;
|
||||
|
||||
|
||||
/**
|
||||
* Return if a model can be used or not
|
||||
*
|
||||
* @return boolean true if model can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return default description of numbering model
|
||||
*
|
||||
* @return string text description
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("reception");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns numbering example
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("reception");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Test if existing numbers make problems with numbering
|
||||
*
|
||||
* @return boolean false if conflit, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next value assigned
|
||||
*
|
||||
* @param Societe $objsoc Third party object
|
||||
* @param Object $reception Reception object
|
||||
* @return string Value
|
||||
*/
|
||||
public function getNextValue($objsoc, $reception)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of the numbering model
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
* \brief File with parent class of submodules to manage numbering and document generation
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@@ -32,11 +33,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
*/
|
||||
abstract class ModeleThirdPartyDoc extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -61,63 +57,8 @@ abstract class ModeleThirdPartyDoc extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class for third parties code generators
|
||||
*/
|
||||
abstract class ModeleThirdPartyCode
|
||||
abstract class ModeleThirdPartyCode extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* @var array Error code (or message) array
|
||||
*/
|
||||
public $errors;
|
||||
|
||||
|
||||
/** Returns the default description of the numbering pattern
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info($langs)
|
||||
{
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/** Return name of module
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Nom du module
|
||||
*/
|
||||
public function getNom($langs)
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
|
||||
/** Return an example of numbering
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample($langs)
|
||||
{
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return next value available
|
||||
*
|
||||
@@ -131,30 +72,6 @@ abstract class ModeleThirdPartyCode
|
||||
return $langs->trans("Function_getNextValue_InModuleNotWorking");
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Return version of module
|
||||
*
|
||||
* @return string Version
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
} else {
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Renvoie la liste des modeles de numérotation
|
||||
@@ -273,74 +190,8 @@ abstract class ModeleThirdPartyCode
|
||||
/**
|
||||
* Parent class for third parties accountancy code generators
|
||||
*/
|
||||
abstract class ModeleAccountancyCode
|
||||
abstract class ModeleAccountancyCode extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return description of module
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Description of module
|
||||
*/
|
||||
public function info($langs)
|
||||
{
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an example of result returned by getNextValue
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @param societe $objsoc Object thirdparty
|
||||
* @param int $type Type of third party (1:customer, 2:supplier, -1:autodetect)
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample($langs, $objsoc = 0, $type = -1)
|
||||
{
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return version of module
|
||||
*
|
||||
* @return string Version
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
} else {
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Return description of module parameters
|
||||
*
|
||||
|
||||
@@ -23,47 +23,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
*/
|
||||
abstract class ModelePDFStock extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
|
||||
|
||||
@@ -38,7 +39,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFStockTransfer extends CommonDocGenerator
|
||||
{
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -65,91 +65,7 @@ abstract class ModelePDFStockTransfer extends CommonDocGenerator
|
||||
/**
|
||||
* Parent class to manage numbering of StockTransfer
|
||||
*/
|
||||
abstract class ModeleNumRefStockTransfer
|
||||
abstract class ModeleNumRefStockTransfer extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering template
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("stocktransfer@stocktransfer");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("stocktransfer@stocktransfer");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated($object)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of numbering module
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') return $langs->trans("VersionDevelopment");
|
||||
if ($this->version == 'experimental') return $langs->trans("VersionExperimental");
|
||||
if ($this->version == 'dolibarr') return DOL_VERSION;
|
||||
if ($this->version) return $this->version;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -26,6 +26,7 @@
|
||||
* and parent class for supplier invoices numbering models
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
|
||||
|
||||
@@ -34,12 +35,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation models
|
||||
@@ -64,93 +59,7 @@ abstract class ModelePDFSuppliersInvoices extends CommonDocGenerator
|
||||
/**
|
||||
* Parent Class of numbering models of suppliers invoices references
|
||||
*/
|
||||
abstract class ModeleNumRefSuppliersInvoices
|
||||
abstract class ModeleNumRefSuppliersInvoices extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/** Return if a model can be used or not
|
||||
*
|
||||
* @return boolean true if model can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Returns the default description of the model numbering
|
||||
*
|
||||
* @return string Description Text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("invoices");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/** Returns a numbering example
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("invoices");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/** Tests if the numbers already in force in the database do not cause conflicts that would prevent this numbering.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Returns next value assigned
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Object $object Object
|
||||
* @param string $mode 'next' for next value or 'last' for last value
|
||||
* @return string Value if OK, 0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc, $object, $mode = 'next')
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/** Returns version of the model numbering
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
* and parent class for supplier orders numbering models
|
||||
*/
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
|
||||
|
||||
@@ -54,12 +55,6 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator
|
||||
public $atleastoneratenotnull = 0;
|
||||
public $atleastonediscount = 0;
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation models
|
||||
@@ -86,92 +81,7 @@ abstract class ModelePDFSuppliersOrders extends CommonDocGenerator
|
||||
/**
|
||||
* Parent Class of numbering models of suppliers orders references
|
||||
*/
|
||||
abstract class ModeleNumRefSuppliersOrders
|
||||
abstract class ModeleNumRefSuppliersOrders extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/** Return if a model can be used or not
|
||||
*
|
||||
* @return boolean true if model can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Returns default description of numbering model
|
||||
*
|
||||
* @return string Description Text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("orders");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/** Returns a numbering example
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("orders");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/** Tests if existing numbers make problems with numbering
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/** Returns next value assigned
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Object $object Object
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc = 0, $object = '')
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/** Returns version of the numbering model
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@@ -24,47 +25,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
*/
|
||||
abstract class ModelePDFSuppliersPayments extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation models
|
||||
@@ -91,97 +51,7 @@ abstract class ModelePDFSuppliersPayments extends CommonDocGenerator
|
||||
*
|
||||
* Payment numbering references mother class
|
||||
*/
|
||||
|
||||
abstract class ModeleNumRefSupplierPayments
|
||||
abstract class ModeleNumRefSupplierPayments extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the default description of numbering module
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return numbering example
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("bills");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the next value
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the module numbering version
|
||||
*
|
||||
* @return string Value
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
} elseif ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
} elseif ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
} elseif ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -28,6 +28,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Requis car utilise dans les classes qui heritent
|
||||
|
||||
|
||||
@@ -36,12 +37,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // Requis
|
||||
*/
|
||||
abstract class ModelePDFSupplierProposal extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -67,99 +62,7 @@ abstract class ModelePDFSupplierProposal extends CommonDocGenerator
|
||||
/**
|
||||
* Classe mere des modeles de numerotation des references de propales
|
||||
*/
|
||||
abstract class ModeleNumRefSupplierProposal
|
||||
abstract class ModeleNumRefSupplierProposal extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering pattern
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("supplier_proposal");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("supplier_proposal");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param SupplierProposal $supplier_proposal Object commercial proposal
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $supplier_proposal)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -26,105 +26,13 @@
|
||||
* \brief File containing the parent class for the numbering of cash register receipts
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* \class ModeleNumRefTakepos
|
||||
* \brief Classe mere des modeles de numerotation des tickets de caisse
|
||||
* Classe mere des modeles de numerotation des tickets de caisse
|
||||
*/
|
||||
abstract class ModeleNumRefTakepos
|
||||
abstract class ModeleNumRefTakepos extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering pattern
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("cashdesk@cashdesk");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load('cashdesk@cashdesk');
|
||||
return $langs->trans('NoExample');
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param Societe $objsoc Object thirdparty
|
||||
* @param Facture $invoice Object invoice
|
||||
* @param string $mode 'next' for next value or 'last' for last value
|
||||
* @return string Value if KO, <0 if KO
|
||||
*/
|
||||
public function getNextValue($objsoc = null, $invoice = null, $mode = 'next')
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans('NotAvailable');
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi version du modele de numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans('VersionDevelopment');
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans('VersionExperimental');
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans('NotAvailable');
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -26,13 +26,14 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Parent class for documents models
|
||||
*/
|
||||
abstract class ModelePDFTicket extends CommonDocGenerator
|
||||
{
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -58,103 +59,7 @@ abstract class ModelePDFTicket extends CommonDocGenerator
|
||||
/**
|
||||
* Classe mere des modeles de numerotation des references de projets
|
||||
*/
|
||||
abstract class ModeleNumRefTicket
|
||||
abstract class ModeleNumRefTicket extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering pattern
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("ticket");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Return an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("ticket");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi prochaine valeur attribuee
|
||||
*
|
||||
* @param Societe $objsoc Object third party
|
||||
* @param Ticket $ticket Object ticket
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($objsoc, $ticket)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Renvoi version du module numerotation
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -19,12 +19,6 @@
|
||||
* or see https://www.gnu.org/
|
||||
*/
|
||||
|
||||
|
||||
/**
|
||||
* \class ModeleProductCode
|
||||
* \brief Parent class for product code generators
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/modules/contract/modules_contract.php
|
||||
* \ingroup contract
|
||||
@@ -33,17 +27,12 @@
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Parent class to manage intervention document templates
|
||||
*/
|
||||
abstract class ModelePDFUserGroup extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
|
||||
|
||||
@@ -38,7 +39,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFWorkstation extends CommonDocGenerator
|
||||
{
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -61,103 +61,10 @@ abstract class ModelePDFWorkstation extends CommonDocGenerator
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Parent class to manage numbering of Workstation
|
||||
*/
|
||||
abstract class ModeleNumRefWorkstation
|
||||
abstract class ModeleNumRefWorkstation extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Version
|
||||
*/
|
||||
public $version = '';
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering template
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("workstation@workstation");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("workstation@workstation");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated($object)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of numbering module
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
|
||||
|
||||
/**
|
||||
@@ -37,43 +37,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFMyObject extends CommonDocGenerator
|
||||
{
|
||||
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -85,8 +48,6 @@ abstract class ModelePDFMyObject extends CommonDocGenerator
|
||||
public static function liste_modeles($db, $maxfilenamelength = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$type = 'myobject';
|
||||
$list = array();
|
||||
|
||||
@@ -98,97 +59,10 @@ abstract class ModelePDFMyObject extends CommonDocGenerator
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Parent class to manage numbering of MyObject
|
||||
*/
|
||||
abstract class ModeleNumRefMyObject
|
||||
abstract class ModeleNumRefMyObject extends CommonNumRefGenerator
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering template
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("mymodule@mymodule");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("mymodule@mymodule");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated($object)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of numbering module
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overload code
|
||||
}
|
||||
|
||||
@@ -29,6 +29,7 @@
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // required for use by classes that inherit
|
||||
|
||||
|
||||
@@ -66,91 +67,5 @@ abstract class ModelePDFRecruitmentCandidature extends CommonDocGenerator
|
||||
*/
|
||||
abstract class ModeleNumRefRecruitmentCandidature
|
||||
{
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error = '';
|
||||
|
||||
/**
|
||||
* Return if a module can be used or not
|
||||
*
|
||||
* @return boolean true if module can be used
|
||||
*/
|
||||
public function isEnabled()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the default description of the numbering template
|
||||
*
|
||||
* @return string Descriptive text
|
||||
*/
|
||||
public function info()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("recruitment");
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an example of numbering
|
||||
*
|
||||
* @return string Example
|
||||
*/
|
||||
public function getExample()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("recruitment");
|
||||
return $langs->trans("NoExample");
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the numbers already in the database do not
|
||||
* cause conflicts that would prevent this numbering working.
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return boolean false if conflict, true if ok
|
||||
*/
|
||||
public function canBeActivated($object)
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns next assigned value
|
||||
*
|
||||
* @param Object $object Object we need next value for
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getNextValue($object)
|
||||
{
|
||||
global $langs;
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns version of numbering module
|
||||
*
|
||||
* @return string Valeur
|
||||
*/
|
||||
public function getVersion()
|
||||
{
|
||||
global $langs;
|
||||
$langs->load("admin");
|
||||
|
||||
if ($this->version == 'development') {
|
||||
return $langs->trans("VersionDevelopment");
|
||||
}
|
||||
if ($this->version == 'experimental') {
|
||||
return $langs->trans("VersionExperimental");
|
||||
}
|
||||
if ($this->version == 'dolibarr') {
|
||||
return DOL_VERSION;
|
||||
}
|
||||
if ($this->version) {
|
||||
return $this->version;
|
||||
}
|
||||
return $langs->trans("NotAvailable");
|
||||
}
|
||||
// No overloaded code
|
||||
}
|
||||
|
||||
@@ -38,42 +38,6 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFRecruitmentJobPosition extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var int page_largeur
|
||||
*/
|
||||
public $page_largeur;
|
||||
|
||||
/**
|
||||
* @var int page_hauteur
|
||||
*/
|
||||
public $page_hauteur;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
/**
|
||||
* @var int marge_gauche
|
||||
*/
|
||||
public $marge_gauche;
|
||||
|
||||
/**
|
||||
* @var int marge_droite
|
||||
*/
|
||||
public $marge_droite;
|
||||
|
||||
/**
|
||||
* @var int marge_haute
|
||||
*/
|
||||
public $marge_haute;
|
||||
|
||||
/**
|
||||
* @var int marge_basse
|
||||
*/
|
||||
public $marge_basse;
|
||||
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return list of active generation modules
|
||||
@@ -102,5 +66,5 @@ abstract class ModelePDFRecruitmentJobPosition extends CommonDocGenerator
|
||||
*/
|
||||
abstract class ModeleNumRefRecruitmentJobPosition extends CommonNumRefGenerator
|
||||
{
|
||||
// No overloaded code
|
||||
// No overload code
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user