Alexandre Janniaux
45f6905bae
FIX #32376 : lettering: fix ifsql() called with invalid $check parameter
...
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 .
2024-12-15 18:39:40 +01:00
Alexandre Janniaux
678283dab6
Merge branch 'develop' into accountingjournal-create/1
2024-12-11 09:53:36 +01:00
Pichi1966
b86c1b22f4
Update Closure Income Labels
2024-12-09 12:46:47 +01:00
Leonardo Pedroza
cd2ea4e66f
Fix: accountancy import for FEC files to avoid double escaped values in query ( '\'D\'')
2024-12-09 11:37:46 +01:00
Pichi1966
25e3224121
Close #30039 and port code on this one
...
This will help to better and understand and follow this fix
2024-12-08 11:36:26 +01:00
Pichi1966
7e3624ee27
Clean Spaces versu tab
2024-12-01 19:08:53 +01:00
Pichi1966
89fc9ac8ea
FIX Accounting Closure Duplicates and more Update bookkeeping.class.php
...
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 )
2024-12-01 18:55:31 +01:00
Frédéric FRANCE
1b6ee9e654
fix phpdoc ( #32097 )
...
* fix phpdoc
* Update accountancycategory.class.php
* fix phpstan
* fix phpstan
* fix phpstan
* fix phan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr >
2024-11-28 11:15:56 +01:00
Alexandre Janniaux
0099fbbd2c
accountingjournal: add create() method
...
Adding a create method ensure we create the accountingjournal in a
uniform way, and allow creating the journals in tests without getting
out-of-sync.
2024-11-25 21:23:33 +01:00
Frédéric FRANCE
daae68f9d3
Fix phpstan ( #32005 )
...
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
2024-11-19 21:02:05 +01:00
Alexandre SPANGARO
73171867e0
Accountancy personalized reports - Prepare report page ( #31935 )
2024-11-16 20:58:09 +01:00
MDW
9ec4618199
Qual: Fix FunctionArray phan notices ( #31754 )
...
* 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
2024-11-11 14:48:18 +01:00
Laurent Destailleur
37df9c3524
export
2024-11-10 18:42:57 +01:00
Laurent Destailleur
579aa77d76
Fix phpstan
2024-11-10 18:40:24 +01:00
Frédéric FRANCE
15490b292f
fix phpstan and fix CI ( #31739 )
...
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
2024-11-10 11:16:23 +01:00
Frédéric FRANCE
41a4f42b31
add phpdoc and clean phpstan baseline ( #31717 )
...
* add phpdoc and clean phpstan baseline
* add phpdoc and clean phpstan baseline
* add phpdoc and clean phpstan baseline
* add phpdoc and clean phpstan baseline
* add phpdoc and clean phpstan baseline
* add phpdoc and clean phpstan baseline
* add phpdoc and clean phpstan baseline
* add phpdoc and clean phpstan baseline
* add phpdoc and clean phpstan baseline
* add phpdoc and clean phpstan baseline
* add phpdoc and clean phpstan baseline
* add phpdoc
* add phpdoc
* add phpdoc
2024-11-07 17:31:40 +01:00
Frédéric FRANCE
1adc883b56
add baseline exclude for phpstan ( #31632 )
...
* add baseline exclude for phpstan
* update
* update
* update
* update
* update
* merge
* restore one filter
* delete old errors
* fix
* fix
* fix
* $moreforfilter can t be empty
* fix
* enable check
* refresh baseline
* add phpdoc
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* update phpstan baseline
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
* fix
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr >
2024-11-04 23:53:20 +01:00
Alexandre SPANGARO
3c81211b80
NEW Custom accounting reports ( #31673 )
...
* NEW Custom accounting reports
* Copyright
* FIX Pre-commit
* FIX Pre-commit
* Fix Phan
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr >
2024-11-04 16:38:17 +01:00
Laurent Destailleur
10fe6f1f9f
Fix option ACCOUNTANCY_DISABLE_CLOSURE_LINE_BY_LINE
2024-10-29 14:38:08 +01:00
Laurent Destailleur
405a741726
Fix doxygen
2024-10-25 14:30:51 +02:00
Alexandre Janniaux
0bdd209d06
QUAL: AccountancySystem: maintenance work to uniformize and clean up ( #31391 )
...
* 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 >
2024-10-19 03:37:44 +02:00
Alexandre Janniaux
4146c0df89
accountancysystem: fix object create() method ( #31390 )
...
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.
2024-10-14 16:50:32 +02:00
MDW
53cfbc35be
Qual: Fix several phan & stan notices ( #31308 )
...
* 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
2024-10-14 01:59:44 +02:00
Alexandre SPANGARO
c4409e44f9
QUAL Use table_element in sql querries ( #31355 )
...
* Use table element in sql querries
* Use table element in sql querries
* Use also $this->db->prefix()
* Use table_element in sql querries
2024-10-13 16:47:47 +02:00
Alexandre SPANGARO
dfa1a5dd6e
NEW Accountancy - Option to select the label operation ( #31200 )
...
* 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
2024-10-06 14:06:20 +02:00
MDW
f70c945931
Qual: Fix phan/stan notices ( #31271 )
...
# Qual: Fix phan/stan notices in relation with UnknownObjectMethodCall
Fix notices in classes with UnknownObjectMethodCall notices or classes
related with these.
2024-10-05 18:55:36 +02:00
thomas-Ngr
88879e0708
Add triggers on Bookkeeping class ( #31204 )
2024-10-03 20:52:39 +02:00
Laurent Destailleur
7b61965042
FIX autoselect the fiscal period by default
2024-09-30 13:19:39 +02:00
Laurent Destailleur
d2a279cc7d
FIX autoselect the fiscal period by default
2024-09-30 13:13:15 +02:00
Laurent Destailleur
2d62400b22
FIX autoselect the fiscal period by default
2024-09-30 13:12:42 +02:00
MDW
42bb4fbf3e
Qual: Enable & fix or ignore Invalid DimOffset ( #31176 )
...
* Qual: Enable & fix or ignore Invalid DimOffset
# Qual: Enable & fix or ignore Invalid DimOffset
The Invalid DimOffset notices occur when array keys are defined and
the index used is not amongst the known array keys.
This PR enables these notices and fixes array definitions when needed,
or ignores the notices locally if it's a false positive, or in the
baseline.txt when it does not seem to be a false positive so that
it can be fixed later
* Nullable object typing in function signature not ok for 7.0/8.4
Can't user '?User' as argument type for PHP7.0 which is required by PHP8.4.
Therefore, removing the typing specification in the function definition
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr >
2024-09-29 21:52:31 +02:00
Laurent Destailleur
cc95331fc6
Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop
2024-09-23 22:09:24 +02:00
Laurent Destailleur
0f5e5e1e5b
FIX Maxi debug edit/delete accounting transaction
2024-09-23 21:42:52 +02:00
Laurent Destailleur
33da02bbcd
FIX Maxi debug edit/delete accounting tnasaction
2024-09-23 20:16:39 +02:00
MDW
506454b10a
Qual: Resolve ~200 phan notices/~100 phpstan notices ( #30879 )
...
* bookkeeping\card.php, productaccount
* Fix bookkeeping/listbyaccount
* Typing for accountancycategory
* Fix typing accountancyimport
* Typing accountingaccount
* Typing api_accountancy
* bookkeeping typing
* Fix typing lettering
* Typing for accountancy/customer/list
* Typing accountancy/journal/bankjournal
* typing accountancy/journal/variousjournal
* Typing accountancy/supplier/list
* Initialisations in accountancy/journal/expensereportsjournal
* Initialisations in accountancy/journal/purchasesjournal
* Initialisations in accountancy/journal/sellsjournal
* Update baseline
2024-09-10 02:11:53 +02:00
MDW
32732d37d2
Qual: Improve typing in Export class ( #30859 )
...
* Update baseline
* Qual: Improve typing in Export class
* Add 'abstract' methods to help with typing
* Add some typing
* Improve typing in export modules
* Improve typing for AccountancyExport
* Qual: PHPDoc executeCLI (nullable arguments, range)
* PHPDoc for export function
* Fix $permissiontoClose -> $permissiontoclose
* PHPDoc - Improve AccountingJournal typing
* Improve export_journal tpl typing
* Improve html.formsetup typing
* Impove commonfieldsexport typing
* Improve extrafieldsinexport typing
* Fix typing, initialisation
* Fix typing intracommreport
* Ensure string in $error for CronJob
2024-09-09 03:15:26 +02:00
Frédéric FRANCE
80d1f47d4d
fix ignored phpstan (most of expects string, int given) ( #30649 )
...
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
fix ignored phpstan
fix ignored phpstan
fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
fix ignored phpstan
fix ignored phpstan
fix ignored phpstan
fix ignored phpstan
fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* fix ignored phpstan
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* more ignore
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
* fix phpstan
2024-09-05 16:05:37 +02:00
MDW
aa49419e8f
Qual: Fix/initial type cannot be inferred ( #30591 )
...
* Update baseline
* Add/update phpdoc typings
* Fix type for AssetDepreciationOptions as is
* Fix typing for Asset->depreciation_lines
* $card is used in derived classes, add it back to ActionsAdherentCardCommon
* Adjust code with typing/corrections for defined types
* Fix typos, code update to match typing, extra typing
* Add type cast for numeric operation
* Phpdoc/cast adjustments detected because of new phpdoc hints
2024-08-10 23:21:46 +02:00
MDW
45ed4caeb2
Qual: Enable Phan Simplify rule and fix notices ( #30537 )
...
* Qual: Phan - Enable Simplyfy expression
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Qual: Simplify expression (phan notice)
* Update functions2.lib.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr >
2024-08-07 03:05:02 +02:00
Laurent Destailleur
b3b21d56b6
Fix doxygen
2024-08-07 02:49:38 +02:00
MDW
d6948077b2
Qual: Fix spelling/update .pre-commit configuration (versions) ( #30546 )
...
* Qual: Update pre-commit configuration
* Qual: Update spelling
* Ignore use of deprecated constant
2024-08-07 01:20:43 +02:00
Laurent Destailleur
ee0412dd27
Fix phan warning
2024-07-31 18:54:52 +02:00
Laurent Destailleur
f1cfbb68c6
Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop
2024-07-22 11:23:41 +02:00
Laurent Destailleur
5890f359d0
Fix missing the compatibility layer for conferenceofbooth
2024-07-21 12:15:30 +02:00
Frédéric FRANCE
2707475a12
fix phpstan ( #30319 )
...
* fix phpstan
* fix phpstan expects int, false given ...
* fix phpstan expects int, true given ...
2024-07-08 21:45:35 +02:00
Frédéric FRANCE
4b275dc148
add phpdoc ( #30208 )
...
* add phpdoc
* add phpdoc
* add phpdoc
* add phpdoc
* clean phpdoc
2024-06-30 19:39:01 +02:00
Alexandre SPANGARO
4cde150804
NEW Accountancy - Add partial reconcile on subledger ( #30027 )
...
* NEW Accountancy - Add partial lettering on subledger
* Fix PHPCS
* Fix codespell
2024-06-19 20:10:04 +02:00
lvessiller-opendsi
3929653365
NEW due date in accounting bookkeeping list and card ( #30061 )
...
* NEW due date in accounting bookkeeping list and card
* fix pre-commit
* fix pre-commit
2024-06-19 19:47:22 +02:00
lvessiller-opendsi
46864255ba
FIX validated date filter on accountancy bookkeeping list and export ( #30069 )
2024-06-18 18:32:27 +02:00
Frédéric FRANCE
d5de4f4f67
fix cti ( #29809 )
...
* fix cti
* Update accountingaccount.class.php
* Update accountingaccount.class.php
* Update admin.lang
* Update ignore_translation_keys.lst
* Update ignore_translation_keys.lst
* Update json.lib.php
2024-06-03 13:44:31 +02:00