qual: phpstan - various fixes (#28351)
* qual: phpstan for htdocs/compta/tva/class/paymentvat.class.php htdocs/compta/tva/class/paymentvat.class.php 540 Property CommonObject::$tms (int) does not accept string. * qual: phpstan - various "$enabled (int) does not accept bool." htdocs/core/boxes/box_actions.php 54 Property box_actions::$enabled (int) does not accept bool. htdocs/core/boxes/box_actions_future.php 54 Property box_actions_future::$enabled (int) does not accept bool. htdocs/core/boxes/box_activity.php 53 Property box_activity::$enabled (int) does not accept string. * qual: phpstan for htdocs/core/boxes/box_activity.php htdocs/core/boxes/box_activity.php 53 Property box_activity::$enabled (int) does not accept string. * qual: phpstan for htdocs/core/modules/modTakePos.class.php htdocs/core/modules/modTakePos.class.php 284 Property Societe::$code_client (string) does not accept int. htdocs/core/modules/modTakePos.class.php 285 Property Societe::$code_fournisseur (string) does not accept int.
This commit is contained in:
parent
757abcfaae
commit
009a4856b3
4 changed files with 5 additions and 5 deletions
|
|
@ -537,7 +537,7 @@ class PaymentVAT extends CommonObject
|
|||
$this->id = 0;
|
||||
$this->fk_tva = 0;
|
||||
$this->datec = dol_now();
|
||||
$this->tms = '';
|
||||
$this->tms = dol_now();
|
||||
$this->datep = '';
|
||||
$this->amount = '';
|
||||
$this->fk_typepaiement = 0;
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@ class box_activity extends ModeleBoxes
|
|||
$this->db = $db;
|
||||
|
||||
// FIXME: Pb into some status
|
||||
$this->enabled = (getDolGlobalString('MAIN_FEATURES_LEVEL')); // Not enabled by default due to bugs (see previous comments)
|
||||
$this->enabled = getDolGlobalInt('MAIN_FEATURES_LEVEL'); // Not enabled by default due to bugs (see previous comments)
|
||||
|
||||
$this->hidden = !(
|
||||
(isModEnabled('facture') && $user->hasRight('facture', 'read'))
|
||||
|
|
|
|||
|
|
@ -64,7 +64,7 @@ class ModeleBoxes // Can't be abstract as it is instantiated to build "empty" bo
|
|||
public $max = 5;
|
||||
|
||||
/**
|
||||
* @var int Condition to have widget enabled
|
||||
* @var bool|int Condition to have widget enabled
|
||||
*/
|
||||
public $enabled = 1;
|
||||
|
||||
|
|
|
|||
|
|
@ -281,8 +281,8 @@ class modTakePos extends DolibarrModules
|
|||
if ($searchcompanyid == 0) {
|
||||
$societe->name = $nametouse;
|
||||
$societe->client = 1;
|
||||
$societe->code_client = -1;
|
||||
$societe->code_fournisseur = -1;
|
||||
$societe->code_client = '-1';
|
||||
$societe->code_fournisseur = '-1';
|
||||
$societe->note_private = "Default customer automatically created by Point Of Sale module activation. Can be used as the default generic customer in the Point Of Sale setup. Can also be edited or removed if you don't need a generic customer.";
|
||||
|
||||
$searchcompanyid = $societe->create($user);
|
||||
|
|
|
|||
Loading…
Reference in a new issue