fix advanced numbering
This commit is contained in:
parent
4ca57617b8
commit
0ddea2ccea
@ -93,11 +93,11 @@ if ((float) DOL_VERSION >= 6) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if ($action == 'updateMask') {
|
if ($action == 'updateMask') {
|
||||||
$maskconstorder = GETPOST('maskconstorder', 'alpha');
|
$maskconstjob = GETPOST('maskconstjob', 'alpha');
|
||||||
$maskorder = GETPOST('maskorder', 'alpha');
|
$maskjob = GETPOST('maskjob', 'alpha');
|
||||||
|
|
||||||
if ($maskconstorder) {
|
if ($maskconstjob) {
|
||||||
$res = dolibarr_set_const($db, $maskconstorder, $maskorder, 'chaine', 0, '', $conf->entity);
|
$res = dolibarr_set_const($db, $maskconstjob, $maskjob, 'chaine', 0, '', $conf->entity);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!($res > 0)) {
|
if (!($res > 0)) {
|
||||||
|
|||||||
@ -68,7 +68,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi
|
|||||||
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
$texte .= '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||||
$texte .= '<input type="hidden" name="token" value="'.newToken().'">';
|
$texte .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
$texte .= '<input type="hidden" name="action" value="updateMask">';
|
$texte .= '<input type="hidden" name="action" value="updateMask">';
|
||||||
$texte .= '<input type="hidden" name="maskconstBom" value="RECRUITMENT_RECRUITMENTJOBPOSITION_ADVANCED_MASK">';
|
$texte .= '<input type="hidden" name="maskconstjob" value="RECRUITMENT_RECRUITMENTJOBPOSITION_ADVANCED_MASK">';
|
||||||
$texte .= '<table class="nobordernopadding" width="100%">';
|
$texte .= '<table class="nobordernopadding" width="100%">';
|
||||||
|
|
||||||
$tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("RecruitmentJobPosition"), $langs->transnoentities("RecruitmentJobPosition"));
|
$tooltip = $langs->trans("GenericMaskCodes", $langs->transnoentities("RecruitmentJobPosition"), $langs->transnoentities("RecruitmentJobPosition"));
|
||||||
@ -79,7 +79,7 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi
|
|||||||
|
|
||||||
// Parametrage du prefix
|
// Parametrage du prefix
|
||||||
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
$texte .= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||||
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskRecruitmentJobPosition" value="'.getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
|
$texte .= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat minwidth175" name="maskjob" value="'.getDolGlobalString('RECRUITMENT_RECRUITMENTJOBPOSITION_ADVANCED_MASK').'">', $tooltip, 1, 1).'</td>';
|
||||||
|
|
||||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans("Modify").'"></td>';
|
||||||
|
|
||||||
@ -98,20 +98,15 @@ class mod_recruitmentjobposition_advanced extends ModeleNumRefRecruitmentJobPosi
|
|||||||
*/
|
*/
|
||||||
public function getExample()
|
public function getExample()
|
||||||
{
|
{
|
||||||
global $conf, $db, $langs, $mysoc;
|
global $conf, $langs, $mysoc;
|
||||||
|
|
||||||
$object = new RecruitmentJobPosition($db);
|
$old_code_client = $mysoc->code_client;
|
||||||
$object->initAsSpecimen();
|
|
||||||
|
|
||||||
/*$old_code_client = $mysoc->code_client;
|
|
||||||
$old_code_type = $mysoc->typent_code;
|
$old_code_type = $mysoc->typent_code;
|
||||||
$mysoc->code_client = 'CCCCCCCCCC';
|
$mysoc->code_client = 'CCCCCCCCCC';
|
||||||
$mysoc->typent_code = 'TTTTTTTTTT';*/
|
$mysoc->typent_code = 'TTTTTTTTTT';
|
||||||
|
$numExample = $this->getNextValue($mysoc, '');
|
||||||
$numExample = $this->getNextValue($object);
|
$mysoc->code_client = $old_code_client;
|
||||||
|
$mysoc->typent_code = $old_code_type;
|
||||||
/*$mysoc->code_client = $old_code_client;
|
|
||||||
$mysoc->typent_code = $old_code_type;*/
|
|
||||||
|
|
||||||
if (!$numExample) {
|
if (!$numExample) {
|
||||||
$numExample = $langs->trans('NotConfigured');
|
$numExample = $langs->trans('NotConfigured');
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user