@@ -568,7 +568,7 @@ discard block |
||
568 | 568 | return $this->LibStatut($this->status, $mode); |
569 | 569 | } |
570 | 570 | |
571 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
571 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
572 | 572 | /** |
573 | 573 | * Return label of a status |
574 | 574 | * |
@@ -578,7 +578,7 @@ discard block |
||
578 | 578 | */ |
579 | 579 | public function LibStatut($status, $mode = 0) |
580 | 580 | { |
581 | - // phpcs:enable |
|
581 | + // phpcs:enable |
|
582 | 582 | global $langs; |
583 | 583 | $langs->load('orders'); |
584 | 584 |
@@ -734,9 +734,9 @@ discard block |
||
734 | 734 | if ($this->origin_object instanceof CommonObject && empty($this->origin_object->lines)) { |
735 | 735 | $res = $this->origin_object->fetch_lines(); |
736 | 736 | if ($this->origin_object instanceof CommandeFournisseur) { |
737 | - $this->commandeFournisseur = $this->origin_object; // deprecated |
|
737 | + $this->commandeFournisseur = $this->origin_object; // deprecated |
|
738 | 738 | } else { |
739 | - $this->commandeFournisseur = null; // deprecated |
|
739 | + $this->commandeFournisseur = null; // deprecated |
|
740 | 740 | } |
741 | 741 | if ($res < 0) { |
742 | 742 | return $res; |
@@ -1358,7 +1358,7 @@ discard block |
||
1358 | 1358 | if (getDolGlobalInt("STOCK_CALCULATE_ON_RECEPTION_CLOSE")) { |
1359 | 1359 | $this->labelStatus[1] = 'StatusReceptionValidatedToReceive'; |
1360 | 1360 | } |
1361 | - $this->labelStatus[2] = 'StatusReceptionProcessed'; |
|
1361 | + $this->labelStatus[2] = 'StatusReceptionProcessed'; |
|
1362 | 1362 | |
1363 | 1363 | // List of short language codes for status |
1364 | 1364 | $this->labelStatusShort[-1] = 'StatusReceptionCanceledShort'; |
@@ -1468,7 +1468,7 @@ discard block |
||
1468 | 1468 | while ($xnbp < $nbp) { |
1469 | 1469 | $line = new CommandeFournisseurDispatch($this->db); |
1470 | 1470 | $line->desc = $langs->trans("Description") . " " . $xnbp; |
1471 | - $line->libelle = $langs->trans("Description") . " " . $xnbp; // deprecated |
|
1471 | + $line->libelle = $langs->trans("Description") . " " . $xnbp; // deprecated |
|
1472 | 1472 | $line->label = $langs->trans("Description") . " " . $xnbp; |
1473 | 1473 | $line->qty = 10; |
1474 | 1474 |
@@ -1178,7 +1178,7 @@ discard block |
||
1178 | 1178 | } |
1179 | 1179 | } |
1180 | 1180 | |
1181 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1181 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1182 | 1182 | /** |
1183 | 1183 | * Load lines |
1184 | 1184 | * |
@@ -1186,7 +1186,7 @@ discard block |
||
1186 | 1186 | */ |
1187 | 1187 | public function fetch_lines() |
1188 | 1188 | { |
1189 | - // phpcs:enable |
|
1189 | + // phpcs:enable |
|
1190 | 1190 | $this->lines = array(); |
1191 | 1191 | |
1192 | 1192 | |
@@ -1327,7 +1327,7 @@ discard block |
||
1327 | 1327 | return $this->LibStatut($this->statut, $mode); |
1328 | 1328 | } |
1329 | 1329 | |
1330 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1330 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1331 | 1331 | /** |
1332 | 1332 | * Return label of a status |
1333 | 1333 | * |
@@ -1337,7 +1337,7 @@ discard block |
||
1337 | 1337 | */ |
1338 | 1338 | public function LibStatut($status, $mode) |
1339 | 1339 | { |
1340 | - // phpcs:enable |
|
1340 | + // phpcs:enable |
|
1341 | 1341 | global $langs; |
1342 | 1342 | |
1343 | 1343 | // List of long language codes for status |
@@ -1498,7 +1498,7 @@ discard block |
||
1498 | 1498 | } |
1499 | 1499 | } |
1500 | 1500 | |
1501 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1501 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1502 | 1502 | /** |
1503 | 1503 | * Fetch deliveries method and return an array. Load array this->meths(rowid=>label). |
1504 | 1504 | * |
@@ -1506,7 +1506,7 @@ discard block |
||
1506 | 1506 | */ |
1507 | 1507 | public function fetch_delivery_methods() |
1508 | 1508 | { |
1509 | - // phpcs:enable |
|
1509 | + // phpcs:enable |
|
1510 | 1510 | global $langs; |
1511 | 1511 | $this->meths = array(); |
1512 | 1512 | |
@@ -1524,7 +1524,7 @@ discard block |
||
1524 | 1524 | } |
1525 | 1525 | } |
1526 | 1526 | |
1527 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1527 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1528 | 1528 | /** |
1529 | 1529 | * Fetch all deliveries method and return an array. Load array this->listmeths. |
1530 | 1530 | * |
@@ -1533,7 +1533,7 @@ discard block |
||
1533 | 1533 | */ |
1534 | 1534 | public function list_delivery_methods($id = 0) |
1535 | 1535 | { |
1536 | - // phpcs:enable |
|
1536 | + // phpcs:enable |
|
1537 | 1537 | global $langs; |
1538 | 1538 | |
1539 | 1539 | $this->listmeths = array(); |
@@ -204,11 +204,11 @@ |
||
204 | 204 | |
205 | 205 | $receptionline->fk_product = $line['fk_product']; |
206 | 206 | $receptionline->fk_entrepot = $line['fk_entrepot']; |
207 | - $receptionline->fk_element = $line['fk_element'] ?? $line['origin_id']; // example: purchase order id. this->origin is 'supplier_order' |
|
207 | + $receptionline->fk_element = $line['fk_element'] ?? $line['origin_id']; // example: purchase order id. this->origin is 'supplier_order' |
|
208 | 208 | $receptionline->origin_line_id = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: purchase order id |
209 | - $receptionline->fk_elementdet = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: purchase order line id |
|
210 | - $receptionline->origin_type = $line['element_type'] ?? $line['origin_type']; // example 'supplier_order' |
|
211 | - $receptionline->element_type = $line['element_type'] ?? $line['origin_type']; // example 'supplier_order' |
|
209 | + $receptionline->fk_elementdet = $line['fk_elementdet'] ?? $line['origin_line_id']; // example: purchase order line id |
|
210 | + $receptionline->origin_type = $line['element_type'] ?? $line['origin_type']; // example 'supplier_order' |
|
211 | + $receptionline->element_type = $line['element_type'] ?? $line['origin_type']; // example 'supplier_order' |
|
212 | 212 | $receptionline->qty = $line['qty']; |
213 | 213 | //$receptionline->rang = $line['rang']; |
214 | 214 | $receptionline->array_options = $line['array_options']; |
@@ -49,7 +49,7 @@ discard block |
||
49 | 49 | public $reception; |
50 | 50 | |
51 | 51 | /** |
52 | - * Constructor |
|
52 | + * Constructor |
|
53 | 53 | */ |
54 | 54 | public function __construct() |
55 | 55 | { |
@@ -643,15 +643,15 @@ discard block |
||
643 | 643 | */ |
644 | 644 | |
645 | 645 | /** |
646 | - * Close a reception (Classify it as "Delivered") |
|
647 | - * |
|
648 | - * @param int $id Reception ID |
|
649 | - * @param int $notrigger Disabled triggers |
|
650 | - * |
|
651 | - * @url POST {id}/close |
|
652 | - * |
|
646 | + * Close a reception (Classify it as "Delivered") |
|
647 | + * |
|
648 | + * @param int $id Reception ID |
|
649 | + * @param int $notrigger Disabled triggers |
|
650 | + * |
|
651 | + * @url POST {id}/close |
|
652 | + * |
|
653 | 653 | * @return array |
654 | - */ |
|
654 | + */ |
|
655 | 655 | public function close($id, $notrigger = 0) |
656 | 656 | { |
657 | 657 | if (!DolibarrApiAccess::$user->hasRight('reception', 'creer')) { |
@@ -683,7 +683,7 @@ discard block |
||
683 | 683 | return $this->_cleanObjectDatas($this->reception); |
684 | 684 | } |
685 | 685 | |
686 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
686 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore |
|
687 | 687 | /** |
688 | 688 | * Clean sensible object datas |
689 | 689 | * |
@@ -692,7 +692,7 @@ discard block |
||
692 | 692 | */ |
693 | 693 | protected function _cleanObjectDatas($object) |
694 | 694 | { |
695 | - // phpcs:enable |
|
695 | + // phpcs:enable |
|
696 | 696 | $object = parent::_cleanObjectDatas($object); |
697 | 697 | |
698 | 698 | unset($object->thirdparty); // id already returned |
@@ -177,8 +177,8 @@ discard block |
||
177 | 177 | public $usage_bill_time; // Is the time spent on project must be invoiced or not |
178 | 178 | |
179 | 179 | /** |
180 | - * @var integer Event organization: Use Event Organization |
|
181 | - */ |
|
180 | + * @var integer Event organization: Use Event Organization |
|
181 | + */ |
|
182 | 182 | public $usage_organize_event; |
183 | 183 | |
184 | 184 | /** |
@@ -812,7 +812,7 @@ discard block |
||
812 | 812 | return $substitution; |
813 | 813 | } |
814 | 814 | |
815 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
815 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
816 | 816 | /** |
817 | 817 | * Return list of elements for type, linked to a project |
818 | 818 | * |
@@ -826,7 +826,7 @@ discard block |
||
826 | 826 | */ |
827 | 827 | public function get_element_list($type, $tablename, $datefieldname = '', $date_start = null, $date_end = null, $projectkey = 'fk_projet') |
828 | 828 | { |
829 | - // phpcs:enable |
|
829 | + // phpcs:enable |
|
830 | 830 | |
831 | 831 | global $hookmanager; |
832 | 832 | |
@@ -1285,7 +1285,7 @@ discard block |
||
1285 | 1285 | return $this->LibStatut(isset($this->statut) ? $this->statut : $this->status, $mode); |
1286 | 1286 | } |
1287 | 1287 | |
1288 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1288 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1289 | 1289 | /** |
1290 | 1290 | * Renvoi status label for a status |
1291 | 1291 | * |
@@ -1295,7 +1295,7 @@ discard block |
||
1295 | 1295 | */ |
1296 | 1296 | public function LibStatut($status, $mode = 0) |
1297 | 1297 | { |
1298 | - // phpcs:enable |
|
1298 | + // phpcs:enable |
|
1299 | 1299 | global $langs; |
1300 | 1300 | |
1301 | 1301 | if (is_null($status)) { |
@@ -1976,7 +1976,7 @@ discard block |
||
1976 | 1976 | } |
1977 | 1977 | |
1978 | 1978 | |
1979 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1979 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
1980 | 1980 | /** |
1981 | 1981 | * Associate element to a project |
1982 | 1982 | * |
@@ -1986,7 +1986,7 @@ discard block |
||
1986 | 1986 | */ |
1987 | 1987 | public function update_element($tableName, $elementSelectId) |
1988 | 1988 | { |
1989 | - // phpcs:enable |
|
1989 | + // phpcs:enable |
|
1990 | 1990 | $sql = "UPDATE " . MAIN_DB_PREFIX . $tableName; |
1991 | 1991 | |
1992 | 1992 | if ($tableName == "actioncomm") { |
@@ -2010,7 +2010,7 @@ discard block |
||
2010 | 2010 | } |
2011 | 2011 | } |
2012 | 2012 | |
2013 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2013 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2014 | 2014 | /** |
2015 | 2015 | * Associate element to a project |
2016 | 2016 | * |
@@ -2022,7 +2022,7 @@ discard block |
||
2022 | 2022 | */ |
2023 | 2023 | public function remove_element($tableName, $elementSelectId, $projectfield = 'fk_projet') |
2024 | 2024 | { |
2025 | - // phpcs:enable |
|
2025 | + // phpcs:enable |
|
2026 | 2026 | $sql = "UPDATE " . MAIN_DB_PREFIX . $tableName; |
2027 | 2027 | |
2028 | 2028 | if ($tableName == "actioncomm") { |
@@ -2207,7 +2207,7 @@ discard block |
||
2207 | 2207 | } |
2208 | 2208 | } |
2209 | 2209 | |
2210 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2210 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
2211 | 2211 | /** |
2212 | 2212 | * Load indicators for dashboard (this->nbtodo and this->nbtodolate) |
2213 | 2213 | * |
@@ -2216,7 +2216,7 @@ discard block |
||
2216 | 2216 | */ |
2217 | 2217 | public function load_board($user) |
2218 | 2218 | { |
2219 | - // phpcs:enable |
|
2219 | + // phpcs:enable |
|
2220 | 2220 | global $conf, $langs; |
2221 | 2221 | |
2222 | 2222 | // For external user, no check is done on company because readability is managed by public status of project and assignment. |
@@ -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>'; |
@@ -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 |
@@ -242,7 +242,7 @@ discard block |
||
242 | 242 | |
243 | 243 | $sql = "SELECT t.rowid"; |
244 | 244 | $sql .= " FROM " . MAIN_DB_PREFIX . "projet as t"; |
245 | - $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 |
|
245 | + $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 |
|
246 | 246 | if ($category > 0) { |
247 | 247 | $sql .= ", " . MAIN_DB_PREFIX . "categorie_project as c"; |
248 | 248 | } |
@@ -255,12 +255,12 @@ discard block |
||
255 | 255 | if ($search_sale == -2) { |
256 | 256 | $sql .= " AND NOT EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc)"; |
257 | 257 | } elseif ($search_sale > 0) { |
258 | - $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = " . ((int)$search_sale) . ")"; |
|
258 | + $sql .= " AND EXISTS (SELECT sc.fk_soc FROM " . MAIN_DB_PREFIX . "societe_commerciaux as sc WHERE sc.fk_soc = t.fk_soc AND sc.fk_user = " . ((int) $search_sale) . ")"; |
|
259 | 259 | } |
260 | 260 | } |
261 | 261 | // Select projects of given category |
262 | 262 | if ($category > 0) { |
263 | - $sql .= " AND c.fk_categorie = " . ((int)$category) . " AND c.fk_project = t.rowid "; |
|
263 | + $sql .= " AND c.fk_categorie = " . ((int) $category) . " AND c.fk_project = t.rowid "; |
|
264 | 264 | } |
265 | 265 | // Add sql filters |
266 | 266 | if ($sqlfilters) { |
@@ -226,7 +226,7 @@ discard block |
||
226 | 226 | } |
227 | 227 | } |
228 | 228 | |
229 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
229 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
230 | 230 | /** |
231 | 231 | * Load object in memory from the database |
232 | 232 | * |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | */ |
237 | 237 | public function fetch_by_product($product_id, $lang = '') |
238 | 238 | { |
239 | - // phpcs:enable |
|
239 | + // phpcs:enable |
|
240 | 240 | global $langs, $conf; |
241 | 241 | |
242 | 242 | $sql = "SELECT"; |
@@ -404,7 +404,7 @@ discard block |
||
404 | 404 | } |
405 | 405 | } |
406 | 406 | |
407 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
407 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
408 | 408 | /** |
409 | 409 | * Delete object in database |
410 | 410 | * |
@@ -416,7 +416,7 @@ discard block |
||
416 | 416 | */ |
417 | 417 | public function delete_by_product($user, $product_id, $lang_id = '', $notrigger = 0) |
418 | 418 | { |
419 | - // phpcs:enable |
|
419 | + // phpcs:enable |
|
420 | 420 | global $conf, $langs; |
421 | 421 | $error = 0; |
422 | 422 | |
@@ -452,7 +452,7 @@ discard block |
||
452 | 452 | } |
453 | 453 | } |
454 | 454 | |
455 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
455 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
456 | 456 | /** |
457 | 457 | * Delete object in database |
458 | 458 | * |
@@ -461,7 +461,7 @@ discard block |
||
461 | 461 | */ |
462 | 462 | public function delete_by_file($user) |
463 | 463 | { |
464 | - // phpcs:enable |
|
464 | + // phpcs:enable |
|
465 | 465 | global $conf, $langs; |
466 | 466 | $error = 0; |
467 | 467 |
@@ -158,7 +158,7 @@ |
||
158 | 158 | )); |
159 | 159 | |
160 | 160 | // Retrieve all extrafields if not already not know (should not happen) |
161 | - if (! is_object($extrafields)) { |
|
161 | + if (!is_object($extrafields)) { |
|
162 | 162 | $extrafields = new ExtraFields($this->db); |
163 | 163 | $extrafields->fetch_name_optionals_label($product->table_element); |
164 | 164 | } |
@@ -598,7 +598,7 @@ discard block |
||
598 | 598 | } |
599 | 599 | |
600 | 600 | |
601 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
601 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
602 | 602 | /** |
603 | 603 | * Return list of all warehouses |
604 | 604 | * |
@@ -607,7 +607,7 @@ discard block |
||
607 | 607 | */ |
608 | 608 | public function list_array($status = 1) |
609 | 609 | { |
610 | - // phpcs:enable |
|
610 | + // phpcs:enable |
|
611 | 611 | $liste = array(); |
612 | 612 | |
613 | 613 | $sql = "SELECT rowid, ref as label"; |
@@ -629,7 +629,7 @@ discard block |
||
629 | 629 | return $liste; |
630 | 630 | } |
631 | 631 | |
632 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
632 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
633 | 633 | /** |
634 | 634 | * Return number of unique different product into a warehouse |
635 | 635 | * |
@@ -637,7 +637,7 @@ discard block |
||
637 | 637 | */ |
638 | 638 | public function nb_different_products() |
639 | 639 | { |
640 | - // phpcs:enable |
|
640 | + // phpcs:enable |
|
641 | 641 | $ret = array(); |
642 | 642 | |
643 | 643 | $sql = "SELECT count(distinct p.rowid) as nb"; |
@@ -660,7 +660,7 @@ discard block |
||
660 | 660 | return $ret; |
661 | 661 | } |
662 | 662 | |
663 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
663 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
664 | 664 | /** |
665 | 665 | * Return stock and value of warehosue |
666 | 666 | * |
@@ -669,7 +669,7 @@ discard block |
||
669 | 669 | public function nb_products() |
670 | 670 | { |
671 | 671 | global $conf; |
672 | - // phpcs:enable |
|
672 | + // phpcs:enable |
|
673 | 673 | $ret = array(); |
674 | 674 | |
675 | 675 | //For MultiCompany PMP per entity |
@@ -719,7 +719,7 @@ discard block |
||
719 | 719 | return $this->LibStatut($this->statut, $mode); |
720 | 720 | } |
721 | 721 | |
722 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
722 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
723 | 723 | /** |
724 | 724 | * Return label of a given status |
725 | 725 | * |
@@ -729,7 +729,7 @@ discard block |
||
729 | 729 | */ |
730 | 730 | public function LibStatut($status, $mode = 0) |
731 | 731 | { |
732 | - // phpcs:enable |
|
732 | + // phpcs:enable |
|
733 | 733 | global $langs; |
734 | 734 | |
735 | 735 | $statusType = 'status5'; |
@@ -903,7 +903,7 @@ discard block |
||
903 | 903 | return 1; |
904 | 904 | } |
905 | 905 | |
906 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
906 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
907 | 907 | /** |
908 | 908 | * Return full path to current warehouse |
909 | 909 | * |
@@ -911,7 +911,7 @@ discard block |
||
911 | 911 | */ |
912 | 912 | public function get_full_arbo() |
913 | 913 | { |
914 | - // phpcs:enable |
|
914 | + // phpcs:enable |
|
915 | 915 | $TArbo = array($this->label); |
916 | 916 | |
917 | 917 | $protection = 100; // We limit depth of warehouses to 100 |
@@ -944,7 +944,7 @@ discard block |
||
944 | 944 | return implode(' >> ', array_reverse($TArbo)); |
945 | 945 | } |
946 | 946 | |
947 | - // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
947 | + // phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps |
|
948 | 948 | /** |
949 | 949 | * Return array of children warehouses ids from $id warehouse (recursive function) |
950 | 950 | * |
@@ -954,7 +954,7 @@ discard block |
||
954 | 954 | */ |
955 | 955 | public function get_children_warehouses($id, &$TChildWarehouses) |
956 | 956 | { |
957 | - // phpcs:enable |
|
957 | + // phpcs:enable |
|
958 | 958 | |
959 | 959 | $sql = "SELECT rowid |
960 | 960 | FROM " . $this->db->prefix() . "entrepot |
@@ -209,7 +209,7 @@ |
||
209 | 209 | /** |
210 | 210 | * Warehouse open and any operations are allowed, but warehouse is not included into calculation of stock. |
211 | 211 | */ |
212 | - const STATUS_OPENEXT_ALL = 3; // TODO Implement this |
|
212 | + const STATUS_OPENEXT_ALL = 3; // TODO Implement this |
|
213 | 213 | |
214 | 214 | /** |
215 | 215 | * Constructor |