`WHERE xx IN ()` is not allowed in PostgreSQL queries, and result in
fatal errors.
We can check whether we have valid invoices before running the query,
since the query will only check whether the invoices are complete or
not.
It also fixes the following error on the development PHP output:
Fatal error: Uncaught TypeError: pg_num_rows(): Argument #1 ($result)
must be of type PgSql\Result, bool given in
/var/www/html/core/db/pgsql.class.php:654 Stack trace: #0
/var/www/html/core/db/pgsql.class.php(654): pg_num_rows(false) #1
/var/www/html/accountancy/journal/expensereportsjournal.php(264):
DoliDBPgsql->num_rows(false) #2 {main} thrown in
/var/www/html/core/db/pgsql.class.php on line 654
Refs #32374 but for the expensereportsjournal page.
`WHERE xx IN ()` is not allowed in PostgreSQL queries, and result in the
following fatal error:
GROUP BY fk_facture_fourn
33 DoliDBPgsql::query SQL Error message: ERROR: 42601: syntax error at or near ")"
LINE 10: AND fk_facture_fourn IN ()
^
We can check whether we have valid invoices before running the query,
since the query will only check whether the invoices are complete or
not.
It also fixes the following error on the development PHP output.
Fatal error: Uncaught TypeError: pg_num_rows(): Argument #1
($result) must be of type PgSql\Result, bool given in
/var/www/html/core/db/pgsql.class.php:654 Stack trace: #0
/var/www/html/core/db/pgsql.class.php(654): pg_num_rows(false) #1
/var/www/html/accountancy/journal/purchasesjournal.php(418):
DoliDBPgsql->num_rows(false) #2 {main} thrown in
/var/www/html/core/db/pgsql.class.php on line 654
Fixes#32374
It shows as the following in the logs:
GROUP BY fk_facture
\x09AND fk_facture IN (8)
AND fd.total_ttc <> 0
AND fd.fk_code_ventilation <= 0
fd.product_type <= 2
WHERE
\x09llx_facturedet as fd
FROM
* Fix expense report journal entries bind to user
WAS: expense report payments did not fill out $tabtb (credit) to associate with their $tabpay (debit). The case would always fall through to 'NotDefined' and require manual adjustment.
NEW: if a user is associated with the expense report, then that user will get an associated credit line ($tabtp) generated.
* allow grouping tax with actual cost for accounting
Provides the ability for taxes paid in expense reports (ER_JOURNAL_GROUP_TAX_WITH_LINES) or purchases (AC_JOURNAL_GROUP_TAX_WITH_LINES) to get grouped with the main expense/purchase line and associated with the accounting account for the item itself. This is in contrast to the default behavior designed around VAT which splits off any taxes paid into a separate accounting account for each type of tax.
* fixed out of date reference
fixed merge error
* fixed linting issues
whitespace around braces and if/else keywords
* Update bankjournal.php
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW Accountancy - Add general account on thirdparty - SQL Part
* NEW Accountancy - Add general account on thirdparty - Code customer part
* NEW Accountancy - Add general account on thirdparty - Code customer part
* NEW Accountancy - Add general account on thirdparty - Code customer part
* Fix Phan
* Use isModEnabled
* NEW Accountancy - Add general account on thirdparty - Code supplier part
* Fix phan
* Fix phan
* Fix phan
* Use list of account instead of simple input
* Use list of account instead of simple input
* Tabs
* NEW Accountancy - Add general account on thirdparty - Code user part
* NEW Accountancy - Add general account on thirdparty - Code user part
* Fix indent
* Fix indent
* Remove duplicate language key
* Fix phan
* Fix phan
* Update card.php
* Fix accountancy export CSV
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* NEW Accountancy - Add general account on thirdparty - SQL Part
* NEW Accountancy - Add general account on thirdparty - Code customer part
* NEW Accountancy - Add general account on thirdparty - Code customer part
* NEW Accountancy - Add general account on thirdparty - Code customer part
* Fix Phan
* Use isModEnabled
* NEW Accountancy - Add general account on thirdparty - Code supplier part
* Fix phan
* Fix phan
* Fix phan
* Use list of account instead of simple input
* Use list of account instead of simple input
* Tabs
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* 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 - Add general account on thirdparty - SQL Part
* NEW Accountancy - Add general account on thirdparty - Code customer part
* NEW Accountancy - Add general account on thirdparty - Code customer part
* NEW Accountancy - Add general account on thirdparty - Code customer part
* Fix Phan
* Use isModEnabled
---------
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
* 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
* FIX User List - Function is show in wrong column when module HRM enabled
* FIX Accountancy - Generate entries of expense report with localtax. $cpttva don't exist