@@ -31,9 +31,9 @@ discard block |
||
| 31 | 31 | class mod_expedition_ribera extends ModelNumRefExpedition |
| 32 | 32 | { |
| 33 | 33 | /** |
| 34 | - * Dolibarr version of the loaded document |
|
| 35 | - * @var string |
|
| 36 | - */ |
|
| 34 | + * Dolibarr version of the loaded document |
|
| 35 | + * @var string |
|
| 36 | + */ |
|
| 37 | 37 | public $version = 'dolibarr'; |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -58,9 +58,9 @@ discard block |
||
| 58 | 58 | * |
| 59 | 59 | * @return string text description |
| 60 | 60 | */ |
| 61 | - public function info() |
|
| 62 | - { |
|
| 63 | - global $conf, $langs, $db; |
|
| 61 | + public function info() |
|
| 62 | + { |
|
| 63 | + global $conf, $langs, $db; |
|
| 64 | 64 | |
| 65 | 65 | $langs->load("bills"); |
| 66 | 66 | |
@@ -87,22 +87,22 @@ discard block |
||
| 87 | 87 | $texte .= '</form>'; |
| 88 | 88 | |
| 89 | 89 | return $texte; |
| 90 | - } |
|
| 90 | + } |
|
| 91 | 91 | |
| 92 | 92 | /** |
| 93 | 93 | * Return numbering example |
| 94 | 94 | * |
| 95 | 95 | * @return string Example |
| 96 | 96 | */ |
| 97 | - public function getExample() |
|
| 98 | - { |
|
| 99 | - global $conf, $langs, $mysoc; |
|
| 100 | - |
|
| 101 | - $old_code_client = $mysoc->code_client; |
|
| 102 | - $old_code_type = $mysoc->typent_code; |
|
| 103 | - $mysoc->code_client = 'CCCCCCCCCC'; |
|
| 104 | - $mysoc->typent_code = 'TTTTTTTTTT'; |
|
| 105 | - $numExample = $this->getNextValue($mysoc, ''); |
|
| 97 | + public function getExample() |
|
| 98 | + { |
|
| 99 | + global $conf, $langs, $mysoc; |
|
| 100 | + |
|
| 101 | + $old_code_client = $mysoc->code_client; |
|
| 102 | + $old_code_type = $mysoc->typent_code; |
|
| 103 | + $mysoc->code_client = 'CCCCCCCCCC'; |
|
| 104 | + $mysoc->typent_code = 'TTTTTTTTTT'; |
|
| 105 | + $numExample = $this->getNextValue($mysoc, ''); |
|
| 106 | 106 | $mysoc->code_client = $old_code_client; |
| 107 | 107 | $mysoc->typent_code = $old_code_type; |
| 108 | 108 | |
@@ -111,7 +111,7 @@ discard block |
||
| 111 | 111 | $numExample = $langs->trans('NotConfigured'); |
| 112 | 112 | } |
| 113 | 113 | return $numExample; |
| 114 | - } |
|
| 114 | + } |
|
| 115 | 115 | |
| 116 | 116 | /** |
| 117 | 117 | * Return next value |
@@ -120,8 +120,8 @@ discard block |
||
| 120 | 120 | * @param Object $shipment Shipment object |
| 121 | 121 | * @return string Value if OK, 0 if KO |
| 122 | 122 | */ |
| 123 | - public function getNextValue($objsoc, $shipment) |
|
| 124 | - { |
|
| 123 | + public function getNextValue($objsoc, $shipment) |
|
| 124 | + { |
|
| 125 | 125 | global $db, $conf; |
| 126 | 126 | |
| 127 | 127 | require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | return $numFinal; |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 144 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 145 | 145 | /** |
| 146 | 146 | * Return next free value |
| 147 | 147 | * |
@@ -149,9 +149,9 @@ discard block |
||
| 149 | 149 | * @param Object $objforref Shipment object |
| 150 | 150 | * @return string Next free value |
| 151 | 151 | */ |
| 152 | - public function expedition_get_num($objsoc, $objforref) |
|
| 153 | - { |
|
| 154 | - // phpcs:enable |
|
| 155 | - return $this->getNextValue($objsoc, $objforref); |
|
| 156 | - } |
|
| 152 | + public function expedition_get_num($objsoc, $objforref) |
|
| 153 | + { |
|
| 154 | + // phpcs:enable |
|
| 155 | + return $this->getNextValue($objsoc, $objforref); |
|
| 156 | + } |
|
| 157 | 157 | } |
@@ -31,9 +31,9 @@ discard block |
||
| 31 | 31 | class mod_expensereport_sand extends ModeleNumRefExpenseReport |
| 32 | 32 | { |
| 33 | 33 | /** |
| 34 | - * Dolibarr version of the loaded document |
|
| 35 | - * @var string |
|
| 36 | - */ |
|
| 34 | + * Dolibarr version of the loaded document |
|
| 35 | + * @var string |
|
| 36 | + */ |
|
| 37 | 37 | public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr' |
| 38 | 38 | |
| 39 | 39 | /** |
@@ -54,14 +54,14 @@ discard block |
||
| 54 | 54 | public $name = 'Sand'; |
| 55 | 55 | |
| 56 | 56 | |
| 57 | - /** |
|
| 58 | - * Returns the description of the numbering model |
|
| 59 | - * |
|
| 60 | - * @return string Texte descripif |
|
| 61 | - */ |
|
| 62 | - public function info() |
|
| 63 | - { |
|
| 64 | - global $db, $conf, $langs; |
|
| 57 | + /** |
|
| 58 | + * Returns the description of the numbering model |
|
| 59 | + * |
|
| 60 | + * @return string Texte descripif |
|
| 61 | + */ |
|
| 62 | + public function info() |
|
| 63 | + { |
|
| 64 | + global $db, $conf, $langs; |
|
| 65 | 65 | |
| 66 | 66 | $langs->load("bills"); |
| 67 | 67 | |
@@ -92,39 +92,39 @@ discard block |
||
| 92 | 92 | $texte .= '</form>'; |
| 93 | 93 | |
| 94 | 94 | return $texte; |
| 95 | - } |
|
| 95 | + } |
|
| 96 | 96 | |
| 97 | - /** |
|
| 98 | - * Return an example of numbering |
|
| 99 | - * |
|
| 100 | - * @return string Example |
|
| 101 | - */ |
|
| 102 | - public function getExample() |
|
| 103 | - { |
|
| 104 | - global $db, $conf, $langs, $user; |
|
| 97 | + /** |
|
| 98 | + * Return an example of numbering |
|
| 99 | + * |
|
| 100 | + * @return string Example |
|
| 101 | + */ |
|
| 102 | + public function getExample() |
|
| 103 | + { |
|
| 104 | + global $db, $conf, $langs, $user; |
|
| 105 | 105 | |
| 106 | - $exp = new ExpenseReport($db); |
|
| 107 | - $exp->initAsSpecimen(); |
|
| 108 | - $exp->fk_user_author = $user->id; |
|
| 106 | + $exp = new ExpenseReport($db); |
|
| 107 | + $exp->initAsSpecimen(); |
|
| 108 | + $exp->fk_user_author = $user->id; |
|
| 109 | 109 | |
| 110 | - $numExample = $this->getNextValue($exp); |
|
| 110 | + $numExample = $this->getNextValue($exp); |
|
| 111 | 111 | |
| 112 | 112 | if (!$numExample) |
| 113 | 113 | { |
| 114 | 114 | $numExample = $langs->trans('NotConfigured'); |
| 115 | 115 | } |
| 116 | 116 | return $numExample; |
| 117 | - } |
|
| 118 | - |
|
| 119 | - /** |
|
| 120 | - * Return next free value |
|
| 121 | - * |
|
| 122 | - * @param Object $object Object we need next value for |
|
| 123 | - * @return string Value if KO, <0 if KO |
|
| 124 | - */ |
|
| 125 | - public function getNextValue($object) |
|
| 126 | - { |
|
| 127 | - global $db, $conf; |
|
| 117 | + } |
|
| 118 | + |
|
| 119 | + /** |
|
| 120 | + * Return next free value |
|
| 121 | + * |
|
| 122 | + * @param Object $object Object we need next value for |
|
| 123 | + * @return string Value if KO, <0 if KO |
|
| 124 | + */ |
|
| 125 | + public function getNextValue($object) |
|
| 126 | + { |
|
| 127 | + global $db, $conf; |
|
| 128 | 128 | |
| 129 | 129 | require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php'; |
| 130 | 130 | |
@@ -154,5 +154,5 @@ discard block |
||
| 154 | 154 | $numFinal = get_next_value($db, $mask, 'expensereport', 'ref', '', null, $date, 'next', true, $fuser); |
| 155 | 155 | |
| 156 | 156 | return $numFinal; |
| 157 | - } |
|
| 157 | + } |
|
| 158 | 158 | } |
@@ -29,7 +29,7 @@ |
||
| 29 | 29 | global $conf, $langs; |
| 30 | 30 | |
| 31 | 31 | // Load translation files required by the page |
| 32 | - $langs->loadLangs(array("payment", "paybox")); |
|
| 32 | + $langs->loadLangs(array("payment", "paybox")); |
|
| 33 | 33 | |
| 34 | 34 | $servicename = 'Online'; |
| 35 | 35 | |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | print '<div class="center">'; |
| 51 | 51 | if (count($export->array_export_code)) |
| 52 | 52 | { |
| 53 | - print dolGetButtonTitle($langs->trans('NewExport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/exports/export.php?leftmenu=export', '', $user->rights->export->creer); |
|
| 53 | + print dolGetButtonTitle($langs->trans('NewExport'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/exports/export.php?leftmenu=export', '', $user->rights->export->creer); |
|
| 54 | 54 | } |
| 55 | 55 | print '</div>'; |
| 56 | 56 | print '<br>'; |
@@ -73,10 +73,10 @@ discard block |
||
| 73 | 73 | |
| 74 | 74 | foreach ($liste as $key => $val) |
| 75 | 75 | { |
| 76 | - if (preg_match('/__\(Disabled\)__/', $liste[$key])) |
|
| 77 | - { |
|
| 78 | - $liste[$key] = preg_replace('/__\(Disabled\)__/', '('.$langs->transnoentitiesnoconv("Disabled").')', $liste[$key]); |
|
| 79 | - } |
|
| 76 | + if (preg_match('/__\(Disabled\)__/', $liste[$key])) |
|
| 77 | + { |
|
| 78 | + $liste[$key] = preg_replace('/__\(Disabled\)__/', '('.$langs->transnoentitiesnoconv("Disabled").')', $liste[$key]); |
|
| 79 | + } |
|
| 80 | 80 | |
| 81 | 81 | print '<tr class="oddeven">'; |
| 82 | 82 | print '<td width="16">'.img_picto_common($model->getDriverLabelForKey($key), $model->getPictoForKey($key)).'</td>'; |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | |
| 60 | 60 | // List of fields to search into when doing a "search in all" |
| 61 | 61 | $fieldstosearchall = array( |
| 62 | - 'm.titre'=>'Ref', |
|
| 62 | + 'm.titre'=>'Ref', |
|
| 63 | 63 | ); |
| 64 | 64 | |
| 65 | 65 | |
@@ -157,7 +157,7 @@ discard block |
||
| 157 | 157 | $newcardbutton = ''; |
| 158 | 158 | if ($user->rights->mailing->creer) |
| 159 | 159 | { |
| 160 | - $newcardbutton .= dolGetButtonTitle($langs->trans('NewMailing'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/mailing/card.php?action=create'); |
|
| 160 | + $newcardbutton .= dolGetButtonTitle($langs->trans('NewMailing'), '', 'fa fa-plus-circle', DOL_URL_ROOT.'/comm/mailing/card.php?action=create'); |
|
| 161 | 161 | } |
| 162 | 162 | |
| 163 | 163 | $i = 0; |
@@ -177,8 +177,8 @@ discard block |
||
| 177 | 177 | |
| 178 | 178 | $moreforfilter = ''; |
| 179 | 179 | |
| 180 | - print '<div class="div-table-responsive">'; |
|
| 181 | - print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
| 180 | + print '<div class="div-table-responsive">'; |
|
| 181 | + print '<table class="tagtable liste'.($moreforfilter ? " listwithfilterbefore" : "").'">'."\n"; |
|
| 182 | 182 | |
| 183 | 183 | print '<tr class="liste_titre_filter">'; |
| 184 | 184 | print '<td class="liste_titre">'; |
@@ -205,11 +205,11 @@ discard block |
||
| 205 | 205 | print img_object($langs->trans("ShowPropal"), "propal").' '.$obj->ref.'</a></td>'; |
| 206 | 206 | |
| 207 | 207 | print "<td>"; |
| 208 | - $companystatic->id = $obj->socid; |
|
| 209 | - $companystatic->name = $obj->name; |
|
| 210 | - $companystatic->client = $obj->client; |
|
| 211 | - $companystatic->canvas = $obj->canvas; |
|
| 212 | - print $companystatic->getNomUrl(1, '', 44); |
|
| 208 | + $companystatic->id = $obj->socid; |
|
| 209 | + $companystatic->name = $obj->name; |
|
| 210 | + $companystatic->client = $obj->client; |
|
| 211 | + $companystatic->canvas = $obj->canvas; |
|
| 212 | + print $companystatic->getNomUrl(1, '', 44); |
|
| 213 | 213 | print "</td>\n"; |
| 214 | 214 | print "<td align=\"right\">"; |
| 215 | 215 | print dol_print_date($db->jdate($obj->dp), 'day')."</td>\n"; |
@@ -258,11 +258,11 @@ discard block |
||
| 258 | 258 | $obj = $db->fetch_object($resql); |
| 259 | 259 | |
| 260 | 260 | print '<tr class="oddeven"><td width="12%">'; |
| 261 | - $companystatic->id = $obj->socid; |
|
| 262 | - $companystatic->name = $obj->name; |
|
| 263 | - $companystatic->client = $obj->client; |
|
| 264 | - $companystatic->canvas = $obj->canvas; |
|
| 265 | - print $companystatic->getNomUrl(1, 'prospect', 44); |
|
| 261 | + $companystatic->id = $obj->socid; |
|
| 262 | + $companystatic->name = $obj->name; |
|
| 263 | + $companystatic->client = $obj->client; |
|
| 264 | + $companystatic->canvas = $obj->canvas; |
|
| 265 | + print $companystatic->getNomUrl(1, 'prospect', 44); |
|
| 266 | 266 | print '</td></tr>'; |
| 267 | 267 | $i++; |
| 268 | 268 | } |
@@ -94,10 +94,10 @@ |
||
| 94 | 94 | { |
| 95 | 95 | // Check option standard_conforming_strings is on |
| 96 | 96 | $paramarray = $db->getServerParametersValues('standard_conforming_strings'); |
| 97 | - // if ($paramarray['standard_conforming_strings'] != 'on' && $paramarray['standard_conforming_strings'] != 1) |
|
| 98 | - // { |
|
| 99 | - // $langs->load("errors"); |
|
| 100 | - // } |
|
| 97 | + // if ($paramarray['standard_conforming_strings'] != 'on' && $paramarray['standard_conforming_strings'] != 1) |
|
| 98 | + // { |
|
| 99 | + // $langs->load("errors"); |
|
| 100 | + // } |
|
| 101 | 101 | } |
| 102 | 102 | print '<br>'; |
| 103 | 103 | |
@@ -100,7 +100,7 @@ |
||
| 100 | 100 | $filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1); |
| 101 | 101 | $totalsize = 0; |
| 102 | 102 | foreach ($filearray as $key => $file) { |
| 103 | - $totalsize += $file['size']; |
|
| 103 | + $totalsize += $file['size']; |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | // Shipment card |
@@ -108,9 +108,9 @@ discard block |
||
| 108 | 108 | $fuser->fetch(GETPOST("fk_user", "int")); |
| 109 | 109 | $object->salary = $fuser->salary; |
| 110 | 110 | |
| 111 | - // Fill array 'array_options' with data from add form |
|
| 112 | - $ret = $extrafields->setOptionalsFromPost(null, $object); |
|
| 113 | - if ($ret < 0) $error++; |
|
| 111 | + // Fill array 'array_options' with data from add form |
|
| 112 | + $ret = $extrafields->setOptionalsFromPost(null, $object); |
|
| 113 | + if ($ret < 0) $error++; |
|
| 114 | 114 | |
| 115 | 115 | if (empty($datep) || empty($datev) || empty($datesp) || empty($dateep)) |
| 116 | 116 | { |
@@ -340,14 +340,14 @@ discard block |
||
| 340 | 340 | print '<td><input name="num_payment" id="num_payment" type="text" value="'.GETPOST("num_payment").'"></td></tr>'."\n"; |
| 341 | 341 | } |
| 342 | 342 | |
| 343 | - // Other attributes |
|
| 344 | - $parameters = array(); |
|
| 345 | - $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
| 346 | - print $hookmanager->resPrint; |
|
| 347 | - if (empty($reshook)) |
|
| 348 | - { |
|
| 349 | - print $object->showOptionals($extrafields, 'edit'); |
|
| 350 | - } |
|
| 343 | + // Other attributes |
|
| 344 | + $parameters = array(); |
|
| 345 | + $reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook |
|
| 346 | + print $hookmanager->resPrint; |
|
| 347 | + if (empty($reshook)) |
|
| 348 | + { |
|
| 349 | + print $object->showOptionals($extrafields, 'edit'); |
|
| 350 | + } |
|
| 351 | 351 | |
| 352 | 352 | print '</table>'; |
| 353 | 353 | |
@@ -464,8 +464,8 @@ discard block |
||
| 464 | 464 | } |
| 465 | 465 | } |
| 466 | 466 | |
| 467 | - // Other attributes |
|
| 468 | - include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 467 | + // Other attributes |
|
| 468 | + include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_view.tpl.php'; |
|
| 469 | 469 | |
| 470 | 470 | print '</table>'; |
| 471 | 471 | |