|
@@ -24,7 +24,9 @@
|
|
|
* \brief File that contain parent class for task models
|
|
|
* and parent class for task numbering models
|
|
|
*/
|
|
|
+
|
|
|
require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
|
|
+require_once DOL_DOCUMENT_ROOT.'/core/class/commonnumrefgenerator.class.php';
|
|
|
|
|
|
|
|
|
/**
|
|
@@ -32,12 +34,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
|
|
*/
|
|
|
abstract class ModelePDFTask extends CommonDocGenerator
|
|
|
{
|
|
|
- /**
|
|
|
- * @var string Error code (or message)
|
|
|
- */
|
|
|
- public $error = '';
|
|
|
-
|
|
|
-
|
|
|
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
|
|
/**
|
|
|
* Return list of active generation modules
|
|
@@ -64,95 +60,7 @@ abstract class ModelePDFTask extends CommonDocGenerator
|
|
|
/**
|
|
|
* Classe mere des modeles de numerotation des references de projets
|
|
|
*/
|
|
|
-abstract class ModeleNumRefTask
|
|
|
+abstract class ModeleNumRefTask 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");
|
|
|
- }
|
|
|
- if ($this->version == 'experimental') {
|
|
|
- return $langs->trans("VersionExperimental");
|
|
|
- }
|
|
|
- if ($this->version == 'dolibarr') {
|
|
|
- return DOL_VERSION;
|
|
|
- }
|
|
|
- return $langs->trans("NotAvailable");
|
|
|
- }
|
|
|
+ // No overload code
|
|
|
}
|