The $check is supposed to be a check retuning a boolean. By being an
`if (value)` check instead of being an `if (value IS NOT NULL)` check,
postgresql complains the types are not correct:
Error ERROR: 42804: argument of CASE/WHEN must be type boolean,
not type integer LINE 1: ...k, tl2.fk_doc FROM ( SELECT DISTINCT
(CASE WHEN tll.fk_fac... ^ LOCATION: coerce_to_boolean,
parse_coerce.c:1176
Regression from commit cfc162a31d.
FIX I did further testing and investigation and I fixed the following issues that stop doing a full closure without duplicate lines generated by an unclean database :
- different label_compte with same account number
- removing label_compte is raising an issue and the code in the line around 2770 $bookkeeping->label_compte = $obj->label_compte;
- different subledger_label with same subledger_account
- empty versus null values for subledger_label and subledger_account
- opening_balance is 0 as it creates a bookkeeping entry for now.
FIX - Update Accounting closure with missing too many A-Nouveau #30039)
* Qual: Fix FunctionArray phan notices
* Fix class name in typing of htdocs/modulebuilder/index.php
* Fix customreports phpdoc
* Adjust file type after completeFileArrayWithDatabaseInfo
* Further phpdoc typing improvements
* More phpdoc
* Improve typing with cast on position field
* Force phpstan version
* Add phpstan exception
* Fix array index type + adjust phan config comment
* accountancysystem: inherit CommonObject
This provides the common methods on the database objects like error
handling.
* accountancysystem: improve error reporting
Forward the database error to the caller when an error happens.
* accountancysystem: clean up class
The fields that were completely unused are removed. $ref is still kept
since it was filled by AccountancySystem::fetch(), but marqued as
deprecated to incite using the newer more descriptive pcg_version field.
* Update accountancysystem.class.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
The accountancysystem::create() method is not used in the code, and thus
was not updated, especially after the introduction of the whole new
accountancy system. The method is at least useful for the tests so fix
it to create values like in every other tests.
* Qual: Fix several phan & stan notices
# Qual: Fix several phan & stan notices
Several fixes in files while fixing UnknownClass notices
* Qual: Update prepare_head PHPDoc return types
# Qual: Update prepare_head PHPDoc return types
Provide detailed array return types for prepare_head functions.
* Fix new phan notice
* Better loadLangs typing and fix call to loadLangs
* Fix new issues (stats)
* Other fixes of new issues
* Qual: update phan baseline
* NEW Accountancy - Option to select the label operation
* NEW Accountancy - Option to select the label operation
* NEW Accountancy - Option to select the label operation
* NEW Accountancy - Option to select the label operation
* Fix codespell
* Fix CodeSniffer
* Fix Phan
* Some fix
* User function csvClean
* User function csvClean
# Qual: Fix phan/stan notices in relation with UnknownObjectMethodCall
Fix notices in classes with UnknownObjectMethodCall notices or classes
related with these.