30require_once DOL_DOCUMENT_ROOT.
'/partnership/core/modules/partnership/modules_partnership.php';
42 public $version =
'dolibarr';
52 public $name =
'advanced';
61 public function info($langs)
65 $langs->load(
"bills");
67 $form =
new Form($db);
69 $text = $langs->trans(
'GenericNumRefModelDesc').
"<br>\n";
70 $text .=
'<form action="'.$_SERVER[
"PHP_SELF"].
'" method="POST">';
71 $text .=
'<input type="hidden" name="token" value="'.newToken().
'">';
72 $text .=
'<input type="hidden" name="action" value="updateMask">';
73 $text .=
'<input type="hidden" name="maskconst" value="PARTNERSHIP_ADVANCED_MASK">';
74 $text .=
'<table class="nobordernopadding" width="100%">';
76 $tooltip = $langs->trans(
"GenericMaskCodes", $langs->transnoentities(
"Partnership"), $langs->transnoentities(
"Partnership"));
77 $tooltip .= $langs->trans(
"GenericMaskCodes2");
78 $tooltip .= $langs->trans(
"GenericMaskCodes3");
79 $tooltip .= $langs->trans(
"GenericMaskCodes4a", $langs->transnoentities(
"Partnership"), $langs->transnoentities(
"Partnership"));
80 $tooltip .= $langs->trans(
"GenericMaskCodes5");
81 $tooltip .=
'<br>'.$langs->trans(
"GenericMaskCodes5b");
84 $text .=
'<tr><td>'.$langs->trans(
"Mask").
':</td>';
85 $text .=
'<td class="right">'.$form->textwithpicto(
'<input type="text" class="flat minwidth175" name="maskPartnership" value="'.
getDolGlobalString(
'PARTNERSHIP_ADVANCED_MASK').
'">', $tooltip, 1, 1).
'</td>';
87 $text .=
'<td class="left" rowspan="2"> <input type="submit" class="button button-edit" name="Button"value="'.$langs->trans(
"Modify").
'"></td>';
104 global
$conf, $db, $langs, $mysoc;
120 $numExample = $langs->trans(
'NotConfigured');
135 require_once DOL_DOCUMENT_ROOT.
'/core/lib/functions2.lib.php';
141 $this->error =
'NotConfigured';
147 $numFinal =
get_next_value($db, $mask,
'partnership',
'ref',
'',
'', $date);
if( $user->socid > 0) if(! $user->hasRight('accounting', 'chartofaccount')) $object
Parent class to manage numbering of Partnership.
Class to manage the Advanced numbering rule for Partnership.
getExample()
Return an example of numbering.
getNextValue($object)
Return next free value.
info($langs)
Returns the description of the numbering model.
get_next_value($db, $mask, $table, $field, $where='', $objsoc='', $date='', $mode='next', $bentityon=true, $objuser=null, $forceentity=null)
Return last or next value for a mask (according to area we should not reset)
getDolGlobalString($key, $default='')
Return a Dolibarr global constant string value.
global $conf
The following vars must be defined: $type2label $form $conf, $lang, The following vars may also be de...