Skip to content

Commit

Permalink
Merge branch 'develop' into jyhere/filterable-stockatdate
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Dec 4, 2024
2 parents 35c7d76 + 19b0c2d commit 899e0e4
Show file tree
Hide file tree
Showing 18 changed files with 75 additions and 154 deletions.
5 changes: 4 additions & 1 deletion .github/workflows/pr-18.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install GitHub CLI
run: |
Expand All @@ -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
102 changes: 0 additions & 102 deletions build/phpstan/phpstan-baseline.neon
Original file line number Diff line number Diff line change
Expand Up @@ -18696,12 +18696,6 @@ parameters:
count: 4
path: ../../htdocs/eventorganization/conferenceorboothattendee_card.php

-
message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#'
identifier: variable.undefined
count: 3
path: ../../htdocs/eventorganization/conferenceorboothattendee_card.php

-
message: '#^Variable \$text might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -18768,12 +18762,6 @@ parameters:
count: 1
path: ../../htdocs/eventorganization/core/actions_massactions_mail.inc.php

-
message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/eventorganization/core/actions_massactions_mail.inc.php

-
message: '#^Variable \$from might not be defined\.$#'
identifier: variable.undefined
Expand Down Expand Up @@ -20946,42 +20934,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
Expand Down Expand Up @@ -21585,42 +21537,6 @@ parameters:
-
message: '#^If condition is always false\.$#'
identifier: if.alwaysFalse
count: 2
path: ../../htdocs/holiday/card.php

-
message: '#^Parameter \#4 \$month of function dol_mktime expects int, array\<mixed\>\|string given\.$#'
identifier: argument.type
count: 8
path: ../../htdocs/holiday/card.php

-
message: '#^Parameter \#5 \$day of function dol_mktime expects int, array\<mixed\>\|string given\.$#'
identifier: argument.type
count: 8
path: ../../htdocs/holiday/card.php

-
message: '#^Parameter \#6 \$year of function dol_mktime expects int, array\<mixed\>\|string given\.$#'
identifier: argument.type
count: 8
path: ../../htdocs/holiday/card.php

-
message: '#^Variable \$canread might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/holiday/card.php

-
message: '#^Variable \$endhalfdaykey might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/holiday/card.php

-
message: '#^Variable \$starthalfdaykey might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/holiday/card.php

Expand Down Expand Up @@ -24462,12 +24378,6 @@ parameters:
count: 1
path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php

-
message: '#^Parameter \#3 \$tab_height of method pdf_standard_myobject\:\:_tableau\(\) expects int, float given\.$#'
identifier: argument.type
count: 6
path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php

-
message: '#^Property pdf_standard_myobject\:\:\$cols \(array\<string, array\{rank\: int, width\: float\|int, status\: bool, title\: array\{textkey\: string, label\: string, align\: string, padding\: array\{float, float, float, float\}\}, content\: array\{align\: string, padding\: array\{float, float, float, float\}\}\}\>\) does not accept non\-empty\-array\<string, array\{rank\: 0, width\: false, status\: true, title\: array\{textkey\: ''Designation'', align\: ''L'', padding\: array\{0\.5, 0\.5, 0\.5, 0\.5\}\}, content\: array\{align\: ''L'', padding\: array\{1, 0\.5, 1, 1\.5\}\}\}\|array\{rank\: int, width\: float\|int, status\: bool, title\: array\{textkey\: string, label\: string, align\: string, padding\: array\{float, float, float, float\}\}, content\: array\{align\: string, padding\: array\{float, float, float, float\}\}\}\>\.$#'
identifier: assign.propertyType
Expand Down Expand Up @@ -24528,12 +24438,6 @@ parameters:
count: 1
path: ../../htdocs/modulebuilder/template/core/modules/mymodule/doc/pdf_standard_myobject.modules.php

-
message: '#^Variable \$object might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/modulebuilder/template/core/tpl/linkedobjectblock_myobject.tpl.php

-
message: '#^Negated boolean expression is always true\.$#'
identifier: booleanNot.alwaysTrue
Expand Down Expand Up @@ -27792,12 +27696,6 @@ parameters:
count: 1
path: ../../htdocs/projet/admin/project.php

-
message: '#^Variable \$dolibarr_main_url_root might not be defined\.$#'
identifier: variable.undefined
count: 1
path: ../../htdocs/projet/admin/website.php

