* 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>
* fix phpstan
Property PaymentVarious::$id (int) does not accept null.
Property PaymentVarious::$ref (string) does not accept null.
* Update emailcollector.lib.php
* 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>
# 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).
* 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>
* 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.
# 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
# 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<string,string> $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
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
* 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.
* 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
* 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>