Commit Graph

2588 Commits

Author SHA1 Message Date
Laurent Destailleur
c112a965cc Fix phan warnings 2024-03-28 12:54:08 +01:00
MDW
27546808fc subtype is not nullable int, reflect this in code 2024-03-27 21:57:57 +01:00
Yamil Esteban Garcia
0a2481c702 Update fournisseur.facture.class.php
IRPF reset when editing the label of a supplier invoice #29049
2024-03-26 22:14:19 +01:00
Laurent Destailleur
5c31471053 Merge pull request #29020 from frederic34/last_main_doc
fetch last_main_doc in invoice supplier
2024-03-23 17:37:38 +01:00
Frédéric FRANCE
df13bc5ab4 fetch last_main_doc in invoice supplier 2024-03-22 12:24:52 +01:00
Laurent Destailleur
922f30eceb Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop
2024-03-21 15:38:11 +01:00
MDW
effe9e79b5 Fix $mybool |=... which is binary op, not boolean op
# Fix $mybool |=... which is binary op, not boolean op

This fixes PhanTypeInvalidLeftOperandOfBitwiseOp.
Replace $var |= ... with $var = ... || $var .
Add cast before ... when needed (@include does not always return bool).
|= always evaluates expression, there for || $var, not $var ||
2024-03-21 13:45:23 +01:00
MDW
e19a60cd62 Fix $mybool |=... which is binary op, not boolean op
# Fix $mybool |=... which is binary op, not boolean op

This fixes PhanTypeInvalidLeftOperandOfBitwiseOp.
Replace $var |= ... with $var = ... || $var .
Add cast before ... when needed (@include does not always return bool).
|= always evaluates expression, there for || $var, not $var ||
2024-03-21 13:45:21 +01:00
MDW
476d8cfd9c Fix $mybool |=... which is binary op, not boolean op
# Fix $mybool |=... which is binary op, not boolean op

