@@ -119,7 +119,7 @@ |
||
119 | 119 | |
120 | 120 | $title = $object->ref . ' - ' . $langs->trans("Notes"); |
121 | 121 | if (!empty($withproject)) { |
122 | - $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : '') ; |
|
122 | + $title .= ' | ' . $langs->trans("Project") . (!empty($projectstatic->ref) ? ': ' . $projectstatic->ref : ''); |
|
123 | 123 | } |
124 | 124 | $help_url = ''; |
125 | 125 |
@@ -466,7 +466,7 @@ |
||
466 | 466 | } |
467 | 467 | if ($field == 'array_options' && is_array($value)) { |
468 | 468 | foreach ($value as $index => $val) { |
469 | - $this->task->array_options[$index] = $this->_checkValForAPI($field, $val, $this->task);; |
|
469 | + $this->task->array_options[$index] = $this->_checkValForAPI($field, $val, $this->task); ; |
|
470 | 470 | } |
471 | 471 | continue; |
472 | 472 | } |
@@ -331,7 +331,7 @@ discard block |
||
331 | 331 | if ($foundintocache) { // Cache file found and is not too old |
332 | 332 | dol_syslog(get_class($this) . '::' . __FUNCTION__ . " read data from cache file " . $newpathofdestfile . " " . $filedate . "."); |
333 | 333 | $data = json_decode(file_get_contents($newpathofdestfile), true); |
334 | - '@phan-var-force array $data'; // Phan can not interpret json_decode |
|
334 | + '@phan-var-force array $data'; // Phan can not interpret json_decode |
|
335 | 335 | } else { |
336 | 336 | $year = $startyear; |
337 | 337 | while ($year <= $endyear) { |
@@ -442,7 +442,7 @@ discard block |
||
442 | 442 | if ($foundintocache) { // Cache file found and is not too old |
443 | 443 | dol_syslog(get_class($this) . '::' . __FUNCTION__ . " read data from cache file " . $newpathofdestfile . " " . $filedate . "."); |
444 | 444 | $data = json_decode(file_get_contents($newpathofdestfile), true); |
445 | - '@phan-var-force array $data'; // Phan can not interpret json_decode |
|
445 | + '@phan-var-force array $data'; // Phan can not interpret json_decode |
|
446 | 446 | } else { |
447 | 447 | $year = $startyear; |
448 | 448 | while ($year <= $endyear) { |
@@ -746,7 +746,7 @@ discard block |
||
746 | 746 | $this->statut = $obj->status; // deprecated |
747 | 747 | $this->status = $obj->status; |
748 | 748 | $this->opp_status = $obj->fk_opp_status; |
749 | - $this->opp_amount = $obj->opp_amount; |
|
749 | + $this->opp_amount = $obj->opp_amount; |
|
750 | 750 | $this->opp_percent = $obj->opp_percent; |
751 | 751 | $this->budget_amount = $obj->budget_amount; |
752 | 752 | $this->model_pdf = $obj->model_pdf; |
@@ -1703,7 +1703,7 @@ discard block |
||
1703 | 1703 | global $langs, $conf; |
1704 | 1704 | |
1705 | 1705 | $error = 0; |
1706 | - $clone_project_id = 0; // For static toolcheck |
|
1706 | + $clone_project_id = 0; // For static toolcheck |
|
1707 | 1707 | |
1708 | 1708 | dol_syslog("createFromClone clone_contact=" . json_encode($clone_contact) . " clone_task=" . json_encode($clone_task) . " clone_project_file=" . json_encode($clone_project_file) . " clone_note=" . json_encode($clone_note) . " move_date=" . json_encode($move_date), LOG_DEBUG); |
1709 | 1709 | |
@@ -1997,7 +1997,7 @@ discard block |
||
1997 | 1997 | if ($tableName == "actioncomm") { |
1998 | 1998 | $sql .= " SET fk_project=" . $this->id; |
1999 | 1999 | $sql .= " WHERE id=" . ((int) $elementSelectId); |
2000 | - } elseif (in_array($tableName, ["entrepot","mrp_mo","stocktransfer_stocktransfer"])) { |
|
2000 | + } elseif (in_array($tableName, ["entrepot", "mrp_mo", "stocktransfer_stocktransfer"])) { |
|
2001 | 2001 | $sql .= " SET fk_project=" . $this->id; |
2002 | 2002 | $sql .= " WHERE rowid=" . ((int) $elementSelectId); |
2003 | 2003 | } else { |
@@ -2188,7 +2188,7 @@ discard block |
||
2188 | 2188 | $date = explode('-', $obj->element_date); |
2189 | 2189 | $week_number = getWeekNumber($date[2], $date[1], $date[0]); |
2190 | 2190 | } |
2191 | - '@phan-var-force int $week_number'; // Needed because phan considers it might be null |
|
2191 | + '@phan-var-force int $week_number'; // Needed because phan considers it might be null |
|
2192 | 2192 | if (empty($weekalreadyfound[$week_number])) { |
2193 | 2193 | $this->monthWorkLoad[$week_number] = $obj->element_duration; |
2194 | 2194 | $this->monthWorkLoadPerTask[$week_number][$obj->fk_element] = $obj->element_duration; |
@@ -2535,7 +2535,7 @@ discard block |
||
2535 | 2535 | if (method_exists($this, 'getLibStatut')) { |
2536 | 2536 | $return .= '<div class="info-box-status small inline-block valignmiddle">' . $this->getLibStatut(3) . '</div>'; |
2537 | 2537 | } |
2538 | - $return .= '</div>'; // end div line status |
|
2538 | + $return .= '</div>'; // end div line status |
|
2539 | 2539 | |
2540 | 2540 | $return .= '</div>'; |
2541 | 2541 | $return .= '</div>'; |
@@ -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 |
@@ -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 |