2
0
forked from Wavyzz/dolibarr
Commit Graph

672 Commits

Author SHA1 Message Date
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
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
MDW
0ac595364b Qual: Fix phan/phpstan notices in class files (part 1) (#31501)
* Ignore phpstan configuration for spelling

* Qual: Fix phan notices in class files
2024-10-25 21:00:02 +02:00
Alexandre SPANGARO
3e9068c1c6 FIX Accountancy - Loan - Error on transfer (#31546) 2024-10-25 13:42:46 +02:00
kkhelifa-opendsi
90a545637e NEW : Add hook after the line is processed in the sell journal page (#31439) 2024-10-19 01:38:36 +02:00
Alexandre SPANGARO
4a91c2c734 NEW Accountancy - Add general account on thirdparty - Code supplier part (#31318)
* 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>
2024-10-14 12:05:07 +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
6fe1adec7d NEW Accountancy - Add general account on thirdparty - Code customer part (#31294)
* 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>
2024-10-09 01:51:12 +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
Laurent Destailleur
61e8382869 Fix SERVICE_ARE_ECOMMERCE_200238EC #31159 in transfer of sale journal 2024-09-30 10:46:51 +02:00
Frédéric FRANCE
000173c7b9 fix phpstan (#31075)
* 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

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-09-23 01:59:14 +02:00
kkhelifa-opendsi
c00650c403 NEW: Add hook on sell journal page for overwrite the processed journal data after the SQL request (#31033) 2024-09-20 01:41:40 +02:00
Laurent Destailleur
5540c8cd87 Fix bad var name 2024-09-10 02:12:40 +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
Laurent Destailleur
2009c6f09a Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-31 17:30:32 +02:00
Laurent Destailleur
1e3a860767 Fix test on permissions 2024-08-31 16:01:27 +02:00
Laurent Destailleur
5797a0db3f Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-08-22 02:54:55 +02:00
Laurent Destailleur
234c9403b8 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-08-20 10:16:43 +02:00
Regis Houssin
5590cc1441 FIX avoid pgsql error (#30678) 2024-08-20 03:18:08 +02:00
Laurent Destailleur
2c86c9b21b Clean code to swith to code_compta_client 2024-08-14 16:51:53 +02:00
Laurent Destailleur
a39d55474f Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-07-18 02:44:35 +02:00
Laurent Destailleur
b303be54fd Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0 2024-07-18 02:41:28 +02:00
Laurent Destailleur
9d4951e85b Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-07-18 02:35:53 +02:00
Alexandre SPANGARO
50646e70a0 FIX Accountancy - Generate entries of expense report with localtax (#30411)
* 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
2024-07-17 19:42:12 +02:00
Laurent Destailleur
f7936d4378 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-07-15 00:46:03 +02:00
Laurent Destailleur
9487a4f918 FIX transfer in accountancy for expense reports. 2024-07-15 00:43:30 +02:00
Laurent Destailleur
8712c1c900 Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into 20.0
Conflicts:
	htdocs/product/card.php
2024-07-06 14:04:23 +02:00
Laurent Destailleur
146c9e5732 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-07-06 14:00:32 +02:00
Laurent Destailleur
9ddc8dd93c Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-07-06 13:59:47 +02:00
Laurent Destailleur
0a88dc95a5 Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into 17.0 2024-07-06 13:59:13 +02:00
Laurent Destailleur
86362599c1 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0 2024-07-06 13:55:04 +02:00
Laurent Destailleur
ca39809658 Fix #30256 2024-07-06 13:53:54 +02:00
Laurent Destailleur
4c6f4839ea Better fix for #30256 2024-07-06 13:49:34 +02:00