Ver Fonte

add numbering modules for members

Frédéric FRANCE há 2 anos atrás
pai
commit
690562c22e
68 ficheiros alterados com 479 adições e 155 exclusões
  1. 98 4
      htdocs/adherents/admin/member.php
  2. 40 4
      htdocs/adherents/class/adherent.class.php
  3. 24 22
      htdocs/core/class/conf.class.php
  4. 1 1
      htdocs/core/modules/asset/mod_asset_advanced.php
  5. 1 1
      htdocs/core/modules/asset/modules_asset.php
  6. 1 1
      htdocs/core/modules/barcode/doc/phpbarcode.modules.php
  7. 1 1
      htdocs/core/modules/bom/mod_bom_advanced.php
  8. 1 1
      htdocs/core/modules/bom/modules_bom.php
  9. 1 1
      htdocs/core/modules/cheque/mod_chequereceipt_thyme.php
  10. 1 1
      htdocs/core/modules/cheque/modules_chequereceipts.php
  11. 1 1
      htdocs/core/modules/commande/mod_commande_saphir.php
  12. 1 1
      htdocs/core/modules/commande/modules_commande.php
  13. 1 1
      htdocs/core/modules/delivery/mod_delivery_jade.php
  14. 2 2
      htdocs/core/modules/delivery/mod_delivery_saphir.php
  15. 1 1
      htdocs/core/modules/delivery/modules_delivery.php
  16. 1 1
      htdocs/core/modules/dons/modules_don.php
  17. 1 1
      htdocs/core/modules/expensereport/mod_expensereport_sand.php
  18. 1 1
      htdocs/core/modules/facture/mod_facture_mars.php
  19. 1 1
      htdocs/core/modules/facture/mod_facture_mercure.php
  20. 1 1
      htdocs/core/modules/facture/mod_facture_terre.php
  21. 1 1
      htdocs/core/modules/facture/modules_facture.php
  22. 1 1
      htdocs/core/modules/fichinter/mod_arctic.php
  23. 1 1
      htdocs/core/modules/hrm/mod_evaluation_advanced.php
  24. 1 1
      htdocs/core/modules/hrm/modules_evaluation.php
  25. 165 0
      htdocs/core/modules/member/mod_member_advanced.php
  26. 26 59
      htdocs/core/modules/member/mod_member_simple.php
  27. 58 2
      htdocs/core/modules/member/modules_member.class.php
  28. 1 1
      htdocs/core/modules/mrp/mod_mo_advanced.php
  29. 1 1
      htdocs/core/modules/mrp/modules_mo.php
  30. 1 1
      htdocs/core/modules/payment/mod_payment_ant.php
  31. 1 1
      htdocs/core/modules/payment/modules_payment.php
  32. 1 1
      htdocs/core/modules/product/modules_product.class.php
  33. 1 1
      htdocs/core/modules/product_batch/mod_lot_advanced.php
  34. 1 1
      htdocs/core/modules/product_batch/mod_sn_advanced.php
  35. 1 1
      htdocs/core/modules/product_batch/modules_product_batch.class.php
  36. 1 1
      htdocs/core/modules/project/mod_project_universal.php
  37. 1 1
      htdocs/core/modules/project/modules_project.php
  38. 1 1
      htdocs/core/modules/project/task/mod_task_universal.php
  39. 1 1
      htdocs/core/modules/project/task/modules_task.php
  40. 1 1
      htdocs/core/modules/propale/mod_propale_saphir.php
  41. 1 1
      htdocs/core/modules/propale/modules_propale.php
  42. 1 1
      htdocs/core/modules/societe/modules_societe.class.php
  43. 1 1
      htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php
  44. 1 1
      htdocs/core/modules/stocktransfer/modules_stocktransfer.php
  45. 1 1
      htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php
  46. 2 2
      htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php
  47. 1 1
      htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php
  48. 1 1
      htdocs/core/modules/supplier_payment/modules_supplier_payment.php
  49. 1 1
      htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php
  50. 1 1
      htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php
  51. 1 1
      htdocs/core/modules/takepos/mod_takepos_ref_universal.php
  52. 1 1
      htdocs/core/modules/takepos/modules_takepos.php
  53. 1 1
      htdocs/core/modules/ticket/mod_ticket_universal.php
  54. 1 1
      htdocs/core/modules/ticket/modules_ticket.php
  55. 1 1
      htdocs/core/modules/workstation/mod_workstation_advanced.php
  56. 1 1
      htdocs/core/modules/workstation/modules_workstation.php
  57. 1 1
      htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php
  58. 1 1
      htdocs/knowledgemanagement/core/modules/knowledgemanagement/modules_knowledgerecord.php
  59. 3 0
      htdocs/langs/en_US/admin.lang
  60. 3 2
      htdocs/langs/en_US/members.lang
  61. 1 1
      htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php
  62. 1 1
      htdocs/modulebuilder/template/core/modules/mymodule/modules_myobject.php
  63. 1 1
      htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php
  64. 1 1
      htdocs/partnership/core/modules/partnership/modules_partnership.php
  65. 1 1
      htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php
  66. 1 1
      htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php
  67. 1 1
      htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php
  68. 1 1
      htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php

+ 98 - 4
htdocs/adherents/admin/member.php

@@ -152,10 +152,13 @@ if ($action == 'set_default') {
 		setEventMessages('RecordModifiedSuccessfully', null, 'mesgs');
 		$db->commit();
 	}
