clean code and fix phpstan (#37831)
* fix phpstan * fix phpstan * fix phpstan * fix phpstan
This commit is contained in:
parent
dfc236f70a
commit
45d0566b6f
30 changed files with 482 additions and 717 deletions
|
|
@ -780,18 +780,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/admin/tools/purge.php
|
||||
|
||||
-
|
||||
message: '#^Method Documentation\:\:displayMenu\(\) has parameter \$menu with no value type specified in iterable type array\.$#'
|
||||
identifier: missingType.iterableValue
|
||||
count: 1
|
||||
path: ../../../htdocs/admin/tools/ui/class/documentation.class.php
|
||||
|
||||
-
|
||||
message: '#^Method Documentation\:\:displaySummary\(\) has parameter \$menu with no value type specified in iterable type array\.$#'
|
||||
identifier: missingType.iterableValue
|
||||
count: 1
|
||||
path: ../../../htdocs/admin/tools/ui/class/documentation.class.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always false\.$#'
|
||||
identifier: if.alwaysFalse
|
||||
|
|
@ -942,18 +930,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/asset/class/assetmodel.class.php
|
||||
|
||||
-
|
||||
message: '#^Property AssetModel\:\:\$asset_accountancy_codes \(AssetAccountancyCodes\) in empty\(\) is not falsy\.$#'
|
||||
identifier: empty.property
|
||||
count: 2
|
||||
path: ../../../htdocs/asset/class/assetmodel.class.php
|
||||
|
||||
-
|
||||
message: '#^Property AssetModel\:\:\$asset_depreciation_options \(AssetDepreciationOptions\) in empty\(\) is not falsy\.$#'
|
||||
identifier: empty.property
|
||||
count: 2
|
||||
path: ../../../htdocs/asset/class/assetmodel.class.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always false\.$#'
|
||||
identifier: booleanNot.alwaysFalse
|
||||
|
|
@ -978,24 +954,12 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/blockedlog/ajax/block-add.php
|
||||
|
||||
-
|
||||
message: '#^Dead catch \- Exception is never thrown in the try block\.$#'
|
||||
identifier: catch.neverThrown
|
||||
count: 1
|
||||
path: ../../../htdocs/blockedlog/class/blockedlog.class.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always true\.$#'
|
||||
identifier: if.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/blockedlog/class/blockedlog.class.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$idprod might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../../htdocs/bom/bom_card.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
|
|
@ -2676,12 +2640,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/compta/stats/cabyuser.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$description might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/stats/cabyuser.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$sql might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -2694,12 +2652,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/compta/stats/casoc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$description might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/stats/casoc.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$sql might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
|
|
@ -2748,12 +2700,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/compta/stats/supplier_turnover_by_prodserv.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$type might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 1
|
||||
path: ../../../htdocs/compta/stats/supplier_turnover_by_prodserv.php
|
||||
|
||||
-
|
||||
message: '#^Ternary operator condition is always false\.$#'
|
||||
identifier: ternary.alwaysFalse
|
||||
|
|
@ -5664,234 +5610,30 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../htdocs/core/modules/modEventOrganization.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''FACTURE_ADDON'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modFacture.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''FACTURE_ADDON_PDF'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modFacture.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''FACTURE_ADDON_PDF…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modFacture.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{0\: string, 1\: string, 2\: int\|string, 3\?\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 3
|
||||
path: ../../../htdocs/core/modules/modFacture.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''FICHEINTER_ADDON'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modFicheinter.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''FICHEINTER_ADDON_PDF'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modFicheinter.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{0\: string, 1\: string, 2\: int\|string, 3\?\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 2
|
||||
path: ../../../htdocs/core/modules/modFicheinter.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''COMMANDE_SUPPLIER…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 2
|
||||
path: ../../../htdocs/core/modules/modFournisseur.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''INVOICE_SUPPLIER…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modFournisseur.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''SUPPLIER_INVOICE…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modFournisseur.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''SUPPLIER_ORDER…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modFournisseur.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{0\: string, 1\: string, 2\: int\|string, 3\?\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 5
|
||||
path: ../../../htdocs/core/modules/modFournisseur.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''HOLIDAY_ADDON'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modHoliday.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''HOLIDAY_ADDON_PDF'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modHoliday.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''HOLIDAY_ADDON_PDF…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modHoliday.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{0\: string, 1\: string, 2\: int\|string, 3\?\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 3
|
||||
path: ../../../htdocs/core/modules/modHoliday.class.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always false\.$#'
|
||||
identifier: if.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modKnowledgeManagement.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{0\: string, 1\: string, 2\: int\|string, 3\?\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 3
|
||||
path: ../../../htdocs/core/modules/modLoan.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''MAILING_CONTACT…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modMailing.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{0\: string, 1\: string, 2\: int\|string, 3\?\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modMailing.class.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always false\.$#'
|
||||
identifier: if.alwaysFalse
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modPartnership.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''BANK_ADDON_PDF'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modPrelevement.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{0\: string, 1\: string, 2\: int\|string, 3\?\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modPrelevement.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''MAIN_SUBMODULE…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modReception.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''RECEPTION_ADDON_PDF'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modReception.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''RECEPTION_ADDON_PDF…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modReception.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''RECEPTION_ADDON…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modReception.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{0\: string, 1\: string, 2\: int\|string, 3\?\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 4
|
||||
path: ../../../htdocs/core/modules/modReception.class.php
|
||||
|
||||
-
|
||||
message: '#^If condition is always true\.$#'
|
||||
identifier: if.alwaysTrue
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modRecruitment.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''COMPANY_ADDON_PDF…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modSociete.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''SOCIETE_ADD_REF_IN…'', ''yesno''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modSociete.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''SOCIETE_CODECLIENT…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modSociete.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''SOCIETE_CODECOMPTA…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modSociete.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''SOCIETE_FISCAL…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modSociete.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{0\: string, 1\: string, 2\: int\|string, 3\?\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 5
|
||||
path: ../../../htdocs/core/modules/modSociete.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$export_special_array \(array\<array\<array\{rule\: string, file\: string, classfile\: string, class\: string, method\: string, method_params\: array\<string\>\}\|string\>\>\) does not accept non\-empty\-array\<array\<array\{rule\: string, file\?\: string, classfile\: string, class\: string, method\: string, method_params\: array\<string\>\}\|string\>\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 1
|
||||
path: ../../../htdocs/core/modules/modStock.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{''SUPPLIER_PROPOSAL…'', ''chaine''\}\|array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 3
|
||||
path: ../../../htdocs/core/modules/modSupplierProposal.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$const \(array\<array\{0\: string, 1\: string, 2\: int\|string, 3\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\) does not accept non\-empty\-array\<array\{0\: string, 1\: string, 2\: int\|string, 3\?\: string, 4\?\: int\<0, 1\>, 5\?\: string, 6\?\: int\<0, 1\>\}\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
count: 3
|
||||
path: ../../../htdocs/core/modules/modSupplierProposal.class.php
|
||||
|
||||
-
|
||||
message: '#^Property DolibarrModules\:\:\$export_permission \(array\<array\<array\{string, string\}\>\>\) does not accept non\-empty\-array\<array\<array\{0\: string, 1\?\: string\}\>\>\.$#'
|
||||
identifier: assign.propertyType
|
||||
|
|
@ -12168,12 +11910,6 @@ parameters:
|
|||
count: 1
|
||||
path: ../../../scripts/emailings/mailing-send.php
|
||||
|
||||
-
|
||||
message: '#^Variable \$mesg might not be defined\.$#'
|
||||
identifier: variable.undefined
|
||||
count: 2
|
||||
path: ../../../scripts/emailings/mailing-send.php
|
||||
|
||||
-
|
||||
message: '#^Negated boolean expression is always true\.$#'
|
||||
identifier: booleanNot.alwaysTrue
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2017-2018 Laurent Destailleur <eldy@destailleur.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -47,6 +47,7 @@ $backtopage = GETPOST('backtopage', 'alpha');
|
|||
|
||||
$withtab = GETPOSTINT('withtab');
|
||||
$origin = GETPOST('origin');
|
||||
$withtab = GETPOSTISSET('withtab') ? GETPOSTINT('withtab') : 1;
|
||||
|
||||
// Access Control
|
||||
if (!$user->admin || !isModEnabled('blockedlog')) {
|
||||
|
|
@ -114,7 +115,7 @@ if (!isRegistrationDataSavedAndPushed()) {
|
|||
print load_fiche_titre($title.'<br>'.$texttop, $linkback, 'blockedlog', 0, '', '', $morehtmlcenter);
|
||||
|
||||
if ($withtab) {
|
||||
$head = blockedlogadmin_prepare_head(GETPOST('withtab', 'alpha'));
|
||||
$head = blockedlogadmin_prepare_head($withtab);
|
||||
print dol_get_fiche_head($head, 'technicalinfo', '', -1);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,9 +54,8 @@ $confirm = GETPOST('confirm', 'aZ09'); // Used by the actions_linkedfiles.inc.ph
|
|||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : getDolDefaultContextPage(__FILE__); // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
$withtab = GETPOST('withtab', 'alpha');
|
||||
|
||||
$withtab = GETPOSTISSET('withtab') ? GETPOSTINT('withtab') : 1;
|
||||
$withtab = GETPOSTISSET('withtab') ? GETPOSTINT('withtab') : 1;
|
||||
|
||||
$search_showonlyerrors = GETPOSTINT('search_showonlyerrors');
|
||||
if ($search_showonlyerrors < 0) {
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ $confirm = GETPOST('confirm', 'aZ09'); // Used by the actions_linkedfiles.in
|
|||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : getDolDefaultContextPage(__FILE__); // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha'); // Go back to a dedicated page
|
||||
$optioncss = GETPOST('optioncss', 'aZ'); // Option for the css output (always '' except when 'print')
|
||||
$withtab = GETPOSTISSET('withtab') ? GETPOSTINT('withtab') : 1;
|
||||
|
||||
//$hmacexportkey = GETPOST('hmacexportkey', 'password');
|
||||
$inputregistrationnumber = GETPOST('inputregistrationnumber');
|
||||
|
|
@ -164,7 +165,7 @@ if (!userIsTaxAuditor()) {
|
|||
|
||||
print load_fiche_titre($title.'<br>'.$texttop, $linkback, 'blockedlog', 0, '', '', $morehtmlcenter);
|
||||
|
||||
$head = blockedlogadmin_prepare_head(GETPOST('withtab', 'alpha'));
|
||||
$head = blockedlogadmin_prepare_head($withtab);
|
||||
|
||||
print dol_get_fiche_head($head, 'control', '', -1);
|
||||
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ $search_pos_source = GETPOST('search_pos_source');
|
|||
$search_ref = GETPOST('search_ref', 'alpha');
|
||||
$search_amount = GETPOST('search_amount', 'alpha');
|
||||
$search_signature = GETPOST('search_signature', 'alpha');
|
||||
$withtab = GETPOSTISSET('withtab') ? GETPOSTINT('withtab') : 1;
|
||||
|
||||
if (($search_start == -1 || empty($search_start)) && !GETPOSTISSET('search_startmonth') && !GETPOSTISSET('begin')) {
|
||||
$search_start = dol_time_plus_duree(dol_now(), -1, 'w');
|
||||
|
|
@ -170,7 +171,7 @@ if (userIsTaxAuditor()) {
|
|||
|
||||
$form = new Form($db);
|
||||
|
||||
if (GETPOST('withtab', 'alpha')) {
|
||||
if ($withtab) {
|
||||
$title = $langs->trans("ModuleSetup").' '.$langs->trans('BlockedLog');
|
||||
} else {
|
||||
$title = $langs->trans("BrowseBlockedLog");
|
||||
|
|
@ -192,7 +193,7 @@ if (!is_array($blocks)) {
|
|||
}
|
||||
|
||||
$linkback = '';
|
||||
if (GETPOST('withtab', 'alpha')) {
|
||||
if ($withtab) {
|
||||
$linkback = '<a href="'.dolBuildUrl($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
|
||||
}
|
||||
|
||||
|
|
@ -209,7 +210,7 @@ if (!userIsTaxAuditor()) { // @phpstan-ignore-line as it is already checked befo
|
|||
|
||||
print load_fiche_titre($title.'<br>'.$texttop, $linkback, 'blockedlog', 0, '', '', $morehtmlcenter);
|
||||
|
||||
$head = blockedlogadmin_prepare_head(GETPOST('withtab', 'alpha'));
|
||||
$head = blockedlogadmin_prepare_head($withtab);
|
||||
|
||||
print dol_get_fiche_head($head, 'fingerprints', '', -1);
|
||||
|
||||
|
|
@ -289,8 +290,8 @@ if ($search_signature) {
|
|||
if ($search_showonlyerrors > 0) {
|
||||
$param .= '&search_showonlyerrors='.((int) $search_showonlyerrors);
|
||||
}
|
||||
if (GETPOST('withtab', 'alpha')) {
|
||||
$param .= '&withtab='.urlencode(GETPOST('withtab', 'alpha'));
|
||||
if ($withtab) {
|
||||
$param .= '&withtab='.((int) $withtab);
|
||||
}
|
||||
|
||||
print '<form method="POST" id="searchFormList" action="'.dolBuildUrl($_SERVER["PHP_SELF"]).'">';
|
||||
|
|
@ -305,7 +306,7 @@ print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
|||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
print '<input type="hidden" name="contextpage" value="'.$contextpage.'">';
|
||||
print '<input type="hidden" name="withtab" value="'.GETPOST('withtab', 'alpha').'">';
|
||||
print '<input type="hidden" name="withtab" value="'.$withtab.'">';
|
||||
|
||||
print '<div class="div-table-responsive">'; // You can use div-table-responsive-no-min if you don't need reserved height for your table
|
||||
print '<table class="noborder centpercent liste">';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2017-2018 Laurent Destailleur <eldy@destailleur.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -76,7 +76,7 @@ $formcompany = new FormCompany($db);
|
|||
$block_static = new BlockedLog($db);
|
||||
$block_static->loadTrackedEvents();
|
||||
|
||||
if (GETPOST('withtab', 'alpha')) {
|
||||
if ($withtab) {
|
||||
$title = $langs->trans("ModuleSetup").' '.$langs->trans('BlockedLog');
|
||||
} else {
|
||||
$title = $langs->trans("BrowseBlockedLog");
|
||||
|
|
@ -86,7 +86,7 @@ $help_url="EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Inalt
|
|||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-blockedlog page-admin_blockedlog');
|
||||
|
||||
if (GETPOST('withtab', 'alpha')) {
|
||||
if ($withtab) {
|
||||
$linkback = '<a href="'.dolBuildUrl($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
|
||||
} else {
|
||||
$linkback='';
|
||||
|
|
@ -106,7 +106,7 @@ if (!userIsTaxAuditor()) {
|
|||
print load_fiche_titre($title.'<br>'.$texttop, $linkback, 'blockedlog', 0, '', '', $morehtmlcenter);
|
||||
|
||||
if ($withtab) {
|
||||
$head = blockedlogadmin_prepare_head(GETPOST('withtab', 'alpha'));
|
||||
$head = blockedlogadmin_prepare_head($withtab);
|
||||
print dol_get_fiche_head($head, 'documentation', '', -1);
|
||||
} else {
|
||||
print '<br>';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2017-2018 Laurent Destailleur <eldy@destailleur.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -212,7 +212,7 @@ $formcompany = new FormCompany($db);
|
|||
$block_static = new BlockedLog($db);
|
||||
$block_static->loadTrackedEvents();
|
||||
|
||||
if (GETPOST('withtab', 'alpha')) {
|
||||
if ($withtab) {
|
||||
$title = $langs->trans("ModuleSetup").' '.$langs->trans('BlockedLog');
|
||||
} else {
|
||||
$title = $langs->trans("BrowseBlockedLog");
|
||||
|
|
@ -222,7 +222,7 @@ $help_url = "EN:Module_Unalterable_Archives_-_Logs|FR:Module_Archives_-_Logs_Ina
|
|||
|
||||
llxHeader('', $title, $help_url, '', 0, 0, '', '', '', 'mod-blockedlog page-admin_blockedlog');
|
||||
|
||||
if (GETPOST('withtab', 'alpha')) {
|
||||
if ($withtab) {
|
||||
$linkback = '<a href="'.dolBuildUrl($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php', ['restore_lastsearch_values' => 1]).'">'.img_picto($langs->trans("BackToModuleList"), 'back', 'class="pictofixedwidth"').'<span class="hideonsmartphone">'.$langs->trans("BackToModuleList").'</span></a>';
|
||||
} else {
|
||||
$linkback = '';
|
||||
|
|
@ -242,7 +242,7 @@ if (!userIsTaxAuditor()) {
|
|||
print load_fiche_titre($title.'<br>'.$texttop, $linkback, 'blockedlog', 0, '', '', $morehtmlcenter);
|
||||
|
||||
if ($withtab) {
|
||||
$head = blockedlogadmin_prepare_head(GETPOST('withtab', 'alpha'));
|
||||
$head = blockedlogadmin_prepare_head($withtab);
|
||||
print dol_get_fiche_head($head, 'registration', '', -1);
|
||||
} else {
|
||||
print '<br>';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 ATM Consulting <contact@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -40,7 +41,7 @@ function getBlockedLogVersionToShow()
|
|||
/**
|
||||
* Define head array for tabs of blockedlog tools setup pages
|
||||
*
|
||||
* @param string $withtabsetup Add also the tab "Setup"
|
||||
* @param int $withtabsetup Add also the tab "Setup"
|
||||
* @return array<array{0:string,1:string,2:string}> Array of head
|
||||
*/
|
||||
function blockedlogadmin_prepare_head($withtabsetup)
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* Copyright (C) 2005-2024 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2018 Josep Lluís Amador <joseplluis@lliuretic.cat>
|
||||
* Copyright (C) 2019-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -114,7 +114,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
|
|||
public $boxes = array();
|
||||
|
||||
/**
|
||||
* @var array<array{0:string,1:string,2:string|int,3:string,4?:int<0,1>,5?:string,6?:int<0,1>}> Module constants
|
||||
* @var array<int,array{0:string,1:string,2:string|int,3:string,4?:int<0,1>,5?:string,6?:int<0,1>}> Module constants
|
||||
* (0:name,1:type,2:val,3:note,4:visible,5:entity,6:deleteonunactive)
|
||||
*/
|
||||
public $const = array();
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2014 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2016-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2017-2021 Open-DSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -155,10 +156,10 @@ class modAccounting extends DolibarrModules
|
|||
$this->module_parts = array();
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array(
|
||||
0=>array('file'=>'box_accountancy_last_manual_entries.php', 'enabledbydefaulton'=>'accountancyindex'),
|
||||
1=>array('file'=>'box_accountancy_suspense_account.php', 'enabledbydefaulton'=>'accountancyindex')
|
||||
);
|
||||
$this->boxes = [
|
||||
['file'=>'box_accountancy_last_manual_entries.php', 'enabledbydefaulton'=>'accountancyindex'],
|
||||
['file'=>'box_accountancy_suspense_account.php', 'enabledbydefaulton'=>'accountancyindex'],
|
||||
];
|
||||
|
||||
// Permissions
|
||||
$this->rights_class = 'accounting';
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2021 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Rafael San José <rsanjose@alxarafe.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -124,11 +124,11 @@ class modBom extends DolibarrModules
|
|||
// Example: $this->const=array(0=>array('BILLOFMATERIALS_MYNEWCONST1','chaine','myvalue','This is a constant to add',1),
|
||||
// 1=>array('BILLOFMATERIALS_MYNEWCONST2','chaine','myvalue','This is another constant to add',0, 'current', 1)
|
||||
// );
|
||||
$this->const = array(
|
||||
1 => array('BOM_ADDON_PDF', 'chaine', 'generic_bom_odt', 'Name of PDF model of BOM', 0),
|
||||
2 => array('BOM_ADDON', 'chaine', 'mod_bom_standard', 'Name of numbering rules of BOM', 0),
|
||||
3 => array('BOM_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT'.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/boms', '', 0)
|
||||
);
|
||||
$this->const = [
|
||||
['BOM_ADDON_PDF', 'chaine', 'generic_bom_odt', 'Name of PDF model of BOM', 0],
|
||||
['BOM_ADDON', 'chaine', 'mod_bom_standard', 'Name of numbering rules of BOM', 0],
|
||||
['BOM_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT'.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/boms', '', 0],
|
||||
];
|
||||
|
||||
// Some keys to add into the overwriting translation tables
|
||||
/*$this->overwrite_translation = array(
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -92,7 +93,6 @@ class modDataPolicy extends DolibarrModules
|
|||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->langfiles = array("datapolicy");
|
||||
$this->phpmin = array(7, 1); // Minimum version of PHP required by module
|
||||
$this->warnings_activation = array();
|
||||
$this->warnings_activation_ext = array();
|
||||
//$this->automatic_activation = array('FR'=>'datapolicyWasAutomaticallyActivatedBecauseOfYourCountryChoice');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -73,13 +74,13 @@ class modFTP extends DolibarrModules
|
|||
$this->requiredby = array(); // List of modules id to disable if this one is disabled
|
||||
|
||||
// Constants
|
||||
$this->const = array(
|
||||
1=>array('FTP_CONNECT_WITH_SSL', 'chaine', '0', 'Use FTPS for FTP module', 1, 'current', 1),
|
||||
2=>array('FTP_CONNECT_WITH_SFTP', 'chaine', '0', 'Use SFTP for FTP module', 1, 'current', 1)
|
||||
); // List of parameters
|
||||
$this->const = [
|
||||
['FTP_CONNECT_WITH_SSL', 'chaine', '0', 'Use FTPS for FTP module', 1, 'current', 1],
|
||||
['FTP_CONNECT_WITH_SFTP', 'chaine', '0', 'Use SFTP for FTP module', 1, 'current', 1],
|
||||
]; // List of parameters
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array(); // List of boxes
|
||||
$this->boxes = []; // List of boxes
|
||||
$r = 0;
|
||||
|
||||
// Add here list of php file(s) stored in core/boxes that contains class to show a box.
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2021-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2022-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2022-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 William Mead <william.mead@manchenumerique.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -76,29 +76,29 @@ class modFacture extends DolibarrModules
|
|||
$this->config_page_url = array("invoice.php");
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r = 0;
|
||||
|
||||
$this->const[$r][0] = "FACTURE_ADDON";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_facture_terre";
|
||||
$this->const[$r][3] = 'Name of numbering numerotation rules of invoice';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "FACTURE_ADDON_PDF";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "sponge";
|
||||
$this->const[$r][3] = 'Name of PDF model of invoice';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "FACTURE_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/invoices";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
$this->const = [
|
||||
[
|
||||
"FACTURE_ADDON",
|
||||
"chaine",
|
||||
"mod_facture_terre",
|
||||
'Name of numbering numerotation rules of invoice',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"FACTURE_ADDON_PDF",
|
||||
"chaine",
|
||||
"sponge",
|
||||
'Name of PDF model of invoice',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"FACTURE_ADDON_PDF_ODT_PATH",
|
||||
"chaine",
|
||||
"DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/invoices",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
];
|
||||
|
||||
// Boxes
|
||||
//$this->boxes = array(0=>array(1=>'box_factures_imp.php'),1=>array(1=>'box_factures.php'));
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -72,24 +73,35 @@ class modFicheinter extends DolibarrModules
|
|||
// Config pages
|
||||
$this->config_page_url = array("fichinter.php");
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r = 0;
|
||||
|
||||
if (!isset($conf->ficheinter) || !isset($conf->ficheinter->enabled)) {
|
||||
$conf->ficheinter = new stdClass();
|
||||
$conf->ficheinter->enabled = 0;
|
||||
}
|
||||
|
||||
$this->const[$r][0] = "FICHEINTER_ADDON_PDF";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "soleil";
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "FICHEINTER_ADDON";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "pacific";
|
||||
$r++;
|
||||
// Constants
|
||||
// 0:name
|
||||
// 1:type
|
||||
// 2:val
|
||||
// 3:note
|
||||
// 4:visible
|
||||
// 5:entity
|
||||
// 6:deleteonunactive
|
||||
$this->const = [
|
||||
[
|
||||
"FICHEINTER_ADDON_PDF",
|
||||
"chaine",
|
||||
"soleil",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
[
|
||||
"FICHEINTER_ADDON",
|
||||
"chaine",
|
||||
"pacific",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
];
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array(0=>array('file'=>'box_ficheinter.php', 'enabledbydefaulton'=>'Home'));
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@
|
|||
* Copyright (C) 2013-2015 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2020 Ahmad Jamaly Rabib <rabib@metroworks.co.jp>
|
||||
* Copyright (C) 2024-2026 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -82,22 +82,52 @@ if (!getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) {
|
|||
$this->config_page_url = array("supplier_order.php@supplier_order");
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r = 0;
|
||||
|
||||
$this->const[$r][0] = "COMMANDE_SUPPLIER_ADDON_PDF";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "cornas";
|
||||
$this->const[$r][3] = 'Nom du gestionnaire de generation des bons de commande en PDF';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "COMMANDE_SUPPLIER_ADDON_NUMBER";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_commande_fournisseur_muguet";
|
||||
$this->const[$r][3] = 'Nom du gestionnaire de numerotation des commandes fournisseur';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
// 0:name
|
||||
// 1:type
|
||||
// 2:val
|
||||
// 3:note
|
||||
// 4:visible
|
||||
// 5:entity
|
||||
// 6:deleteonunactive
|
||||
$this->const = [
|
||||
[
|
||||
"COMMANDE_SUPPLIER_ADDON_PDF",
|
||||
"chaine",
|
||||
"cornas",
|
||||
'Nom du gestionnaire de generation des bons de commande en PDF',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"COMMANDE_SUPPLIER_ADDON_NUMBER",
|
||||
"chaine",
|
||||
"mod_commande_fournisseur_muguet",
|
||||
'Nom du gestionnaire de numerotation des commandes fournisseur',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"INVOICE_SUPPLIER_ADDON_NUMBER",
|
||||
"chaine",
|
||||
"mod_facture_fournisseur_cactus",
|
||||
'Nom du gestionnaire de numerotation des factures fournisseur',
|
||||
0,
|
||||
],
|
||||
[
|
||||
// Add ability ODT for Supplier orders
|
||||
"SUPPLIER_ORDER_ADDON_PDF_ODT_PATH",
|
||||
"chaine",
|
||||
"DOL_DATA_ROOT" . ($conf->entity > 1 ? '/' . $conf->entity : '') . "/doctemplates/supplier_orders",
|
||||
'',
|
||||
0,
|
||||
],
|
||||
[
|
||||
// Add ability ODT for Supplier Invoices
|
||||
"SUPPLIER_INVOICE_ADDON_PDF_ODT_PATH",
|
||||
"chaine",
|
||||
"DOL_DATA_ROOT" . ($conf->entity > 1 ? '/' . $conf->entity : '') . "/doctemplates/supplier_invoices",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
];
|
||||
|
||||
/* For supplier invoice, we must not have default pdf template on. In most cases, we need to join PDF from supplier, not have a document generated.
|
||||
$this->const[$r][0] = "INVOICE_SUPPLIER_ADDON_PDF";
|
||||
|
|
@ -108,39 +138,16 @@ if (!getDolGlobalString('MAIN_USE_NEW_SUPPLIERMOD')) {
|
|||
$r++;
|
||||
*/
|
||||
|
||||
$this->const[$r][0] = "INVOICE_SUPPLIER_ADDON_NUMBER";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_facture_fournisseur_cactus";
|
||||
$this->const[$r][3] = 'Nom du gestionnaire de numerotation des factures fournisseur';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
// Add ability ODT for Supplier orders
|
||||
$this->const[$r][0] = "SUPPLIER_ORDER_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT" . ($conf->entity > 1 ? '/' . $conf->entity : '') . "/doctemplates/supplier_orders";
|
||||
$this->const[$r][3] = '';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
// Add ability ODT for Supplier Invoices
|
||||
$this->const[$r][0] = "SUPPLIER_INVOICE_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT" . ($conf->entity > 1 ? '/' . $conf->entity : '') . "/doctemplates/supplier_invoices";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array(
|
||||
0 => array('file' => 'box_graph_invoices_supplier_permonth.php', 'enabledbydefaulton' => 'Home'),
|
||||
1 => array('file' => 'box_graph_orders_supplier_permonth.php', 'enabledbydefaulton' => 'Home'),
|
||||
2 => array('file' => 'box_fournisseurs.php', 'enabledbydefaulton' => 'Home'),
|
||||
3 => array('file' => 'box_factures_fourn_imp.php', 'enabledbydefaulton' => 'Home'),
|
||||
4 => array('file' => 'box_factures_fourn.php', 'enabledbydefaulton' => 'Home'),
|
||||
5 => array('file' => 'box_supplier_orders.php', 'enabledbydefaulton' => 'Home'),
|
||||
6 => array('file' => 'box_supplier_orders_awaiting_reception.php', 'enabledbydefaulton' => 'Home'),
|
||||
);
|
||||
$this->boxes = [
|
||||
['file' => 'box_graph_invoices_supplier_permonth.php', 'enabledbydefaulton' => 'Home'],
|
||||
['file' => 'box_graph_orders_supplier_permonth.php', 'enabledbydefaulton' => 'Home'],
|
||||
['file' => 'box_fournisseurs.php', 'enabledbydefaulton' => 'Home'],
|
||||
['file' => 'box_factures_fourn_imp.php', 'enabledbydefaulton' => 'Home'],
|
||||
['file' => 'box_factures_fourn.php', 'enabledbydefaulton' => 'Home'],
|
||||
['file' => 'box_supplier_orders.php', 'enabledbydefaulton' => 'Home'],
|
||||
['file' => 'box_supplier_orders_awaiting_reception.php', 'enabledbydefaulton' => 'Home'],
|
||||
];
|
||||
|
||||
$arraydate = dol_getdate(dol_now());
|
||||
$datestart = dol_mktime(23, 0, 0, $arraydate['mon'], $arraydate['mday'], $arraydate['year']);
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018 Charlene Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -85,36 +86,33 @@ class modHoliday extends DolibarrModules
|
|||
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->phpmin = array(7, 0); // Minimum version of PHP required by module
|
||||
$this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module
|
||||
$this->langfiles = array("holiday");
|
||||
|
||||
// Constants
|
||||
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0),
|
||||
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) );
|
||||
$this->const = array(); // List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 0 or 'allentities')
|
||||
$r = 0;
|
||||
|
||||
$this->const[$r][0] = "HOLIDAY_ADDON";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_holiday_madonna";
|
||||
$this->const[$r][3] = 'Nom du gestionnaire de numerotation des congés';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "HOLIDAY_ADDON_PDF";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "celebrate";
|
||||
$this->const[$r][3] = 'Name of PDF model of holiday';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "HOLIDAY_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/holiday";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
// List of particular constants to add when module is enabled (key, 'chaine', value, desc, visible, 0 or 'allentities')
|
||||
$this->const = [
|
||||
[
|
||||
"HOLIDAY_ADDON",
|
||||
"chaine",
|
||||
"mod_holiday_madonna",
|
||||
'Nom du gestionnaire de numerotation des congés',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"HOLIDAY_ADDON_PDF",
|
||||
"chaine",
|
||||
"celebrate",
|
||||
'Name of PDF model of holiday',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"HOLIDAY_ADDON_PDF_ODT_PATH",
|
||||
"chaine",
|
||||
"DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/holiday",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
];
|
||||
|
||||
// Array to add new pages in new tabs
|
||||
//$this->tabs[] = array('data'=>'user:+paidholidays:CPTitreMenu:holiday:$user->rights->holiday->read:/holiday/list.php?mainmenu=hrm&id=__ID__'); // We avoid to get one tab for each module. RH data are already in RH tab.
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2007 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -67,27 +68,26 @@ class modLdap extends DolibarrModules
|
|||
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->phpmin = array(7, 0); // Minimum version of PHP required by module
|
||||
|
||||
// Constants
|
||||
$this->const = array(
|
||||
0=>array('LDAP_SERVER_TYPE', 'chaine', 'openldap', '', 0),
|
||||
1=>array('LDAP_SERVER_PROTOCOLVERSION', 'chaine', '3', '', 0),
|
||||
2=>array('LDAP_SERVER_HOST', 'chaine', 'localhost', '', 0),
|
||||
3=>array('LDAP_USER_DN', 'chaine', 'ou=users,dc=example,dc=com', '', 0),
|
||||
4=>array('LDAP_GROUP_DN', 'chaine', 'ou=groups,dc=example,dc=com', '', 0),
|
||||
5=>array('LDAP_FILTER_CONNECTION', 'chaine', '&(objectClass=inetOrgPerson)', '', 0),
|
||||
6=>array('LDAP_FIELD_LOGIN', 'chaine', 'uid', '', 0),
|
||||
7=>array('LDAP_FIELD_FULLNAME', 'chaine', 'cn', '', 0),
|
||||
8=>array('LDAP_FIELD_NAME', 'chaine', 'sn', '', 0),
|
||||
9=>array('LDAP_FIELD_FIRSTNAME', 'chaine', 'givenname', '', 0),
|
||||
10=>array('LDAP_FIELD_MAIL', 'chaine', 'mail', '', 0),
|
||||
11=>array('LDAP_FIELD_PHONE', 'chaine', 'telephonenumber', '', 0),
|
||||
12=>array('LDAP_FIELD_FAX', 'chaine', 'facsimiletelephonenumber', '', 0),
|
||||
13=>array('LDAP_FIELD_MOBILE', 'chaine', 'mobile', '', 0),
|
||||
14=>array('LDAP_GROUP_FILTER', 'chaine', '&(objectClass=groupOfNames)', '', 0),
|
||||
15=>array('LDAP_USERACCOUNTCONTROL', 'int', 512, '', 0),
|
||||
);
|
||||
$this->const = [
|
||||
['LDAP_SERVER_TYPE', 'chaine', 'openldap', '', 0],
|
||||
['LDAP_SERVER_PROTOCOLVERSION', 'chaine', '3', '', 0],
|
||||
['LDAP_SERVER_HOST', 'chaine', 'localhost', '', 0],
|
||||
['LDAP_USER_DN', 'chaine', 'ou=users,dc=example,dc=com', '', 0],
|
||||
['LDAP_GROUP_DN', 'chaine', 'ou=groups,dc=example,dc=com', '', 0],
|
||||
['LDAP_FILTER_CONNECTION', 'chaine', '&(objectClass=inetOrgPerson)', '', 0],
|
||||
['LDAP_FIELD_LOGIN', 'chaine', 'uid', '', 0],
|
||||
['LDAP_FIELD_FULLNAME', 'chaine', 'cn', '', 0],
|
||||
['LDAP_FIELD_NAME', 'chaine', 'sn', '', 0],
|
||||
['LDAP_FIELD_FIRSTNAME', 'chaine', 'givenname', '', 0],
|
||||
['LDAP_FIELD_MAIL', 'chaine', 'mail', '', 0],
|
||||
['LDAP_FIELD_PHONE', 'chaine', 'telephonenumber', '', 0],
|
||||
['LDAP_FIELD_FAX', 'chaine', 'facsimiletelephonenumber', '', 0],
|
||||
['LDAP_FIELD_MOBILE', 'chaine', 'mobile', '', 0],
|
||||
['LDAP_GROUP_FILTER', 'chaine', '&(objectClass=groupOfNames)', '', 0],
|
||||
['LDAP_USERACCOUNTCONTROL', 'int', 512, '', 0],
|
||||
];
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -64,26 +65,32 @@ class modLoan extends DolibarrModules
|
|||
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->phpmin = array(7, 0); // Minimum version of PHP required by module
|
||||
$this->langfiles = array("loan");
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$this->const[0] = array(
|
||||
$this->const = [
|
||||
[
|
||||
"LOAN_ACCOUNTING_ACCOUNT_CAPITAL",
|
||||
"chaine",
|
||||
"164"
|
||||
);
|
||||
$this->const[1] = array(
|
||||
"164",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
[
|
||||
"LOAN_ACCOUNTING_ACCOUNT_INTEREST",
|
||||
"chaine",
|
||||
"6611"
|
||||
);
|
||||
$this->const[2] = array(
|
||||
"6611",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
[
|
||||
"LOAN_ACCOUNTING_ACCOUNT_INSURANCE",
|
||||
"chaine",
|
||||
"6162"
|
||||
);
|
||||
"6162",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
];
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -65,22 +66,21 @@ class modMailing extends DolibarrModules
|
|||
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->phpmin = array(7, 0); // Minimum version of PHP required by module
|
||||
$this->langfiles = array("mails");
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("mailing.php");
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r = 0;
|
||||
|
||||
$this->const[$r][0] = "MAILING_CONTACT_DEFAULT_BULK_STATUS";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "0";
|
||||
$this->const[$r][3] = 'Default value for field "Refuse bulk email" when creating a contact';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
$this->const = [
|
||||
[
|
||||
"MAILING_CONTACT_DEFAULT_BULK_STATUS",
|
||||
"chaine",
|
||||
"0",
|
||||
'Default value for field "Refuse bulk email" when creating a contact',
|
||||
0,
|
||||
],
|
||||
];
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2005-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -73,16 +74,15 @@ class modPrelevement extends DolibarrModules
|
|||
$this->config_page_url = array("prelevement.php");
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r = 0;
|
||||
|
||||
$this->const[$r][0] = "BANK_ADDON_PDF";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "sepamandate";
|
||||
$this->const[$r][3] = 'Name of manager to generate SEPA mandate';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const = [
|
||||
[
|
||||
"BANK_ADDON_PDF",
|
||||
"chaine",
|
||||
"sepamandate",
|
||||
'Name of manager to generate SEPA mandate',
|
||||
0,
|
||||
],
|
||||
];
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018 Quentin Vial-Gouteyron <quentin.vial-gouteyron@atm-consulting.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -58,10 +58,11 @@ class modReception extends DolibarrModules
|
|||
$this->picto = "dollyrevert";
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array("/reception/receipt",
|
||||
"/reception/receipt/temp",
|
||||
"/doctemplates/receptions"
|
||||
);
|
||||
$this->dirs = [
|
||||
"/reception/receipt",
|
||||
"/reception/receipt/temp",
|
||||
"/doctemplates/receptions"
|
||||
];
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("reception_setup.php");
|
||||
|
|
@ -73,36 +74,36 @@ class modReception extends DolibarrModules
|
|||
$this->langfiles = array('receptions');
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r = 0;
|
||||
|
||||
$this->const[$r][0] = "RECEPTION_ADDON_PDF";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "squille";
|
||||
$this->const[$r][3] = 'Nom du gestionnaire de generation des bons receptions en PDF';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "RECEPTION_ADDON_NUMBER";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_reception_beryl";
|
||||
$this->const[$r][3] = 'Name for numbering manager for receptions';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "RECEPTION_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/receptions";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "MAIN_SUBMODULE_RECEPTION";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "1";
|
||||
$this->const[$r][3] = "Enable receptions";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
$this->const = [
|
||||
[
|
||||
"RECEPTION_ADDON_PDF",
|
||||
"chaine",
|
||||
"squille",
|
||||
'Nom du gestionnaire de generation des bons receptions en PDF',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"RECEPTION_ADDON_NUMBER",
|
||||
"chaine",
|
||||
"mod_reception_beryl",
|
||||
'Name for numbering manager for receptions',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"RECEPTION_ADDON_PDF_ODT_PATH",
|
||||
"chaine",
|
||||
"DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/receptions",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
[
|
||||
"MAIN_SUBMODULE_RECEPTION",
|
||||
"chaine",
|
||||
"1",
|
||||
"Enable receptions",
|
||||
0,
|
||||
],
|
||||
];
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
* Copyright (C) 2012-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -76,61 +76,59 @@ class modSociete extends DolibarrModules
|
|||
$this->langfiles = array("companies", 'bills', "compta", "admin", "banks");
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r = 0;
|
||||
|
||||
$this->const[$r][0] = "SOCIETE_CODECLIENT_ADDON";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_codeclient_monkey";
|
||||
$this->const[$r][3] = 'Module to control third parties codes';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "SOCIETE_CODECOMPTA_ADDON";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_codecompta_panicum";
|
||||
$this->const[$r][3] = 'Module to control third parties codes';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "SOCIETE_FISCAL_MONTH_START";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "1";
|
||||
$this->const[$r][3] = "Enter the month number of the first month of the fiscal year, e. g. 9 for September";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "COMPANY_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/thirdparties";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
/*
|
||||
$this->const[$r][0] = "COMPANY_HIDE_INACTIVE_IN_COMBOBOX";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "0";
|
||||
$this->const[$r][3] = "hide thirdparty customer inative in combobox";
|
||||
$this->const[$r][4] = 1;
|
||||
$r++;
|
||||
*/
|
||||
|
||||
$this->const[$r][0] = "SOCIETE_ADD_REF_IN_LIST";
|
||||
$this->const[$r][1] = "yesno";
|
||||
$this->const[$r][2] = "0";
|
||||
$this->const[$r][3] = "Display customer ref into select list";
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
$this->const = [
|
||||
[
|
||||
"SOCIETE_CODECLIENT_ADDON",
|
||||
"chaine",
|
||||
"mod_codeclient_monkey",
|
||||
'Module to control third parties codes',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"SOCIETE_CODECOMPTA_ADDON",
|
||||
"chaine",
|
||||
"mod_codecompta_panicum",
|
||||
'Module to control third parties codes',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"SOCIETE_FISCAL_MONTH_START",
|
||||
"chaine",
|
||||
"1",
|
||||
"Enter the month number of the first month of the fiscal year, e. g. 9 for September",
|
||||
0,
|
||||
],
|
||||
[
|
||||
"COMPANY_ADDON_PDF_ODT_PATH",
|
||||
"chaine",
|
||||
"DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/thirdparties",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
// [
|
||||
// "COMPANY_HIDE_INACTIVE_IN_COMBOBOX",
|
||||
// "chaine",
|
||||
// "0",
|
||||
// "hide thirdparty customer inative in combobox",
|
||||
// 1,
|
||||
// ],
|
||||
[
|
||||
"SOCIETE_ADD_REF_IN_LIST",
|
||||
"yesno",
|
||||
"0",
|
||||
"Display customer ref into select list",
|
||||
0,
|
||||
],
|
||||
];
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array(
|
||||
0 => array('file' => 'box_clients.php', 'enabledbydefaulton' => 'Home'),
|
||||
1 => array('file' => 'box_prospect.php', 'enabledbydefaulton' => 'Home'),
|
||||
2 => array('file' => 'box_contacts.php', 'enabledbydefaulton' => 'Home'),
|
||||
3 => array('file' => 'box_activity.php', 'enabledbydefaulton' => 'Home', 'note' => '(WarningUsingThisBoxSlowDown)'),
|
||||
4 => array('file' => 'box_goodcustomers.php', 'enabledbydefaulton' => 'Home', 'note' => '(WarningUsingThisBoxSlowDown)'),
|
||||
);
|
||||
$this->boxes = [
|
||||
['file' => 'box_clients.php', 'enabledbydefaulton' => 'Home'],
|
||||
['file' => 'box_prospect.php', 'enabledbydefaulton' => 'Home'],
|
||||
['file' => 'box_contacts.php', 'enabledbydefaulton' => 'Home'],
|
||||
['file' => 'box_activity.php', 'enabledbydefaulton' => 'Home', 'note' => '(WarningUsingThisBoxSlowDown)'],
|
||||
['file' => 'box_goodcustomers.php', 'enabledbydefaulton' => 'Home', 'note' => '(WarningUsingThisBoxSlowDown)'],
|
||||
];
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
|
|
|
|||
|
|
@ -70,7 +70,7 @@ class modStock extends DolibarrModules
|
|||
$this->hidden = false; // A condition to hide module
|
||||
$this->depends = array("modProduct"); // List of module class names as string that must be enabled if this module is enabled
|
||||
$this->requiredby = array("modProductBatch"); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->conflictwith = []; // List of module class names as string this module is in conflict with
|
||||
$this->langfiles = array("stocks");
|
||||
|
||||
// Constants
|
||||
|
|
@ -113,10 +113,10 @@ class modStock extends DolibarrModules
|
|||
];
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
$this->boxes = [];
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights = [];
|
||||
$this->rights_class = 'stock';
|
||||
|
||||
$r = 0;
|
||||
|
|
@ -209,7 +209,7 @@ class modStock extends DolibarrModules
|
|||
}
|
||||
|
||||
// Main menu entries
|
||||
$this->menu = array(); // List of menus to add
|
||||
$this->menu = []; // List of menus to add
|
||||
$r = 0;
|
||||
|
||||
// Menus
|
||||
|
|
@ -237,8 +237,8 @@ class modStock extends DolibarrModules
|
|||
'd.code_departement' => 'List:c_departements:code_departement:code_departement:', 'c.code' => 'List:c_country:code:code:',
|
||||
'e.phone' => 'Text', 'e.fax' => 'Text', 'e.statut' => 'Text', 'pe.rowid' => 'List:entrepot:ref:rowid:stock', 'pe.ref' => 'Text'
|
||||
);
|
||||
$this->export_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into export_icon
|
||||
$this->export_aggregate_array[$r] = array(); // TODO Not used yet
|
||||
$this->export_entities_array[$r] = []; // We define here only fields that use another icon that the one defined into export_icon
|
||||
$this->export_aggregate_array[$r] = []; // TODO Not used yet
|
||||
$keyforselect = 'entrepot';
|
||||
$keyforelement = 'entrepot';
|
||||
$keyforaliasextra = 'extra';
|
||||
|
|
@ -477,7 +477,7 @@ class modStock extends DolibarrModules
|
|||
$this->import_code[$r] = $this->rights_class.'_'.$r;
|
||||
$this->import_label[$r] = "Warehouses"; // Translation key
|
||||
$this->import_icon[$r] = "warehouse";
|
||||
$this->import_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into import_icon
|
||||
$this->import_entities_array[$r] = []; // We define here only fields that use another icon that the one defined into import_icon
|
||||
$this->import_tables_array[$r] = array('e' => MAIN_DB_PREFIX.'entrepot', 'extra' => MAIN_DB_PREFIX.'entrepot_extrafields');
|
||||
$this->import_tables_creator_array[$r] = array('e' => 'fk_user_author');
|
||||
$this->import_fields_array[$r] = array('e.ref' => "LocationSummary*",
|
||||
|
|
@ -500,7 +500,7 @@ class modStock extends DolibarrModules
|
|||
);
|
||||
$this->import_regex_array[$r] = array('e.statut' => '^[0|1]');
|
||||
// Add extra fields
|
||||
$import_extrafield_sample = array();
|
||||
$import_extrafield_sample = [];
|
||||
$sql = "SELECT name, label, fieldrequired FROM ".MAIN_DB_PREFIX."extrafields WHERE type <> 'separate' AND elementtype = 'entrepot' AND entity IN (0, ".$conf->entity.")";
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql) { // This can fail when class is used on old database (during migration for example)
|
||||
|
|
@ -533,7 +533,7 @@ class modStock extends DolibarrModules
|
|||
$this->import_code[$r] = $this->rights_class.'_'.$r;
|
||||
$this->import_label[$r] = "Stocks"; // Translation key
|
||||
$this->import_icon[$r] = "stock";
|
||||
$this->import_entities_array[$r] = array(); // We define here only fields that use another icon that the one defined into import_icon
|
||||
$this->import_entities_array[$r] = []; // We define here only fields that use another icon that the one defined into import_icon
|
||||
$this->import_tables_array[$r] = array('ps' => MAIN_DB_PREFIX.'product_stock');
|
||||
$this->import_fields_array[$r] = array('ps.fk_product' => "Product*", 'ps.fk_entrepot' => "Warehouse*", 'ps.reel' => "Stock*");
|
||||
|
||||
|
|
@ -587,7 +587,7 @@ class modStock extends DolibarrModules
|
|||
}
|
||||
}
|
||||
|
||||
$sql = array();
|
||||
$sql = [];
|
||||
|
||||
$sql = array(
|
||||
"DELETE FROM ".MAIN_DB_PREFIX."document_model WHERE nom = '".$this->db->escape($this->const[1][2])."' AND type = 'stock' AND entity = ".((int) $conf->entity),
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2026 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
|
|
@ -122,12 +122,12 @@ class modStockTransfer extends DolibarrModules
|
|||
$this->hidden = false;
|
||||
// List of module class names as string that must be enabled if this module is enabled. Example: array('always'=>array('modModuleToEnable1','modModuleToEnable2'), 'FR'=>array('modModuleToEnableFR'...))
|
||||
$this->depends = array('modStock', 'modProduct');
|
||||
$this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
|
||||
$this->requiredby = []; // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
|
||||
$this->conflictwith = []; // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
|
||||
$this->langfiles = array("stocktransfer@stocktransfer");
|
||||
$this->phpmin = array(7, 0); // Minimum version of PHP required by module
|
||||
$this->warnings_activation = array();
|
||||
$this->warnings_activation_ext = array();
|
||||
$this->warnings_activation = [];
|
||||
$this->warnings_activation_ext = [];
|
||||
//$this->automatic_activation = array('FR'=>'StockTransferWasAutomaticallyActivatedBecauseOfYourCountryChoice');
|
||||
|
||||
// Constants
|
||||
|
|
@ -135,7 +135,7 @@ class modStockTransfer extends DolibarrModules
|
|||
// Example: $this->const=array(1 => array('STOCKTRANSFER_MYNEWCONST1', 'chaine', 'myvalue', 'This is a constant to add', 1),
|
||||
// 2 => array('STOCKTRANSFER_MYNEWCONST2', 'chaine', 'myvalue', 'This is another constant to add', 0, 'current', 1)
|
||||
// );
|
||||
$this->const = array();
|
||||
$this->const = [];
|
||||
|
||||
if (!isset($conf->stocktransfer) || !isset($conf->stocktransfer->enabled)) {
|
||||
$conf->stocktransfer = new stdClass();
|
||||
|
|
@ -143,7 +143,7 @@ class modStockTransfer extends DolibarrModules
|
|||
}
|
||||
|
||||
// Array to add new pages in new tabs
|
||||
$this->tabs = array();
|
||||
$this->tabs = [];
|
||||
// Example:
|
||||
// $this->tabs[] = array('data'=>'objecttype:+tabname1:Title1:mylangfile@stocktransfer:$user->rights->stocktransfer->read:/stocktransfer/mynewtab1.php?id=__ID__'); // To add a new tab identified by code tabname1
|
||||
// $this->tabs[] = array('data'=>'objecttype:+tabname2:SUBSTITUTION_Title2:mylangfile@stocktransfer:$user->rights->othermodule->read:/stocktransfer/mynewtab2.php?id=__ID__', // To add another new tab identified by code tabname2. Label will be result of calling all substitution functions on 'Title2' key.
|
||||
|
|
@ -171,7 +171,7 @@ class modStockTransfer extends DolibarrModules
|
|||
// 'user' to add a tab in user view
|
||||
|
||||
// Dictionaries
|
||||
$this->dictionaries = array();
|
||||
$this->dictionaries = [];
|
||||
/* Example:
|
||||
$this->dictionaries=array(
|
||||
'langs'=>'stocktransfer@stocktransfer',
|
||||
|
|
@ -231,7 +231,7 @@ class modStockTransfer extends DolibarrModules
|
|||
// );
|
||||
|
||||
// Permissions provided by this module
|
||||
$this->rights = array();
|
||||
$this->rights = [];
|
||||
$r = 10;
|
||||
// Add here entries to declare new permissions
|
||||
/* BEGIN MODULEBUILDER PERMISSIONS */
|
||||
|
|
@ -254,7 +254,7 @@ class modStockTransfer extends DolibarrModules
|
|||
|
||||
// Main menu entries to add
|
||||
$langs->load('stocktransfer@stocktransfer');
|
||||
$this->menu = array();
|
||||
$this->menu = [];
|
||||
$r = 0;
|
||||
// Add here entries to declare new menus
|
||||
/* BEGIN MODULEBUILDER TOPMENU */
|
||||
|
|
@ -433,7 +433,7 @@ class modStockTransfer extends DolibarrModules
|
|||
// Permissions
|
||||
$this->remove($options);
|
||||
|
||||
$sql = array();
|
||||
$sql = [];
|
||||
|
||||
// Roles
|
||||
$resql = $this->db->query("SELECT rowid FROM ".MAIN_DB_PREFIX."c_type_contact WHERE code = 'STDEST' AND element = 'stocktransfer' AND source = 'internal'");
|
||||
|
|
@ -490,7 +490,7 @@ class modStockTransfer extends DolibarrModules
|
|||
*/
|
||||
public function remove($options = '')
|
||||
{
|
||||
$sql = array();
|
||||
$sql = [];
|
||||
return $this->_remove($sql, $options);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -60,7 +60,7 @@ class modSupplierProposal extends DolibarrModules
|
|||
$this->picto = 'supplier_proposal';
|
||||
|
||||
// Data directories to create when module is enabled.
|
||||
$this->dirs = array();
|
||||
$this->dirs = [];
|
||||
|
||||
// Config pages. Put here list of php page names stored in admin directory used to setup module.
|
||||
$this->config_page_url = array("supplier_proposal.php@supplier_proposal");
|
||||
|
|
@ -72,40 +72,39 @@ class modSupplierProposal extends DolibarrModules
|
|||
} else {
|
||||
$this->depends = array('modFournisseur'); // List of module class names as string that must be enabled if this module is enabled
|
||||
}
|
||||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->phpmin = array(7, 0); // Minimum version of PHP required by module
|
||||
$this->requiredby = []; // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = []; // List of module class names as string this module is in conflict with
|
||||
$this->langfiles = array("supplier_proposal");
|
||||
|
||||
// Constants
|
||||
$this->const = array();
|
||||
$r = 0;
|
||||
|
||||
$this->const[$r][0] = "SUPPLIER_PROPOSAL_ADDON_PDF";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "aurore";
|
||||
$this->const[$r][3] = 'Name of submodule to generate PDF for supplier quotation request';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "SUPPLIER_PROPOSAL_ADDON";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "mod_supplier_proposal_marbre";
|
||||
$this->const[$r][3] = 'Name of submodule to number supplier quotation request';
|
||||
$this->const[$r][4] = 0;
|
||||
$r++;
|
||||
|
||||
$this->const[$r][0] = "SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH";
|
||||
$this->const[$r][1] = "chaine";
|
||||
$this->const[$r][2] = "DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/supplier_proposals";
|
||||
$this->const[$r][3] = "";
|
||||
$this->const[$r][4] = 0;
|
||||
|
||||
$this->const = [
|
||||
[
|
||||
"SUPPLIER_PROPOSAL_ADDON_PDF",
|
||||
"chaine",
|
||||
"aurore",
|
||||
'Name of submodule to generate PDF for supplier quotation request',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"SUPPLIER_PROPOSAL_ADDON",
|
||||
"chaine",
|
||||
"mod_supplier_proposal_marbre",
|
||||
'Name of submodule to number supplier quotation request',
|
||||
0,
|
||||
],
|
||||
[
|
||||
"SUPPLIER_PROPOSAL_ADDON_PDF_ODT_PATH",
|
||||
"chaine",
|
||||
"DOL_DATA_ROOT".($conf->entity > 1 ? '/'.$conf->entity : '')."/doctemplates/supplier_proposals",
|
||||
"",
|
||||
0,
|
||||
],
|
||||
];
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
$this->boxes = [];
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
$this->rights = [];
|
||||
$this->rights_class = 'supplier_proposal';
|
||||
$r = 0;
|
||||
|
||||
|
|
@ -146,7 +145,7 @@ class modSupplierProposal extends DolibarrModules
|
|||
$this->rights[$r][4] = 'cloturer';
|
||||
|
||||
// Main menu entries
|
||||
$this->menu = array(); // List of menus to add
|
||||
$this->menu = []; // List of menus to add
|
||||
$r = 0;
|
||||
}
|
||||
|
||||
|
|
@ -166,7 +165,7 @@ class modSupplierProposal extends DolibarrModules
|
|||
// Remove permissions and default values
|
||||
$this->remove($options);
|
||||
|
||||
//ODT template
|
||||
// ODT template
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/supplier_proposals/template_supplier_proposal.odt';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/supplier_proposals';
|
||||
$dest = $dirodt.'/template_supplier_proposal.odt';
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2018 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 SuperAdmin
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -80,16 +80,16 @@ class modTakePos extends DolibarrModules
|
|||
// for specific path of parts (eg: /takepos/core/modules/barcode)
|
||||
// for specific css file (eg: /takepos/css/takepos.css.php)
|
||||
$this->module_parts = array(
|
||||
'triggers' => 0, // Set this to 1 if module has its own trigger directory (core/triggers)
|
||||
'login' => 0, // Set this to 1 if module has its own login method file (core/login)
|
||||
'substitutions' => 1, // Set this to 1 if module has its own substitution function file (core/substitutions)
|
||||
'menus' => 0, // Set this to 1 if module has its own menus handler directory (core/menus)
|
||||
'theme' => 0, // Set this to 1 if module has its own theme directory (theme)
|
||||
'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl)
|
||||
'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode)
|
||||
'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
|
||||
'hooks' => array() // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all'
|
||||
);
|
||||
'triggers' => 0, // Set this to 1 if module has its own trigger directory (core/triggers)
|
||||
'login' => 0, // Set this to 1 if module has its own login method file (core/login)
|
||||
'substitutions' => 1, // Set this to 1 if module has its own substitution function file (core/substitutions)
|
||||
'menus' => 0, // Set this to 1 if module has its own menus handler directory (core/menus)
|
||||
'theme' => 0, // Set this to 1 if module has its own theme directory (theme)
|
||||
'tpl' => 0, // Set this to 1 if module overwrite template dir (core/tpl)
|
||||
'barcode' => 0, // Set this to 1 if module has its own barcode directory (core/modules/barcode)
|
||||
'models' => 0, // Set this to 1 if module has its own models directory (core/modules/xxx)
|
||||
'hooks' => array() // Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all'
|
||||
);
|
||||
|
||||
// Data directories to create when module is enabled.
|
||||
// Example: this->dirs = array("/takepos/temp","/takepos/subdir");
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2004 Sebastien Di Cintio <sdicintio@ressource-toi.org>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -70,7 +71,6 @@ class modTax extends DolibarrModules
|
|||
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->phpmin = array(7, 0); // Minimum version of PHP required by module
|
||||
$this->langfiles = array("compta", "bills");
|
||||
|
||||
// Constants
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io>
|
||||
/* Copyright (C) 2013-2018 Jean-François FERRY <hello@librethic.io>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -81,54 +81,53 @@ class modTicket extends DolibarrModules
|
|||
// for default path (eg: /ticket/core/xxxxx) (0=disable, 1=enable)
|
||||
// for specific path of parts (eg: /ticket/core/modules/barcode)
|
||||
// for specific css file (eg: /ticket/css/ticket.css.php)
|
||||
$this->module_parts = array(
|
||||
$this->module_parts = [
|
||||
// Set this to 1 if module has its own trigger directory
|
||||
'triggers' => 1,
|
||||
);
|
||||
];
|
||||
|
||||
// Data directories to create when module is enabled.
|
||||
// Example: this->dirs = array("/ticket/temp");
|
||||
$this->dirs = array();
|
||||
// Example: this->dirs = ["/ticket/temp"];
|
||||
$this->dirs = [];
|
||||
|
||||
// Config pages. Put here list of php pages
|
||||
// stored into ticket/admin directory, used to setup module.
|
||||
$this->config_page_url = array("ticket.php");
|
||||
$this->config_page_url = ["ticket.php"];
|
||||
|
||||
// Dependencies
|
||||
$this->hidden = false; // A condition to hide module
|
||||
$this->depends = array('modAgenda'); // List of module class names as string that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->phpmin = array(7, 0); // Minimum version of PHP required by module
|
||||
$this->langfiles = array("ticket");
|
||||
$this->depends = ['modAgenda']; // List of module class names as string that must be enabled if this module is enabled
|
||||
$this->requiredby = []; // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = []; // List of module class names as string this module is in conflict with
|
||||
$this->langfiles = ["ticket"];
|
||||
|
||||
// Constants
|
||||
// List of particular constants to add when module is enabled
|
||||
// (key, 'chaine', value, desc, visible, 'current' or 'allentities', deleteonunactive)
|
||||
// Example:
|
||||
$default_footer = $langs->trans('TicketMessageMailFooterText', getDolGlobalString('MAIN_INFO_SOCIETE_NOM'));
|
||||
$this->const = array(
|
||||
1 => array('TICKET_ENABLE_PUBLIC_INTERFACE', 'chaine', '0', 'Enable ticket public interface', 0),
|
||||
2 => array('TICKET_ADDON', 'chaine', 'mod_ticket_simple', 'Ticket ref module', 0),
|
||||
3 => array('TICKET_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT'.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/tickets', 'Ticket templates ODT/ODS directory for templates', 0),
|
||||
4 => array('TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', 'chaine', 0, 'Automatically mark ticket as read when created from backend', 0),
|
||||
5 => array('TICKET_DELAY_BEFORE_FIRST_RESPONSE', 'chaine', '0', 'Maximum wanted elapsed time before a first answer to a ticket (in hours). Display a warning in tickets list if not respected.', 0),
|
||||
6 => array('TICKET_DELAY_SINCE_LAST_RESPONSE', 'chaine', '0', 'Maximum wanted elapsed time between two answers on the same ticket (in hours). Display a warning in tickets list if not respected.', 0),
|
||||
7 => array('TICKET_NOTIFY_AT_CLOSING', 'chaine', '0', 'Default notify contacts when closing a module', 0),
|
||||
8 => array('TICKET_PRODUCT_CATEGORY', 'chaine', 0, 'The category of product that is being used to find contract to link to created ticket', 0),
|
||||
9 => array('TICKET_NOTIFICATION_EMAIL_FROM', 'chaine', getDolGlobalString('MAIN_MAIL_EMAIL_FROM'), 'Email to use by default as sender for messages sent from Dolibarr', 0),
|
||||
10 => array('TICKET_MESSAGE_MAIL_INTRO', 'chaine', $langs->trans('TicketMessageMailIntroText'), 'Introduction text of ticket replies sent from Dolibarr', 0),
|
||||
11 => array('TICKET_MESSAGE_MAIL_SIGNATURE', 'chaine', $default_footer, 'Signature to use by default for messages sent from Dolibarr', 0),
|
||||
12 => array('MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER', 'chaine', "1", 'Disable the rendering of headers in tickets', 0),
|
||||
13 => array('MAIN_SECURITY_ENABLECAPTCHA_TICKET', 'chaine', getDolGlobalInt('MAIN_SECURITY_ENABLECAPTCHA_TICKET'), 'Enable captcha code by default', 0),
|
||||
14 => array('TICKET_SHOW_COMPANY_LOGO', 'chaine', getDolGlobalInt('TICKET_SHOW_COMPANY_LOGO', 1), 'Enable logo header on ticket public page', 0),
|
||||
15 => array('TICKET_SHOW_COMPANY_FOOTER', 'chaine', getDolGlobalInt('TICKET_SHOW_COMPANY_FOOTER', 1), 'Enable footer on ticket public page', 0)
|
||||
);
|
||||
$this->const = [
|
||||
['TICKET_ENABLE_PUBLIC_INTERFACE', 'chaine', '0', 'Enable ticket public interface', 0],
|
||||
['TICKET_ADDON', 'chaine', 'mod_ticket_simple', 'Ticket ref module', 0],
|
||||
['TICKET_ADDON_PDF_ODT_PATH', 'chaine', 'DOL_DATA_ROOT'.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/tickets', 'Ticket templates ODT/ODS directory for templates', 0],
|
||||
['TICKET_AUTO_READ_WHEN_CREATED_FROM_BACKEND', 'chaine', 0, 'Automatically mark ticket as read when created from backend', 0],
|
||||
['TICKET_DELAY_BEFORE_FIRST_RESPONSE', 'chaine', '0', 'Maximum wanted elapsed time before a first answer to a ticket (in hours). Display a warning in tickets list if not respected.', 0],
|
||||
['TICKET_DELAY_SINCE_LAST_RESPONSE', 'chaine', '0', 'Maximum wanted elapsed time between two answers on the same ticket (in hours). Display a warning in tickets list if not respected.', 0],
|
||||
['TICKET_NOTIFY_AT_CLOSING', 'chaine', '0', 'Default notify contacts when closing a module', 0],
|
||||
['TICKET_PRODUCT_CATEGORY', 'chaine', 0, 'The category of product that is being used to find contract to link to created ticket', 0],
|
||||
['TICKET_NOTIFICATION_EMAIL_FROM', 'chaine', getDolGlobalString('MAIN_MAIL_EMAIL_FROM'), 'Email to use by default as sender for messages sent from Dolibarr', 0],
|
||||
['TICKET_MESSAGE_MAIL_INTRO', 'chaine', $langs->trans('TicketMessageMailIntroText'), 'Introduction text of ticket replies sent from Dolibarr', 0],
|
||||
['TICKET_MESSAGE_MAIL_SIGNATURE', 'chaine', $default_footer, 'Signature to use by default for messages sent from Dolibarr', 0],
|
||||
['MAIN_EMAILCOLLECTOR_MAIL_WITHOUT_HEADER', 'chaine', "1", 'Disable the rendering of headers in tickets', 0],
|
||||
['MAIN_SECURITY_ENABLECAPTCHA_TICKET', 'chaine', getDolGlobalInt('MAIN_SECURITY_ENABLECAPTCHA_TICKET'), 'Enable captcha code by default', 0],
|
||||
['TICKET_SHOW_COMPANY_LOGO', 'chaine', getDolGlobalInt('TICKET_SHOW_COMPANY_LOGO', 1), 'Enable logo header on ticket public page', 0],
|
||||
['TICKET_SHOW_COMPANY_FOOTER', 'chaine', getDolGlobalInt('TICKET_SHOW_COMPANY_FOOTER', 1), 'Enable footer on ticket public page', 0],
|
||||
];
|
||||
|
||||
/*
|
||||
$this->tabs = array(
|
||||
$this->tabs = [
|
||||
'thirdparty:+ticket:Tickets:ticket:$user->hasRight("ticket","read"):/ticket/list.php?socid=__ID__',
|
||||
);
|
||||
];
|
||||
*/
|
||||
|
||||
// Dictionaries
|
||||
|
|
@ -139,7 +138,7 @@ class modTicket extends DolibarrModules
|
|||
|
||||
// Dictionary of ticket types
|
||||
$this->declareNewDictionary(
|
||||
array(
|
||||
[
|
||||
'name' => 'c_ticket_type',
|
||||
'lib' => 'TicketDictType',
|
||||
'sql' => 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default, f.entity FROM '.$this->db->prefix().'c_ticket_type as f WHERE f.entity IN ('.getEntity('c_ticket_type').')',
|
||||
|
|
@ -149,13 +148,13 @@ class modTicket extends DolibarrModules
|
|||
'fieldinsert' => 'code,label,pos,use_default,entity',
|
||||
'rowid' => 'rowid',
|
||||
'cond' => isModEnabled('ticket'),
|
||||
'help' => array('code' => $langs->trans('EnterAnyCode'), 'use_default' => $langs->trans('EnterYesOrNo'))
|
||||
)
|
||||
'help' => ['code' => $langs->trans('EnterAnyCode'), 'use_default' => $langs->trans('EnterYesOrNo')],
|
||||
]
|
||||
);
|
||||
|
||||
// Dictionary of ticket severities
|
||||
$this->declareNewDictionary(
|
||||
array(
|
||||
[
|
||||
'name' => 'c_ticket_severity',
|
||||
'lib' => 'TicketDictSeverity',
|
||||
'sql' => 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default, f.entity FROM '.$this->db->prefix().'c_ticket_severity as f WHERE f.entity IN ('.getEntity('c_ticket_severity').')',
|
||||
|
|
@ -165,13 +164,16 @@ class modTicket extends DolibarrModules
|
|||
'fieldinsert' => 'code,label,pos,use_default,entity',
|
||||
'rowid' => 'rowid',
|
||||
'cond' => isModEnabled('ticket'),
|
||||
'help' => array('code' => $langs->trans('EnterAnyCode'), 'use_default' => $langs->trans('EnterYesOrNo'))
|
||||
)
|
||||
'help' => [
|
||||
'code' => $langs->trans('EnterAnyCode'),
|
||||
'use_default' => $langs->trans('EnterYesOrNo'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Dictionary of ticket categories
|
||||
$this->declareNewDictionary(
|
||||
array(
|
||||
[
|
||||
'name' => 'c_ticket_category',
|
||||
'lib' => 'TicketDictCategory',
|
||||
'sql' => 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default, f.public, f.fk_parent, f.entity FROM '.$this->db->prefix().'c_ticket_category as f WHERE f.entity IN ('.getEntity('c_ticket_category').')',
|
||||
|
|
@ -181,18 +183,18 @@ class modTicket extends DolibarrModules
|
|||
'fieldinsert' => 'code,label,pos,use_default,public,fk_parent,entity',
|
||||
'rowid' => 'rowid',
|
||||
'cond' => isModEnabled('ticket'),
|
||||
'help' => array(
|
||||
'help' => [
|
||||
'code' => $langs->trans('EnterAnyCode'),
|
||||
'use_default' => $langs->trans('EnterYesOrNo'),
|
||||
'public' => $langs->trans('Enter0or1').'<br>'.$langs->trans('TicketGroupIsPublicDesc'),
|
||||
'fk_parent' => $langs->trans('IfThisCategoryIsChildOfAnother')
|
||||
)
|
||||
)
|
||||
'fk_parent' => $langs->trans('IfThisCategoryIsChildOfAnother'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Dictionary of ticket resolutions (apparently unused except if TICKET_ENABLE_RESOLUTION is on)
|
||||
$this->declareNewDictionary(
|
||||
array(
|
||||
[
|
||||
'name' => 'c_ticket_resolution',
|
||||
'lib' => 'TicketDictResolution',
|
||||
'sql' => 'SELECT f.rowid as rowid, f.code, f.pos, f.label, f.active, f.use_default, f.entity FROM '.$this->db->prefix().'c_ticket_resolution as f WHERE f.entity IN ('.getEntity('c_ticket_resolution').')',
|
||||
|
|
@ -202,23 +204,26 @@ class modTicket extends DolibarrModules
|
|||
'fieldinsert' => 'code,label,pos,use_default,entity',
|
||||
'rowid' => 'rowid',
|
||||
'cond' => isModEnabled('ticket') && getDolGlobalString('TICKET_ENABLE_RESOLUTION'),
|
||||
'help' => array('code' => $langs->trans('EnterAnyCode'), 'use_default' => $langs->trans('Enter0or1'))
|
||||
)
|
||||
'help' => [
|
||||
'code' => $langs->trans('EnterAnyCode'),
|
||||
'use_default' => $langs->trans('Enter0or1'),
|
||||
],
|
||||
]
|
||||
);
|
||||
|
||||
// Boxes
|
||||
// Add here list of php file(s) stored in core/boxes that contains class to show a box.
|
||||
$this->boxes = array(
|
||||
0 => array('file' => 'box_last_ticket.php', 'enabledbydefaulton' => 'Home'),
|
||||
1 => array('file' => 'box_last_modified_ticket.php', 'enabledbydefaulton' => 'Home'),
|
||||
2 => array('file' => 'box_graph_ticket_by_severity.php', 'enabledbydefaulton' => 'ticketindex'),
|
||||
3 => array('file' => 'box_graph_nb_ticket_last_x_days.php', 'enabledbydefaulton' => 'ticketindex'),
|
||||
4 => array('file' => 'box_graph_nb_tickets_type.php', 'enabledbydefaulton' => 'ticketindex'),
|
||||
5 => array('file' => 'box_new_vs_close_ticket.php', 'enabledbydefaulton' => 'ticketindex')
|
||||
); // Boxes list
|
||||
$this->boxes = [
|
||||
['file' => 'box_last_ticket.php', 'enabledbydefaulton' => 'Home'],
|
||||
['file' => 'box_last_modified_ticket.php', 'enabledbydefaulton' => 'Home'],
|
||||
['file' => 'box_graph_ticket_by_severity.php', 'enabledbydefaulton' => 'ticketindex'],
|
||||
['file' => 'box_graph_nb_ticket_last_x_days.php', 'enabledbydefaulton' => 'ticketindex'],
|
||||
['file' => 'box_graph_nb_tickets_type.php', 'enabledbydefaulton' => 'ticketindex'],
|
||||
['file' => 'box_new_vs_close_ticket.php', 'enabledbydefaulton' => 'ticketindex'],
|
||||
];
|
||||
|
||||
// Permissions
|
||||
$this->rights = array(); // Permission array used by this module
|
||||
$this->rights = []; // Permission array used by this module
|
||||
|
||||
$r = 0;
|
||||
$this->rights[$r][0] = 56001; // id de la permission
|
||||
|
|
@ -266,25 +271,11 @@ class modTicket extends DolibarrModules
|
|||
*/
|
||||
|
||||
// Main menu entries
|
||||
$this->menu = array(); // List of menus to add
|
||||
$this->menu = []; // List of menus to add
|
||||
$r = 0;
|
||||
|
||||
/*$this->menu[$r] = array('fk_menu' => 0, // Put 0 if this is a top menu
|
||||
'type' => 'top', // This is a Top menu entry
|
||||
'titre' => 'Ticket',
|
||||
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'),
|
||||
'mainmenu' => 'ticket',
|
||||
'leftmenu' => '1', // Use 1 if you also want to add left menu entries using this descriptor.
|
||||
'url' => '/ticket/index.php',
|
||||
'langs' => 'ticket', // Lang file to use (without .lang) by module. File must be in langs/code_CODE/ directory.
|
||||
'position' => 88,
|
||||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->hasRight("ticket","read")',
|
||||
'target' => '',
|
||||
'user' => 2); // 0=Menu for internal users, 1=external users, 2=both
|
||||
$r++;*/
|
||||
|
||||
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket',
|
||||
$this->menu[$r] = [
|
||||
'fk_menu' => 'fk_mainmenu=ticket',
|
||||
'type' => 'left',
|
||||
'titre' => 'Ticket',
|
||||
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth em092"'),
|
||||
|
|
@ -296,10 +287,12 @@ class modTicket extends DolibarrModules
|
|||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->hasRight("ticket","read")',
|
||||
'target' => '',
|
||||
'user' => 2);
|
||||
'user' => 2,
|
||||
];
|
||||
$r++;
|
||||
|
||||
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
||||
$this->menu[$r] = [
|
||||
'fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
||||
'type' => 'left',
|
||||
'titre' => 'NewTicket',
|
||||
'mainmenu' => 'ticket',
|
||||
|
|
@ -309,10 +302,12 @@ class modTicket extends DolibarrModules
|
|||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->hasRight("ticket", "write")',
|
||||
'target' => '',
|
||||
'user' => 2);
|
||||
'user' => 2,
|
||||
];
|
||||
$r++;
|
||||
|
||||
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
||||
$this->menu[$r] = [
|
||||
'fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
||||
'type' => 'left',
|
||||
'titre' => 'List',
|
||||
'mainmenu' => 'ticket',
|
||||
|
|
@ -323,10 +318,12 @@ class modTicket extends DolibarrModules
|
|||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->hasRight("ticket","read")',
|
||||
'target' => '',
|
||||
'user' => 2);
|
||||
'user' => 2,
|
||||
];
|
||||
$r++;
|
||||
|
||||
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
||||
$this->menu[$r] = [
|
||||
'fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
||||
'type' => 'left',
|
||||
'titre' => 'MenuTicketMyAssign',
|
||||
'mainmenu' => 'ticket',
|
||||
|
|
@ -337,10 +334,12 @@ class modTicket extends DolibarrModules
|
|||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->hasRight("ticket","read")',
|
||||
'target' => '',
|
||||
'user' => 0);
|
||||
'user' => 0,
|
||||
];
|
||||
$r++;
|
||||
|
||||
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
||||
$this->menu[$r] = [
|
||||
'fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
||||
'type' => 'left',
|
||||
'titre' => 'Statistics',
|
||||
'mainmenu' => 'ticket',
|
||||
|
|
@ -350,10 +349,12 @@ class modTicket extends DolibarrModules
|
|||
'enabled' => 'isModEnabled("ticket")',
|
||||
'perms' => '$user->hasRight("ticket","read")',
|
||||
'target' => '',
|
||||
'user' => 0);
|
||||
'user' => 0,
|
||||
];
|
||||
$r++;
|
||||
|
||||
$this->menu[$r] = array('fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
||||
$this->menu[$r] = [
|
||||
'fk_menu' => 'fk_mainmenu=ticket,fk_leftmenu=ticket',
|
||||
'type' => 'left',
|
||||
'titre' => 'Categories',
|
||||
'mainmenu' => 'ticket',
|
||||
|
|
@ -363,7 +364,8 @@ class modTicket extends DolibarrModules
|
|||
'enabled' => 'isModEnabled("ticket") && isModEnabled("categorie") && getDolGlobalString("CATEGORY_EDIT_IN_MENU_NOT_IN_POPUP")',
|
||||
'perms' => '$user->hasRight("ticket","read")',
|
||||
'target' => '',
|
||||
'user' => 0);
|
||||
'user' => 0,
|
||||
];
|
||||
$r++;
|
||||
|
||||
// Exports
|
||||
|
|
@ -374,7 +376,7 @@ class modTicket extends DolibarrModules
|
|||
$langs->load("ticket");
|
||||
$this->export_code[$r] = $this->rights_class.'_'.$r;
|
||||
$this->export_label[$r] = 'ExportDataset_ticket_1'; // Translation key (used only if key ExportDataset_xxx_z not found)
|
||||
$this->export_permission[$r] = array(array("ticket", "export"));
|
||||
$this->export_permission[$r] = [["ticket", "export"]];
|
||||
$this->export_icon[$r] = 'ticket';
|
||||
$keyforclass = 'Ticket';
|
||||
$keyforclassfile = '/ticket/class/ticket.class.php';
|
||||
|
|
@ -412,7 +414,7 @@ class modTicket extends DolibarrModules
|
|||
// Permissions
|
||||
$this->remove($options);
|
||||
|
||||
//ODT template
|
||||
// ODT template
|
||||
$src = DOL_DOCUMENT_ROOT.'/install/doctemplates/tickets/template_ticket.odt';
|
||||
$dirodt = DOL_DATA_ROOT.($conf->entity > 1 ? '/'.$conf->entity : '').'/doctemplates/tickets';
|
||||
$dest = $dirodt.'/template_ticket.odt';
|
||||
|
|
@ -428,16 +430,16 @@ class modTicket extends DolibarrModules
|
|||
}
|
||||
}
|
||||
|
||||
$sql = array(
|
||||
array("sql" => "insert into ".$this->db->prefix()."c_type_contact(rowid, element, source, code, libelle, active ) values (110120, 'ticket', 'internal', 'SUPPORTTEC', 'Utilisateur assigné au ticket', 1);", "ignoreerror" => 1),
|
||||
array("sql" => "insert into ".$this->db->prefix()."c_type_contact(rowid, element, source, code, libelle, active ) values (110121, 'ticket', 'internal', 'CONTRIBUTOR', 'Intervenant', 1);", "ignoreerror" => 1),
|
||||
array("sql" => "insert into ".$this->db->prefix()."c_type_contact(rowid, element, source, code, libelle, active ) values (110122, 'ticket', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1);", "ignoreerror" => 1),
|
||||
array("sql" => "insert into ".$this->db->prefix()."c_type_contact(rowid, element, source, code, libelle, active ) values (110123, 'ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1);", "ignoreerror" => 1),
|
||||
$sql = [
|
||||
["sql" => "INSERT INTO ".$this->db->prefix()."c_type_contact(rowid, element, source, code, libelle, active ) values (110120, 'ticket', 'internal', 'SUPPORTTEC', 'Utilisateur assigné au ticket', 1);", "ignoreerror" => 1],
|
||||
["sql" => "INSERT INTO ".$this->db->prefix()."c_type_contact(rowid, element, source, code, libelle, active ) values (110121, 'ticket', 'internal', 'CONTRIBUTOR', 'Intervenant', 1);", "ignoreerror" => 1],
|
||||
["sql" => "INSERT INTO ".$this->db->prefix()."c_type_contact(rowid, element, source, code, libelle, active ) values (110122, 'ticket', 'external', 'SUPPORTCLI', 'Contact client suivi incident', 1);", "ignoreerror" => 1],
|
||||
["sql" => "INSERT INTO ".$this->db->prefix()."c_type_contact(rowid, element, source, code, libelle, active ) values (110123, 'ticket', 'external', 'CONTRIBUTOR', 'Intervenant', 1);", "ignoreerror" => 1],
|
||||
// remove old settings
|
||||
"DELETE FROM ".$this->db->prefix()."document_model WHERE nom = 'TICKET_ADDON_PDF_ODT_PATH' AND type = 'ticket' AND entity = ".((int) $conf->entity),
|
||||
// activate default odt templates
|
||||
array("sql" => "INSERT INTO ".$this->db->prefix()."document_model (nom, type, libelle, entity, description) VALUES('generic_ticket_odt','ticket','ODT templates',".((int) $conf->entity).",'TICKET_ADDON_PDF_ODT_PATH');", "ignoreerror" => 1),
|
||||
);
|
||||
["sql" => "INSERT INTO ".$this->db->prefix()."document_model (nom, type, libelle, entity, description) VALUES('generic_ticket_odt','ticket','ODT templates',".((int) $conf->entity).",'TICKET_ADDON_PDF_ODT_PATH');", "ignoreerror" => 1],
|
||||
];
|
||||
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2024 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2026 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -68,7 +69,6 @@ class modUser extends DolibarrModules
|
|||
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
|
||||
$this->requiredby = array(); // List of module ids to disable if this one is disabled
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with
|
||||
$this->phpmin = array(7, 0); // Minimum version of PHP required by module
|
||||
$this->langfiles = array("main", "users", "companies", "members", "salaries", "hrm");
|
||||
$this->always_enabled = true; // Can't be disabled
|
||||
//$this->auto_enabled = true; // always_enabled already set
|
||||
|
|
@ -77,11 +77,11 @@ class modUser extends DolibarrModules
|
|||
$this->const = array();
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array(
|
||||
0=>array('file'=>'box_lastlogin.php', 'enabledbydefaulton'=>'Home'),
|
||||
1=>array('file'=>'box_birthdays.php', 'enabledbydefaulton'=>'Home'),
|
||||
2=>array('file'=>'box_dolibarr_state_board.php', 'enabledbydefaulton'=>'Home')
|
||||
);
|
||||
$this->boxes = [
|
||||
['file'=>'box_lastlogin.php', 'enabledbydefaulton'=>'Home'],
|
||||
['file'=>'box_birthdays.php', 'enabledbydefaulton'=>'Home'],
|
||||
['file'=>'box_dolibarr_state_board.php', 'enabledbydefaulton'=>'Home'],
|
||||
];
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
|
|
|
|||
Loading…
Reference in a new issue