@@ -2175,7 +2175,7 @@ discard block |
||
| 2175 | 2175 | return $this->LibStatut($this->status, $mode); |
| 2176 | 2176 | } |
| 2177 | 2177 | |
| 2178 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2178 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2179 | 2179 | /** |
| 2180 | 2180 | * Return status label for an object |
| 2181 | 2181 | * |
@@ -2185,7 +2185,7 @@ discard block |
||
| 2185 | 2185 | */ |
| 2186 | 2186 | public function LibStatut($status, $mode = 0) |
| 2187 | 2187 | { |
| 2188 | - // phpcs:enable |
|
| 2188 | + // phpcs:enable |
|
| 2189 | 2189 | global $langs; |
| 2190 | 2190 | |
| 2191 | 2191 | // list of Statut of the task |
@@ -2302,7 +2302,7 @@ discard block |
||
| 2302 | 2302 | } |
| 2303 | 2303 | |
| 2304 | 2304 | |
| 2305 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2305 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
| 2306 | 2306 | /** |
| 2307 | 2307 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
| 2308 | 2308 | * |
@@ -2311,7 +2311,7 @@ discard block |
||
| 2311 | 2311 | */ |
| 2312 | 2312 | public function load_board($user) |
| 2313 | 2313 | { |
| 2314 | - // phpcs:enable |
|
| 2314 | + // phpcs:enable |
|
| 2315 | 2315 | global $conf, $langs; |
| 2316 | 2316 | |
| 2317 | 2317 | // For external user, no check is done on company because readability is managed by public status of project and assignment. |
@@ -536,7 +536,7 @@ discard block |
||
| 536 | 536 | * @param Task $task |
| 537 | 537 | * @return bool |
| 538 | 538 | */ |
| 539 | - static function ($allTasksCompleted, $task) { |
|
| 539 | + static function($allTasksCompleted, $task) { |
|
| 540 | 540 | return $allTasksCompleted && $task->progress >= 100; |
| 541 | 541 | }, |
| 542 | 542 | 1 |
@@ -1596,11 +1596,11 @@ discard block |
||
| 1596 | 1596 | $newobj->timespent_line_id = $obj->rowid; |
| 1597 | 1597 | $newobj->timespent_line_ref_ext = $obj->ref_ext; |
| 1598 | 1598 | $newobj->timespent_line_date = $this->db->jdate($obj->task_date); |
| 1599 | - $newobj->timespent_line_datehour = $this->db->jdate($obj->task_datehour); |
|
| 1599 | + $newobj->timespent_line_datehour = $this->db->jdate($obj->task_datehour); |
|
| 1600 | 1600 | $newobj->timespent_line_withhour = $obj->task_date_withhour; |
| 1601 | 1601 | $newobj->timespent_line_duration = $obj->task_duration; |
| 1602 | 1602 | $newobj->timespent_line_fk_user = $obj->fk_user; |
| 1603 | - $newobj->timespent_line_thm = $obj->thm; // hourly rate |
|
| 1603 | + $newobj->timespent_line_thm = $obj->thm; // hourly rate |
|
| 1604 | 1604 | $newobj->timespent_line_note = $obj->note; |
| 1605 | 1605 | |
| 1606 | 1606 | $arrayres[] = $newobj; |
@@ -2139,7 +2139,7 @@ discard block |
||
| 2139 | 2139 | } |
| 2140 | 2140 | // End |
| 2141 | 2141 | if ($error) { |
| 2142 | - $clone_task_id = 0; // For static tool check |
|
| 2142 | + $clone_task_id = 0; // For static tool check |
|
| 2143 | 2143 | } else { |
| 2144 | 2144 | $clone_task_id = $clone_task->id; |
| 2145 | 2145 | $clone_task_ref = $clone_task->ref; |
@@ -2588,7 +2588,7 @@ discard block |
||
| 2588 | 2588 | global $langs, $hookmanager, $user, $action; |
| 2589 | 2589 | |
| 2590 | 2590 | $error = 0; |
| 2591 | - $task_origin = new Task($this->db); // The thirdparty that we will delete |
|
| 2591 | + $task_origin = new Task($this->db); // The thirdparty that we will delete |
|
| 2592 | 2592 | |
| 2593 | 2593 | dol_syslog("mergeTask merge task id=" . $task_origin_id . " (will be deleted) into the task id=" . $this->id); |
| 2594 | 2594 | |
@@ -18,10 +18,10 @@ discard block |
||
| 18 | 18 | * along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 19 | 19 | */ |
| 20 | 20 | |
| 21 | - use Luracast\Restler\RestException; |
|
| 21 | + use Luracast\Restler\RestException; |
|
| 22 | 22 | |
| 23 | - require_once constant('DOL_DOCUMENT_ROOT') . '/projet/class/project.class.php'; |
|
| 24 | - require_once constant('DOL_DOCUMENT_ROOT') . '/projet/class/task.class.php'; |
|
| 23 | + require_once constant('DOL_DOCUMENT_ROOT') . '/projet/class/project.class.php'; |
|
| 24 | + require_once constant('DOL_DOCUMENT_ROOT') . '/projet/class/task.class.php'; |
|
| 25 | 25 | |
| 26 | 26 | /** |
| 27 | 27 | * API class for projects |
@@ -657,7 +657,7 @@ discard block |
||
| 657 | 657 | } |
| 658 | 658 | |
| 659 | 659 | |
| 660 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 660 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
| 661 | 661 | /** |
| 662 | 662 | * Clean sensible object datas |
| 663 | 663 | * |
@@ -666,7 +666,7 @@ discard block |
||
| 666 | 666 | */ |
| 667 | 667 | protected function _cleanObjectDatas($object) |
| 668 | 668 | { |
| 669 | - // phpcs:enable |
|
| 669 | + // phpcs:enable |
|
| 670 | 670 | $object = parent::_cleanObjectDatas($object); |
| 671 | 671 | |
| 672 | 672 | unset($object->datec); |
@@ -125,7 +125,7 @@ |
||
| 125 | 125 | |
| 126 | 126 | $sql = "SELECT t.rowid"; |
| 127 | 127 | $sql .= " FROM " . MAIN_DB_PREFIX . "projet as t"; |
| 128 | - $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "projet_extrafields AS ef ON ef.fk_object = t.rowid"; // So we will be able to filter on extrafields |
|
| 128 | + $sql .= " LEFT JOIN " . MAIN_DB_PREFIX . "projet_extrafields AS ef ON ef.fk_object = t.rowid"; // So we will be able to filter on extrafields |
|
| 129 | 129 | if ($category > 0) { |
| 130 | 130 | $sql .= ", " . MAIN_DB_PREFIX . "categorie_project as c"; |
| 131 | 131 | } |
@@ -155,7 +155,7 @@ |
||
| 155 | 155 | while ($i < $num) { |
| 156 | 156 | $objp = $db->fetch_object($resql); |
| 157 | 157 | $listofoppstatus[$objp->rowid] = $objp->percent; |
| 158 | - $listofopplabel[$objp->rowid] = $objp->label; // default label if translation from "OppStatus".code not found. |
|
| 158 | + $listofopplabel[$objp->rowid] = $objp->label; // default label if translation from "OppStatus".code not found. |
|
| 159 | 159 | $listofoppcode[$objp->rowid] = $objp->code; |
| 160 | 160 | switch ($objp->code) { |
| 161 | 161 | case 'PROSP': |
@@ -151,8 +151,8 @@ |
||
| 151 | 151 | $id = GETPOSTINT('id'); |
| 152 | 152 | $ref = GETPOST('ref', 'alpha'); |
| 153 | 153 | $action = GETPOST('action', 'aZ09'); |
| 154 | -$datesrfc = GETPOST('datesrfc'); // deprecated |
|
| 155 | -$dateerfc = GETPOST('dateerfc'); // deprecated |
|
| 154 | +$datesrfc = GETPOST('datesrfc'); // deprecated |
|
| 155 | +$dateerfc = GETPOST('dateerfc'); // deprecated |
|
| 156 | 156 | $dates = dol_mktime(0, 0, 0, GETPOST('datesmonth'), GETPOST('datesday'), GETPOST('datesyear')); |
| 157 | 157 | $datee = dol_mktime(23, 59, 59, GETPOST('dateemonth'), GETPOST('dateeday'), GETPOST('dateeyear')); |
| 158 | 158 | if (empty($dates) && !empty($datesrfc)) { // deprecated |
@@ -110,7 +110,7 @@ discard block |
||
| 110 | 110 | $permissionnote = $user->hasRight('contrat', 'creer'); // Used by the include of actions_setnotes.inc.php |
| 111 | 111 | $permissiondellink = $user->hasRight('contrat', 'creer'); // Used by the include of actions_dellink.inc.php |
| 112 | 112 | $permissiontodelete = ($user->hasRight('contrat', 'creer') && $object->statut == $object::STATUS_DRAFT) || $user->hasRight('contrat', 'supprimer'); |
| 113 | -$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 113 | +$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 114 | 114 | $permissiontoedit = $permissiontoadd; |
| 115 | 115 | $permissiontoactivate = $user->hasRight('contrat', 'activer'); |
| 116 | 116 | $error = 0; |
@@ -155,7 +155,7 @@ discard block |
||
| 155 | 155 | |
| 156 | 156 | include DOL_DOCUMENT_ROOT . '/core/actions_dellink.inc.php'; // Must be include, not include_once |
| 157 | 157 | |
| 158 | - include DOL_DOCUMENT_ROOT . '/core/actions_lineupdown.inc.php'; // Must be include, not include_once |
|
| 158 | + include DOL_DOCUMENT_ROOT . '/core/actions_lineupdown.inc.php'; // Must be include, not include_once |
|
| 159 | 159 | |
| 160 | 160 | if ($action == 'confirm_active' && $confirm == 'yes' && $permissiontoactivate) { |
| 161 | 161 | $date_start = ''; |
@@ -533,8 +533,8 @@ discard block |
||
| 533 | 533 | $result = $prodcustprice->fetchAll('', '', 0, 0, $filter); |
| 534 | 534 | if ($result) { |
| 535 | 535 | if (count($prodcustprice->lines) > 0) { |
| 536 | - $price_min = price($prodcustprice->lines[0]->price_min); |
|
| 537 | - $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
| 536 | + $price_min = price($prodcustprice->lines[0]->price_min); |
|
| 537 | + $price_min_ttc = price($prodcustprice->lines[0]->price_min_ttc); |
|
| 538 | 538 | /*$tva_tx = $prodcustprice->lines[0]->tva_tx; |
| 539 | 539 | if ($prodcustprice->lines[0]->default_vat_code && !preg_match('/\(.*\)/', $tva_tx)) { |
| 540 | 540 | $tva_tx .= ' ('.$prodcustprice->lines[0]->default_vat_code.')'; |
@@ -711,7 +711,7 @@ discard block |
||
| 711 | 711 | if (!empty($date_start_update) && !empty($date_end_update) && $date_start_update > $date_end_update) { |
| 712 | 712 | setEventMessages($langs->trans("Error") . ': ' . $langs->trans("DateStartPlanned") . ' > ' . $langs->trans("DateEndPlanned"), null, 'errors'); |
| 713 | 713 | $action = 'editline'; |
| 714 | - $_GET['rowid'] = GETPOST('elrowid'); // Keep $_GET here. Used by GETPOST('rowid') later |
|
| 714 | + $_GET['rowid'] = GETPOST('elrowid'); // Keep $_GET here. Used by GETPOST('rowid') later |
|
| 715 | 715 | $error++; |
| 716 | 716 | } |
| 717 | 717 | |
@@ -770,7 +770,7 @@ discard block |
||
| 770 | 770 | // update price_ht with discount |
| 771 | 771 | // TODO Use object->updateline instead objectline->update |
| 772 | 772 | |
| 773 | - $price_ht = price2num(GETPOST('elprice'), 'MU'); |
|
| 773 | + $price_ht = price2num(GETPOST('elprice'), 'MU'); |
|
| 774 | 774 | $remise_percent = price2num(GETPOST('elremise_percent'), '', 2); |
| 775 | 775 | if ($remise_percent > 0) { |
| 776 | 776 | $remise = round(((float) $price_ht * (float) $remise_percent / 100), 2); |
@@ -875,7 +875,7 @@ discard block |
||
| 875 | 875 | } elseif ($action == 'confirm_activate' && $confirm == 'yes' && $user->hasRight('contrat', 'creer')) { |
| 876 | 876 | $date_start = dol_mktime(12, 0, 0, GETPOST('d_startmonth'), GETPOST('d_startday'), GETPOST('d_startyear')); |
| 877 | 877 | $date_end = dol_mktime(12, 0, 0, GETPOST('d_endmonth'), GETPOST('d_endday'), GETPOST('d_endyear')); |
| 878 | - $comment = GETPOST('comment', 'alpha'); |
|
| 878 | + $comment = GETPOST('comment', 'alpha'); |
|
| 879 | 879 | $result = $object->activateAll($user, $date_start, 0, $comment, $date_end); |
| 880 | 880 | if ($result < 0) { |
| 881 | 881 | setEventMessages($object->error, $object->errors, 'errors'); |
@@ -1504,7 +1504,7 @@ discard block |
||
| 1504 | 1504 | } |
| 1505 | 1505 | |
| 1506 | 1506 | |
| 1507 | - $arrayothercontracts = $object->getListOfContracts('others'); // array or -1 if technical error |
|
| 1507 | + $arrayothercontracts = $object->getListOfContracts('others'); // array or -1 if technical error |
|
| 1508 | 1508 | |
| 1509 | 1509 | /* |
| 1510 | 1510 | * Lines of contracts |
@@ -75,7 +75,7 @@ discard block |
||
| 75 | 75 | |
| 76 | 76 | dol_get_fiche_head($head, 'ticket', $langs->trans("Contract"), -1, 'contract'); |
| 77 | 77 | |
| 78 | -$linkback = '<a href="' . constant('BASE_URL') . '/contrat/list.php' . (! empty($socid) ? '?socid=' . $socid : '') . '">'; |
|
| 78 | +$linkback = '<a href="' . constant('BASE_URL') . '/contrat/list.php' . (!empty($socid) ? '?socid=' . $socid : '') . '">'; |
|
| 79 | 79 | $linkback .= $langs->trans("BackToList") . '</a>'; |
| 80 | 80 | |
| 81 | 81 | $morehtmlref = ''; |
@@ -136,12 +136,12 @@ discard block |
||
| 136 | 136 | // Thirdparty |
| 137 | 137 | $morehtmlref .= '<br>' . $langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1); |
| 138 | 138 | // Project |
| 139 | -if (! empty($conf->projet->enabled)) { |
|
| 139 | +if (!empty($conf->projet->enabled)) { |
|
| 140 | 140 | require_once constant('DOL_DOCUMENT_ROOT') . '/projet/class/task.class.php'; |
| 141 | 141 | |
| 142 | 142 | $langs->load("projects"); |
| 143 | 143 | $morehtmlref .= '<br>' . $langs->trans('Project') . ' : '; |
| 144 | - if (! empty($object->fk_project)) { |
|
| 144 | + if (!empty($object->fk_project)) { |
|
| 145 | 145 | $proj = new Project($db); |
| 146 | 146 | $proj->fetch($object->fk_project); |
| 147 | 147 | $morehtmlref .= '<a href="' . constant('BASE_URL') . '/projet/card.php?id='; |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | |
| 154 | 154 | $object->fields = dol_sort_array($object->fields, 'position'); |
| 155 | 155 | $arrayfields = dol_sort_array($arrayfields, 'position'); |
| 156 | -'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 156 | +'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan |
|
| 157 | 157 | |
| 158 | 158 | $permissiontoread = $user->hasRight('contrat', 'lire'); |
| 159 | 159 | $permissiontoadd = $user->hasRight('contrat', 'creer'); |
@@ -573,7 +573,7 @@ discard block |
||
| 573 | 573 | } |
| 574 | 574 | |
| 575 | 575 | $varpage = empty($contextpage) ? $_SERVER["PHP_SELF"] : $contextpage; |
| 576 | -$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 576 | +$htmlofselectarray = $form->multiSelectArrayWithCheckbox('selectedfields', $arrayfields, $varpage, getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')); // This also change content of $arrayfields with user setup |
|
| 577 | 577 | $selectedfields = ($mode != 'kanban' ? $htmlofselectarray : ''); |
| 578 | 578 | $selectedfields .= (count($arrayofmassactions) ? $form->showCheckAddButtons('checkforselect', 1) : ''); |
| 579 | 579 | |
@@ -89,7 +89,7 @@ |
||
| 89 | 89 | // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context |
| 90 | 90 | $hookmanager->initHooks(array('agendacontract', 'globalcard')); |
| 91 | 91 | |
| 92 | -$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 92 | +$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 93 | 93 | |
| 94 | 94 | $result = restrictedArea($user, 'contrat', $object->id); |
| 95 | 95 | |
@@ -54,7 +54,7 @@ |
||
| 54 | 54 | // Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context |
| 55 | 55 | $hookmanager->initHooks(array('contractcontactcard', 'globalcard')); |
| 56 | 56 | |
| 57 | -$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 57 | +$permissiontoadd = $user->hasRight('contrat', 'creer'); // Used by the include of actions_addupdatedelete.inc.php and actions_lineupdown.inc.php |
|
| 58 | 58 | |
| 59 | 59 | $result = restrictedArea($user, 'contrat', $object->id); |
| 60 | 60 | |