-}
-
-// Action to update or add a constant
-if ($action == 'update' || $action == 'add') {
+} elseif ($action == 'setcodemember') {
+	$result = dolibarr_set_const($db, "MEMBER_CODEMEMBER_ADDON", $value, 'chaine', 0, '', $conf->entity);
+	if ($result <= 0) {
+		dol_print_error($db);
+	}
+} elseif ($action == 'update' || $action == 'add') {
+	// Action to update or add a constant
 	$constname = GETPOST('constname', 'alpha');
 	$constvalue = (GETPOST('constvalue_'.$constname) ? GETPOST('constvalue_'.$constname) : GETPOST('constvalue'));
 
@@ -223,6 +226,97 @@ $head = member_admin_prepare_head();
 
 print dol_get_fiche_head($head, 'general', $langs->trans("Members"), -1, 'user');
 
+$dirModMember = array_merge(array('/core/modules/member/'), $conf->modules_parts['member']);
+foreach ($conf->modules_parts['models'] as $mo) {
+	//Add more models
+	$dirModMember[] = $mo.'core/modules/member/';
+}
+
+// Module to manage customer/supplier code
+
+print load_fiche_titre($langs->trans("MemberCodeChecker"), '', '');
+
+print '<div class="div-table-responsive-no-min">';
+print '<table class="noborder centpercent">'."\n";
+print '<tr class="liste_titre">'."\n";
+print '  <td>'.$langs->trans("Name").'</td>';
+print '  <td>'.$langs->trans("Description").'</td>';
+print '  <td>'.$langs->trans("Example").'</td>';
+print '  <td class="center" width="80">'.$langs->trans("Status").'</td>';
+print '  <td class="center" width="60">'.$langs->trans("ShortInfo").'</td>';
+print "</tr>\n";
+
+$arrayofmodules = array();
+
+foreach ($dirModMember as $dirroot) {
+	$dir = dol_buildpath($dirroot, 0);
+
+	$handle = @opendir($dir);
+	if (is_resource($handle)) {
+		// Loop on each module find in opened directory
+		while (($file = readdir($handle)) !== false) {
+			// module filename has to start with mod_member_
+			if (substr($file, 0, 11) == 'mod_member_' && substr($file, -3) == 'php') {
+				$file = substr($file, 0, dol_strlen($file) - 4);
+				try {
+					dol_include_once($dirroot.$file.'.php');
+				} catch (Exception $e) {
+					dol_syslog($e->getMessage(), LOG_ERR);
+					continue;
+				}
+				$modCodeMember = new $file;
+				// Show modules according to features level
+				if ($modCodeMember->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) {
+					continue;
+				}
+				if ($modCodeMember->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) {
+					continue;
+				}
+
+				$arrayofmodules[$file] = $modCodeMember;
+			}
+		}
+		closedir($handle);
+	}
+}
+
+$arrayofmodules = dol_sort_array($arrayofmodules, 'position');
+
+foreach ($arrayofmodules as $file => $modCodeMember) {
+	print '<tr class="oddeven">'."\n";
+	print '<td width="140">'.$modCodeMember->name.'</td>'."\n";
+	print '<td>'.$modCodeMember->info($langs).'</td>'."\n";
+	print '<td class="nowrap">'.$modCodeMember->getExample($langs).'</td>'."\n";
+
+	if (getDolGlobalString('MEMBER_CODEMEMBER_ADDON') == "$file") {
+		print '<td class="center">'."\n";
+		print img_picto($langs->trans("Activated"), 'switch_on');
+		print "</td>\n";
+	} else {
+		$disabled = (isModEnabled('multicompany') && (is_object($mc) && !empty($mc->sharings['referent']) && $mc->sharings['referent'] != $conf->entity) ? true : false);
+		print '<td class="center">';
+		if (!$disabled) {
+			print '<a class="reposition" href="'.$_SERVER['PHP_SELF'].'?action=setcodemember&token='.newToken().'&value='.urlencode($file).'">';
+		}
+		print img_picto($langs->trans("Disabled"), 'switch_off');
+		if (!$disabled) {
+			print '</a>';
+		}
+		print '</td>';
+	}
+
+	print '<td class="center">';
+	$s = $modCodeMember->getToolTip($langs, null, -1);
+	print $form->textwithpicto('', $s, 1);
+	print '</td>';
+
+	print '</tr>';
+}
+print '</table>';
+print '</div>';
+
+print "<br>";
+
 print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
 print '<input type="hidden" name="token" value="'.newToken().'">';
 print '<input type="hidden" name="action" value="updatemainoptions">';

+ 40 - 4
htdocs/adherents/class/adherent.class.php

@@ -92,6 +92,7 @@ class Adherent extends CommonObject
 	/**
 	 * @var string company name
 	 * @deprecated
+	 * @see $company
 	 */
 	public $societe;
 
@@ -102,8 +103,14 @@ class Adherent extends CommonObject
 
 	/**
 	 * @var int Thirdparty ID
+	 * @deprecated
+	 * @see $socid
 	 */
 	public $fk_soc;
+
+	/**
+	 * @var int socid
+	 */
 	public $socid;
 
 	/**
@@ -154,24 +161,28 @@ class Adherent extends CommonObject
 	/**
 	 * @var string skype account
 	 * @deprecated
+	 * @see $socialnetworks
 	 */
 	public $skype;
 
 	/**
 	 * @var string twitter account
 	 * @deprecated
+	 * @see $socialnetworks
 	 */
 	public $twitter;
 
 	/**
 	 * @var string facebook account
 	 * @deprecated
+	 * @see $socialnetworks
 	 */
 	public $facebook;
 
 	/**
 	 * @var string linkedin account
 	 * @deprecated
+	 * @see $socialnetworks
 	 */
 	public $linkedin;
 
@@ -259,10 +270,19 @@ class Adherent extends CommonObject
 	 */
 	public $type;
 
+	/**
+	 * @var int need_subscription
+	 */
 	public $need_subscription;
 
+	/**
+	 * @var int user_id
+	 */
 	public $user_id;
 
+	/**
+	 * @var string user_login
+	 */
 	public $user_login;
 
 	public $datefin;
@@ -576,7 +596,7 @@ class Adherent extends CommonObject
 	 */
 	public function create($user, $notrigger = 0)
 	{
-		global $conf, $langs;
+		global $conf, $langs, $mysoc;
 
 		$error = 0;
 
@@ -624,7 +644,22 @@ class Adherent extends CommonObject
 			$id = $this->db->last_insert_id(MAIN_DB_PREFIX."adherent");
 			if ($id > 0) {
 				$this->id = $id;
-				$this->ref = (string) $id;
+				if (getDolGlobalString('MEMBER_CODEMEMBER_ADDON') == '') {
+					// keep old numbering
+					$this->ref = (string) $id;
+				} else {
+					// auto code
+					$modfile = dol_buildpath('core/modules/member/'.getDolGlobalString('MEMBER_CODEMEMBER_ADDON').'.php', 0);
+					try {
+						require_once($modfile);
+						$modname = getDolGlobalString('MEMBER_CODEMEMBER_ADDON');
+						$modCodeMember = new $modname;
+						$this->ref = $modCodeMember->getNextValue($mysoc, $this);
+					} catch (Exception $e) {
+						dol_syslog($e->getMessage(), LOG_ERR);
+						$error++;
+					}
+				}
 
 				// Update minor fields
 				$result = $this->update($user, 1, 1, 0, 0, 'add'); // nosync is 1 to avoid update data of user
@@ -1505,7 +1540,7 @@ class Adherent extends CommonObject
 
 		require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
 
-		$sql = "SELECT c.rowid, c.fk_adherent, c.fk_type, c.subscription, c.note, c.fk_bank,";
+		$sql = "SELECT c.rowid, c.fk_adherent, c.fk_type, c.subscription, c.note as note_public, c.fk_bank,";
 		$sql .= " c.tms as datem,";
 		$sql .= " c.datec as datec,";
 		$sql .= " c.dateadh as dateh,";
@@ -1537,7 +1572,8 @@ class Adherent extends CommonObject
 				$subscription->fk_adherent = $obj->fk_adherent;
 				$subscription->fk_type = $obj->fk_type;
 				$subscription->amount = $obj->subscription;
-				$subscription->note = $obj->note;
+				$subscription->note = $obj->note_public;
+				$subscription->note_public = $obj->note_public;
 				$subscription->fk_bank = $obj->fk_bank;
 				$subscription->datem = $this->db->jdate($obj->datem);
 				$subscription->datec = $this->db->jdate($obj->datec);

+ 24 - 22
htdocs/core/class/conf.class.php

@@ -133,6 +133,7 @@ class Conf
 			'barcode' => array(),
 			'models' => array(),
 			'societe' => array(),
+			'member' => array(),
 			'hooks' => array(),
 			'dir' => array(),
 			'syslog' => array()
@@ -145,22 +146,22 @@ class Conf
 		$this->expedition_bon = new stdClass();
 		$this->delivery_note = new stdClass();
 		$this->fournisseur = new stdClass();
-		$this->product			= new stdClass();
-		$this->service			= new stdClass();
-		$this->contrat			= new stdClass();
-		$this->actions			= new stdClass();
-		$this->agenda			= new stdClass();
+		$this->product = new stdClass();
+		$this->service = new stdClass();
+		$this->contrat = new stdClass();
+		$this->actions = new stdClass();
+		$this->agenda = new stdClass();
 		$this->commande = new stdClass();
 		$this->propal = new stdClass();
-		$this->facture			= new stdClass();
-		$this->contrat			= new stdClass();
+		$this->facture = new stdClass();
+		$this->contrat = new stdClass();
 		$this->user	= new stdClass();
-		$this->adherent			= new stdClass();
+		$this->adherent = new stdClass();
 		$this->bank = new stdClass();
-		$this->notification		= new stdClass();
+		$this->notification = new stdClass();
 		$this->mailing = new stdClass();
-		$this->expensereport	= new stdClass();
-		$this->productbatch		= new stdClass();
+		$this->expensereport = new stdClass();
+		$this->productbatch = new stdClass();
 	}
 
 	/**
@@ -215,22 +216,22 @@ class Conf
 		$this->expedition_bon = new stdClass();
 		$this->delivery_note = new stdClass();
 		$this->fournisseur = new stdClass();
-		$this->product			= new stdClass();
-		$this->service			= new stdClass();
-		$this->contrat			= new stdClass();
-		$this->actions			= new stdClass();
-		$this->agenda			= new stdClass();
+		$this->product = new stdClass();
+		$this->service = new stdClass();
+		$this->contrat = new stdClass();
+		$this->actions = new stdClass();
+		$this->agenda = new stdClass();
 		$this->commande = new stdClass();
 		$this->propal = new stdClass();
-		$this->facture			= new stdClass();
-		$this->contrat			= new stdClass();
+		$this->facture = new stdClass();
+		$this->contrat = new stdClass();
 		$this->user	= new stdClass();
-		$this->adherent			= new stdClass();
+		$this->adherent = new stdClass();
 		$this->bank = new stdClass();
-		$this->notification		= new stdClass();
+		$this->notification = new stdClass();
 		$this->mailing = new stdClass();
-		$this->expensereport	= new stdClass();
-		$this->productbatch		= new stdClass();
+		$this->expensereport = new stdClass();
+		$this->productbatch = new stdClass();
 
 		// Common arrays
 		$this->cache = array();
@@ -249,6 +250,7 @@ class Conf
 			'barcode' => array(),
 			'models' => array(),
 			'societe' => array(),
+			'member' => array(),
 			'hooks' => array(),
 			'dir' => array(),
 			'syslog' => array(),

+ 1 - 1
htdocs/core/modules/asset/mod_asset_advanced.php

@@ -53,7 +53,7 @@ class mod_asset_advanced extends ModeleNumRefAsset
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/asset/modules_asset.php

@@ -121,7 +121,7 @@ abstract class ModeleNumRefAsset
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/barcode/doc/phpbarcode.modules.php

@@ -58,7 +58,7 @@ class modPhpbarcode extends ModeleBarCode
 	/**
 	 * 	Return description
 	 *
-	 * 	@return     string      Texte descripif
+	 * 	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/bom/mod_bom_advanced.php

@@ -54,7 +54,7 @@ class mod_bom_advanced extends ModeleNumRefboms
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/bom/modules_bom.php

@@ -87,7 +87,7 @@ abstract class ModeleNumRefBoms
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/cheque/mod_chequereceipt_thyme.php

@@ -48,7 +48,7 @@ class mod_chequereceipt_thyme extends ModeleNumRefChequeReceipts
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/cheque/modules_chequereceipts.php

@@ -54,7 +54,7 @@ abstract class ModeleNumRefChequeReceipts
 	/**
 	 *	Return the default description of numbering module
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/commande/mod_commande_saphir.php

@@ -54,7 +54,7 @@ class mod_commande_saphir extends ModeleNumRefCommandes
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/commande/modules_commande.php

@@ -88,7 +88,7 @@ abstract class ModeleNumRefCommandes
 	/**
 	 *	Renvoie la description par defaut du modele de numerotation
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/delivery/mod_delivery_jade.php

@@ -63,7 +63,7 @@ class mod_delivery_jade extends ModeleNumRefDeliveryOrder
 	/**
 	 *   Returns the description of the numbering model
 	 *
-	 *   @return     string      Texte descripif
+	 *   @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 2 - 2
htdocs/core/modules/delivery/mod_delivery_saphir.php

@@ -58,7 +58,7 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{
@@ -162,7 +162,7 @@ class mod_delivery_saphir extends ModeleNumRefDeliveryOrder
 	 *
 	 *  @param	Societe		$objsoc      	Object thirdparty
 	 *  @param  Object		$object			Objet livraison
-	 *  @return string      				Texte descripif
+	 *  @return string      				Texte descriptif
 	 */
 	public function delivery_get_num($objsoc = 0, $object = '')
 	{

+ 1 - 1
htdocs/core/modules/delivery/modules_delivery.php

@@ -90,7 +90,7 @@ abstract class ModeleNumRefDeliveryOrder
 	/**
 	 * Renvoi la description par defaut du modele de numerotation
 	 *
-	 * @return     string      Texte descripif
+	 * @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/dons/modules_don.php

@@ -86,7 +86,7 @@ abstract class ModeleNumRefDons
 	/**
 	 * 	Renvoi la description par defaut du modele de numerotation
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/expensereport/mod_expensereport_sand.php

@@ -57,7 +57,7 @@ class mod_expensereport_sand extends ModeleNumRefExpenseReport
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/facture/mod_facture_mars.php

@@ -72,7 +72,7 @@ class mod_facture_mars extends ModeleNumRefFactures
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/facture/mod_facture_mercure.php

@@ -49,7 +49,7 @@ class mod_facture_mercure extends ModeleNumRefFactures
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/facture/mod_facture_terre.php

@@ -88,7 +88,7 @@ class mod_facture_terre extends ModeleNumRefFactures
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/facture/modules_facture.php

@@ -96,7 +96,7 @@ abstract class ModeleNumRefFactures
 	/**
 	 * Renvoi la description par defaut du modele de numerotation
 	 *
-	 * @return    string      Texte descripif
+	 * @return    string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/fichinter/mod_arctic.php

@@ -59,7 +59,7 @@ class mod_arctic extends ModeleNumRefFicheinter
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/hrm/mod_evaluation_advanced.php

@@ -54,7 +54,7 @@ class mod_evaluation_advanced extends ModeleNumRefEvaluation
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/hrm/modules_evaluation.php

@@ -86,7 +86,7 @@ abstract class ModeleNumRefEvaluation
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 165 - 0
htdocs/core/modules/member/mod_member_advanced.php

@@ -0,0 +1,165 @@
+<?php
+/* Copyright (C) 2021		Laurent Destailleur	<eldy@users.sourceforge.net>
+ * Copyright (C) 2022       Frédéric France         <frederic.france@netlogic.fr>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <https://www.gnu.org/licenses/>.
+ * or see https://www.gnu.org/
+ */
+
+/**
+ *	\file       htdocs/core/modules/member/mod_member_advanced.php
+ *	\ingroup    member
+ *	\brief      File with class to manage the numbering module Advanced for member references
+ */
+
+require_once DOL_DOCUMENT_ROOT.'/core/modules/member/modules_member.class.php';
+
+
+/**
+ * 	Class to manage the numbering module Advanced for member references
+ */
+class mod_member_advanced extends ModeleNumRefMembers
+{
+	/**
+	 * Dolibarr version of the loaded document
+	 * @var string
+	 */
+	public $version = 'dolibarr';
+
+	/**
+	 * prefix
+	 *
+	 * @var string
+	 */
+	public $prefix = 'MEM';
+
+	/**
+	 * @var string Error code (or message)
+	 */
+	public $error = '';
+
+	/**
+	 * @var string model name
+	 */
+	public $name = 'Advanced';
+
+	/**
+	 * @var int Automatic numbering
+	 */
+	public $code_auto = 1;
+
+	/**
+	 *  Return description of numbering module
+	 *
+	 *  @return     string      Text with description
+	 */
+	public function info()
+	{
+		global $langs;
+		return $langs->trans("AdvancedNumRefModelDesc", $this->prefix);
+	}
+
+
+	/**
+	 *  Return an example of numbering module values
+	 *
+	 * 	@return     string      Example
+	 */
+	public function getExample()
+	{
+		return $this->prefix."2301-0001";
+	}
+
+
+	/**
+	 *  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()
+	{
+		global $conf, $langs, $db;
+
+		$coyymm = '';
+		$max = '';
+
+		$posindice = strlen($this->prefix) + 6;
+		$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
+		$sql .= " FROM ".MAIN_DB_PREFIX."adherent";
+		$sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'";
+		$sql .= " AND entity = ".$conf->entity;
+		$resql = $db->query($sql);
+		if ($resql) {
+			$row = $db->fetch_row($resql);
+			if ($row) {
+				$coyymm = substr($row[0], 0, 6);
+				$max = $row[0];
+			}
+		}
+		if (!$coyymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) {
+			return true;
+		} else {
+			$langs->load("errors");
+			$this->error = $langs->trans('ErrorNumRefModel', $max);
+			return false;
+		}
+	}
+
+
+	/**
+	 *  Return next value
+	 *
+	 *  @param  Societe		$objsoc		Object third party
+	 *  @param  Member		$object		Object we need next value for
+	 *  @return	string					Value if OK, 0 if KO
+	 */
+	public function getNextValue($objsoc, $object)
+	{
+		global $db, $conf;
+
+		// First, we get the max value
+		$posindice = strlen($this->prefix) + 6;
+		$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
+		$sql .= " FROM ".MAIN_DB_PREFIX."adherent";
+		$sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'";
+		$sql .= " AND entity = ".$conf->entity;
+
+		$resql = $db->query($sql);
+		if ($resql) {
+			$obj = $db->fetch_object($resql);
+			if ($obj) {
+				$max = intval($obj->max);
+			} else {
+				$max = 0;
+			}
+		} else {
+			dol_syslog("mod_member_advanced::getNextValue", LOG_DEBUG);
+			return -1;
+		}
+
+		$date = empty($object->datec) ? dol_now() : $object->datec;
+
+		$yymm = dol_print_date($date, '%y%m', 'gmt');
+
+		if ($max >= (pow(10, 4) - 1)) {
+			$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
+		} else {
+			$num = sprintf("%04s", $max + 1);
+		}
+
+		dol_syslog("mod_member_advanced::getNextValue return ".$this->prefix.$yymm."-".$num, LOG_INFO);
+		return $this->prefix.$yymm."-".$num;
+	}
+}

+ 26 - 59
htdocs/core/modules/member/mod_member_simple.php

@@ -1,5 +1,6 @@
 <?php
 /* Copyright (C) 2021		Laurent Destailleur	<eldy@users.sourceforge.net>
+ * Copyright (C) 2022       Frédéric France         <frederic.france@netlogic.fr>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -34,27 +35,29 @@ class mod_member_simple extends ModeleNumRefMembers
 	 * Dolibarr version of the loaded document
 	 * @var string
 	 */
-	public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
-
-	public $prefix = 'MEM';
+	public $version = 'dolibarr';
 
 	/**
-	 * @var string Error code (or message)
+	 * prefix
+	 *
+	 * @var string
 	 */
-	public $error = '';
+	public $prefix = '';
 
 	/**
-	 * @var string Nom du modele
-	 * @deprecated
-	 * @see $name
+	 * @var string Error code (or message)
 	 */
-	public $nom = 'Simple';
+	public $error = '';
 
 	/**
 	 * @var string model name
 	 */
 	public $name = 'Simple';
 
+	/**
+	 * @var int Automatic numbering
+	 */
+	public $code_auto = 1;
 
 	/**
 	 *  Return description of numbering module
@@ -64,7 +67,7 @@ class mod_member_simple extends ModeleNumRefMembers
 	public function info()
 	{
 		global $langs;
-		return $langs->trans("SimpleNumRefModelDesc", $this->prefix);
+		return $langs->trans("SimpleRefNumRefModelDesc");
 	}
 
 
@@ -75,7 +78,7 @@ class mod_member_simple extends ModeleNumRefMembers
 	 */
 	public function getExample()
 	{
-		return $this->prefix."0501-0001";
+		return "1";
 	}
 
 
@@ -92,11 +95,9 @@ class mod_member_simple extends ModeleNumRefMembers
 		$coyymm = '';
 		$max = '';
 
-		$posindice = strlen($this->prefix) + 6;
-		$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
+		$sql = "SELECT MAX(CAST(ref AS SIGNED)) as max";
 		$sql .= " FROM ".MAIN_DB_PREFIX."adherent";
-		$sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'";
-		$sql .= " AND entity = ".$conf->entity;
+		$sql .= " WHERE entity = ".$conf->entity;
 		$resql = $db->query($sql);
 		if ($resql) {
 			$row = $db->fetch_row($resql);
@@ -105,7 +106,7 @@ class mod_member_simple extends ModeleNumRefMembers
 				$max = $row[0];
 			}
 		}
-		if (!$coyymm || preg_match('/'.$this->prefix.'[0-9][0-9][0-9][0-9]/i', $coyymm)) {
+		if (!$coyymm || preg_match('/[0-9][0-9][0-9][0-9]/i', $coyymm)) {
 			return true;
 		} else {
 			$langs->load("errors");
@@ -119,65 +120,31 @@ class mod_member_simple extends ModeleNumRefMembers
 	 *  Return next value
 	 *
 	 *  @param  Societe		$objsoc		Object third party
-	 *  @param  Object		$object		Object we need next value for
+	 *  @param  Member		$object		Object we need next value for
 	 *  @return	string					Value if OK, 0 if KO
 	 */
 	public function getNextValue($objsoc, $object)
 	{
-		global $db, $conf;
-
-		/*
-		// First, we get the max value
-		$posindice = strlen($this->prefix) + 6;
-		$sql = "SELECT MAX(CAST(SUBSTRING(ref FROM ".$posindice.") AS SIGNED)) as max";
-		$sql .= " FROM ".MAIN_DB_PREFIX."adherent";
-		$sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'";
-		$sql .= " AND entity = ".$conf->entity;
-
-		$resql = $db->query($sql);
-		if ($resql) {
-			$obj = $db->fetch_object($resql);
-			if ($obj) {
-				$max = intval($obj->max);
-			} else {
-				$max = 0;
-			}
-		} else {
-			dol_syslog("mod_member_simple::getNextValue", LOG_DEBUG);
-			return -1;
-		}
-
-		$date = empty($object->date_c) ? dol_now() : $object->date_c;
-
-		//$yymm = strftime("%y%m",time());
-		$yymm = strftime("%y%m", $date);
-
-		if ($max >= (pow(10, 4) - 1)) {
-			$num = $max + 1; // If counter > 9999, we do not format on 4 chars, we take number as it is
-		} else {
-			$num = sprintf("%04s", $max + 1);
-		}
-
-		dol_syslog("mod_member_simple::getNextValue return ".$this->prefix.$yymm."-".$num);
-		return $this->prefix.$yymm."-".$num;
-		*/
+		global $conf, $db;
 
-		// For the moment, the ref of a member is the rowid
-		$sql = "SELECT MAX(rowid) as max";
+		// the ref of a member is the rowid
+		$sql = "SELECT MAX(CAST(ref AS SIGNED)) as max";
 		$sql .= " FROM ".MAIN_DB_PREFIX."adherent";
+		$sql .= " WHERE entity = ".(int) $conf->entity;
 
 		$resql = $db->query($sql);
 		if ($resql) {
 			$obj = $db->fetch_object($resql);
 			if ($obj) {
-				$max = intval($obj->max);
+				$max = intval($obj->max) + 1;
 			} else {
-				$max = 0;
+				$max = 1;
 			}
 		} else {
 			dol_syslog("mod_member_simple::getNextValue", LOG_DEBUG);
 			return -1;
 		}
-		return ($max + 1);
+		$max = str_pad((string) $max, getDolGlobalInt('MEMBER_MOD_SIMPLE_LPAD'), "0", STR_PAD_LEFT);
+		return $max;
 	}
 }

+ 58 - 2
htdocs/core/modules/member/modules_member.class.php

@@ -84,9 +84,9 @@ abstract class ModeleNumRefMembers
 	}
 
 	/**
-	 *  Renvoi la description par defaut du modele de numerotation
+	 *  Renvoie la description par defaut du modele de numerotation
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{
@@ -95,6 +95,16 @@ abstract class ModeleNumRefMembers
 		return $langs->trans("NoDescription");
 	}
 
+	/**
+	 * Return name of module
+	 *
+	 *  @return string Module name
+	 */
+	public function getName()
+	{
+		return $this->name;
+	}
+
 	/**
 	 *  Return an example of numbering
 	 *
@@ -153,4 +163,50 @@ abstract class ModeleNumRefMembers
 			return $langs->trans("NotAvailable");
 		}
 	}
+
+	/**
+	 *  Return description of module parameters
+	 *
+	 *  @param	Translate	$langs      Output language
+	 *  @param	Societe		$soc		Third party object
+	 *  @return	string					HTML translated description
+	 */
+	public function getToolTip($langs, $soc)
+	{
+		global $conf;
+
+		$langs->loadLangs(array("admin", "companies"));
+
+		$strikestart = '';
+		$strikeend = '';
+		if (!empty($conf->global->MAIN_MEMBER_CODE_ALWAYS_REQUIRED) && !empty($this->code_null)) {
+			$strikestart = '<strike>';
+			$strikeend = '</strike> '.yn(1, 1, 2).' ('.$langs->trans("ForcedToByAModule", $langs->transnoentities("yes")).')';
+		}
+
+		$s = '';
+		$s .= $langs->trans("Name").': <b>'.$this->getName().'</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 .= '<br>';
+		$s .= '<u>'.$langs->trans("ThisIsModuleRules").':</u><br>';
+
+		$s .= $langs->trans("Required").': '.$strikestart;
+		$s .= yn(!$this->code_null, 1, 2).$strikeend;
+		$s .= '<br>';
+		$s .= $langs->trans("CanBeModifiedIfOk").': ';
+		$s .= yn($this->code_modifiable, 1, 2);
+		$s .= '<br>';
+		$s .= $langs->trans("CanBeModifiedIfKo").': '.yn($this->code_modifiable_invalide, 1, 2).'<br>';
+		$s .= $langs->trans("AutomaticCode").': '.yn($this->code_auto, 1, 2).'<br>';
+		$s .= '<br>';
+		$nextval = $this->getNextValue($soc, 0);
+		if (empty($nextval)) {
+			$nextval = $langs->trans("Undefined");
+		}
+		$s .= $langs->trans("NextValue").' ('.$langs->trans("Member").')'.': <b>'.$nextval.'</b><br>';
+
+		return $s;
+	}
 }

+ 1 - 1
htdocs/core/modules/mrp/mod_mo_advanced.php

@@ -55,7 +55,7 @@ class mod_mo_advanced extends ModeleNumRefMos
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/mrp/modules_mo.php

@@ -87,7 +87,7 @@ abstract class ModeleNumRefMos
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/payment/mod_payment_ant.php

@@ -57,7 +57,7 @@ class mod_payment_ant extends ModeleNumRefPayments
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/payment/modules_payment.php

@@ -41,7 +41,7 @@ abstract class ModeleNumRefPayments
 	/**
 	 *	Return the default description of numbering module
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/product/modules_product.class.php

@@ -107,7 +107,7 @@ abstract class ModeleProductCode
 	/**     Renvoi la description par defaut du modele de numerotation
 	 *
 	 *		@param	Translate	$langs		Object langs
-	 *      @return string      			Texte descripif
+	 *      @return string      			Texte descriptif
 	 */
 	public function info($langs)
 	{

+ 1 - 1
htdocs/core/modules/product_batch/mod_lot_advanced.php

@@ -55,7 +55,7 @@ class mod_lot_advanced extends ModeleNumRefBatch
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/product_batch/mod_sn_advanced.php

@@ -55,7 +55,7 @@ class mod_sn_advanced extends ModeleNumRefBatch
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/product_batch/modules_product_batch.class.php

@@ -89,7 +89,7 @@ abstract class ModeleNumRefBatch
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/project/mod_project_universal.php

@@ -62,7 +62,7 @@ class mod_project_universal extends ModeleNumRefProjects
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/project/modules_project.php

@@ -145,7 +145,7 @@ abstract class ModeleNumRefProjects
 	/**
 	 *  Renvoi la description par defaut du modele de numerotation
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/project/task/mod_task_universal.php

@@ -57,7 +57,7 @@ class mod_task_universal extends ModeleNumRefTask
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/project/task/modules_task.php

@@ -86,7 +86,7 @@ abstract class ModeleNumRefTask
 	/**
 	 *  Renvoi la description par defaut du modele de numerotation
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/propale/mod_propale_saphir.php

@@ -60,7 +60,7 @@ class mod_propale_saphir extends ModeleNumRefPropales
 	/**
 	 *  Return description of module
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/propale/modules_propale.php

@@ -89,7 +89,7 @@ abstract class ModeleNumRefPropales
 	/**
 	 *  Renvoi la description par defaut du modele de numerotation
 	 *
-	 * 	@return     string      Texte descripif
+	 * 	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/societe/modules_societe.class.php

@@ -78,7 +78,7 @@ abstract class ModeleThirdPartyCode
 	/**     Renvoi la description par defaut du modele de numerotation
 	 *
 	 *		@param	Translate	$langs		Object langs
-	 *      @return string      			Texte descripif
+	 *      @return string      			Texte descriptif
 	 */
 	public function info($langs)
 	{

+ 1 - 1
htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php

@@ -55,7 +55,7 @@ class mod_stocktransfer_advanced extends ModeleNumRefStockTransfer
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/stocktransfer/modules_stocktransfer.php

@@ -87,7 +87,7 @@ abstract class ModeleNumRefStockTransfer
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php

@@ -178,7 +178,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
 	 *
 	 *  @param	Societe		$objsoc     Object third party
 	 *  @param  Object	    $object		Object
-	 *  @return string      			Texte descripif
+	 *  @return string      			Texte descriptif
 	 */
 	public function commande_get_num($objsoc = 0, $object = '')
 	{

+ 2 - 2
htdocs/core/modules/supplier_order/mod_commande_fournisseur_orchidee.php

@@ -59,7 +59,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 * 	@return     string      Texte descripif
+	 * 	@return     string      Texte descriptif
 	 */
 	public function info()
 	{
@@ -150,7 +150,7 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
 	 *
 	 *  @param	Societe		$objsoc     Object third party
 	 *  @param  Object	    $object		Object
-	 *  @return string      			Texte descripif
+	 *  @return string      			Texte descriptif
 	 */
 	public function commande_get_num($objsoc = 0, $object = '')
 	{

+ 1 - 1
htdocs/core/modules/supplier_payment/mod_supplier_payment_brodator.php

@@ -57,7 +57,7 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/supplier_payment/modules_supplier_payment.php

@@ -111,7 +111,7 @@ abstract class ModeleNumRefSupplierPayments
 	/**
 	 *	Return the default description of numbering module
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/supplier_proposal/mod_supplier_proposal_saphir.php

@@ -60,7 +60,7 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal
 	/**
 	 *  Return description of module
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/supplier_proposal/modules_supplier_proposal.php

@@ -89,7 +89,7 @@ abstract class ModeleNumRefSupplierProposal
 	/**
 	 *  Renvoi la description par defaut du modele de numerotation
 	 *
-	 * 	@return     string      Texte descripif
+	 * 	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/takepos/mod_takepos_ref_universal.php

@@ -54,7 +54,7 @@ class mod_takepos_ref_universal extends ModeleNumRefTakepos
 	/**
 	 *  return description of the numbering model
 	 *
-	 * @return     string      Texte descripif
+	 * @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/takepos/modules_takepos.php

@@ -54,7 +54,7 @@ abstract class ModeleNumRefTakepos
 	/**
 	 * Renvoi la description par defaut du modele de numerotation
 	 *
-	 * @return    string      Texte descripif
+	 * @return    string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/ticket/mod_ticket_universal.php

@@ -55,7 +55,7 @@ class mod_ticket_universal extends ModeleNumRefTicket
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return string      Texte descripif
+	 *  @return string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/ticket/modules_ticket.php

@@ -80,7 +80,7 @@ abstract class ModeleNumRefTicket
 	/**
 	 *  Renvoi la description par defaut du modele de numerotation
 	 *
-	 *  @return string      Texte descripif
+	 *  @return string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/workstation/mod_workstation_advanced.php

@@ -55,7 +55,7 @@ class mod_workstation_advanced extends ModeleNumRefWorkstation
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/core/modules/workstation/modules_workstation.php

@@ -87,7 +87,7 @@ abstract class ModeleNumRefWorkstation
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/knowledgemanagement/core/modules/knowledgemanagement/mod_knowledgerecord_advanced.php

@@ -54,7 +54,7 @@ class mod_knowledgerecord_advanced extends ModeleNumRefKnowledgeRecord
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/knowledgemanagement/core/modules/knowledgemanagement/modules_knowledgerecord.php

@@ -86,7 +86,7 @@ abstract class ModeleNumRefKnowledgeRecord
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 3 - 0
htdocs/langs/en_US/admin.lang

@@ -1302,6 +1302,8 @@ YouMustRunCommandFromCommandLineAfterLoginToUser=You must run this command from
 YourPHPDoesNotHaveSSLSupport=SSL functions not available in your PHP
 DownloadMoreSkins=More skins to download
 SimpleNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset
+SimpleRefNumRefModelDesc=Returns the reference number in the format n where n is a sequential auto-incrementing number with no reset
+AdvancedNumRefModelDesc=Returns the reference number in the format %syymm-nnnn where yy is the year, mm is the month and nnnn is a sequential auto-incrementing number with no reset
 SimpleNumRefNoDateModelDesc=Returns the reference number in the format %s-nnnn where nnnn is a sequential auto-incrementing number with no reset
 ShowProfIdInAddress=Show professional ID with addresses
 ShowVATIntaInAddress=Hide intra-Community VAT number
@@ -1488,6 +1490,7 @@ WatermarkOnDraftContractCards=Watermark on draft contracts (none if empty)
 ##### Members #####
 MembersSetup=Members module setup
 MemberMainOptions=Main options
+MemberCodeChecker=Options for automatic generation of member codes
 AdherentLoginRequired= Manage a Login for each member
 AdherentMailRequired=Email required to create a new member
 MemberSendInformationByMailByDefault=Checkbox to send mail confirmation to members (validation or new subscription) is on by default

+ 3 - 2
htdocs/langs/en_US/members.lang

@@ -98,7 +98,7 @@ MorAndPhy=Corporation and Individual
 Reenable=Re-Enable
 ExcludeMember=Exclude a member
 Exclude=Exclude
-ConfirmExcludeMember=Are you sure you want to exclude this member ? 
+ConfirmExcludeMember=Are you sure you want to exclude this member ?
 ResiliateMember=Terminate a member
 ConfirmResiliateMember=Are you sure you want to terminate this member?
 DeleteMember=Delete a member
@@ -230,4 +230,5 @@ ForceMemberNature=Force member nature (Individual or Corporation)
 CreateDolibarrLoginDesc=The creation of a user login for members allows them to connect to the application. Depending on the authorizations granted, they will be able, for example, to consult or modify their file themselves.
 CreateDolibarrThirdPartyDesc=A thirdparty is the legal entity that will be used on the invoice if you decide to generate invoice for each contribution. You will be able to create it later during the process of recording the contribution.
 MemberFirstname=Member firstname
-MemberLastname=Member lastname
+MemberLastname=Member lastname
+MemberCodeDesc=Member Code, unique for all members

+ 1 - 1
htdocs/modulebuilder/template/core/modules/mymodule/mod_myobject_advanced.php

@@ -54,7 +54,7 @@ class mod_myobject_advanced extends ModeleNumRefMyObject
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/modulebuilder/template/core/modules/mymodule/modules_myobject.php

@@ -122,7 +122,7 @@ abstract class ModeleNumRefMyObject
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php

@@ -54,7 +54,7 @@ class mod_partnership_advanced extends ModeleNumRefPartnership
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/partnership/core/modules/partnership/modules_partnership.php

@@ -86,7 +86,7 @@ abstract class ModeleNumRefPartnership
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php

@@ -54,7 +54,7 @@ class mod_recruitmentcandidature_advanced extends ModeleNumRefRecruitmentCandida
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php

@@ -54,7 +54,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi
 	/**
 	 *  Returns the description of the numbering model
 	 *
-	 *  @return     string      Texte descripif
+	 *  @return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/recruitment/core/modules/recruitment/modules_recruitmentcandidature.php

@@ -86,7 +86,7 @@ abstract class ModeleNumRefRecruitmentCandidature
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{

+ 1 - 1
htdocs/recruitment/core/modules/recruitment/modules_recruitmentjobposition.php

@@ -122,7 +122,7 @@ abstract class ModeleNumRefRecruitmentJobPosition
 	/**
 	 *	Returns the default description of the numbering template
 	 *
-	 *	@return     string      Texte descripif
+	 *	@return     string      Texte descriptif
 	 */
 	public function info()
 	{