Commit Graph

130451 Commits

Author SHA1 Message Date
Frédéric FRANCE
b7b799b88e fix phpstan (#28403) 2024-02-25 10:04:57 +01:00
Laurent Destailleur
c159aff82f phpcs 2024-02-25 10:04:27 +01:00
Frédéric FRANCE
2cfeacbd1e fix phpstan (#28402) 2024-02-25 10:03:04 +01:00
Frédéric FRANCE
fe0123262d fix phpstan (#28401)
Property ProductCombinationLevel::$fk_product_attribute_combination (int) does not accept float.
2024-02-25 10:00:58 +01:00
Frédéric FRANCE
92103e2029 fix phpstan (#28399)
Property CommonObject::$fk_project (int) does not accept string.
2024-02-25 10:00:39 +01:00
Frédéric FRANCE
cac5d5e7c8 fix phpstan (#28398)
Property HookManager::$error (string) does not accept int.
2024-02-25 10:00:09 +01:00
Goldron
6876f9fcc3 Fixes an error by initializing ->line in the insert_discount method. (#28407)
* Fixes an error by initializing ->line in the insert_discount method.

* Update propal.class.php

---------

Co-authored-by: David IGREJA <david@siladel.fr>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-25 09:58:24 +01:00
Frédéric FRANCE
af3761000a fix phpstan (#28406)
Property ExtraFields::$errno (string) does not accept int.
2024-02-25 09:56:46 +01:00
Frédéric FRANCE
8588e97364 fix phpstan (#28397)
Property CommonObject::$ref (string) does not accept int.
2024-02-25 09:56:23 +01:00
Frédéric FRANCE
fc432928ea fix phpstan (#28400)
* fix phpstan

Property PaymentVarious::$id (int) does not accept null.
Property PaymentVarious::$ref (string) does not accept null.

* Update emailcollector.lib.php
2024-02-25 09:56:05 +01:00
Frédéric FRANCE
a08cb4ca1e fix phpstan (#28408)
Property RecruitmentJobPosition::$import_key (string) does not accept null.
2024-02-25 09:55:47 +01:00
Jon Bendtsen
c9f718f1c1 Attempt at fixing #28070 with mobile phone to a thirdparty (#28110)
* NEW #28070 Adding mobile phone to thirdparty

* fix indenting

* trying to fix build errors

* too many parentases and missing;

* Update actions_card_common.class.php

---------

Co-authored-by: Jon Bendtsen <xcodeauthor@jonb.dk>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-25 09:43:11 +01:00
Laurent Destailleur
b08e17e76d QUAL Rename all input fields "tel" into "phone" 2024-02-25 09:36:14 +01:00
Laurent Destailleur
34ad7e8670 Fix doxygen 2024-02-25 09:30:20 +01:00
Laurent Destailleur
5a0ae16c18 PERF: Performance enhancement on Invoice/Paiement area page 2024-02-25 09:28:14 +01:00
Laurent Destailleur
78622c24a0 Doc 2024-02-24 19:28:14 +01:00
Laurent Destailleur
64269f1597 Add phone_mobile for #28070 2024-02-24 19:24:37 +01:00
Laurent Destailleur
f216c742cb Add phone_mobile for #28070 2024-02-24 19:19:25 +01:00
Laurent Destailleur
a3c0c1958e Fix EOL in log 2024-02-24 18:05:42 +01:00
Laurent Destailleur
c79a4767eb Merge 2024-02-24 17:52:50 +01:00
Laurent Destailleur
1a25a086cb FIX quote in sql request 2024-02-24 17:49:11 +01:00
Laurent Destailleur
83087defa7 Merge 2024-02-24 17:45:55 +01:00
Laurent Destailleur
f90675f7fd FIX quote in sql request 2024-02-24 17:44:30 +01:00
MDW
20b740dcc8 Qual: Review pre-commit configure - re-enable no-commit-to-branch (#28385)
# Qual: Review pre-commit configure - re-enable no-commit-to-branch

This reviews some of the documentation inside the pre-commit-config.yaml file.
It also re-enables the no-commit-to-branch hook.

Also enable spelling on hidden files (changes to pyproject.toml +
exceptions file).
2024-02-24 15:38:20 +01:00
Laurent Destailleur
87aded900f Fix doxygen 2024-02-24 14:31:39 +01:00
Laurent Destailleur
88758c02b1 Fix phan 2024-02-24 14:25:33 +01:00
Laurent Destailleur
58fd9a073a Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-24 14:23:10 +01:00
Laurent Destailleur
7e63df13af Fix phpstan warnings 2024-02-24 14:22:44 +01:00
Laurent Destailleur
de53f6e0c2 Fix phpstan 2024-02-24 14:18:56 +01:00
MDW
8842f8ab10 Qual: Refactor CodingPhpTest / CommonClassTest - less verbosity, but better when error (#28388)
* Qual: CommonClassTest - less verbosity, but better when error

# Qual: CommonClassTest - less verbosity, but better when error

- Report the test method and parameters in case of error.
- Less verbosity about setup.
- $_ENV was empty array, replaced with getenv()

* Qual: Refactor CodingPhpTest

# Qual: Refactor CodingPhpTest

- Use dataprovider (better progress report, better errors, better continuation)
- Use dol_dir_list's exclude_filter capability (do not traverse the excluded dirs)
- Reduce debug output from dolibarr.log (not really relevant for these tests).

* Fix: References to loop variables outside loop

# Fix: References to loop variables outside loop

The test referenced some undefined variables outside foreach loops ($val[0])

* Update CommonClassTest.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-24 14:12:32 +01:00
Laurent Destailleur
6341df1795 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-24 14:09:52 +01:00
Laurent Destailleur
a74382c768 Fix for #28388 2024-02-24 14:09:42 +01:00
MDW
6190c6ad69 Qual: Initialize module mapping from common constant (#28384)
# Qual: Initialize module mapping from common constant

DRY: Use constant define din functions.lib for centralized updates
2024-02-24 14:08:23 +01:00
MDW
b72294bf4c Fix: Typing for PDF parameter (#28383)
* Fix: Typing for PDF parameter

# Fix: Typing for PDF parameter

Change PDF to known type.

* Fix: Typing for PDF parameter

# Fix: Typing for PDF parameter

Change PDF to known type.
2024-02-24 14:07:21 +01:00
MDW
a7eaa091dc Fix: Reviewed, fixed and optimized dol_dir_list (#28387)
# Fix: Reviewed, fixed and optimized dol_dir_list

Review: had some issues using the exclusion filter, may be unrelated to implementation.
Fixed: is_link was testing utf8 filename, not os filename version.
Optimized:
- Simplified is_dir branches
- Avoid computing the exclusion arrays multiple times
2024-02-24 13:09:13 +01:00
MDW
e77cd248f0 Fix: Spelling in "hidden" files (#28391)
* Fix: Spelling in 'hidden' file

* Fix: Spelling in 'hidden' file

* Fix: Spelling in 'hidden' file
2024-02-24 13:04:22 +01:00
Frédéric FRANCE
9d3d88437c fix phpstan (#28390)
Property User::$socialnetworks (array) does not accept string.
2024-02-24 13:03:57 +01:00
Laurent Destailleur
a0e6e0fac7 Fix avoid loosing setup of terminal when setting some option 2024-02-24 13:03:03 +01:00
Laurent Destailleur
de3966572f Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2024-02-24 12:45:55 +01:00
Yoan Mollard
02180e45cd NEW Allow to set a default project for POS sales (#27042)
* Allow to set a default project for POS sales

* Fixed: Expected 1 space(s) after cast statement

* (int) getDolGlobalString() -> getDolGlobalInt()

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-24 12:45:37 +01:00
MDW
6115d58f47 Qual: Optimize workflow (#28386)
# Qual: Optimize workflow

The log annotation based on the pre-commit logs is now simplified.
2024-02-23 20:05:29 +01:00
MDW
a99875524f Fix: Spelling, PHan warnings, preg quoting, array size (#28380)
# Fix: Spelling, PHan warnings, preg quoting, array size

Initial reasons:
website.class.php: PhanPluginSuspiciousParamOrder: Suspicious order for arguments named pathofwebsiteold and pathofwebsitenew - These are being passed to parameters #1 (string $srcfile) and #2 (string $destfile) of \dolCopyDir(string $srcfile, string $destfile, string $newmask, int $overwriteifexists, array&lt;string,string&gt; $arrayreplacement = null, int $excludesubdir = 0, string[] $excludefileext = null) defined at htdocs/core/lib/files.lib.php:871
Warning: website.class.php: PhanTypeArraySuspiciousNull: Suspicious array access to $linefound[1] of type null
Warning: website.class.php: PhanTypeArraySuspiciousNull: Suspicious array access to $linefound[1] of type null

Also fixed spelling, added preg_quote, fixed spelling for several comments
and variables
2024-02-23 20:04:42 +01:00
Vincent Maury
23d912decd Fix show desactproj in os card (#28039)
When creating or modifying order supplier with complete form, only active projects (if activated) are displayed in select (ajax or not)

But when using the small pencil, desactivated project are displayed
2024-02-23 17:47:55 +01:00
Laurent Destailleur
1d66f725f9 Code 2024-02-23 17:47:27 +01:00
MDW
f3a3de8ea2 Qual: Fix/complete/refactor ModuleTest case. (#28373)
* Fix: Correct CommonClassTest's constructor

# Fix: Correct CommonClassTest's constructor

Dataproviders did not work because of the issue with the constructor

* Qual: Refactor module name list, add mapping to class name

# Qual: Refactor module name list, add mapping to class name

Based on ModuleTest and search for modules in the code, complete the
list of modules and map to the class names.

This will allow reuse in the ModuleTest.

* Qual: Refactor ModulesInit test

# Qual: Refactor ModulesInit test

Use the updated common module mapping list, more complete than
the original list.
Also refactor the test to use a data provider.

* Fix: valid module test must now use array_key_exists

# Fix: valid module test must now use array_key_exists

Because of the introduction of null key values, isset on the array no
longer works, using array_key_exists to test if the modulename is valid.

* fixup! Qual: Refactor module name list, add mapping to class name

* Qual: Less verbosity for tests

# Qual: Less verbosity for tests

The verbosity on setup/teardown/... is not really usefull and
makes the log less readable.  Reducing the verbosity while allowing
to set an environment variable PHPUNIT_DEBUG to enable it.
2024-02-23 17:43:18 +01:00
Laurent Destailleur
00e57fe765 Fix conf->global 2024-02-23 17:36:15 +01:00
Vincent Maury
ac1e8ac617 Fix tva_tx on deposit invoice (#28305)
* Fix tva_tx on deposit invoice

* Update card.php

* Update card.php

Modifs according to Eldy's suggestions : 

introduce a hidden option
INVOICE_VAT_TO_USE_ON_CREDIT_NOTE_WHEN_GENERATED_FROM_REMAIN_TO_PAY, with possible values:

   - not defined, we keep vat to 0 (current code):
    - if value is string 'default', we do what you suggest, we use the default vat for company (in most cases it will be the higher vat rate in dictionary).
    - if value is a float, we use this float value.

* Update card.php
2024-02-23 17:25:10 +01:00
Laurent Destailleur
f502435d62 FIX position of field in list of field in shipment list 2024-02-23 17:24:02 +01:00
Cédric A
1b4fb86c75 NEW Filter shipments by selecting multiple shipping methods (#28376)
* Filter shipments by selecting multiple shipping methods

* FIX GETPOST from «array» to «array:int»

* FIX "Opening brace must be the last content on the line"

* Update list.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-02-23 17:20:20 +01:00
lvessiller-opendsi
1e28f72057 NEW warning message when cloning a product whose status is not to sell (#28374) 2024-02-23 17:18:16 +01:00