dolibarr/htdocs
Alexandre Janniaux b9419a869c purchasesjournal: fix empty IN () SQL request
`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
2025-01-08 14:42:09 +01:00
..
accountancy purchasesjournal: fix empty IN () SQL request 2025-01-08 14:42:09 +01:00
adherents Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-07 19:12:54 +01:00
admin Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-07 17:20:06 +01:00
ai Prepare v21 2025-01-07 11:44:59 +01:00
api fix phpstan 2025-01-06 18:27:30 +01:00
asset fix phpstan 2024-12-14 13:32:42 +01:00
asterisk
barcode Clean code 2024-11-12 12:57:08 +01:00
blockedlog Merge branch 'develop' into fix_ci_phpstan 2024-12-13 14:27:35 +01:00
bom Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-03 16:43:31 +01:00
bookcal switch object-element to calendar in getEntity 2025-01-03 16:04:10 +01:00
bookmarks Look and feel v21 2024-11-13 00:24:45 +01:00
categories Merge pull request #32234 from altairis-noe/cat_filters 2024-12-08 10:43:47 +01:00
collab
comm Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-07 19:12:54 +01:00
commande Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-06 17:44:06 +01:00
compta Merge remote-tracking branch 'upstream/develop' into fix_phpstan_2025_01_05_01 2025-01-06 18:09:12 +01:00
conf
contact Merge branch 'develop' into branch_dev_MM 2024-12-17 02:54:00 +01:00
contrat fix phpstan 2025-01-05 17:09:38 +01:00
core Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-07 21:47:22 +01:00
cron fix phpstan 2024-12-12 21:06:51 +01:00
custom
datapolicy Debug v21 2024-12-30 11:43:38 +01:00
dav
debugbar Qual: Update fields phpdoc to include fields that are defined/used in some cases 2024-12-05 02:36:50 +01:00
delivery FIX "location_incoterms" is a string 2024-12-23 06:21:26 +01:00
don Debug v21 2024-12-30 03:14:20 +01:00
ecm NEW Option MAIN_RESTRICTHTML_ONLY_VALID_HTML and 2025-01-05 18:57:18 +01:00
emailcollector Qual: Update fields phpdoc to include fields that are defined/used in some cases 2024-12-05 02:36:50 +01:00
eventorganization Debug v2 fix ufs for next_prev_filter 2024-12-10 11:54:33 +01:00
expedition Fix warning 2025-01-05 18:34:01 +01:00
expensereport Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-12-17 16:59:13 +01:00
exports Debug v21 2024-12-18 12:21:54 +01:00
externalsite
fichinter Rename field to avoid conflict. 2025-01-05 13:53:16 +01:00
fourn Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-05 18:38:48 +01:00
ftp
holiday Debug v21 2024-12-30 16:59:16 +01:00
hrm Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-01-05 15:39:44 +01:00
imports Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-06 17:44:06 +01:00
includes Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2025-01-05 18:40:05 +01:00
install Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-07 17:20:06 +01:00
intracommreport Qual: Update fields phpdoc to include fields that are defined/used in some cases 2024-12-05 02:36:50 +01:00
knowledgemanagement Qual: Update fields phpdoc to include fields that are defined/used in some cases 2024-12-05 02:36:50 +01:00
langs Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-07 17:20:06 +01:00
loan Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-03 16:43:31 +01:00
mailmanspip/class
margin Debug v21 2024-12-30 03:26:15 +01:00
modulebuilder add fetch before validate in comments 2024-12-19 11:13:40 +01:00
mrp add fix phpstan 2024-12-31 16:25:57 +01:00
multicurrency fix 2024-12-09 16:34:26 +01:00
opensurvey Fix end date of survey (day must be included) 2024-12-16 18:34:21 +01:00
partnership Debug v21 2025-01-07 11:24:01 +01:00
paybox
paypal fix phpstan 2024-12-11 21:03:15 +01:00
printing
product Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-07 21:03:59 +01:00
projet Fix warning 2025-01-05 18:34:01 +01:00
public Fix warning 2025-01-05 18:34:01 +01:00
reception Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-01-06 17:43:35 +01:00
recruitment Fix warning 2025-01-05 18:34:01 +01:00
resource keep only commonobject property oldcopy (#32123) 2024-11-27 21:59:41 +01:00
salaries add fix phpstan 2024-12-31 16:25:57 +01:00
societe Debug v21 2025-01-07 10:43:45 +01:00
stripe Debug v21 2025-01-03 16:09:52 +01:00
supplier_proposal Add code to make easier to test PDF generation with n lines of product 2024-11-21 19:40:52 +01:00
takepos Merge remote-tracking branch 'upstream/develop' into fix_phpstan_2025_01_05_01 2025-01-05 19:02:46 +01:00
theme Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2025-01-07 19:12:54 +01:00
ticket Merge pull request #32288 from Hystepik/add-drag&drop-on-some-cards 2025-01-05 19:16:48 +01:00
user New add drag & drop on some cards 2024-12-09 11:08:49 +01:00
variants Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-01-05 18:43:15 +01:00
webhook Qual: Update fields phpdoc to include fields that are defined/used in some cases 2024-12-05 02:36:50 +01:00
webportal Update webportalinvoice.class.php 2025-01-02 10:11:11 +01:00
webservices
website fix website purge function 2025-01-07 14:02:53 +01:00
workstation Debug v21 2024-12-13 18:11:05 +01:00
zapier Qual: Update fields phpdoc to include fields that are defined/used in some cases 2024-12-05 02:36:50 +01:00
.gitignore
document.php Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-12-24 00:15:34 +01:00
favicon.ico
filefunc.inc.php Prepare v22 dev 2025-01-05 16:14:21 +01:00
index.php
main.inc.php fix warning error if use of native captcha 2024-12-27 15:16:24 +01:00
master.inc.php fix phpstan (#32188) 2024-12-01 23:15:27 +01:00
opcachepreload.php
robots.txt
security.txt
viewimage.php