diff --git a/.github/workflows/pr-18.yaml b/.github/workflows/pr-18.yaml index 2682e99df38..b8b18169b58 100644 --- a/.github/workflows/pr-18.yaml +++ b/.github/workflows/pr-18.yaml @@ -19,7 +19,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install GitHub CLI run: | @@ -36,7 +36,10 @@ jobs: #REVIEWER: "eldy,lvessiller-opendsi,rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer REVIEWER: "rycks" # Remplacez par le nom d'utilisateur GitHub du reviewer run: | + # shellcheck disable=2086 echo "GH_TOKEN=$GH_TOKEN" + # shellcheck disable=2086 pr_number=$(jq --raw-output .number < $GITHUB_EVENT_PATH) + # shellcheck disable=2086 gh pr edit $pr_number --add-reviewer "$REVIEWER" continue-on-error: true diff --git a/build/phpstan/phpstan-baseline.neon b/build/phpstan/phpstan-baseline.neon index 865aabe7cb4..75b4e9fafba 100644 --- a/build/phpstan/phpstan-baseline.neon +++ b/build/phpstan/phpstan-baseline.neon @@ -20946,42 +20946,6 @@ parameters: count: 1 path: ../../htdocs/fourn/commande/document.php - - - message: '#^Variable \$badgeStatus0 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus1 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus4 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus6 might not be defined\.$#' - identifier: variable.undefined - count: 1 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$badgeStatus9 might not be defined\.$#' - identifier: variable.undefined - count: 2 - path: ../../htdocs/fourn/commande/index.php - - - - message: '#^Variable \$socid might not be defined\.$#' - identifier: variable.undefined - count: 4 - path: ../../htdocs/fourn/commande/index.php - - message: '#^If condition is always false\.$#' identifier: if.alwaysFalse diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 78c2f2a3a3b..78615f801ba 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -1470,7 +1470,7 @@ class Invoices extends DolibarrApi * Add payment line to a specific invoice with the remain to pay as amount. * * @param int $id Id of invoice - * @param string $datepaye {@from body} Payment date {@type timestamp} + * @param string $datepaye {@from body} Payment date * @param int $paymentid {@from body} Payment mode Id {@min 1} * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} * @param int $accountid {@from body} Account Id {@min 1} @@ -1591,7 +1591,7 @@ class Invoices extends DolibarrApi * Example of value for parameter arrayofamounts: {"1": {"amount": "99.99", "multicurrency_amount": ""}, "2": {"amount": "", "multicurrency_amount": "10"}} * * @param array $arrayofamounts {@from body} Array with id of invoices with amount to pay for each invoice - * @param string $datepaye {@from body} Payment date {@type timestamp} + * @param string $datepaye {@from body} Payment date * @param int $paymentid {@from body} Payment mode Id {@min 1} * @param string $closepaidinvoices {@from body} Close paid invoices {@choice yes,no} * @param int $accountid {@from body} Account Id {@min 1} diff --git a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php index 9a2b8aca0b0..01b04b0a338 100644 --- a/htdocs/core/modules/supplier_order/modules_commandefournisseur.php +++ b/htdocs/core/modules/supplier_order/modules_commandefournisseur.php @@ -6,7 +6,8 @@ * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2011-2016 Philippe Grand * Copyright (C) 2014 Marcos García - * Copyright (C) 2024 MDW + * Copyright (C) 2024 MDW + * Copyright (C) 2024 Frédéric France * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -25,7 +26,7 @@ /** * \file htdocs/core/modules/supplier_order/modules_commandefournisseur.php - * \ingroup order fournisseur + * \ingroup supplier order * \brief File that contains parent class for supplier orders models * and parent class for supplier orders numbering models */ diff --git a/htdocs/expensereport/class/expensereport.class.php b/htdocs/expensereport/class/expensereport.class.php index 5f7ef6df827..01827248462 100644 --- a/htdocs/expensereport/class/expensereport.class.php +++ b/htdocs/expensereport/class/expensereport.class.php @@ -616,8 +616,6 @@ class ExpenseReport extends CommonObject */ public function update($user, $notrigger = 0, $userofexpensereport = null) { - global $langs; - $error = 0; $this->db->begin(); @@ -644,24 +642,21 @@ class ExpenseReport extends CommonObject dol_syslog(get_class($this)."::update", LOG_DEBUG); $result = $this->db->query($sql); if ($result) { - if (!$error) { - $result = $this->insertExtraFields(); - if ($result < 0) { - $error++; - } + $result = $this->insertExtraFields(); + if ($result < 0) { + $error++; } if (!$error && !$notrigger) { // Call trigger $result = $this->call_trigger('EXPENSE_REPORT_MODIFY', $user); - if ($result < 0) { $error++; } // End call triggers } - if (empty($error)) { + if (!$error) { $this->db->commit(); return 1; } else { diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 376ca90db2b..d4fff20a846 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -32,7 +32,7 @@ /** * \file htdocs/fourn/commande/card.php - * \ingroup supplier, order + * \ingroup supplier order * \brief Card supplier order */ diff --git a/htdocs/fourn/commande/contact.php b/htdocs/fourn/commande/contact.php index 03efd74eaaa..67b436e308e 100644 --- a/htdocs/fourn/commande/contact.php +++ b/htdocs/fourn/commande/contact.php @@ -22,7 +22,7 @@ /** * \file htdocs/fourn/commande/contact.php - * \ingroup order + * \ingroup supplier order * \brief Onglet de gestion des contacts de commande */ diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php index 485470da945..d61d72ea72b 100644 --- a/htdocs/fourn/commande/dispatch.php +++ b/htdocs/fourn/commande/dispatch.php @@ -27,7 +27,7 @@ /** * \file htdocs/fourn/commande/dispatch.php - * \ingroup commande + * \ingroup supplier order * \brief Page to dispatch receiving */ diff --git a/htdocs/fourn/commande/document.php b/htdocs/fourn/commande/document.php index e5f3a3f8ebe..5c43e0ba3d8 100644 --- a/htdocs/fourn/commande/document.php +++ b/htdocs/fourn/commande/document.php @@ -24,7 +24,7 @@ /** * \file htdocs/fourn/commande/document.php - * \ingroup supplier + * \ingroup supplier order * \brief Management page of attached documents to a supplier order */ diff --git a/htdocs/fourn/commande/index.php b/htdocs/fourn/commande/index.php index 74c608bfd06..25f6d7e4f90 100644 --- a/htdocs/fourn/commande/index.php +++ b/htdocs/fourn/commande/index.php @@ -22,7 +22,7 @@ /** * \file htdocs/fourn/commande/index.php - * \ingroup order fournisseur + * \ingroup supplier order * \brief Home page of supplier's orders area */ @@ -52,6 +52,7 @@ $max = getDolGlobalInt('MAIN_SIZE_SHORTLIST_LIMIT', 5); // Security check $orderid = GETPOST('orderid'); +$socid = GETPOSTINT('socid'); if ($user->socid) { $socid = $user->socid; } @@ -116,7 +117,13 @@ if ($resql) { $db->free($resql); include DOL_DOCUMENT_ROOT.'/theme/'.$conf->theme.'/theme_vars.inc.php'; - + /** + * @var string $badgeStatus0 + * @var string $badgeStatus1 + * @var string $badgeStatus4 + * @var string $badgeStatus6 + * @var string $badgeStatus9 + */ print '
'; print ''; print ''; diff --git a/htdocs/fourn/commande/info.php b/htdocs/fourn/commande/info.php index e55e2c9a1da..477b4b11f95 100644 --- a/htdocs/fourn/commande/info.php +++ b/htdocs/fourn/commande/info.php @@ -21,7 +21,7 @@ /** * \file htdocs/fourn/commande/info.php - * \ingroup order + * \ingroup supplier order * \brief Info page for Purchase Order / Supplier Order */ diff --git a/htdocs/fourn/commande/list.php b/htdocs/fourn/commande/list.php index 44e6630c970..051e09d453d 100644 --- a/htdocs/fourn/commande/list.php +++ b/htdocs/fourn/commande/list.php @@ -29,7 +29,7 @@ /** * \file htdocs/fourn/commande/list.php - * \ingroup fournisseur + * \ingroup supplier order * \brief List of purchase orders */ diff --git a/htdocs/fourn/commande/note.php b/htdocs/fourn/commande/note.php index 22cf2d2f02e..967a875cd60 100644 --- a/htdocs/fourn/commande/note.php +++ b/htdocs/fourn/commande/note.php @@ -22,7 +22,7 @@ /** * \file htdocs/fourn/commande/note.php - * \ingroup order + * \ingroup supplier order * \brief page for notes on supplier orders */
'.$langs->trans("Statistics").' - '.$langs->trans("SuppliersOrders").'