-
message: '#^Call to function method_exists\(\) with Project and ''fetchComments'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
Expand Down
4 changes: 2 additions & 2 deletions htdocs/compta/facture/class/api_invoices.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -1470,7 +1470,7 @@ public function getPayments($id)
* 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}
Expand Down Expand Up @@ -1591,7 +1591,7 @@ public function addPayment($id, $datepaye, $paymentid, $closepaidinvoices, $acco
* 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}
Expand Down
9 changes: 7 additions & 2 deletions htdocs/core/lib/functions.lib.php
Original file line number Diff line number Diff line change
Expand Up @@ -1148,8 +1148,10 @@ function GETPOSTFLOAT($paramname, $rounding = '')
* @param string $hourTime 'getpost' to include hour, minute, second values from the HTTP request,
* or 'XX:YY:ZZ' to set hour, minute, second respectively (for instance '23:59:59')
* or '' means '00:00:00' (default)
* @param string $gm Passed to dol_mktime
* @param int|string $gm Passed to dol_mktime
* @return int|string Date as a timestamp, '' or false if error
*
* @see dol_mktime()
*/
function GETPOSTDATE($prefix, $hourTime = '', $gm = 'auto')
{
Expand Down Expand Up @@ -3647,7 +3649,7 @@ function dol_getdate($timestamp, $fast = false, $forcetimezone = '')
* @param int $month Month (1 to 12)
* @param int $day Day (1 to 31)
* @param int $year Year
* @param mixed $gm True or 1 or 'gmt'=Input information are GMT values
* @param bool|int|string $gm True or 1 or 'gmt'=Input information are GMT values
* False or 0 or 'tzserver' = local to server TZ
* 'auto'
* 'tzuser' = local to user TZ taking dst into account at the current date. Not yet implemented.
Expand Down Expand Up @@ -10577,9 +10579,12 @@ function dol_eval($s, $returnvalue = 1, $hideerrors = 1, $onlysimplestring = '1'
$scheck = preg_replace('/\s\(/', '__PARENTHESIS__ ', $scheck); // accept parenthesis in '... (' like in 'if ($a == 1)'. Must replace with __PARENTHESIS__ with a space after to allow following substitutions
$scheck = preg_replace('/^!?[a-zA-Z0-9_]+\(/', '__FUNCTION__', $scheck); // accept parenthesis in 'function(' and '!function('
$scheck = preg_replace('/\s!?[a-zA-Z0-9_]+\(/', '__FUNCTION__', $scheck); // accept parenthesis in '... function(' and '... !function('
$scheck = preg_replace('/^!\(/', '__NOTANDPARENTHESIS__', $scheck); // accept parenthesis in '!('
$scheck = preg_replace('/\s!\(/', '__NOTANDPARENTHESIS__', $scheck); // accept parenthesis in '... !('
$scheck = preg_replace('/(\^|\')\(/', '__REGEXSTART__', $scheck); // To allow preg_match('/^(aaa|bbb)/'... or isStringVarMatching('leftmenu', '(aaa|bbb)')
}
//print 'scheck='.$scheck." : ".strpos($scheck, '(')."<br>\n";

if (strpos($scheck, '(') !== false) {
if ($returnvalue) {
return 'Bad string syntax to evaluate (mode '.$onlysimplestring.', found call of a function or method without using the direct name of the function): '.$s;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2011-2016 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
*
* 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
Expand All @@ -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
*/
Expand Down
13 changes: 4 additions & 9 deletions htdocs/expensereport/class/expensereport.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -616,8 +616,6 @@ public function createFromClone(User $user, $fk_user_author)
*/
public function update($user, $notrigger = 0, $userofexpensereport = null)
{
global $langs;

$error = 0;
$this->db->begin();

Expand All @@ -644,24 +642,21 @@ public function update($user, $notrigger = 0, $userofexpensereport = null)
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 {
Expand Down
2 changes: 1 addition & 1 deletion htdocs/fourn/commande/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

/**
* \file htdocs/fourn/commande/card.php
* \ingroup supplier, order
* \ingroup supplier order
* \brief Card supplier order
*/

Expand Down
2 changes: 1 addition & 1 deletion htdocs/fourn/commande/contact.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
* \file htdocs/fourn/commande/contact.php
* \ingroup order
* \ingroup supplier order
* \brief Onglet de gestion des contacts de commande
*/

Expand Down
2 changes: 1 addition & 1 deletion htdocs/fourn/commande/dispatch.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

/**
* \file htdocs/fourn/commande/dispatch.php
* \ingroup commande
* \ingroup supplier order
* \brief Page to dispatch receiving
*/

Expand Down
2 changes: 1 addition & 1 deletion htdocs/fourn/commande/document.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/

Expand Down
11 changes: 9 additions & 2 deletions htdocs/fourn/commande/index.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
* \file htdocs/fourn/commande/index.php
* \ingroup order fournisseur
* \ingroup supplier order
* \brief Home page of supplier's orders area
*/

Expand Down Expand Up @@ -52,6 +52,7 @@

// Security check
$orderid = GETPOST('orderid');
$socid = GETPOSTINT('socid');
if ($user->socid) {
$socid = $user->socid;
}
Expand Down Expand Up @@ -116,7 +117,13 @@
$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 '<div class="div-table-responsive-no-min">';
print '<table class="noborder nohover centpercent">';
print '<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").' - '.$langs->trans("SuppliersOrders").'</th></tr>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/fourn/commande/info.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

/**
* \file htdocs/fourn/commande/info.php
* \ingroup order
* \ingroup supplier order
* \brief Info page for Purchase Order / Supplier Order
*/

Expand Down
2 changes: 1 addition & 1 deletion htdocs/fourn/commande/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@

/**
* \file htdocs/fourn/commande/list.php
* \ingroup fournisseur
* \ingroup supplier order
* \brief List of purchase orders
*/

Expand Down
2 changes: 1 addition & 1 deletion htdocs/fourn/commande/note.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@

/**
* \file htdocs/fourn/commande/note.php
* \ingroup order
* \ingroup supplier order
* \brief page for notes on supplier orders
*/

Expand Down
Loading

0 comments on commit 899e0e4

Please sign in to comment.