add doc and fix CI (#34955)

* add doc

* fix

* fix

* fix
This commit is contained in:
Frédéric FRANCE
2025-08-14 19:27:14 +02:00
committed by GitHub
parent 515fc47422
commit 905ee464eb
4 changed files with 21 additions and 16 deletions

View File

@@ -359,6 +359,8 @@ foreach ($dirmodels as $reldir) {
} }
$arrayofmodules = dol_sort_array($arrayofmodules, 'position'); $arrayofmodules = dol_sort_array($arrayofmodules, 'position');
/** @var ModeleNumRefFactures[] $arrayofmodules */
'@phan-var-force ModeleNumRefFactures[] $arrayofmodules';
foreach ($arrayofmodules as $module) { foreach ($arrayofmodules as $module) {
$file = strtolower($module->getName($langs)); $file = strtolower($module->getName($langs));
@@ -558,6 +560,7 @@ foreach ($dirmodels as $reldir) {
$module = new $classname($db); $module = new $classname($db);
'@phan-var-force ModelePDFFactures $module'; '@phan-var-force ModelePDFFactures $module';
/** @var ModelePDFFactures $module */
$modulequalified = 1; $modulequalified = 1;
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {

View File

@@ -131,6 +131,7 @@ if ($action == 'updateMask') {
$module = new $classname($db); $module = new $classname($db);
'@phan-var-force ModelePdfReception $module'; '@phan-var-force ModelePdfReception $module';
/** @var ModelePdfReception $module */
if ($module->write_file($exp, $langs) > 0) { if ($module->write_file($exp, $langs) > 0) {
header("Location: ".DOL_URL_ROOT."/document.php?modulepart=reception&file=SPECIMEN.pdf"); header("Location: ".DOL_URL_ROOT."/document.php?modulepart=reception&file=SPECIMEN.pdf");
@@ -220,8 +221,8 @@ foreach ($dirmodels as $reldir) {
require_once $dir.'/'.$file.'.php'; require_once $dir.'/'.$file.'.php';
$module = new $file(); $module = new $file();
'@phan-var-force ModelNumRefReception $module'; '@phan-var-force ModelNumRefReception $module';
/** @var ModelNumRefReception $module */
if ($module->isEnabled()) { if ($module->isEnabled()) {
// Show modules according to features level // Show modules according to features level
@@ -364,12 +365,13 @@ foreach ($dirmodels as $reldir) {
$module = new $classname($db); $module = new $classname($db);
'@phan-var-force ModelePdfReception $module'; '@phan-var-force ModelePdfReception $module';
/** @var ModelePdfReception $module */
$modulequalified = 1; $modulequalified = 1;
if (isset($module->version) && $module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) { if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
$modulequalified = 0; $modulequalified = 0;
} }
if (isset($module->version) && $module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) { if ($module->version == 'experimental' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 1) {
$modulequalified = 0; $modulequalified = 0;
} }

View File

@@ -1,7 +1,7 @@
<?php <?php
/* Copyright (C) 2014 Maxime Kohlhaas <support@atm-consulting.fr> /* Copyright (C) 2014 Maxime Kohlhaas <support@atm-consulting.fr>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr> * Copyright (C) 2021-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com> * Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@@ -24,7 +24,7 @@
* @var DoliDB $db * @var DoliDB $db
* @var ExtraFields $extrafields * @var ExtraFields $extrafields
* @var Form $form * @var Form $form
* @var Hookmanager $hookmanager * @var HookManager $hookmanager
* @var Translate $langs * @var Translate $langs
* @var User $user * @var User $user
* *
@@ -311,7 +311,7 @@ if (empty($reshook) && !empty($object->table_element) && isset($extrafields->att
print '</form>'; print '</form>';
/** @var $formai ?FormAI */ /** @var ?FormAI $formai */
if (empty($formai) || $formai instanceof FormAI) { if (empty($formai) || $formai instanceof FormAI) {
include_once DOL_DOCUMENT_ROOT.'/core/class/html.formai.class.php'; include_once DOL_DOCUMENT_ROOT.'/core/class/html.formai.class.php';
$formai = new FormAI($db); $formai = new FormAI($db);

View File

@@ -6,7 +6,7 @@
* Copyright (C) 2011-2023 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2011-2023 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro> * Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2023-2024 Frédéric France <frederic.france@free.fr> * Copyright (C) 2023-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com> * Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@@ -586,7 +586,7 @@ class Delivery extends CommonObject
$this->note_private = $expedition->note_private; $this->note_private = $expedition->note_private;
$this->note_public = $expedition->note_public; $this->note_public = $expedition->note_public;
$this->fk_project = $expedition->fk_project; $this->fk_project = $expedition->fk_project;
$this->date_delivery = null; // Date of real reception. The Expedition->date_delivery is the planned one. $this->date_delivery = ''; // Date of real reception. The Expedition->date_delivery is the planned one.
$this->fk_delivery_address = $expedition->fk_delivery_address; $this->fk_delivery_address = $expedition->fk_delivery_address;
$this->socid = $expedition->socid; $this->socid = $expedition->socid;
$this->ref_customer = $expedition->ref_customer; $this->ref_customer = $expedition->ref_customer;