Commit Graph

703 Commits

Author SHA1 Message Date
ldestailleur
ae20554a4d Merge branch '22.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-08-28 16:40:48 +02:00
Alexandre SPANGARO
c120446561 FIX Treasury accountancy - Accounting errors for members (#35097)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-08-28 04:03:58 +02:00
kollibar
87cb738eb5 Correction for the generation of the bankjournal for a paiement for different third parties (#34760)
* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"

This reverts commit 80e67e665a.

* Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true).

correction for the bug issue https://github.com/Dolibarr/dolibarr/issues/34755

* Revert "Correction for the generation of the bankjournal for a payment for different third parties party (in case of payment multi third partie is active, ie option "Allow payments on different third parties bills but same parent company" = true)."

This reverts commit 12ccfa60fa.

* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

(Sorry for the 2 failed pull request: I'm begginer in use of git)

* Revert "Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :"

This reverts commit 6fb35a6d2e.

* Correction for the generation of the bankjournal for a paiement for different third parties party (in case of paiement multi third partie is active :
option "Allow payments on different third parties bills but same parent company" = true)

I've made a bug issu about it : https://github.com/Dolibarr/dolibarr/issues/34755

(Sorry for the 2 failed pull request: I'm begginer in use of git)

* correction commit for phan

* Correction for Travis CI

* I forgot to correct a line

* Correction for phpcs

* ajout d'un test si la requete sql de recherche d'un total pour la ligne échoue

* activation of this fix only if option FACTURE_PAYMENTS_ON_DIFFERENT_THIRDPARTIES_BILLS is on

* spelling correction in comment that don't pass pre-commit check

* trailing whitespace forget
2025-07-20 15:41:11 +02:00
Alexandre SPANGARO
b4914420fa NEW Accountancy - Accounting by payment type (#34729)
* NEW Accountancy - Accounting by payment type

* Better SQL request
2025-07-18 01:01:28 +02:00
Alexandre SPANGARO
e52ddc0181 Fix display on page treasury accounting (#34741)
* Fix name of option for supplier

* Update functions.lib.php (#34718)

Add __MYCOMPANY_URL__ & __MYCOMPANY_PHONEMOBILE__ in getCommonSubstitutionArray

* Fix bad value  fourn paiement process (#34722)

* Fix bad value  fourn paiement process

* best fix

* fix takepos console error (#34709)

* fix console error

* exit early

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>

* Fix CI

* Clean code

* Comment

* PHPStan > Update baseline (#34734)

Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>

* FIX: we should ensure Commande::$lines array contains OrderLine objects (#34727)

* Uniformize position of button with other page & remove useless column

* Remove useless column

* FIX Fiscal year - Translation error on status

* Revert "FIX Fiscal year - Translation error on status"

This reverts commit a6f96ac0a9.

---------

Co-authored-by: ldestailleur <eldy@destailleur.fr>
Co-authored-by: Deefaze <6393617+Deefaze@users.noreply.github.com>
Co-authored-by: Lucas Marcouiller <45882981+Hystepik@users.noreply.github.com>
Co-authored-by: Francis Appels <francis.appels@yahoo.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Dolibot <dolibarr-bot@users.noreply.github.com>
Co-authored-by: Noé Cendrier <81741011+altairis-noe@users.noreply.github.com>
2025-07-15 11:43:29 +02:00
Alexandre SPANGARO
0d00a27a1c QUAL Use GetDolGlobalString (#34662)
* Typo comment

* Use getGlobalString
2025-06-29 12:43:14 +02:00
Marc de Lima Lucio
67e50d6264 FIX: accountancy bank journal: multiple php 8.1 warnings (#34468)
* FIX: social contribution payment: correct error reporting (#34002)

* FIX: social contribution payment: correct error reporting

* FIX: social contribution payment: correclty handle return of adding payment to bank

* FIX element must be visible to set focus on select input when using default values (#34406)

* Fix travis

* FIX: accountancy bank journal: multiple php 8.1 warnings

---------

Co-authored-by: lvessiller-opendsi <lvessiller@open-dsi.fr>
Co-authored-by: Laurent Destailleur <eldy@users.sourceforge.net>
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-06-14 01:09:24 +02:00
Laurent Destailleur
221c27c091 Merge branch '21.0' of git@github.com:Dolibarr/dolibarr.git into develop 2025-06-09 18:15:59 +02:00
Laurent Destailleur
326c75dc51 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into 21.0 2025-06-09 17:58:54 +02:00
Laurent Destailleur
473ddbc53a Merge remote-tracking branch 'origin/19.0' into 20.0 2025-06-09 17:42:02 +02:00
Marc de Lima Lucio
6202f614a4 FIX: accountancy sales/purchases journal: sql error logged when no invoice in journal (#34339)
* FIX: accountancy sales/purchases journal: sql error logged when no invoice in journal

* FIX: accountancy sales journal: correctly check unbounded lines
2025-06-03 17:04:19 +02:00
Frédéric FRANCE
2c3cb5806d fix CI (#33827)
* fix CI

* fix CI

* fix CI

* fix CI

* fix CI

* fix CI

* fix CI

* fix CI

* fix CI

* fix CI

* fix CI

* fix CI

* try to fix

* fix
2025-04-14 19:37:33 +02:00
ldestailleur
6a1bc2f68a CSS 2025-04-14 15:21:12 +02:00
ldestailleur
d9e89e611e Fix warning 2025-04-14 09:13:37 +02:00
Laurent Destailleur
957199ef4c Debug v22 2025-04-13 21:49:57 +02:00
Laurent Destailleur
54af0a152a Debug v22 2025-04-13 21:32:28 +02:00
Laurent Destailleur
ce15dc25c8 FIX HTML broken by the trunc. 2025-04-13 19:50:22 +02:00
Laurent Destailleur
aaa100d132 FIX HTML broken by the trunc. 2025-04-13 19:46:52 +02:00
ldestailleur
a328789541 FIX CI 2025-04-12 17:02:24 +02:00
ldestailleur
c9b60da4e8 Clean var 2025-04-11 23:56:51 +02:00
ldestailleur
ba6d55691c Look and feel v22 2025-04-11 23:53:30 +02:00
ldestailleur
eadf6182e1 Try to debug the transfer in treasury mode. Move into DEBUG level.
Still some tests to do...
2025-04-11 20:12:16 +02:00
Frédéric FRANCE
1361fe414a fix CI (#33721)
* Update treasuryjournal.php

* Update treasuryjournal.php
2025-04-03 20:30:25 +02:00
ldestailleur
2af9cd5aab Fix possible sql injection 2025-04-03 19:50:54 +02:00
lvessiller-opendsi
738fbc1b25 NEW #32706 - Treasury accountancy (#33701)
* NEW #32706 - Treasury accountancy

* Fix CI errors

* Fix CI errors

* Format code for CI integration

* Format code for precommit error

* Resolve CI errors

* Resolve CI errors
2025-04-03 16:08:35 +02:00
Jyhere
476b5d6e40 FIX: useless condition in bankjournal.php (#33639)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2025-03-28 23:16:46 +01:00
kkhelifa-opendsi
8a6ebfeb3f FIX: Fix case when INVOICE_RETAINED_WARRANTY_LIMITED_TO_FINAL_SITUATION for sell journal (#33518) 2025-03-19 17:25:50 +01:00
MDW
69fdccf2a4 Qual: Fix phan notices (accountancy, adherents) (#33480) 2025-03-16 15:19:54 +01:00
Frédéric FRANCE
b7a00127a9 add missing translation (#33461)
* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation

* add missing translation
2025-03-15 11:21:03 +01:00
Frédéric FRANCE
89918c58e5 fix 2025-02-19 18:12:17 +01:00
Frédéric FRANCE
4d604fff55 fix 2025-02-19 17:53:51 +01:00
Laurent Destailleur (aka Eldy)
ef9105cc44 Debug v21 2025-01-17 14:08:39 +01:00
Laurent Destailleur (aka Eldy)
1f01786395 Debug v21 2025-01-17 13:37:30 +01:00
Laurent Destailleur (aka Eldy)
3ce842eab0 Debug v21 - CSS 2025-01-17 13:16:13 +01:00
Laurent Destailleur (aka Eldy)
737e216c5f Debug v21 - use a better error message 2025-01-17 13:05:37 +01:00
Laurent Destailleur (aka Eldy)
8b788773cd Fix transfer in accountancy when general account was empty to -1 2025-01-16 17:54:56 +01:00
Laurent Destailleur (aka Eldy)
5dca2a2d41 Debug v21 - Fix export in accountancy 2025-01-16 17:31:44 +01:00
Alexandre SPANGARO
5403293409 Remove inappropriate <td> 2025-01-16 06:19:22 +01:00
Alexandre Janniaux
c022a530e5 expensereportsjournal: fix empty IN () SQL request
`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.
2025-01-09 19:35:01 +01:00
Alexandre Janniaux
740ad5b0fd 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-09 19:35:01 +01:00
Alexandre Janniaux
1c7deda18d sellsjournal: remove tab character in SQL
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
2024-12-15 17:56:25 +01:00
Laurent Destailleur
e9e1175134 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-11-19 04:04:10 +01:00
Sébastien NASSIET
02eb16a703 FIX#31159 - TVA Account by country is not used (#31984)
* FIX#31159

* FIX#31159
2024-11-18 15:49:52 +01:00
Laurent Destailleur
9730a83d9c Fix phpstan missing parenthesis 2024-11-12 14:42:07 +01:00
Laurent Destailleur
6c7c12b4b4 Rename variables 2024-11-12 14:20:08 +01:00
Andrew Burks
c8e8651c66 NEW [Accounting] Allow grouping taxes with primary line price (#26732)
* 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>
2024-11-12 14:14:36 +01:00
Frédéric FRANCE
661059ca9a fix phpstan (#31763)
* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

* fix phpstan

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-11-11 14:33:53 +01:00
Alexandre SPANGARO
48d5d2b831 NEW Accountancy - Add general account on thirdparty - Code user part (#31676)
* 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>
2024-11-07 18:40:58 +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
Laurent Destailleur
2a39e9edca Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-10-26 15:56:30 +02:00