forked from Wavyzz/dolibarr
NEW Can defined a position of numbering submodules for thirdparties
This commit is contained in:
@@ -34,13 +34,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php'
|
||||
*/
|
||||
class mod_codeclient_elephant extends ModeleThirdPartyCode
|
||||
{
|
||||
/**
|
||||
* @var string Nom du modele
|
||||
* @deprecated
|
||||
* @see name
|
||||
*/
|
||||
public $nom='Elephant';
|
||||
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
|
||||
@@ -38,13 +38,6 @@ class mod_codeclient_leopard extends ModeleThirdPartyCode
|
||||
* Le fonctionnement de celui-ci doit donc rester le plus ouvert possible
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var string Nom du modele
|
||||
* @deprecated
|
||||
* @see name
|
||||
*/
|
||||
public $nom='Leopard';
|
||||
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
|
||||
@@ -32,13 +32,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php'
|
||||
*/
|
||||
class mod_codeclient_monkey extends ModeleThirdPartyCode
|
||||
{
|
||||
/**
|
||||
* @var string Nom du modele
|
||||
* @deprecated
|
||||
* @see name
|
||||
*/
|
||||
public $nom='Monkey';
|
||||
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
|
||||
@@ -31,13 +31,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php'
|
||||
*/
|
||||
class mod_codecompta_aquarium extends ModeleAccountancyCode
|
||||
{
|
||||
/**
|
||||
* @var string Nom du modele
|
||||
* @deprecated
|
||||
* @see name
|
||||
*/
|
||||
public $nom='Aquarium';
|
||||
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
@@ -49,9 +42,11 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
public $prefixcustomeraccountancycode;
|
||||
public $prefixcustomeraccountancycode;
|
||||
|
||||
public $prefixsupplieraccountancycode;
|
||||
public $prefixsupplieraccountancycode;
|
||||
|
||||
public $position = 20;
|
||||
|
||||
|
||||
/**
|
||||
@@ -93,11 +88,11 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
|
||||
$texte.=$langs->trans("ModuleCompanyCodeCustomer".$this->name, $s2)."<br>\n";
|
||||
$texte.=$langs->trans("ModuleCompanyCodeSupplier".$this->name, $s1)."<br>\n";
|
||||
$texte.="<br>\n";
|
||||
if (! isset($conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL) || ! empty($conf->global->$conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL)) $texte.=$langs->trans('COMPANY_AQUARIUM_REMOVE_SPECIAL').' = '.yn(1)."<br>\n";
|
||||
if (! isset($conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL) || ! empty($conf->global->$conf->global->COMPANY_AQUARIUM_REMOVE_SPECIAL)) $texte.=$langs->trans('RemoveSpecialChars').' = '.yn(1)."<br>\n";
|
||||
//if (! empty($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)) $texte.=$langs->trans('COMPANY_AQUARIUM_REMOVE_ALPHA').' = '.yn($conf->global->COMPANY_AQUARIUM_REMOVE_ALPHA)."<br>\n";
|
||||
if (! empty($conf->global->COMPANY_AQUARIUM_CLEAN_REGEX)) $texte.=$langs->trans('COMPANY_AQUARIUM_CLEAN_REGEX').' = '.$conf->global->COMPANY_AQUARIUM_CLEAN_REGEX."<br>\n";
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td class="left"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '</tr></table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -31,13 +31,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php'
|
||||
*/
|
||||
class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
{
|
||||
/**
|
||||
* @var string Nom du modele
|
||||
* @deprecated
|
||||
* @see name
|
||||
*/
|
||||
public $nom='Digitaria';
|
||||
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
@@ -49,9 +42,12 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
*/
|
||||
public $version='dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
public $prefixcustomeraccountancycode;
|
||||
public $prefixcustomeraccountancycode;
|
||||
|
||||
public $prefixsupplieraccountancycode;
|
||||
|
||||
public $position = 30;
|
||||
|
||||
public $prefixsupplieraccountancycode;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
@@ -98,13 +94,13 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
$texte.= $langs->trans("ModuleCompanyCodeSupplier".$this->name, $s1, $s3)."<br>\n";
|
||||
$texte.= "<br>\n";
|
||||
// Remove special char if COMPANY_DIGITARIA_REMOVE_SPECIAL is set to 1 or not set (default)
|
||||
if (! isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL) || ! empty($conf->global->$conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL)) $texte.= $langs->trans('COMPANY_DIGITARIA_REMOVE_SPECIAL').' = '.yn(1)."<br>\n";
|
||||
if (! isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL) || ! empty($conf->global->$conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL)) $texte.= $langs->trans('RemoveSpecialChars').' = '.yn(1)."<br>\n";
|
||||
// Apply a regex replacement pattern on code if COMPANY_DIGITARIA_CLEAN_REGEX is set. Value must be a regex with parenthesis. The part into parenthesis is kept, the rest removed.
|
||||
if (! empty($conf->global->COMPANY_DIGITARIA_CLEAN_REGEX)) $texte.= $langs->trans('COMPANY_DIGITARIA_CLEAN_REGEX').' = '.$conf->global->COMPANY_DIGITARIA_CLEAN_REGEX."<br>\n";
|
||||
// Unique index on code if COMPANY_DIGITARIA_UNIQUE_CODE is set to 1 or not set (default)
|
||||
if (! isset($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE) || ! empty($conf->global->COMPANY_DIGITARIA_UNIQUE_CODE)) $texte.= $langs->trans('COMPANY_DIGITARIA_UNIQUE_CODE').' = '.yn(1)."<br>\n";
|
||||
$texte.= '</td>';
|
||||
$texte.= '<td class="left"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="right"><input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '</tr></table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
|
||||
@@ -30,13 +30,6 @@ require_once DOL_DOCUMENT_ROOT.'/core/modules/societe/modules_societe.class.php'
|
||||
*/
|
||||
class mod_codecompta_panicum extends ModeleAccountancyCode
|
||||
{
|
||||
/**
|
||||
* @var string Nom du modele
|
||||
* @deprecated
|
||||
* @see name
|
||||
*/
|
||||
public $nom='Panicum';
|
||||
|
||||
/**
|
||||
* @var string model name
|
||||
*/
|
||||
@@ -48,6 +41,8 @@ class mod_codecompta_panicum extends ModeleAccountancyCode
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
public $position = 10;
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
|
||||
@@ -83,18 +83,18 @@ abstract class ModeleThirdPartyCode
|
||||
return $langs->trans("NoDescription");
|
||||
}
|
||||
|
||||
/** Renvoi nom module
|
||||
/** Return name of module
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Nom du module
|
||||
*/
|
||||
public function getNom($langs)
|
||||
{
|
||||
return $this->nom;
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
|
||||
/** Renvoi un exemple de numerotation
|
||||
/** Return an example of numbering
|
||||
*
|
||||
* @param Translate $langs Object langs
|
||||
* @return string Example
|
||||
@@ -261,8 +261,7 @@ abstract class ModeleThirdPartyCode
|
||||
|
||||
|
||||
/**
|
||||
* \class ModeleAccountancyCode
|
||||
* \brief Parent class for third parties accountancy code generators
|
||||
* Parent class for third parties accountancy code generators
|
||||
*/
|
||||
abstract class ModeleAccountancyCode
|
||||
{
|
||||
@@ -340,7 +339,7 @@ abstract class ModeleAccountancyCode
|
||||
$langs->load("admin");
|
||||
|
||||
$s='';
|
||||
if ($type == -1) $s.=$langs->trans("Name").': <b>'.$this->nom.'</b><br>';
|
||||
if ($type == -1) $s.=$langs->trans("Name").': <b>'.$this->name.'</b><br>';
|
||||
if ($type == -1) $s.=$langs->trans("Version").': <b>'.$this->getVersion().'</b><br>';
|
||||
//$s.='<br>';
|
||||
//$s.='<u>'.$langs->trans("ThisIsModuleRules").':</u><br>';
|
||||
|
||||
Reference in New Issue
Block a user