2
0
forked from Wavyzz/dolibarr
Commit Graph

5046 Commits

Author SHA1 Message Date
Laurent Destailleur
d92c65ad91 FIX infinite loop in API call/trigger by adding a caller 2023-12-15 12:15:33 +01:00
Laurent Destailleur
fb083a6cfc Fix warning with rector 2023-12-13 16:33:17 +01:00
Laurent Destailleur
7d109e9419 Fix phpcs 2023-12-13 12:46:23 +01:00
Laurent Destailleur
e040219fdc Fix phpcs 2023-12-13 12:45:07 +01:00
Laurent Destailleur
8227c155a0 Fix MAIN_SHOW_TECHNICAL_ID 2023-12-09 21:03:00 +01:00
Laurent Destailleur
60af6843fd Clean code 2023-12-08 02:05:51 +01:00
Laurent Destailleur
89e1e1b859 Merge pull request #26980 from atm-jonathan/FIX_in_array()_list.php
FIX in_array() on key
2023-12-08 01:59:32 +01:00
Frédéric FRANCE
61b79fda17 avoid phpstan error with phpdoc 2023-12-06 15:46:39 +01:00
Jonathan Lescaut
771b735384 FIX in_array() on key 2023-12-05 16:12:18 +01:00
Frédéric FRANCE
91d8758e52 fix phpstan 2023-12-02 22:28:04 +01:00
Laurent Destailleur
c30cb9c14f Merge pull request #26932 from matthieu-michou-wattandsea/patch-3
Update api_thirdparties.class.php
2023-12-02 21:18:24 +01:00
Laurent Destailleur
e2768d0002 Merge pull request #26931 from matthieu-michou-wattandsea/patch-2
Update api_contacts.class.php
2023-12-02 21:18:16 +01:00
Laurent Destailleur
3ecfc1b55f Fix css 2023-12-02 20:27:09 +01:00
matthieu-michou-wattandsea
71a1c6a497 Update api_thirdparties.class.php
fix API REST changed POST to PUT in thirdparties addCategory
2023-12-02 10:30:01 +01:00
matthieu-michou-wattandsea
ff995afd1e Update api_contacts.class.php
fix API REST addCategory
2023-12-02 10:20:38 +01:00
Frédéric FRANCE
53c8a3acf8 clean phpdoc for phpstan (#26905) 2023-12-01 19:51:32 +01:00
Laurent Destailleur
3a78357253 Try an implementation a fix to avoid infinite loop in sync api - trigger 2023-11-29 16:20:37 +01:00
Laurent Destailleur
56e8872ddc Clean code+warnings: The delete() method of AdherentType, Contact,
Delivery, MultiCurrency, CurrencyRate now need $user as first parameter.
2023-11-28 15:33:42 +01:00
Pascal Hubrecht
f1e384cc51 FIX #26881 (#26883) 2023-11-28 11:30:48 +01:00
Laurent Destailleur
552e745908 Debug v19 2023-11-28 10:33:06 +01:00
Laurent Destailleur
1d589fd74e Fix warnings 2023-11-27 13:26:44 +01:00
Laurent Destailleur
075ee02901 Fix php8.2 warnings 2023-11-27 12:08:48 +01:00
sonikf
22e5ef6e18 fix fetch vat details not working for some use cases (#26771)
* fix not working for some use cases

* fix not working for some use cases

* use DOL_URL_ROOT

* fix travis

* Fix missing address
2023-11-23 17:47:17 +01:00
Frédéric FRANCE
ac83341ba2 fix phpstan (#26788) 2023-11-21 23:20:52 +01:00
Laurent Destailleur
4ca565fa95 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop 2023-11-21 23:05:56 +01:00
Laurent Destailleur
40898cac50 Close #26790 2023-11-21 23:05:40 +01:00
Laurent Destailleur
ed122e5408 Clean depracted table 2023-11-20 17:46:57 +01:00
Rémi Champlon
79154f4864 Fix : right to show suppliers count on thirdparty index (#26686)
* thirdparty stats : use supplier read  right

* fix

---------

Co-authored-by: Rémi Champlon <remi.champlon@vold.lu>
2023-11-19 00:49:19 +01:00
Laurent Destailleur
07a3774749 Debug v19 2023-11-17 23:44:02 +01:00
Laurent Destailleur
6ca0154784 Fix management of password type with pass_crypted 2023-11-17 22:09:35 +01:00
Laurent Destailleur
a48e541093 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/accountancy/class/bookkeeping.class.php
	htdocs/accountancy/journal/expensereportsjournal.php
	htdocs/core/class/html.formadmin.class.php
	htdocs/core/lib/functions.lib.php
2023-11-12 23:18:19 +01:00
Laurent Destailleur
2f340a1a77 Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0
Conflicts:
	htdocs/accountancy/journal/expensereportsjournal.php
	htdocs/comm/propal/card.php
2023-11-12 23:06:31 +01:00
Laurent Destailleur
3118b9fb4c Debug v19 2023-11-09 15:50:42 +01:00
atm-sami
53b48173f6 NEW add sorting of product price list by customer (#26483)
* added sorting of product price list by customer

* add search and sort in same time

* Update price.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2023-11-09 14:55:35 +01:00
Laurent Destailleur
6288b803ea Debug v19 2023-11-08 17:22:34 +01:00
Florian Mortgat
835cf9bbc7 FIX v17: Param $notrigger in $societe->create() causes method to return true regardless of actual result of database functions (#26499) 2023-11-07 19:02:18 +01:00
Christophe Battarel
455c061172 add hook tabContentEditThirdparty (#26487)
Co-authored-by: Christophe Battarel <christophe@altairis.fr>
2023-11-07 17:59:44 +01:00
Christophe Battarel
221f497e0f add hook tabContentViewThirdparty (#26488)
Co-authored-by: Christophe Battarel <christophe@altairis.fr>
2023-11-07 17:59:05 +01:00
Christophe Battarel
57d6aee0d9 add hook tabContentCreateThirdparty (#26489)
Co-authored-by: Christophe Battarel <christophe@altairis.fr>
2023-11-07 17:58:52 +01:00
Laurent Destailleur
f18e7dd8b2 Look and feel v19 2023-11-01 12:55:31 +01:00
Laurent Destailleur
774cfce57b Fix must update facture_fourn_rec when merging thirdparties 2023-10-31 18:15:15 +01:00
Laurent Destailleur
494908f1d2 Fix when using non standard action and canvas 2023-10-31 17:53:35 +01:00
Mohamed DAOUD
636f9eaced Add column sales representative third party list (#26387)
Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2023-10-30 02:59:52 +01:00
Laurent Destailleur
20f4051a4b Clean code 2023-10-28 02:14:47 +02:00
Laurent Destailleur
46bfae63a3 Responsive 2023-10-28 00:06:06 +02:00
Alexandre Janniaux
c3b3840f08 QUAL Refactor merging companies and fix #26272 with Reception objects (#26320)
* societe: add missing model_pdf field

The field is used by the class but wasn't declared.

* societe: expose Societe::mergeCompany

The code is directly copied from societe/card.php with as less changes
as possible.

The original code came from deb91ad7c1.

* societe: remove fields from property copy

$phone_pro and $fk_project are not existing for societe. This was added
from deb91ad7c1.

* SocieteTest: test the merge functionality

This test is a simple smoke test to check that the mergeCompany() will
work correctly on simple case and actually merge the details of the
company.

More complex deduplication pattern with objects referencing the deleted
Societe object, will be written for each of the different object class
in their respective test file.

* societe: card: use the new mergeCompany function

Since the code is almost the same, there should be no differences in
behaviour right now.

* societe: api_thirdparties: use Societe::mergeCompany()

* societe: fix issue when merging companies

When a Societe object is merged against another, its related objects are
supposed to reference the new Societe object so that the databse doesn't
raise foreign key errors.

The list references the objects that need to be transformed, and
Reception objects weren't part of this list.

Fix #26272

* ReceptionTest: check company merge hook

Before a Societe object is destroyed from the database, every object
referencing the FK should be destroyed or should reference another
object.

In the case of two companies being merged, the case arises and Reception
objects need to be moved to the new company. This commit brings a
non-regression test for this case.

Refs #26272

* Update societe.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2023-10-26 16:30:38 +02:00
Laurent Destailleur
a318031034 QUAL Standardize code. Renamed ID of user properties into ->user_xxx_id 2023-10-24 11:37:29 +02:00
Alexandre Janniaux
9fe9eee18a FIX|Fix some minor issues on Reception and add a new test for it (#26310)
* reception: reOpen: mirror $this->statut in $this->status

$this->statut is the deprecated variable, $this->status should also get
the correct value.

* reception: setDraft: mirror $this->statut in $this->status

$this->statut is the deprecated variable, $this->status should also get
the correct value.

* reception: add missing $weight field

Fix warning:

    Undefined property: Reception::$weight

* societe: add country_id field

* reception: use getDolGlobalInt when suitable

Using empty() implies that the value actually exists on the stdClass at
$conf->global, but it's not always the case. getDolGlobalInt will handle
this smoothly by checking first, which solves warnings like those:

    Undefined property: stdClass::$STOCK_CALCULATE_ON_RECEPTION

* ReceptionTest: add new test

The test checks the usual workflow of the Reception class, with, on the
one hand, the common CRUD operations:
 - create
 - fetch
 - update
 - delete

And on the other hand, the status handling for Reception:
 - valid: STATUS_DRAFT -> STATUS_VALID
 - setClosed: STATUS_VALID -> STATUS_CLOSED
 - reOpen: STATUS_CLOSED -> STATUS_VALID
 - setDraft: STATUS_VALID -> STATUS_DRAFT

The stocks lines are not tested yet, and the error cases, like any other
transition not described above, are not tested either. The permissions
for some of the operations are hardcoded for the test and there is no
failure check when the permission is not set yet.
2023-10-21 16:28:30 +02:00
Laurent Destailleur
455fb4417a Look and feel v19 2023-10-20 12:57:58 +02:00
Laurent Destailleur
47dd99dd7c Fix fatal error 2023-10-19 12:15:26 +02:00