Commit Graph

121 Commits

Author SHA1 Message Date
Laurent Destailleur
046166f483 Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-10-14 21:38:12 +02:00
Laurent Destailleur
d2bd6a03ec Merge branch '20.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-07-31 13:21:02 +02:00
Laurent Destailleur
2f7a252244 Fix warnings 2024-07-31 13:09:10 +02:00
thibdrev
9b6586ea64 qual: phpdoc for ProductCombination.class.php (#30105)
* qual: phpdoc for ProductCombination.class.php

* use array_map to cast array values upstream

* phpdoc

* fix phan warning

Avoid function calls in a FOR loop test part
2024-06-22 15:40:26 +02:00
thibdrev
b14d20bc4c qual fix PHAN warning when using $product->fetch($id) with $id not being an integer (#30019)
* qual fix phan warning on $object->fetch('')

TypeError PhanTypeMismatchArgumentProbablyReal Argument 1 ($id) is '' of type '' but \Product::fetch() takes int (no real type) defined at htdocs/product/class/product.class.php:2540 (the inferred real argument type has nothing in common with the parameter's phpdoc type)

htdocs/variants/class/ProductCombination.class.php	773

* Update api_categories.class.php

* Update api_categories.class.php

* Update api_products.class.php

* Update api_products.class.php

* Update combinations.php
2024-06-15 15:53:36 +02:00
thibdrev
dd66a407e4 qual: fix PHAN warnings for ProductCombination.class.php (#30020)
htdocs/variants/class/ProductCombination.class.php	843	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string

htdocs/variants/class/ProductCombination.class.php	843	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string

htdocs/variants/class/ProductCombination.class.php	846	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string

htdocs/variants/class/ProductCombination.class.php	846	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string

htdocs/variants/class/ProductCombination.class.php	851	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string

htdocs/variants/class/ProductCombination.class.php	851	TypeError PhanTypeMismatchDimFetch When fetching an array index from a value of type array, found an array index of type int, but expected the index to be of type string
2024-06-15 15:01:40 +02:00
Frédéric FRANCE
facb1930a7 fix phpstan Property Product::$oldcopy in empty() is not falsy (#30003)
* fix phpstan Property Product::$oldcopy in empty() is not falsy

* add token

* doc

* fix phpstan Property Product::$oldcopy in empty() is not falsy

* fix phpstan Property Product::$oldcopy in empty() is not falsy

* fix phpstan
2024-06-13 08:11:11 +02:00
thibdrev
bc6c31cba4 qual: phpstan for ProductCombination.class.php (#29518)
* qual: phpstan for ProductCombination.class.php

htdocs/variants/class/ProductCombination.class.php	725	Method ProductCombination::getUniqueAttributesAndValuesByFkProductParent() should return array<ProductAttributeValue> but returns array<int<0,max>,stdClass>.

* Update ProductCombination.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-04-28 17:36:25 +02:00
thibdrev
52e195fe17 phpdoc (#29480) 2024-04-27 04:20:26 +02:00
Frédéric FRANCE
64508a3909 fix phpstan (#29397) 2024-04-20 22:45:52 +01:00
MDW
0ccdbfe147 Correct/improve phpdoc typing 2024-03-29 18:26:45 +01:00
MDW
4625a6eaaa Fix arg type for trim with cast 2024-03-20 04:10:04 +01:00
MDW
551eaa115c Fix & enable PhanPluginUnknownClosureReturnType
# Fix & enable PhanPluginUnknownClosureReturnType

Fix last PhanPluginUnknownClosureReturnType & enable the notice as
all are fixed
2024-03-17 00:10:18 +01:00
MDW
b28a17ee51 Fix Assign to error as string, not to error as array 2024-03-15 10:11:54 +01:00
MDW
a408288ba1 Fix & enable PhanPluginUnknownClosureParamType
# Fix & enable PhanPluginUnknownClosureParamType

Typing of anonymous functions to fix this notice.
Optimised some minor things.
2024-03-14 22:42:26 +01:00
Frédéric FRANCE
fe0123262d fix phpstan (#28401)
Property ProductCombinationLevel::$fk_product_attribute_combination (int) does not accept float.
2024-02-25 10:00:58 +01:00
kkhelifa-opendsi
dbb8861a98 NEW: Sort variants list by product ref on combinations page (#27969) 2024-02-02 17:45:30 +01:00
MDW
342ab85195 Qual: Spelling htdocs/[q-z]* (#27447)
# Qual: Fix spelling htdocs/[q-z]*

Probably fixes a bug:

- htdocs/webservices/server_thirdparty.php
  No other occurence of adress found.
  -'adress'=>->adress,- +'address'=>->address,+
2024-01-12 17:18:52 +01:00
Laurent Destailleur
b28ae5d8d3 Clean code 2023-12-27 12:12:20 +01:00
Frédéric FRANCE
61b79fda17 avoid phpstan error with phpdoc 2023-12-06 15:46:39 +01:00
Frédéric FRANCE
53c8a3acf8 clean phpdoc for phpstan (#26905) 2023-12-01 19:51:32 +01:00
Laurent Destailleur
075ee02901 Fix php8.2 warnings 2023-11-27 12:08:48 +01:00
Laurent Destailleur
c2bdb3be90 Fix php8.2 warnings 2023-10-15 18:41:39 +02:00
Frédéric FRANCE
3a94290ef7 doc 2023-02-20 20:43:23 +01:00
Laurent Destailleur
8a4613176c Fix warnings 2022-12-28 16:26:07 +01:00
Frédéric France
835441d437 remove blank line 2022-09-07 20:14:49 +02:00
This Charlène
3e8cb1de57 php V8 warning 2022-07-20 11:31:20 +02:00
This Charlène
8cb1e138de forgotted fields 2022-07-20 11:15:44 +02:00
Laurent Destailleur
9a92c7d9b0 Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into 16.0
Conflicts:
	htdocs/core/actions_massactions.inc.php
	htdocs/core/class/extrafields.class.php
2022-07-10 19:28:16 +02:00
Laurent Destailleur
3d226801ba Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 14.0 2022-07-10 19:22:02 +02:00
stickler-ci
04fd17347e Fixing style errors. 2022-07-08 07:36:09 +00:00
Gauthier PC portable 024
787f52fd7f FIX : with callback function 2022-07-08 09:32:20 +02:00
Gauthier PC portable 024
77552fa32a FIX : We must remove empty values of $features array in fetchByProductCombination2ValuePairs() because some products can use only several attributes in their variations and not necessarily all. In this case, fetch doesn't work without my correction 2022-07-07 10:17:56 +02:00
Laurent Destailleur
25e70bead8 phpcs 2022-05-18 23:27:26 +02:00
Laurent Destailleur
91d539bbef Clean code of not used method 2022-05-10 14:38:40 +02:00
Laurent Destailleur
4a80f35aaa Merge branch '15.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/commande/class/commande.class.php
	htdocs/fourn/class/fournisseur.commande.class.php
2022-03-23 17:26:25 +01:00
Laurent Destailleur
c620757dbc Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into 15.0
Conflicts:
	htdocs/comm/propal/list.php
	htdocs/langs/en_US/projects.lang
	htdocs/product/price.php
	htdocs/reception/class/reception.class.php
2022-03-23 17:23:21 +01:00
Laurent Destailleur
32f2499c36 Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0
Conflicts:
	htdocs/comm/propal/list.php
	htdocs/langs/en_US/projects.lang
	htdocs/langs/en_US/propal.lang
	htdocs/product/price.php
	htdocs/projet/card.php
	htdocs/reception/class/reception.class.php
2022-03-23 17:04:31 +01:00
kamel
1418fd7054 NEW : Update variants to standard card and list 2022-03-18 15:38:44 +01:00
Marc de Lima Lucio
e989371651 FIX: better error management at product selling price update 2022-03-08 14:49:26 +01:00
Laurent Destailleur
f5edd25f6d Clean code 2021-11-07 18:14:49 +01:00
Laurent Destailleur
dd2207d6c5 Merge branch '14.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts:
	htdocs/accountancy/customer/list.php
	htdocs/core/db/DoliDB.class.php
	htdocs/resource/list.php
2021-11-06 21:11:05 +01:00
Laurent Destailleur
7e68f9e013 Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 14.0
Conflicts:
	htdocs/core/db/DoliDB.class.php
	htdocs/resource/list.php
2021-11-06 21:04:17 +01:00
stickler-ci
5c10cd5ba9 Fixing style errors. 2021-11-02 13:20:41 +00:00
BadPixxel
98929f2dba FIX: Status propagation from Parent Product
toSell or toBuy Status propagation should be done only when parent is updated. 

Otherwise, any modification made on the parent will overwrite the specific configuration made at the child level.
2021-11-02 14:16:55 +01:00
Laurent Destailleur
cee573cf96 Update ProductCombination.class.php 2021-10-31 17:42:43 +01:00
Gauthier PC portable 024
1e45b9b1cd FIX : We need a default price base type in variant creation case with multiprices when parent has been created with only one level price 2021-10-25 15:25:58 +02:00
lmarcouiller
3a1a688ab2 Fix #18604 : fix percentage on variant product 2021-09-10 15:03:08 +02:00
Laurent Destailleur
3d72a21396 Clean code 2021-08-28 03:09:41 +02:00
Laurent Destailleur
dbd7292cd6 Replace doubleval into floatval 2021-05-20 09:22:55 +02:00