This fixes PhanTypeInvalidLeftOperandOfBitwiseOp.
Replace $var |= ... with $var = ... || $var .
Add cast before ... when needed (@include does not always return bool).
|= always evaluates expression, there for || $var, not $var ||
2024-03-21 13:45:20 +01:00
MDW
9f93a55468 Fix arg type to trim with cast 2024-03-20 04:10:10 +01:00
MDW
8ac8e5844c Fix arg type to preg_match(),preg_replace(),abs() with cast 2024-03-20 04:09:31 +01:00
MDW
2c0f77c1b9 Fix arg type to preg_match(),preg_replace() with cast 2024-03-20 04:09:30 +01:00
MDW
3682cec8ff Fix arg type to preg_match() with cast 2024-03-20 04:09:29 +01:00
MDW
c5479f4520 Fix: Update typing for qty as float 2024-03-19 20:37:38 +01:00
Christophe Battarel
07597c4515 renaming of columns impact db access 2024-03-19 15:56:44 +01:00
Christophe Battarel
3f5ffc5e9d renaming of columns impact db access 2024-03-19 15:50:15 +01:00
Christophe Battarel
446b574de5 renaming of columns impact db access 2024-03-19 15:49:42 +01:00
Christophe Battarel
f94d282c17 renam fk_commande and fk_commandefourdet 2024-03-19 15:24:08 +01:00
Christophe Battarel
b2baacccb4 update credentials 2024-03-19 14:58:05 +01:00
MDW
fd9d48faac Fix phpstan CommonObject->fields - notnull is optional field 2024-03-19 00:32:00 +01:00
MDW
2917b34519 Fix phpstan $fields property issue
Fix Property FactureFournisseur::$fields (array) does not accept default value of type array{rowid: array
2024-03-19 00:31:58 +01:00
Laurent Destailleur
ebba438fbe Merge pull request #27528 from altairisfr/rdb
[DATA_MODEL] rename commande_fournisseur_dispatch into receptiondet_batch
2024-03-17 21:31:27 +01:00
MDW
7ab07a1549 Fix PhanPluginSuspiciousParamOrder in updete() by removeing arg 2024-03-17 20:12:47 +01:00
MDW
18cfd0dae6 Fix PhanTypeComparisonFromArray by testing $error field
# Fix PhanTypeComparisonFromArray by testing $error field

getListOfPayments always returns an array, comparing it to 0 is invalid.
To know if there was an error, we should test error, not the size of the result.
Updated getListOfPayments as well to initialize error to ""
2024-03-17 20:12:45 +01:00
Laurent Destailleur
487a55750a Fix warnings 2024-03-16 22:13:00 +01:00
Laurent Destailleur
0ee6fd6bad Merge pull request #28877 from mdeweerd/PhanTypeMismatchDefault
Fix & enable PhanTypeMismatchDefault
2024-03-15 15:44:30 +01:00
MDW
82157757f0 Fix PhanTypeMismatchDefault by updating defaults 2024-03-15 14:53:03 +01:00
MDW
61b55f21ab Fix PhanTypeMismatchDefault with typing hint 2024-03-15 14:53:02 +01:00
MDW
575e620300 Fix Assign 0 to fk_project, not null (dolibarr's way) 2024-03-15 10:12:02 +01:00
MDW
23785393a3 Add csslist to json keys 2024-03-15 03:55:52 +01:00
MDW
9ea2b38c47 Fix PhanTypeMismatchPropertyDefault 2024-03-15 03:48:17 +01:00
Frédéric France
ad13f6fc76 fix phpstan is incompatible with 2024-03-14 18:46:17 +01:00
MDW
a997447ce3 Fix PhanPluginRedundantAssignment 2024-03-13 01:04:54 +01:00
MDW
af5816f344 Fix PhanPluginRedundantAssignment 2024-03-13 01:04:53 +01:00
Laurent Destailleur
9e16016125 Merge pull request #28770 from mdeweerd/typing/fields
Fix: Repeat fields typing in CommonClass children
2024-03-12 14:30:36 +01:00
Laurent Destailleur
949c885477 Merge branch 'develop' into fix/phpdoc1 2024-03-12 14:11:30 +01:00
MDW
88d59896ec Qual: 'enabled' in fields can be string ('isModEnabled(...)')
# Qual: 'enabled' in fields can be string ('isModEnabled(...)')

Update PHPdoc to allow that enabled is a string
2024-03-12 13:38:08 +01:00
MDW
1ea9a7fa48 Qual: set default value to match PHPdoc type 2024-03-11 22:10:04 +01:00
Frédéric France
23ae21958b clean code and phpdoc 2024-03-11 20:57:48 +01:00
MDW
23eea84309 Fix: Repeat fields typing in CommonClass children
# Fix: Repeat fields typing in CommonClass children

phpstan needs typing to be 'co-variant' and therefore typing must be repeated as
the method is not to initialise the property in the constructor, but to override
the proparty by a 'local' definition in the child class
2024-03-11 17:39:34 +01:00
Laurent Destailleur
01c3808478 Merge pull request #28618 from solution-libre/fix-cloned-supplier-order-creation-date
FIX cloned supplier order creation date as now
2024-03-11 16:34:35 +01:00
Laurent Destailleur
0f2121e3ba Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop 2024-03-11 13:46:08 +01:00
Florent Poinsaut
674e668b78 FIX cloned supplier order creation date as now 2024-03-11 12:42:16 +00:00
Laurent Destailleur
e72671bf50 Merge branch '18.0' of git@github.com:Dolibarr/dolibarr.git into 19.0 2024-03-11 13:39:04 +01:00
Laurent Destailleur
f40ad6e90a Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 18.0 2024-03-11 13:31:55 +01:00
Frédéric FRANCE
895aa5ee85 fix phpstan (#28735)
* fix phpstan

* fix phpstan

* fix phpstan
2024-03-10 01:44:08 +01:00
le-reparateur
b601dabf66 Update fournisseur.product.class.php (#28729)
* Update fournisseur.product.class.php

#28710

* Update fournisseur.product.class.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-09 15:14:23 +01:00
MDW
3d0a85608b Qual: Fix and enable alias deprecation detection (#28716)
* Qual: Ignore some false positives for deprecated functions

# Qual: Ignore some false positives for deprecated functions

The Phan Deprecation Plugin for internal functions has mixed up some
mail functions and lists them as deprecated, this ignores that

* Qual: Enable detection and fixing of internal deprecations

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Replace 'join' with 'implode'

* Qual: Update codespell lines ignore list after format

# Qual: Update codespell lines ignore list after forma

Done using latest library, so also adds some exceptions that are needed
in the future;

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
2024-03-08 21:34:18 +01:00
Florian Mortgat
7f10566d5e FIX 17.0: $num doesn't take trigger-modified newref into account, leading to inconsistencies if BILL_SUPPLIER_VALIDATE changes the invoice's ref (#28684)
this is a follow-up of PR #27008
2024-03-07 20:21:41 +01:00
Laurent Destailleur
a72e1f08c1 Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into
develop

Conflicts:
	htdocs/fourn/class/fournisseur.commande.class.php
2024-03-07 18:54:59 +01:00