Qual: Fix phan notices (#31193)
# Qual: Fix phan notices Fix phan notices in several classes that have UnknownObjectMethod calls and classes that had notices in relation with these classes
This commit is contained in:
parent
1754ee61d5
commit
8236aed22f
42 changed files with 618 additions and 221 deletions
|
|
@ -9,26 +9,26 @@
|
|||
*/
|
||||
return [
|
||||
// # Issue statistics:
|
||||
// PhanPluginUnknownPropertyType : 1430+ occurrences
|
||||
// PhanUndeclaredProperty : 850+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 700+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 670+ occurrences
|
||||
// PhanPluginUnknownPropertyType : 1330+ occurrences
|
||||
// PhanUndeclaredProperty : 840+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 690+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 630+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 440+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 430+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 350+ occurrences
|
||||
// PhanPossiblyUndeclaredVariable : 300+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 420+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 340+ occurrences
|
||||
// PhanPossiblyUndeclaredVariable : 280+ occurrences
|
||||
// PhanTypeMismatchProperty : 190+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionReturnType : 150+ occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 150+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionParamType : 140+ occurrences
|
||||
// PhanTypeMismatchArgumentNullableInternal : 95+ occurrences
|
||||
// PhanPluginUnknownArrayPropertyType : 75+ occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 130+ occurrences
|
||||
// PhanTypeMismatchArgumentNullableInternal : 80+ occurrences
|
||||
// PhanPluginUndeclaredVariableIsset : 70+ occurrences
|
||||
// PhanPluginUnknownArrayPropertyType : 70+ occurrences
|
||||
// PhanPluginEmptyStatementIf : 55+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 55+ occurrences
|
||||
// PhanRedefineFunction : 50+ occurrences
|
||||
// PhanTypeSuspiciousNonTraversableForeach : 50+ occurrences
|
||||
// PhanTypeInvalidDimOffset : 35+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 35+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccess : 25+ occurrences
|
||||
// PhanPossiblyNullTypeMismatchProperty : 15+ occurrences
|
||||
// PhanTypeComparisonFromArray : 15+ occurrences
|
||||
|
|
@ -36,16 +36,16 @@ return [
|
|||
// PhanEmptyForeach : 10+ occurrences
|
||||
// PhanPluginConstantVariableNull : 10+ occurrences
|
||||
// PhanPluginSuspiciousParamPosition : 10+ occurrences
|
||||
// PhanUndeclaredMethod : 9 occurrences
|
||||
// PhanTypeMismatchDimFetchNullable : 10+ occurrences
|
||||
// PhanUndeclaredMethod : 10+ occurrences
|
||||
// PhanPluginBothLiteralsBinaryOp : 8 occurrences
|
||||
// PhanPluginDuplicateExpressionBinaryOp : 7 occurrences
|
||||
// PhanTypeMismatchDimFetchNullable : 7 occurrences
|
||||
// PhanTypeExpectedObjectPropAccessButGotNull : 6 occurrences
|
||||
// PhanTypeExpectedObjectPropAccessButGotNull : 5 occurrences
|
||||
// PhanParamTooMany : 4 occurrences
|
||||
// PhanPluginDuplicateArrayKey : 4 occurrences
|
||||
// PhanParamTooMany : 3 occurrences
|
||||
// PhanInvalidFQSENInClasslike : 2 occurrences
|
||||
// PhanEmptyFQSENInClasslike : 3 occurrences
|
||||
// PhanInvalidFQSENInClasslike : 3 occurrences
|
||||
// PhanAccessMethodProtected : 1 occurrence
|
||||
// PhanEmptyFQSENInClasslike : 1 occurrence
|
||||
|
||||
// Currently, file_suppressions and directory_suppressions are the only supported suppressions
|
||||
'file_suppressions' => [
|
||||
|
|
@ -60,7 +60,7 @@ return [
|
|||
'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/api/class/api_setup.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/api/class/api_setup.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/api/class/api_status.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/asset/admin/setup.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/asset/card.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -76,7 +76,6 @@ return [
|
|||
'htdocs/asset/tpl/depreciation_options_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/asset/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/asterisk/wrapper.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/barcode/codeinit.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/barcode/printsheet.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/blockedlog/ajax/block-info.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/blockedlog/class/blockedlog.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'],
|
||||
|
|
@ -90,14 +89,13 @@ return [
|
|||
'htdocs/bookcal/availabilities_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/availabilities_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/bookcal/booking_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/bookcal/calendar_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/calendar_card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/calendar_list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/bookcal/class/availabilities.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/class/calendar.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/lib/bookcal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bookcal/lib/bookcal_availabilities.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bookcal/lib/bookcal_calendar.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bookmarks/class/bookmark.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/categories/class/categorie.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/categories/edit.php' => ['PhanTypeMismatchDimFetch'],
|
||||
|
|
@ -123,21 +121,20 @@ return [
|
|||
'htdocs/comm/mailing/class/html.formadvtargetemailing.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/comm/mailing/class/mailing.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/comm/mailing/index.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/comm/propal/card.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/comm/propal/class/api_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/propal/class/api_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/comm/propal/class/propal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/comm/propal/class/propalestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/comm/propal/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/comm/propal/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/commande/class/api_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/commande/class/commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/commande/class/api_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/commande/class/commande.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/commande/class/commandestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/commande/customer.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/commande/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/commande/list_det.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/commande/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/commande/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/accounting-files.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/accounting-files.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/bank/account_statement_document.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/bank/annuel.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/bank/bankentries_list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -158,7 +155,6 @@ return [
|
|||
'htdocs/compta/cashcontrol/class/cashcontrol.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/charges/index.php' => ['PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/compta/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/deplacement/card.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/deplacement/class/deplacement.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/deplacement/class/deplacementstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/deplacement/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -208,12 +204,9 @@ return [
|
|||
'htdocs/compta/resultat/clientfourn.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/resultat/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/resultat/result.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/sociales/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/sociales/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/sociales/class/cchargesociales.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/sociales/class/chargesociales.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/sociales/class/paymentsocialcontribution.class.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/sociales/document.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/sociales/info.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/sociales/list.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/compta/sociales/payments.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/stats/byratecountry.php' => ['PhanPluginEmptyStatementIf'],
|
||||
|
|
@ -224,13 +217,11 @@ return [
|
|||
'htdocs/compta/stats/supplier_turnover.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/stats/supplier_turnover_by_prodserv.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/stats/supplier_turnover_by_thirdparty.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/tva/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/tva/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/compta/tva/class/paymentvat.class.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/tva/class/tva.class.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/tva/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/tva/document.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/tva/index.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/tva/info.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/tva/payments.php' => ['PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/compta/tva/quadri_detail.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/contact/canvas/actions_contactcard_common.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
|
|
@ -240,7 +231,7 @@ return [
|
|||
'htdocs/contact/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/contact/perso.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/contrat/agenda.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/contrat/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/contrat/card.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/contrat/class/api_contracts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/contrat/messaging.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/contrat/services_list.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -254,15 +245,14 @@ return [
|
|||
'htdocs/core/actions_massactions.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_printing.inc.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_sendmails.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/core/actions_setmoduleoptions.inc.php' => ['PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/core/ajax/ajaxdirpreview.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/core/ajax/ajaxdirtree.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/ajax/fileupload.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/ajax/onlineSign.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/ajax/saveinplace.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/core/ajax/saveinplace.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/ajax/selectobject.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/ajax/selectsearchbox.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/core/ajax/ziptown.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/boxes/box_actions.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/boxes/box_actions_future.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/boxes/box_external_rss.php' => ['PhanPluginUnknownPropertyType'],
|
||||
|
|
@ -283,8 +273,7 @@ return [
|
|||
'htdocs/core/boxes/box_services_contracts.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/boxes/box_task.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/boxes/box_validated_projects.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/CSMSFile.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/canvas.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/canvas.class.php' => ['PhanParamTooMany', 'PhanUndeclaredMethod'],
|
||||
'htdocs/core/class/ccountry.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/cgenericdic.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/commondocgenerator.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -319,32 +308,27 @@ return [
|
|||
'htdocs/core/class/html.formaccounting.class.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/class/html.formbarcode.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/core/class/html.formcategory.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/core/class/html.formcompany.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/html.formfile.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/class/html.formcompany.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/html.formfile.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayMethodParamType', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/class/html.formldap.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/core/class/html.formmail.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/html.formmargin.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/html.formprojet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/class/html.formsetup.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/class/html.formticket.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/class/html.formwebsite.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/interfaces.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/ldap.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/class/link.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/mastodonhandler.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/core/class/notify.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/openid.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/class/reddithandler.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/class/rssparser.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/core/class/smtps.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/core/class/socialnetworkmanager.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/core/class/stats.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/core/class/timespent.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/translate.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/class/utils.class.php' => ['PhanPluginConstantVariableNull', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/class/validate.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/core/class/vcard.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/core/customreports.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUndeclaredVariableIsset', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchDimFetchNullable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/customreports.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetchNullable'],
|
||||
'htdocs/core/datepicker.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/core/db/Database.interface.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/core/db/mysqli.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray'],
|
||||
|
|
@ -359,7 +343,7 @@ return [
|
|||
'htdocs/core/lib/ajax.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/lib/asset.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/bank.lib.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/lib/company.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/lib/contract.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/cron.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/customreports.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch'],
|
||||
|
|
@ -417,7 +401,7 @@ return [
|
|||
'htdocs/core/menus/standard/auguria.lib.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/core/menus/standard/eldy_menu.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/core/modules/DolibarrModules.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/modules/action/modules_action.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -565,7 +549,7 @@ return [
|
|||
'htdocs/delivery/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/delivery/class/delivery.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/delivery/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/document.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/document.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/don/admin/donation.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/don/card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/don/class/api_donations.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
|
|
@ -589,7 +573,7 @@ return [
|
|||
'htdocs/ecm/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/ecm/index_auto.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/ecm/index_medias.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanInvalidFQSENInClasslike', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/emailcollector/class/emailcollectoraction.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/emailcollector/class/emailcollectorfilter.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/emailcollector/lib/emailcollector.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
|
|
@ -616,7 +600,6 @@ return [
|
|||
'htdocs/expedition/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/expensereport/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expensereport/class/api_expensereports.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expensereport/class/expensereport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeExpectedObjectPropAccessButGotNull'],
|
||||
'htdocs/expensereport/class/expensereportstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/expensereport/payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -665,9 +648,8 @@ return [
|
|||
'htdocs/ftp/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/holiday/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/holiday/card_group.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/holiday/class/holiday.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/holiday/define_holiday.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/holiday/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/holiday/view_log.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/hrm/admin/admin_hrm.php' => ['PhanEmptyForeach', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/hrm/class/evaluation.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/class/evaluationdet.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -770,7 +752,7 @@ return [
|
|||
'htdocs/product/canvas/product/actions_card_product.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/product/canvas/service/actions_card_service.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/product/card.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/html.formproduct.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/product.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/product/class/productbatch.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'],
|
||||
|
|
@ -873,7 +855,7 @@ return [
|
|||
'htdocs/public/project/suggestconference.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/public/project/viewandvote.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/recruitment/view.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/stripe/ipn.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/stripe/ipn.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/test/test_arrays.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/public/test/test_forms.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'],
|
||||
|
|
@ -949,10 +931,8 @@ return [
|
|||
'htdocs/societe/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/societe/paymentmodes.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/societe/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/societe/project.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/societe/tpl/linesalesrepresentative.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/societe/website.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/stripe/admin/stripe.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/stripe/ajax/ajax.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/stripe/class/actions_stripe.class.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/stripe/class/stripe.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -1021,7 +1001,7 @@ return [
|
|||
'htdocs/webportal/class/controller.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/webportal/class/html.formcardwebportal.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/webportal/class/html.formwebportal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/webportal/class/webPortalTheme.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/webportal/class/webportalinvoice.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/webportal/class/webportalmember.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
|
|
|
|||
115
dev/tools/phan/stubs/ovhsms.php
Normal file
115
dev/tools/phan/stubs/ovhsms.php
Normal file
|
|
@ -0,0 +1,115 @@
|
|||
<?php
|
||||
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*/
|
||||
|
||||
namespace {
|
||||
/**
|
||||
* Use an OVH account to send SMS with Dolibarr
|
||||
*/
|
||||
class OvhSms extends \CommonObject
|
||||
{
|
||||
public $db;
|
||||
//!< To store db handler
|
||||
public $error;
|
||||
//!< To return error code (or message)
|
||||
public $errors = array();
|
||||
//!< To return several error codes (or messages)
|
||||
public $element = 'ovhsms';
|
||||
//!< Id that identify managed object
|
||||
public $id;
|
||||
public $account;
|
||||
public $socid;
|
||||
public $contact_id;
|
||||
public $member_id;
|
||||
public $fk_project;
|
||||
public $nostop;
|
||||
public $expe;
|
||||
public $dest;
|
||||
public $message;
|
||||
public $validity;
|
||||
public $class;
|
||||
public $deferred;
|
||||
public $priority;
|
||||
public $soap;
|
||||
// Old API
|
||||
public $conn;
|
||||
// New API
|
||||
public $endpoint;
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
}
|
||||
/**
|
||||
* Logout
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function logout()
|
||||
{
|
||||
}
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps,PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Send SMS
|
||||
*
|
||||
* @return int <=0 if error, >0 if OK
|
||||
*/
|
||||
public function SmsSend()
|
||||
{
|
||||
}
|
||||
/**
|
||||
* Show HTML select box to select account
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function printListAccount()
|
||||
{
|
||||
}
|
||||
/**
|
||||
* Return list of SMSAccounts
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function getSmsListAccount()
|
||||
{
|
||||
}
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps,PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Return Credit
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function CreditLeft()
|
||||
{
|
||||
}
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps,PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Return History
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
public function SmsHistory()
|
||||
{
|
||||
}
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps,PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
|
||||
/**
|
||||
* Return list of possible SMS senders
|
||||
*
|
||||
* @return array|int <0 if KO, array with list of available senders if OK
|
||||
*/
|
||||
public function SmsSenderList()
|
||||
{
|
||||
}
|
||||
/**
|
||||
* Call soapDebug method to output traces
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function soapDebug()
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -140,7 +140,7 @@ if ($action == 'initbarcodethirdparties' && $user->hasRight('societe', 'lire'))
|
|||
$thirdpartystatic->id = $obj->rowid;
|
||||
$nextvalue = $modBarCodeThirdparty->getNextValue($thirdpartystatic, '');
|
||||
|
||||
$result = $thirdpartystatic->setValueFrom('barcode', $nextvalue, '', '', 'text', '', $user, 'THIRDPARTY_MODIFY');
|
||||
$result = $thirdpartystatic->setValueFrom('barcode', $nextvalue, '', null, 'text', '', $user, 'THIRDPARTY_MODIFY');
|
||||
|
||||
$nbtry++;
|
||||
if ($result > 0) {
|
||||
|
|
@ -249,7 +249,7 @@ if ($action == 'initbarcodeproducts' && $user->hasRight('produit', 'lire')) {
|
|||
$nextvalue = $modBarCodeProduct->getNextValue($productstatic, '');
|
||||
|
||||
//print 'Set value '.$nextvalue.' to product '.$productstatic->id." ".$productstatic->ref." ".$productstatic->type."<br>\n";
|
||||
$result = $productstatic->setValueFrom('barcode', $nextvalue, '', '', 'text', '', $user, 'PRODUCT_MODIFY');
|
||||
$result = $productstatic->setValueFrom('barcode', $nextvalue, '', null, 'text', '', $user, 'PRODUCT_MODIFY');
|
||||
|
||||
$nbtry++;
|
||||
if ($result > 0) {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2022 Alice Adminson <aadminson@example.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -180,8 +181,8 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
|
||||
// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
|
||||
// Actions cancel, add, update, update_extras, confirm_validate, confirm_delete, confirm_deleteline, confirm_clone, confirm_close, confirm_setdraft, confirm_reopen
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_addupdatedelete.inc.php';
|
||||
|
||||
// Actions when linking object each other
|
||||
include DOL_DOCUMENT_ROOT.'/core/actions_dellink.inc.php';
|
||||
|
|
@ -196,7 +197,7 @@ if (empty($reshook)) {
|
|||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
|
||||
if ($action == 'set_thirdparty' && $permissiontoadd) {
|
||||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname);
|
||||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname);
|
||||
}
|
||||
if ($action == 'classin' && $permissiontoadd) {
|
||||
$object->setProject(GETPOSTINT('projectid'));
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2023 Alice Adminson <aadminson@example.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -158,7 +159,7 @@ if (empty($reshook)) {
|
|||
include DOL_DOCUMENT_ROOT.'/core/actions_builddoc.inc.php';
|
||||
|
||||
if ($action == 'set_thirdparty' && $permissiontoadd) {
|
||||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', '', 'date', '', $user, $triggermodname);
|
||||
$object->setValueFrom('fk_soc', GETPOSTINT('fk_soc'), '', null, 'date', '', $user, $triggermodname);
|
||||
}
|
||||
if ($action == 'classin' && $permissiontoadd) {
|
||||
$object->setProject(GETPOSTINT('projectid'));
|
||||
|
|
|
|||
|
|
@ -1016,7 +1016,7 @@ if (empty($reshook)) {
|
|||
$line->multicurrency_total_tva = $line->tva_tx * $line->qty * (float) $subprice * $line->multicurrency_subprice / $line->subprice;
|
||||
$line->multicurrency_total_ttc = (1 + $line->tva_tx) * $line->qty * (float) $subprice * $line->multicurrency_subprice / $line->subprice;
|
||||
// Used previous $line->subprice and $line->multicurrency_subprice above, now they can be set to their new values
|
||||
$line->subprice = $subprice;
|
||||
$line->subprice = (float) $subprice;
|
||||
$line->multicurrency_subprice = $multicurrency_subprice;
|
||||
}
|
||||
} elseif ($action == 'addline' && !GETPOST('submitforalllines', 'alpha') && !GETPOST('submitforallmargins', 'alpha') && $usercancreate) { // Add line
|
||||
|
|
@ -1170,7 +1170,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if ( !$pricebycustomerexist && $object->thirdparty->price_level) { // If price per segment
|
||||
if (!$pricebycustomerexist && $object->thirdparty->price_level) { // If price per segment
|
||||
$pu_ht = $prod->multiprices[$object->thirdparty->price_level];
|
||||
$pu_ttc = $prod->multiprices_ttc[$object->thirdparty->price_level];
|
||||
$price_min = $prod->multiprices_min[$object->thirdparty->price_level];
|
||||
|
|
|
|||
|
|
@ -203,7 +203,7 @@ class Commande extends CommonOrder
|
|||
public $date_commande;
|
||||
|
||||
/**
|
||||
* @var null|int|'' Date expected of shipment (date of start of shipment, not the reception that occurs some days after)
|
||||
* @var null|int|'' Expected shipment date (date of start of shipment, not the reception that occurs some days after)
|
||||
*/
|
||||
public $delivery_date;
|
||||
|
||||
|
|
@ -213,10 +213,14 @@ class Commande extends CommonOrder
|
|||
public $fk_remise_except;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @var string
|
||||
* @deprecated See $fk_remise_except
|
||||
*/
|
||||
public $remise_percent;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $source; // Order mode. How we received order (by phone, by email, ...)
|
||||
|
||||
/**
|
||||
|
|
@ -253,13 +257,17 @@ class Commande extends CommonOrder
|
|||
public $lines = array();
|
||||
|
||||
|
||||
//! key of module source when order generated from a dedicated module ('cashdesk', 'takepos', ...)
|
||||
/**
|
||||
* @var string key of module source when order generated from a dedicated module ('cashdesk', 'takepos', ...)
|
||||
*/
|
||||
public $module_source;
|
||||
//! key of pos source ('0', '1', ...)
|
||||
/**
|
||||
* @var string key of pos source ('0', '1', ...)
|
||||
*/
|
||||
public $pos_source;
|
||||
|
||||
/**
|
||||
* @var array Array with line of all shipments
|
||||
* @var array<int,float> Array with lines of all shipments (qty)
|
||||
*/
|
||||
public $expeditions;
|
||||
|
||||
|
|
@ -1325,7 +1333,7 @@ class Commande extends CommonOrder
|
|||
/**
|
||||
* Load an object from a proposal and create a new order into database
|
||||
*
|
||||
* @param Object $object Object source
|
||||
* @param Propal $object Object source
|
||||
* @param User $user User making creation
|
||||
* @return int Return integer <0 if KO, 0 if nothing done, 1 if OK
|
||||
*/
|
||||
|
|
@ -1506,11 +1514,11 @@ class Commande extends CommonOrder
|
|||
* @param int $fk_fournprice Id supplier price
|
||||
* @param int $pa_ht Buying price (without tax)
|
||||
* @param string $label Label
|
||||
* @param array $array_options extrafields array. Example array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...)
|
||||
* @param int|null $fk_unit Code of the unit to use. Null to use the default one
|
||||
* @param array<string,mixed> $array_options extrafields array. Example array('options_codeforfield1'=>'valueforfield1', 'options_codeforfield2'=>'valueforfield2', ...)
|
||||
* @param ?int $fk_unit Code of the unit to use. Null to use the default one
|
||||
* @param string $origin Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be 'orderdet', 'propaldet'..., else 'order','propal,'....
|
||||
* @param int $origin_id Depend on global conf MAIN_CREATEFROM_KEEP_LINE_ORIGIN_INFORMATION can be Id of origin object (aka line id), else object id
|
||||
* @param double $pu_ht_devise Unit price in currency
|
||||
* @param float $pu_ht_devise Unit price in currency
|
||||
* @param string $ref_ext line external reference
|
||||
* @param int $noupdateafterinsertline No update after insert of line
|
||||
* @return int >0 if OK, <0 if KO
|
||||
|
|
@ -3116,12 +3124,12 @@ class Commande extends CommonOrder
|
|||
* @param int $pa_ht Price (without tax) of product when it was bought
|
||||
* @param string $label Label
|
||||
* @param int $special_code Special code (also used by externals modules!)
|
||||
* @param array $array_options extrafields array
|
||||
* @param int|null $fk_unit Code of the unit to use. Null to use the default one
|
||||
* @param double $pu_ht_devise Amount in currency
|
||||
* @param array<string,mixed> $array_options extrafields array
|
||||
* @param ?int $fk_unit Code of the unit to use. Null to use the default one
|
||||
* @param float $pu_ht_devise Amount in currency
|
||||
* @param int $notrigger disable line update trigger
|
||||
* @param string $ref_ext external reference
|
||||
* @param integer $rang line rank
|
||||
* @param int $rang line rank
|
||||
* @return int Return integer < 0 if KO, > 0 if OK
|
||||
*/
|
||||
public function updateline($rowid, $desc, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0.0, $txlocaltax2 = 0.0, $price_base_type = 'HT', $info_bits = 0, $date_start = '', $date_end = '', $type = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = null, $pa_ht = 0, $label = '', $special_code = 0, $array_options = array(), $fk_unit = null, $pu_ht_devise = 0, $notrigger = 0, $ref_ext = '', $rang = 0)
|
||||
|
|
@ -4132,11 +4140,11 @@ class Commande extends CommonOrder
|
|||
*
|
||||
* @param string $modele Force template to use ('' to not force)
|
||||
* @param Translate $outputlangs object lang a utiliser pour traduction
|
||||
* @param int $hidedetails Hide details of lines
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hideref Hide ref
|
||||
* @param null|array $moreparams Array to provide more information
|
||||
* @return int 0 if KO, 1 if OK
|
||||
* @param int<0,1> $hidedetails Hide details of lines
|
||||
* @param int<0,1> $hidedesc Hide description
|
||||
* @param int<0,1> $hideref Hide ref
|
||||
* @param array<string,mixed> $moreparams Array to provide more information
|
||||
* @return int<0,1> 0 if KO, 1 if OK
|
||||
*/
|
||||
public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
|
||||
{
|
||||
|
|
@ -4235,10 +4243,10 @@ class Commande extends CommonOrder
|
|||
/**
|
||||
* Set signed status
|
||||
*
|
||||
* @param User $user Object user that modify
|
||||
* @param int $status Newsigned status to set (often a constant like self::STATUS_XXX)
|
||||
* @param int $notrigger 1 = Does not execute triggers, 0 = Execute triggers
|
||||
* @param string $triggercode Trigger code to use
|
||||
* @param User $user Object user that modify
|
||||
* @param int $status Newsigned status to set (often a constant like self::STATUS_XXX)
|
||||
* @param int<0,1> $notrigger 1 = Does not execute triggers, 0 = Execute triggers
|
||||
* @param string $triggercode Trigger code to use
|
||||
* @return int 0 < if KO, > 0 if OK
|
||||
*/
|
||||
public function setSignedStatus(User $user, int $status = 0, int $notrigger = 0, $triggercode = ''): int
|
||||
|
|
|
|||
|
|
@ -831,7 +831,7 @@ if (!empty($date_start) && !empty($date_stop)) {
|
|||
} elseif ($data['item'] == 'ExpenseReport') {
|
||||
$expensereport->id = $data['id'];
|
||||
$expensereport->ref = $data['ref'];
|
||||
print $expensereport->getNomUrl(1, 0, 0, '', 0, 0);
|
||||
print $expensereport->getNomUrl(1, 0, 0, 0, 0, 0);
|
||||
} elseif ($data['item'] == 'SalaryPayment') {
|
||||
$salary_payment->id = $data['id'];
|
||||
$salary_payment->ref = $data['ref'];
|
||||
|
|
|
|||
|
|
@ -230,6 +230,7 @@ if (empty($reshook)) {
|
|||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$proj = null;
|
||||
if ($arrayfields['account']['checked'] || $arrayfields['subledger']['checked']) {
|
||||
$formaccounting = new FormAccounting($db);
|
||||
}
|
||||
|
|
@ -783,7 +784,7 @@ while ($i < $imaxinloop) {
|
|||
// Project
|
||||
if ($arrayfields['project']['checked']) {
|
||||
print '<td class="nowraponall">';
|
||||
if ($obj->fk_project > 0) {
|
||||
if ($obj->fk_project > 0 && is_object($proj)) {
|
||||
$proj->fetch($obj->fk_project);
|
||||
print $proj->getNomUrl(1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -172,7 +173,7 @@ if ($action == 'validate' && $user->hasRight('deplacement', 'creer')) {
|
|||
// Set fields
|
||||
$dated = dol_mktime(GETPOSTINT('datedhour'), GETPOSTINT('datedmin'), GETPOSTINT('datedsec'), GETPOSTINT('datedmonth'), GETPOSTINT('datedday'), GETPOSTINT('datedyear'));
|
||||
$object->fetch($id);
|
||||
$result = $object->setValueFrom('dated', $dated, '', '', 'date', '', $user, 'DEPLACEMENT_MODIFY');
|
||||
$result = $object->setValueFrom('dated', $dated, '', null, 'date', '', $user, 'DEPLACEMENT_MODIFY');
|
||||
if ($result < 0) {
|
||||
dol_print_error($db, $object->error);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -180,7 +180,7 @@ class Facture extends CommonInvoice
|
|||
*/
|
||||
public $module_source;
|
||||
/**
|
||||
* @var int key of pos source ('0', '1', ...)
|
||||
* @var string key of pos source ('0', '1', ...)
|
||||
*/
|
||||
public $pos_source;
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2016-2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2017-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -63,7 +64,7 @@ $fk_project = (GETPOST('fk_project') ? GETPOSTINT('fk_project') : 0);
|
|||
$dateech = dol_mktime(GETPOST('echhour'), GETPOST('echmin'), GETPOST('echsec'), GETPOST('echmonth'), GETPOST('echday'), GETPOST('echyear'));
|
||||
$dateperiod = dol_mktime(GETPOST('periodhour'), GETPOST('periodmin'), GETPOST('periodsec'), GETPOST('periodmonth'), GETPOST('periodday'), GETPOST('periodyear'));
|
||||
$label = GETPOST('label', 'alpha');
|
||||
$actioncode = GETPOST('actioncode');
|
||||
$actioncode = GETPOSTINT('actioncode');
|
||||
$fk_user = GETPOSTINT('userid') > 0 ? GETPOSTINT('userid') : 0;
|
||||
|
||||
// Initialize a technical object to manage hooks of page. Note that conf->hooks_modules contains an array of hook context
|
||||
|
|
@ -138,7 +139,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
if ($action == 'setlib' && $permissiontoadd) {
|
||||
$result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY');
|
||||
$result = $object->setValueFrom('libelle', GETPOST('lib'), '', null, 'text', '', $user, 'TAX_MODIFY');
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
|
@ -374,7 +375,7 @@ if ($action == 'create') {
|
|||
print $langs->trans("Type");
|
||||
print '</td>';
|
||||
print '<td>';
|
||||
$formsocialcontrib->select_type_socialcontrib(GETPOST("actioncode", 'alpha') ? GETPOST("actioncode", 'alpha') : '', 'actioncode', 1);
|
||||
$formsocialcontrib->select_type_socialcontrib(GETPOST('actioncode', 'alpha') ? GETPOST('actioncode', 'alpha') : '', 'actioncode', 1);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
|
|
@ -463,12 +464,12 @@ if ($id > 0) {
|
|||
// Clone confirmation
|
||||
if ($action === 'clone') {
|
||||
$formquestion = array(
|
||||
array('type' => 'text', 'name' => 'clone_label', 'label' => $langs->trans("Label"), 'value' => $langs->trans("CopyOf").' '.$object->label, 'tdclass'=>'fieldrequired'),
|
||||
array('type' => 'text', 'name' => 'clone_label', 'label' => $langs->trans("Label"), 'value' => $langs->trans("CopyOf").' '.$object->label, 'tdclass' => 'fieldrequired'),
|
||||
);
|
||||
if (getDolGlobalString('TAX_ADD_CLONE_FOR_NEXT_MONTH_CHECKBOX')) {
|
||||
$formquestion[] = array('type' => 'checkbox', 'name' => 'clone_for_next_month', 'label' => $langs->trans("CloneTaxForNextMonth"), 'value' => 1);
|
||||
} else {
|
||||
$formquestion[] = array('type' => 'date', 'datenow'=>1, 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1);
|
||||
$formquestion[] = array('type' => 'date', 'datenow' => 1, 'name' => 'clone_date_ech', 'label' => $langs->trans("Date"), 'value' => -1);
|
||||
$formquestion[] = array('type' => 'date', 'name' => 'clone_period', 'label' => $langs->trans("PeriodEndDate"), 'value' => -1);
|
||||
$formquestion[] = array('type' => 'text', 'name' => 'amount', 'label' => $langs->trans("Amount"), 'value' => price($object->amount), 'morecss' => 'width100');
|
||||
}
|
||||
|
|
@ -587,7 +588,8 @@ if ($id > 0) {
|
|||
print '<tr><td class="titlefieldmiddle">';
|
||||
print $langs->trans("Type")."</td><td>";
|
||||
if ($action == 'edit' && $object->getSommePaiement() == 0) {
|
||||
$formsocialcontrib->select_type_socialcontrib(GETPOST("actioncode", 'alpha') ? GETPOST("actioncode", 'alpha') : $object->type, 'actioncode', 1);
|
||||
$actionPostValue = GETPOSTINT('actioncode');
|
||||
$formsocialcontrib->select_type_socialcontrib($actionPostValue ? $actionPostValue : $object->type, 'actioncode', 1);
|
||||
} else {
|
||||
print $object->type_label;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,20 +65,43 @@ class ChargeSociales extends CommonObject
|
|||
* @var string label
|
||||
*/
|
||||
public $label;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $type;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_label;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_code;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_accountancy_code;
|
||||
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $amount;
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $paye;
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use $period
|
||||
* @var int|string
|
||||
*/
|
||||
public $periode;
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $period;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
* @deprecated Use label instead
|
||||
*/
|
||||
public $lib;
|
||||
|
|
@ -102,7 +125,13 @@ class ChargeSociales extends CommonObject
|
|||
* @var int ID
|
||||
*/
|
||||
public $mode_reglement_id;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $mode_reglement_code;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $mode_reglement;
|
||||
|
||||
/**
|
||||
|
|
@ -301,7 +330,7 @@ class ChargeSociales extends CommonObject
|
|||
// Get bank transaction lines for this social contributions
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
$account = new Account($this->db);
|
||||
$lines_url = $account->get_url('', $this->id, 'sc');
|
||||
$lines_url = $account->get_url(0, $this->id, 'sc');
|
||||
|
||||
// Delete bank urls
|
||||
foreach ($lines_url as $line_url) {
|
||||
|
|
@ -520,8 +549,8 @@ class ChargeSociales extends CommonObject
|
|||
/**
|
||||
* Retourne le libelle du statut d'une charge (impaye, payee)
|
||||
*
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
|
||||
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommend to put here amount paid if you have it, 1 otherwise)
|
||||
* @param int<0,6> $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
|
||||
* @param float $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommend to put here amount paid if you have it, 1 otherwise)
|
||||
* @return string Label
|
||||
*/
|
||||
public function getLibStatut($mode = 0, $alreadypaid = -1)
|
||||
|
|
@ -535,7 +564,7 @@ class ChargeSociales extends CommonObject
|
|||
*
|
||||
* @param int $status Id status
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
|
||||
* @param double $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommend to put here amount paid if you have it, 1 otherwise)
|
||||
* @param float $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommend to put here amount paid if you have it, 1 otherwise)
|
||||
* @return string Label
|
||||
*/
|
||||
public function LibStatut($status, $mode = 0, $alreadypaid = -1)
|
||||
|
|
@ -792,7 +821,7 @@ class ChargeSociales extends CommonObject
|
|||
if (property_exists($this, 'label')) {
|
||||
$return .= ' <div class="inline-block opacitymedium valignmiddle tdoverflowmax100">'.$this->label.'</div>';
|
||||
}
|
||||
if (!empty($arraydata['project']) && $arraydata['project']->id > 0) {
|
||||
if (!empty($arraydata['project']) && $arraydata['project'] instanceof Project && $arraydata['project']->id > 0) {
|
||||
$return .= '<br><span class="info-box-label">'.$arraydata['project']->getNomUrl(1).'</span>';
|
||||
}
|
||||
if (property_exists($this, 'date_ech')) {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@
|
|||
* Copyright (C) 2005 Simon TOSSER <simon@kornog-computing.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -90,7 +91,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
|||
|
||||
if ($action == 'setlib' && $user->hasRight('tax', 'charges', 'creer')) {
|
||||
$object->fetch($id);
|
||||
$result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY');
|
||||
$result = $object->setValueFrom('libelle', GETPOST('lib'), '', null, 'text', '', $user, 'TAX_MODIFY');
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2005-2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -56,7 +57,7 @@ $result = restrictedArea($user, 'tax', $object->id, 'chargesociales', 'charges')
|
|||
|
||||
if ($action == 'setlib' && $user->hasRight('tax', 'charges', 'creer')) {
|
||||
$object->fetch($id);
|
||||
$result = $object->setValueFrom('libelle', GETPOST('lib'), '', '', 'text', '', $user, 'TAX_MODIFY');
|
||||
$result = $object->setValueFrom('libelle', GETPOST('lib'), '', null, 'text', '', $user, 'TAX_MODIFY');
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2015-2023 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2018-2024 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>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -115,7 +116,7 @@ if (empty($reshook)) {
|
|||
|
||||
if ($action == 'setlib' && $user->hasRight('tax', 'charges', 'creer')) {
|
||||
$object->fetch($id);
|
||||
$result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY');
|
||||
$result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', null, 'text', '', $user, 'TAX_MODIFY');
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2018 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -91,7 +92,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
|||
|
||||
if ($action == 'setlib' && $permissiontoadd) {
|
||||
$object->fetch($id);
|
||||
$result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY');
|
||||
$result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', null, 'text', '', $user, 'TAX_MODIFY');
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2016-2023 Alexandre Spangaro <aspangaro@easya.solutions>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -49,7 +50,7 @@ $result = restrictedArea($user, 'tax', '', 'tva', 'charges');
|
|||
|
||||
if ($action == 'setlib' && $user->hasRight('tax', 'charges', 'creer')) {
|
||||
$object->fetch($id);
|
||||
$result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', '', 'text', '', $user, 'TAX_MODIFY');
|
||||
$result = $object->setValueFrom('label', GETPOST('lib', 'alpha'), '', null, 'text', '', $user, 'TAX_MODIFY');
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -896,7 +896,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) {
|
|||
if (!empty($socid)) {
|
||||
print '<tr><td>'.$langs->trans("ContactByDefaultFor").'</td>';
|
||||
print '<td colspan="3">';
|
||||
$contactType = $object->listeTypeContacts('external', '', 1);
|
||||
$contactType = $object->listeTypeContacts('external', 0, 1);
|
||||
print img_picto('', 'contact', 'class="pictofixedwidth"').$form->multiselectarray('roles', $contactType, array(), 0, 0, '', 0, '90%');
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,6 +93,8 @@ $hookmanager->initHooks(array('contractcard', 'globalcard'));
|
|||
$object = new Contrat($db);
|
||||
$extrafields = new ExtraFields($db);
|
||||
$ret = 0;
|
||||
$pu_ht = null; // Init for static analysis
|
||||
$pu_ttc = null; // Init for static analysis
|
||||
|
||||
// Load object
|
||||
if ($id > 0 || !empty($ref) && $action != 'add') {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -34,6 +35,11 @@ if ($action == 'update' && !empty($formSetup) && is_object($formSetup) && !empty
|
|||
return;
|
||||
}
|
||||
|
||||
'
|
||||
@phan-var-force FormSetup $formSetup
|
||||
';
|
||||
|
||||
$upload_dir = null;
|
||||
|
||||
if ($action == 'update' && !empty($arrayofparameters) && is_array($arrayofparameters) && !empty($user->admin)) {
|
||||
$db->begin();
|
||||
|
|
|
|||
|
|
@ -98,6 +98,7 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e
|
|||
$savemethod = GETPOST('savemethod', 'alpha', 2);
|
||||
$savemethodname = (!empty($savemethod) ? $savemethod : 'setValueFrom');
|
||||
$newelement = $element;
|
||||
$subelement = null;
|
||||
|
||||
$view = '';
|
||||
$format = 'text';
|
||||
|
|
@ -203,6 +204,7 @@ if (!empty($field) && !empty($element) && !empty($table_element) && !empty($fk_e
|
|||
dol_include_once('/'.$module.'/class/actions_'.$subelement.'.class.php');
|
||||
$classname = 'Actions'.ucfirst($subelement);
|
||||
$object = new $classname($db);
|
||||
'@phan-var-force CommonHookActions $object';
|
||||
$ret = $object->$loadmethodname();
|
||||
if ($ret > 0) {
|
||||
$loadcache = $object->$loadcachename;
|
||||
|
|
|
|||
|
|
@ -132,7 +132,7 @@ if (GETPOST('zipcode') || GETPOST('town')) {
|
|||
$row_array['state_id'] = $row['state_id'];
|
||||
|
||||
// TODO Use a cache here to avoid to make select_state in each pass (this make a SQL and lot of logs)
|
||||
$row_array['states'] = $formcompany->select_state('', $row['country_id'], '');
|
||||
$row_array['states'] = $formcompany->select_state(0, $row['country_id'], '');
|
||||
|
||||
array_push($return_arr, $row_array);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -65,21 +65,48 @@ class CSMSFile
|
|||
* @var string address to
|
||||
*/
|
||||
public $addr_to;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $deferred;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $priority;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $class;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $message;
|
||||
/**
|
||||
* @var bool
|
||||
*/
|
||||
public $nostop;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $socid;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $contact_id;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $member_id;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_project;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $deliveryreceipt;
|
||||
|
||||
|
||||
|
|
@ -169,6 +196,7 @@ class CSMSFile
|
|||
|
||||
if (class_exists($classname)) {
|
||||
$sms = new $classname($this->db);
|
||||
'@phan-var-force OvhSms $sms'; // Using original for analysis
|
||||
|
||||
$sms->expe = $this->addr_from;
|
||||
$sms->dest = $this->addr_to;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2010-2018 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -43,14 +44,35 @@ class Canvas
|
|||
*/
|
||||
public $errors = array();
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $actiontype;
|
||||
|
||||
/**
|
||||
* @var string Module directory
|
||||
*/
|
||||
public $dirmodule; // Module directory
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $targetmodule; // Module concerned by canvas (ex: thirdparty, contact, ...)
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $canvas; // Name of canvas (ex: company, individual, product, service, ...)
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $card; // Tab (sub-canvas)
|
||||
|
||||
public $template_dir; // Initialized by getCanvas with templates directory
|
||||
/**
|
||||
* @var string Initialized by getCanvas with templates directory
|
||||
*/
|
||||
public $template_dir;
|
||||
/**
|
||||
* @var ActionsContactCardCommon|ActionsAdherentCardCommon|ActionsCardProduct|ActionsCardService|ActionsCardCommon
|
||||
*/
|
||||
public $control; // Initialized by getCanvas with controller instance
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3676,6 +3676,7 @@ abstract class CommonObject
|
|||
|
||||
$sql = "UPDATE ".$this->db->prefix().$this->table_element;
|
||||
$sql .= " SET ref_ext = '".$this->db->escape($ref_ext)."'";
|
||||
// @phan-suppress-next-line PhanUndeclaredProperty
|
||||
$sql .= " WHERE ".(isset($this->table_rowid) ? $this->table_rowid : 'rowid')." = ".((int) $this->id);
|
||||
|
||||
dol_syslog(get_class($this)."::update_ref_ext", LOG_DEBUG);
|
||||
|
|
@ -4036,7 +4037,9 @@ abstract class CommonObject
|
|||
}
|
||||
|
||||
// Add revenue stamp to total
|
||||
// @phan-suppress-next-line PhanUndeclaredProperty
|
||||
$this->total_ttc += isset($this->revenuestamp) ? $this->revenuestamp : 0;
|
||||
// @phan-suppress-next-line PhanUndeclaredProperty
|
||||
$this->multicurrency_total_ttc += isset($this->revenuestamp) ? ($this->revenuestamp * $multicurrency_tx) : 0;
|
||||
|
||||
// Situations totals
|
||||
|
|
@ -5472,6 +5475,7 @@ abstract class CommonObject
|
|||
|
||||
//var_dump($line);
|
||||
if (!empty($line->date_start)) {
|
||||
// @phan-suppress-next-line PhanUndeclaredProperty
|
||||
$date_start = $line->date_start;
|
||||
} else {
|
||||
$date_start = $line->date_debut_prevue;
|
||||
|
|
@ -5480,6 +5484,7 @@ abstract class CommonObject
|
|||
}
|
||||
}
|
||||
if (!empty($line->date_end)) {
|
||||
// @phan-suppress-next-line PhanUndeclaredProperty
|
||||
$date_end = $line->date_end;
|
||||
} else {
|
||||
$date_end = $line->date_fin_prevue;
|
||||
|
|
|
|||
|
|
@ -2097,7 +2097,7 @@ class Form
|
|||
* @param int<0,1> $show_empty 0=liste sans valeur nulle, 1=ajoute valeur inconnue
|
||||
* @param int[] $exclude Array list of users id to exclude
|
||||
* @param int<0,1> $disabled If select list must be disabled
|
||||
* @param int[]|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me
|
||||
* @param int[]|''|'hierarchy'|'hierarchyme' $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me
|
||||
* @param int[]|int $enableonly Array list of users id to be enabled. All other must be disabled
|
||||
* @param string $force_entity '0' or Ids of environment to force
|
||||
* @return void
|
||||
|
|
@ -2120,13 +2120,13 @@ class Form
|
|||
* @param int<0,1>|string $show_empty 0=list with no empty value, 1=add also an empty value into list
|
||||
* @param int[]|null $exclude Array list of users id to exclude
|
||||
* @param int $disabled If select list must be disabled
|
||||
* @param int[]|string $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me
|
||||
* @param array|string $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled
|
||||
* @param int[]|''|'hierarchy'|'hierarchyme' $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me
|
||||
* @param int[]|'' $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled
|
||||
* @param string $force_entity '0' or list of Ids of environment to force, separated by a coma, or 'default' = do no extend to all entities allowed to superadmin.
|
||||
* @param int $maxlength Maximum length of string into list (0=no limit)
|
||||
* @param int<-1,1> $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status
|
||||
* @param string $morefilter Add more filters into sql request (Example: '(employee:=:1)'). This value must not come from user input.
|
||||
* @param integer $show_every 0=default list, 1=add also a value "Everybody" at beginning of list
|
||||
* @param int<0,1> $show_every 0=default list, 1=add also a value "Everybody" at beginning of list
|
||||
* @param string $enableonlytext If option $enableonlytext is set, we use this text to explain into label why record is disabled. Not used if enableonly is empty.
|
||||
* @param string $morecss More css
|
||||
* @param int<0,1> $notdisabled Show only active users (note: this will also happen, whatever is this option, if USER_HIDE_INACTIVE_IN_COMBOBOX is on).
|
||||
|
|
|
|||
|
|
@ -45,9 +45,9 @@ class FormCompany extends Form
|
|||
/**
|
||||
* Return list of labels (translated) of third parties type
|
||||
*
|
||||
* @param int $mode 0=Return id+label, 1=Return code+label
|
||||
* @param string $filter Add a SQL filter to select. Data must not come from user input.
|
||||
* @return array Array of types
|
||||
* @param int<0,1> $mode 0=Return id+label, 1=Return code+label
|
||||
* @param string $filter Add a SQL filter to select. Data must not come from user input.
|
||||
* @return array<string,string> Array of types
|
||||
*/
|
||||
public function typent_array($mode = 0, $filter = '')
|
||||
{
|
||||
|
|
@ -96,9 +96,9 @@ class FormCompany extends Form
|
|||
/**
|
||||
* Return the list of entries for staff (no translation, it is number ranges)
|
||||
*
|
||||
* @param int $mode 0=return id+label, 1=return code+Label
|
||||
* @param string $filter Add a SQL filter to select. Data must not come from user input.
|
||||
* @return array Array of types d'effectifs
|
||||
* @param int<0,1> $mode 0=return id+label, 1=return code+Label
|
||||
* @param string $filter Add a SQL filter to select. Data must not come from user input.
|
||||
* @return array<string,string> Array of types d'effectifs
|
||||
*/
|
||||
public function effectif_array($mode = 0, $filter = '')
|
||||
{
|
||||
|
|
@ -126,13 +126,14 @@ class FormCompany extends Form
|
|||
$key = $objp->code;
|
||||
}
|
||||
|
||||
$effs[$key] = $objp->label != '-' ? $objp->label : '';
|
||||
$effs[$key] = $objp->label != '-' ? (string) $objp->label : '';
|
||||
$i++;
|
||||
}
|
||||
$this->db->free($resql);
|
||||
}
|
||||
//return natural sorted list
|
||||
natsort($effs);
|
||||
'@phan-var-force array<string,string> $effs';
|
||||
return $effs;
|
||||
}
|
||||
|
||||
|
|
@ -642,7 +643,7 @@ class FormCompany extends Form
|
|||
* @param string $var_id Name of id field
|
||||
* @param int $selected Pre-selected third party
|
||||
* @param string $htmlname Name of HTML form
|
||||
* @param array $limitto Disable answers that are not id in this array list
|
||||
* @param int[] $limitto Disable answers that are not id in this array list
|
||||
* @param int $forceid This is to force another object id than object->id
|
||||
* @param string $moreparam String with more param to add into url when noajax search is used.
|
||||
* @param string $morecss More CSS on select component
|
||||
|
|
@ -768,6 +769,7 @@ class FormCompany extends Form
|
|||
|
||||
$num = $this->db->num_rows($resql);
|
||||
$i = 0;
|
||||
$firstCompany = 0; // For static analysis
|
||||
if ($num) {
|
||||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
|
@ -808,15 +810,15 @@ class FormCompany extends Form
|
|||
/**
|
||||
* Return a select list with types of contacts
|
||||
*
|
||||
* @param object $object Object to use to find type of contact
|
||||
* @param Object $object Object to use to find type of contact
|
||||
* @param string $selected Default selected value
|
||||
* @param string $htmlname HTML select name
|
||||
* @param string $source Source ('internal' or 'external')
|
||||
* @param string $sortorder Sort criteria ('position', 'code', ...)
|
||||
* @param int $showempty 1=Add en empty line
|
||||
* @param string $morecss Add more css to select component
|
||||
* @param int $output 0=return HTML, 1= direct print
|
||||
* @param int $forcehidetooltip Force hide tooltip for admin
|
||||
* @param int<0,1> $output 0=return HTML, 1= direct print
|
||||
* @param int<0,1> $forcehidetooltip Force hide tooltip for admin
|
||||
* @return string|void Depending on $output param, return the HTML select list (recommended method) or nothing
|
||||
*/
|
||||
public function selectTypeContact($object, $selected, $htmlname = 'type', $source = 'internal', $sortorder = 'position', $showempty = 0, $morecss = '', $output = 1, $forcehidetooltip = 0)
|
||||
|
|
@ -825,6 +827,7 @@ class FormCompany extends Form
|
|||
|
||||
$out = '';
|
||||
if (is_object($object) && method_exists($object, 'liste_type_contact')) {
|
||||
'@phan-var-force CommonObject $object'; // CommonObject has the method.
|
||||
$lesTypes = $object->liste_type_contact($source, $sortorder, 0, 1); // List of types into c_type_contact for element=$object->element
|
||||
|
||||
$out .= '<select class="flat valignmiddle' . ($morecss ? ' ' . $morecss : '') . '" name="' . $htmlname . '" id="' . $htmlname . '">';
|
||||
|
|
@ -860,7 +863,7 @@ class FormCompany extends Form
|
|||
* @param string $htmlname Html component name and id
|
||||
* @param Contact $contact Contact Object
|
||||
* @param string $rendermode view, edit
|
||||
* @param array $selected $key=>$val $val is selected Roles for input mode
|
||||
* @param array<array{id:int}> $selected $key=>$val $val is selected Roles for input mode
|
||||
* @param string $morecss More css
|
||||
* @param string $placeholder Placeholder text (used when $rendermode is 'edit')
|
||||
* @return string String with contacts roles
|
||||
|
|
@ -876,7 +879,7 @@ class FormCompany extends Form
|
|||
}
|
||||
|
||||
if ($rendermode === 'edit') { // A multiselect combo list
|
||||
$contactType = $contact->listeTypeContacts('external', '', 1, '', '', 'agenda'); // We exclude agenda as there is no contact on such element
|
||||
$contactType = $contact->listeTypeContacts('external', 0, 1, '', '', 'agenda'); // We exclude agenda as there is no contact on such element
|
||||
if (count($selected) > 0) {
|
||||
$newselected = array();
|
||||
foreach ($selected as $key => $val) {
|
||||
|
|
@ -934,12 +937,12 @@ class FormCompany extends Form
|
|||
/**
|
||||
* Return HTML string to use as input of professional id into a HTML page (siren, siret, etc...)
|
||||
*
|
||||
* @param int $idprof 1,2,3,4 (Example: 1=siren,2=siret,3=naf,4=rcs/rm)
|
||||
* @param string $htmlname Name of HTML select
|
||||
* @param string $preselected Default value to show
|
||||
* @param string $country_code FR, IT, ...
|
||||
* @param string $morecss More css
|
||||
* @return string HTML string with prof id
|
||||
* @param int<1,4> $idprof 1,2,3,4 (Example: 1=siren,2=siret,3=naf,4=rcs/rm)
|
||||
* @param string $htmlname Name of HTML select
|
||||
* @param string $preselected Default value to show
|
||||
* @param string $country_code FR, IT, ...
|
||||
* @param string $morecss More css
|
||||
* @return string HTML string with prof id
|
||||
*/
|
||||
public function get_input_id_prof($idprof, $htmlname, $preselected, $country_code, $morecss = 'maxwidth200')
|
||||
{
|
||||
|
|
@ -1155,7 +1158,7 @@ class FormCompany extends Form
|
|||
* Output html select to select prospect status
|
||||
*
|
||||
* @param string $htmlname Name of HTML select
|
||||
* @param Societe|null $prospectstatic Prospect object
|
||||
* @param Contact|null $prospectstatic Prospect object
|
||||
* @param int $statusprospect status of prospect
|
||||
* @param int $idprospect id of prospect
|
||||
* @param string $mode select if we want activate de html part or js
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -53,16 +54,16 @@ class FormSocialContrib
|
|||
* Return list of social contributions.
|
||||
* Use mysoc->country_id or mysoc->country_code so they must be defined.
|
||||
*
|
||||
* @param string $selected Preselected type
|
||||
* @param string $htmlname Name of field in form
|
||||
* @param int $useempty Set to 1 if we want an empty value
|
||||
* @param int $maxlen Max length of text in combo box
|
||||
* @param int $help Add or not the admin help picto
|
||||
* @param string $morecss Add more CSS on select
|
||||
* @param int $noerrorifempty No print error if list is empty for the country
|
||||
* @param int $selected Preselected type
|
||||
* @param string $htmlname Name of field in form
|
||||
* @param int<0,1> $useempty Set to 1 if we want an empty value
|
||||
* @param int $maxlen Max length of text in combo box
|
||||
* @param int<0,1> $help Add or not the admin help picto
|
||||
* @param string $morecss Add more CSS on select
|
||||
* @param int<0,1> $noerrorifempty No print error if list is empty for the country
|
||||
* @return void
|
||||
*/
|
||||
public function select_type_socialcontrib($selected = '', $htmlname = 'actioncode', $useempty = 0, $maxlen = 40, $help = 1, $morecss = 'minwidth300', $noerrorifempty = 0)
|
||||
public function select_type_socialcontrib($selected = 0, $htmlname = 'actioncode', $useempty = 0, $maxlen = 40, $help = 1, $morecss = 'minwidth300', $noerrorifempty = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $db, $langs, $user, $mysoc;
|
||||
|
|
|
|||
|
|
@ -66,61 +66,136 @@ class FormTicket
|
|||
*/
|
||||
public $fk_user_create;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $message;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $topic_title;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $action;
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withtopic;
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withemail;
|
||||
|
||||
/**
|
||||
* @var int $withsubstit Show substitution array
|
||||
* @var int<0,1> $withsubstit Show substitution array
|
||||
*/
|
||||
public $withsubstit;
|
||||
|
||||
/**
|
||||
* @var int<0,2>
|
||||
*/
|
||||
public $withfile;
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withfilereadonly;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $backtopage;
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $ispublic; // to show information or not into public form
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withtitletopic;
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withtopicreadonly;
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withreadid;
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withcompany; // to show company drop-down list
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withfromsocid;
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withfromcontactid;
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withnotifytiersatcreate;
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withusercreate; // to show name of creating user in form
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withcreatereadonly;
|
||||
|
||||
/**
|
||||
* @var int withextrafields
|
||||
* @var int<0,1> withextrafields
|
||||
*/
|
||||
public $withextrafields;
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withref; // to show ref field
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $withcancel;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_code;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $category_code;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $severity_code;
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @var array $substit Substitutions
|
||||
* @var array<string,string> $substit Substitutions
|
||||
*/
|
||||
public $substit = array();
|
||||
/**
|
||||
* @var array<string,mixed|array>
|
||||
*/
|
||||
public $param = array();
|
||||
|
||||
/**
|
||||
* @var string Error code (or message)
|
||||
*/
|
||||
public $error;
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
public $errors = array();
|
||||
|
||||
|
||||
|
|
@ -137,7 +212,7 @@ class FormTicket
|
|||
|
||||
$this->action = 'add';
|
||||
|
||||
$this->withcompany = !getDolGlobalInt("TICKETS_NO_COMPANY_ON_FORM") && isModEnabled("societe");
|
||||
$this->withcompany = (int) (!getDolGlobalInt("TICKETS_NO_COMPANY_ON_FORM") && isModEnabled("societe"));
|
||||
$this->withfromsocid = 0;
|
||||
$this->withfromcontactid = 0;
|
||||
$this->withreadid = 0;
|
||||
|
|
@ -174,12 +249,12 @@ class FormTicket
|
|||
/**
|
||||
* Show the form to input ticket
|
||||
*
|
||||
* @param int $withdolfichehead With dol_get_fiche_head() and dol_get_fiche_end()
|
||||
* @param string $mode Mode ('create' or 'edit')
|
||||
* @param int $public 1=If we show the form for the public interface
|
||||
* @param ?Contact $with_contact [=NULL] Contact to link to this ticket if it exists
|
||||
* @param string $action [=''] Action in card
|
||||
* @param ?Ticket $object [=NULL] Ticket object
|
||||
* @param int $withdolfichehead With dol_get_fiche_head() and dol_get_fiche_end()
|
||||
* @param 'create'|'edit' $mode Mode ('create' or 'edit')
|
||||
* @param int<0,1> $public 1=If we show the form for the public interface
|
||||
* @param ?Contact $with_contact [=NULL] Contact to link to this ticket if it exists
|
||||
* @param string $action [=''] Action in card
|
||||
* @param ?Ticket $object [=NULL] Ticket object
|
||||
* @return void
|
||||
*/
|
||||
public function showForm($withdolfichehead = 0, $mode = 'edit', $public = 0, $with_contact = null, $action = '', $object = null)
|
||||
|
|
@ -371,6 +446,7 @@ class FormTicket
|
|||
dol_include_once('/'.$element.'/class/'.$subelement.'.class.php');
|
||||
$classname = ucfirst($subelement);
|
||||
$objectsrc = new $classname($this->db);
|
||||
'@phan-var-force CommonObject $objectsrc';
|
||||
$objectsrc->fetch(GETPOSTINT('originid'));
|
||||
|
||||
if (empty($objectsrc->lines) && method_exists($objectsrc, 'fetch_lines')) {
|
||||
|
|
@ -514,7 +590,7 @@ class FormTicket
|
|||
if (count($cate_arbo)) {
|
||||
// Categories
|
||||
print '<tr><td class="wordbreak"></td><td>';
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', $langs->transnoentitiesnoconv("Categories"));
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', $langs->transnoentitiesnoconv("Categories"));
|
||||
print "</td></tr>";
|
||||
}
|
||||
}
|
||||
|
|
@ -598,7 +674,7 @@ class FormTicket
|
|||
$events = array();
|
||||
$events[] = array('method' => 'getContacts', 'url' => dol_buildpath('/core/ajax/contacts.php', 1), 'htmlname' => 'contactid', 'params' => array('add-customer-contact' => 'disabled'));
|
||||
print img_picto('', 'company', 'class="paddingright"');
|
||||
print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, '', $events, 0, 'minwidth200');
|
||||
print $form->select_company($this->withfromsocid, 'socid', '', 1, 1, 0, $events, 0, 'minwidth200');
|
||||
print '</td></tr>';
|
||||
if (!empty($conf->use_javascript_ajax) && getDolGlobalString('COMPANY_USE_SEARCH_TO_SELECT')) {
|
||||
$htmlname = 'socid';
|
||||
|
|
@ -755,7 +831,7 @@ class FormTicket
|
|||
/**
|
||||
* Return html list of tickets type
|
||||
*
|
||||
* @param string|array $selected Id of preselected field or array of Ids
|
||||
* @param string|int[] $selected Id of preselected field or array of Ids
|
||||
* @param string $htmlname Nom de la zone select
|
||||
* @param string $filtertype To filter on field type in llx_c_ticket_type (array('code'=>xx,'label'=>zz))
|
||||
* @param int $format 0=id+libelle, 1=code+code, 2=code+libelle, 3=id+code
|
||||
|
|
@ -1543,7 +1619,7 @@ class FormTicket
|
|||
// Zone to select its email template
|
||||
if (count($modelmail_array) > 0) {
|
||||
print '<tr class="email_line"><td></td><td colspan="2"><div style="padding: 3px 0 3px 0">'."\n";
|
||||
print $langs->trans('SelectMailModel').': '.$formmail->selectarray('modelmailselected', $modelmail_array, $this->param['models_id'], 1, 0, "", "", 0, 0, 0, '', 'minwidth200');
|
||||
print $langs->trans('SelectMailModel').': '.$formmail->selectarray('modelmailselected', $modelmail_array, $this->param['models_id'], 1, 0, 0, "", 0, 0, 0, '', 'minwidth200');
|
||||
if ($user->admin) {
|
||||
print info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -37,6 +37,9 @@ class Interfaces
|
|||
*/
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $dir; // Directory with all core and external triggers files
|
||||
|
||||
/**
|
||||
|
|
@ -184,6 +187,7 @@ class Interfaces
|
|||
}
|
||||
|
||||
$objMod = new $modName($this->db);
|
||||
'@phan-var-force DolibarrTriggers $objMod';
|
||||
if ($objMod) {
|
||||
$dblevelbefore = $this->db->transaction_opened;
|
||||
|
||||
|
|
@ -194,6 +198,7 @@ class Interfaces
|
|||
$result = $objMod->runTrigger($action, $object, $user, $langs, $conf);
|
||||
} elseif (method_exists($objMod, 'run_trigger')) { // Deprecated method
|
||||
dol_syslog(get_class($this)."::run_triggers action=".$action." Launch old method run_trigger (rename your trigger into runTrigger) for file '".$files[$key]."'", LOG_WARNING);
|
||||
// @phan-suppress-next-line PhanUndeclaredMethod
|
||||
$result = $objMod->run_trigger($action, $object, $user, $langs, $conf);
|
||||
} else {
|
||||
dol_syslog(get_class($this)."::run_triggers action=".$action." A trigger was declared for class ".get_class($objMod)." but method runTrigger was not found", LOG_ERR);
|
||||
|
|
@ -248,8 +253,8 @@ class Interfaces
|
|||
* Return list of triggers. Function used by admin page htdoc/admin/triggers.
|
||||
* List is sorted by trigger filename so by priority to run.
|
||||
*
|
||||
* @param array $forcedirtriggers null=All default directories. This parameter is used by modulebuilder module only.
|
||||
* @return array Array list of triggers
|
||||
* @param ?array<int,string> $forcedirtriggers null=All default directories. This parameter is used by modulebuilder module only.
|
||||
* @return array<array{picto:string,file:string,fullpath:string,relpath:string,iscoreorexternal?:'internal'|'external',version?:string,status?:string,module?:string,info:string}> Array list of triggers
|
||||
*/
|
||||
public function getTriggersList($forcedirtriggers = null)
|
||||
{
|
||||
|
|
@ -334,6 +339,7 @@ class Interfaces
|
|||
|
||||
try {
|
||||
$objMod = new $modName($db);
|
||||
'@phan-var-force DolibarrTriggers $objMod';
|
||||
|
||||
if (is_subclass_of($objMod, 'DolibarrTriggers')) {
|
||||
// Define disabledbyname and disabledbymodule
|
||||
|
|
@ -395,7 +401,7 @@ class Interfaces
|
|||
$triggers[$j]['status'] = img_picto('Error: Trigger '.$modName.' does not extends DolibarrTriggers', 'warning');
|
||||
|
||||
//print 'Error: Trigger '.$modName.' does not extends DolibarrTriggers<br>';
|
||||
$text = 'Error: Trigger '.$modName.' does not extends DolibarrTriggers';
|
||||
$text = 'Error: Trigger '.$modName.' does not extend DolibarrTriggers';
|
||||
}
|
||||
} catch (Exception $e) {
|
||||
print $e->getMessage();
|
||||
|
|
|
|||
|
|
@ -261,7 +261,7 @@ class RssParser
|
|||
/**
|
||||
* getItems
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{link:string,title:string,description:string,pubDate:string,category:string,id:string,author:string}>
|
||||
*/
|
||||
public function getItems()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021 John BOTELLA <john.botella@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -261,7 +262,7 @@ class Validate
|
|||
/**
|
||||
* Check for all values in db
|
||||
*
|
||||
* @param array $values Boolean to validate
|
||||
* @param string[] $values Boolean to validate
|
||||
* @param string $table the db table name without $this->db->prefix()
|
||||
* @param string $col the target col
|
||||
* @return boolean Validity is ok or not
|
||||
|
|
@ -313,6 +314,7 @@ class Validate
|
|||
if ($classname && class_exists($classname)) {
|
||||
/** @var CommonObject $object */
|
||||
$object = new $classname($this->db);
|
||||
'@phan-var-force CommonObject|User $object'; // User provided to propose a class with 'fetch'
|
||||
|
||||
if (!is_callable(array($object, 'fetch')) || !is_callable(array($object, 'isExistingObject'))) {
|
||||
$this->error = $this->outputLang->trans('BadSetupOfFieldFetchNotCallable');
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ function dol_quoted_printable_encode($input, $line_max = 76)
|
|||
} elseif (($dec == 61) || ($dec < 32) || ($dec > 126)) { // always encode "\t", which is *not* required
|
||||
$h2 = floor($dec / 16);
|
||||
$h1 = floor($dec % 16);
|
||||
$c = $escape.$hex["$h2"].$hex["$h1"];
|
||||
$c = $escape.$hex[(int) $h2].$hex[(int) $h1];
|
||||
}
|
||||
if ((strlen($newline) + strlen($c)) >= $line_max) { // CRLF is not counted
|
||||
$output .= $newline.$escape.$eol; // soft line break; " =\r\n" is okay
|
||||
|
|
@ -90,7 +90,7 @@ function dol_quoted_printable_encode($input, $line_max = 76)
|
|||
class vCard
|
||||
{
|
||||
/**
|
||||
* @var array array of properties
|
||||
* @var array<string,?string> array of properties
|
||||
*/
|
||||
public $properties;
|
||||
|
||||
|
|
@ -388,8 +388,8 @@ class vCard
|
|||
* Return a VCARD string
|
||||
* See RFC https://datatracker.ietf.org/doc/html/rfc6350
|
||||
*
|
||||
* @param Object $object Object (User or Contact)
|
||||
* @param Societe|null $company Company. May be null.
|
||||
* @param User|Contact $object Object (User or Contact)
|
||||
* @param ?Societe $company Company. May be null.
|
||||
* @param Translate $langs Lang object
|
||||
* @param string $urlphoto Full public URL of photo
|
||||
* @param string $outdir Directory where to store the temporary file
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ if (!defined('USE_CUSTOM_REPORT_AS_INCLUDE')) {
|
|||
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
|
||||
|
||||
$mode = GETPOST('mode', 'alpha');
|
||||
$objecttype = GETPOST('objecttype', 'aZ09arobase');
|
||||
$objecttype = (string) GETPOST('objecttype', 'aZ09arobase');
|
||||
$tabfamily = GETPOST('tabfamily', 'aZ09');
|
||||
|
||||
$search_measures = GETPOST('search_measures', 'array');
|
||||
|
|
@ -58,6 +58,8 @@ if (!defined('USE_CUSTOM_REPORT_AS_INCLUDE')) {
|
|||
$search_groupby = array();
|
||||
}
|
||||
|
||||
'@phan-var-force string[] $search_groupby';
|
||||
|
||||
$search_yaxis = GETPOST('search_yaxis', 'array');
|
||||
$search_graph = GETPOST('search_graph', 'restricthtml');
|
||||
|
||||
|
|
@ -77,6 +79,12 @@ if (!defined('USE_CUSTOM_REPORT_AS_INCLUDE')) {
|
|||
|
||||
$object = null;
|
||||
} else {
|
||||
// When included
|
||||
'
|
||||
@phan-var-force int<0,1> $SHOWLEGEND
|
||||
@phan-var-force string customreportkey
|
||||
';
|
||||
|
||||
$langs->load("main");
|
||||
// $search_measures, $search_xaxis or $search_yaxis may have been defined by the parent.
|
||||
|
||||
|
|
@ -122,6 +130,8 @@ $hookmanager->initHooks(array('customreport')); // Note that conf->hooks_modules
|
|||
|
||||
$title = '';
|
||||
$picto = '';
|
||||
$errormessage = null;
|
||||
$keyforlabeloffield = null;
|
||||
$head = array();
|
||||
$ObjectClassName = '';
|
||||
// Objects available by default
|
||||
|
|
@ -372,17 +382,17 @@ $arrayofgroupby = dol_sort_array($arrayofgroupby, 'position', 'asc', 0, 0, 1);
|
|||
|
||||
// Check parameters
|
||||
if ($action == 'viewgraph') {
|
||||
if (!count($search_measures)) {
|
||||
if (is_array($search_measures) && !count($search_measures)) {
|
||||
setEventMessages($langs->trans("AtLeastOneMeasureIsRequired"), null, 'warnings');
|
||||
} elseif ($mode == 'graph' && count($search_xaxis) > 1) {
|
||||
} elseif ($mode == 'graph' && is_array($search_xaxis) && count($search_xaxis) > 1) {
|
||||
setEventMessages($langs->trans("OnlyOneFieldForXAxisIsPossible"), null, 'warnings');
|
||||
$search_xaxis = array(0 => $search_xaxis[0]);
|
||||
}
|
||||
if (count($search_groupby) >= 2) {
|
||||
if (is_array($search_groupby) && count($search_groupby) >= 2) {
|
||||
setEventMessages($langs->trans("ErrorOnlyOneFieldForGroupByIsPossible"), null, 'warnings');
|
||||
$search_groupby = array(0 => $search_groupby[0]);
|
||||
}
|
||||
if (!count($search_xaxis)) {
|
||||
if (is_array($search_xaxis) && !count($search_xaxis)) {
|
||||
setEventMessages($langs->trans("AtLeastOneXAxisIsRequired"), null, 'warnings');
|
||||
} elseif ($mode == 'graph' && $search_graph == 'bars' && count($search_measures) > $MAXMEASURESINBARGRAPH) {
|
||||
$langs->load("errors");
|
||||
|
|
@ -477,6 +487,7 @@ if (is_array($search_groupby) && count($search_groupby)) {
|
|||
dol_include_once($classpath);
|
||||
if (class_exists($classname)) {
|
||||
$tmpobject = new $classname($db);
|
||||
'@phan-var-force CommonObject $tmpobject';
|
||||
$tmpobject->fetch($obj->val);
|
||||
foreach ($tmpobject->fields as $fieldkey => $field) {
|
||||
if ($field['showoncombobox']) {
|
||||
|
|
|
|||
|
|
@ -556,13 +556,13 @@ function societe_admin_prepare_head()
|
|||
* Return country label, code or id from an id, code or label
|
||||
*
|
||||
* @param int|string $searchkey Id or code of country to search
|
||||
* @param string $withcode '' or '0' = Return label,
|
||||
* '1'=Return code + label,
|
||||
* '2'=Return code from id,
|
||||
* '3'=Return id from code,
|
||||
* 'all'=Return array('id'=>,'code'=>,'label'=>)
|
||||
* @param DoliDB $dbtouse Database handler (using in global way may fail because of conflicts with some autoload features)
|
||||
* @param Translate $outputlangs Langs object for output translation
|
||||
* @param ''|'0'|'1'|'2'|'3'|'all' $withcode '' or '0' = Return label,
|
||||
* '1'=Return code + label,
|
||||
* '2'=Return code from id,
|
||||
* '3'=Return id from code,
|
||||
* 'all'=Return array('id'=>,'code'=>,'label'=>)
|
||||
* @param ?DoliDB $dbtouse Database handler (using in global way may fail because of conflicts with some autoload features)
|
||||
* @param ?Translate $outputlangs Langs object for output translation
|
||||
* @param int $entconv 0=Return value without entities and not converted to output charset, 1=Ready for html output
|
||||
* @param string $searchlabel Label of country to search (warning: searching on label is not reliable)
|
||||
* @return int|string|array{id:int,code:string,label:string} Integer with country id or String with country code or translated country name or Array('id','code','label') or 'NotDefined'
|
||||
|
|
@ -2202,7 +2202,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = null, $nopr
|
|||
if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
|
||||
$out .= getTitleFieldOfList('', 0, $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'maxwidthsearch ');
|
||||
}
|
||||
if ($donetodo) {
|
||||
if ($donetodo && $filterobj !== null) {
|
||||
$tmp = '';
|
||||
if (get_class($filterobj) == 'Societe') {
|
||||
$tmp .= '<a href="'.DOL_URL_ROOT.'/comm/action/list.php?mode=show_list&socid='.$filterobj->id.'&status=done">';
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ class InterfaceWorkflowManager extends DolibarrTriggers
|
|||
$ret = 0;
|
||||
|
||||
// Proposals to order
|
||||
if ($action == 'PROPAL_CLOSE_SIGNED') {
|
||||
if ($action == 'PROPAL_CLOSE_SIGNED' && $object instanceof Propal) {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
if (isModEnabled('order') && getDolGlobalString('WORKFLOW_PROPAL_AUTOCREATE_ORDER')) {
|
||||
$object->fetchObjectLinked();
|
||||
|
|
|
|||
|
|
@ -192,17 +192,53 @@ class EmailCollector extends CommonObject
|
|||
*/
|
||||
public $import_key;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $host;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $port;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $hostcharset;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $login;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $password;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $acces_type;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $oauth_service;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $imap_encryption;
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $norsh;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $source_directory;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $target_directory;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $maxemailpercollect;
|
||||
|
||||
/**
|
||||
|
|
@ -210,14 +246,32 @@ class EmailCollector extends CommonObject
|
|||
*/
|
||||
public $datelastresult;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $codelastresult;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $lastresult;
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $datelastok;
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
/**
|
||||
* @var array<array{id:int,status:int,rulevalue:string,type:'to'|'from'|'bcc'|'cc'|'subject'|'body'|'header'|'seene'|'unseen'|'unanswered'|'answered'|'smaller'|'larger'|'withtrackingidinmsgid'|'withouttrackingidinmsgid'|'withtrackingid'|'withouttrackingid'|'isanwser'|'isnotanswer'|'replyto'}>
|
||||
*/
|
||||
public $filters;
|
||||
/**
|
||||
* @var array<array{type:string,actionparam:string,status:int,position:int}>
|
||||
*/
|
||||
public $actions;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $debuginfo;
|
||||
|
||||
const STATUS_DISABLED = 0;
|
||||
|
|
@ -1010,7 +1064,7 @@ class EmailCollector extends CommonObject
|
|||
if (property_exists($object, $tmpproperty)) {
|
||||
$valuecurrent = $object->$tmpproperty;
|
||||
} else {
|
||||
// @phan-suppress-next-line PhanTypeInvalidDimOffset
|
||||
// False positive @phan-suppress-next-line PhanTypeInvalidDimOffset
|
||||
$valuecurrent = $tmp[$tmpproperty];
|
||||
}
|
||||
}
|
||||
|
|
@ -1105,6 +1159,10 @@ class EmailCollector extends CommonObject
|
|||
$searchfilterexcludesubjectarray = array();
|
||||
$operationslog = '';
|
||||
$rulesreplyto = array();
|
||||
$connectstringsource = '';
|
||||
$connectstringtarget = '';
|
||||
$connection = false;
|
||||
$arrayofemail = array();
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
|
|
@ -1264,7 +1322,7 @@ class EmailCollector extends CommonObject
|
|||
$this->debuginfo .= 'connectstringsource = '.$connectstringsource.', $connectstringtarget='.$connectstringtarget.'<br>';
|
||||
|
||||
$connection = imap_open($connectstringsource, $this->login, $this->password);
|
||||
if (!$connection) {
|
||||
if ($connection === false) {
|
||||
$this->error = 'Failed to open IMAP connection '.$connectstringsource.' '.imap_last_error();
|
||||
return -3;
|
||||
}
|
||||
|
|
@ -1279,6 +1337,7 @@ class EmailCollector extends CommonObject
|
|||
//$search='ALL';
|
||||
}
|
||||
|
||||
$criteria = array();
|
||||
if (getDolGlobalString('MAIN_IMAP_USE_PHPIMAP')) {
|
||||
// Use PHPIMAP external library
|
||||
$criteria = array(array('UNDELETED')); // Seems not supported by some servers
|
||||
|
|
@ -1564,8 +1623,9 @@ class EmailCollector extends CommonObject
|
|||
$nbemailok = 0;
|
||||
$nbactiondone = 0;
|
||||
$charset = ($this->hostcharset ? $this->hostcharset : "UTF-8");
|
||||
$arrayofemail = array();
|
||||
|
||||
if (getDolGlobalString('MAIN_IMAP_USE_PHPIMAP')) {
|
||||
if (getDolGlobalString('MAIN_IMAP_USE_PHPIMAP') && is_object($client)) {
|
||||
try {
|
||||
// Uncomment this to output debug info
|
||||
//$client->getConnection()->enableDebug();
|
||||
|
|
@ -1620,7 +1680,7 @@ class EmailCollector extends CommonObject
|
|||
dol_syslog("EmailCollector::doCollectOneCollector ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
} else {
|
||||
} elseif ($connection !== false) {
|
||||
// Scan IMAP dir (for native IMAP, the source dir is inside the $connection variable)
|
||||
$arrayofemail = imap_search($connection, $search, SE_UID, $charset);
|
||||
|
||||
|
|
@ -1638,7 +1698,7 @@ class EmailCollector extends CommonObject
|
|||
$arrayofemailtodelete = array(); // Track email to delete to make the deletion at end.
|
||||
|
||||
// Loop on each email found
|
||||
if (!$error && !empty($arrayofemail) && count($arrayofemail) > 0) {
|
||||
if (!$error && !empty($arrayofemail) && count($arrayofemail) > 0 && $connection !== false) {
|
||||
// Loop to get part html and plain
|
||||
/*
|
||||
0 multipart/mixed
|
||||
|
|
@ -2620,7 +2680,7 @@ class EmailCollector extends CommonObject
|
|||
|
||||
// Create thirdparty
|
||||
$thirdpartystatic = new Societe($db);
|
||||
$thirdpartystatic->name = $nametouseforthirdparty;
|
||||
$thirdpartystatic->name = (string) (string) $nametouseforthirdparty;
|
||||
if (!empty($namealiastouseforthirdparty)) {
|
||||
if ($namealiastouseforthirdparty != $nametouseforthirdparty) {
|
||||
$thirdpartystatic->name_alias = $namealiastouseforthirdparty;
|
||||
|
|
@ -2937,7 +2997,7 @@ class EmailCollector extends CommonObject
|
|||
'recruitment/recruitmentcandidature' => array('table' => 'recruitment_recruitmentcandidature',
|
||||
'fields' => array('ref'),
|
||||
'class' => 'recruitment/class/recruitmentcandidature.class.php',
|
||||
'object' => ' RecruitmentCandidature'),
|
||||
'object' => 'RecruitmentCandidature'),
|
||||
'societe' => array('table' => 'societe',
|
||||
'fields' => array('code_client', 'code_fournisseur'),
|
||||
'class' => 'societe/class/societe.class.php',
|
||||
|
|
@ -3131,6 +3191,7 @@ class EmailCollector extends CommonObject
|
|||
// Overwrite values with values extracted from source email.
|
||||
// This may overwrite any $projecttocreate->xxx properties.
|
||||
$errorforthisaction = $this->overwritePropertiesOfObject($projecttocreate, $operation['actionparam'], $messagetext, $subject, $header, $operationslog);
|
||||
$modele = null;
|
||||
|
||||
// Set project ref if not yet defined
|
||||
if (empty($projecttocreate->ref)) {
|
||||
|
|
@ -3282,6 +3343,7 @@ class EmailCollector extends CommonObject
|
|||
// This may overwrite any $projecttocreate->xxx properties.
|
||||
$errorforthisaction = $this->overwritePropertiesOfObject($tickettocreate, $operation['actionparam'], $messagetext, $subject, $header, $operationslog);
|
||||
|
||||
$modele = 'UNDEFINED';
|
||||
// Set ticket ref if not yet defined
|
||||
if (empty($tickettocreate->ref)) {
|
||||
// Get next Ref
|
||||
|
|
|
|||
|
|
@ -109,7 +109,7 @@ class ExpenseReport extends CommonObject
|
|||
* 0=draft, 2=validated (attente approb), 4=canceled, 5=approved, 6=paid, 99=denied
|
||||
*
|
||||
* @var int Status
|
||||
* @deprecated
|
||||
* @deprecated Use $status
|
||||
*/
|
||||
public $fk_statut;
|
||||
|
||||
|
|
@ -123,6 +123,9 @@ class ExpenseReport extends CommonObject
|
|||
*/
|
||||
public $modepaymentid;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $paid;
|
||||
|
||||
// Paiement
|
||||
|
|
@ -141,6 +144,9 @@ class ExpenseReport extends CommonObject
|
|||
*/
|
||||
public $user_validator_infos;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $rule_warning_message;
|
||||
|
||||
// ACTIONS
|
||||
|
|
@ -244,7 +250,15 @@ class ExpenseReport extends CommonObject
|
|||
*/
|
||||
public $fk_user_approve;
|
||||
|
||||
/**
|
||||
* @var float|int
|
||||
* @deprecated See $total_localtax1
|
||||
*/
|
||||
public $localtax1; // for backward compatibility (real field should be total_localtax1 defined into CommonObject)
|
||||
/**
|
||||
* @var float|int
|
||||
* @deprecated See $total_localtax2
|
||||
*/
|
||||
public $localtax2; // for backward compatibility (real field should be total_localtax2 defined into CommonObject)
|
||||
|
||||
/**
|
||||
|
|
@ -1787,13 +1801,13 @@ class ExpenseReport extends CommonObject
|
|||
/**
|
||||
* Return clickable name (with picto eventually)
|
||||
*
|
||||
* @param int $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||
* @param string $option Where point the link ('', 'document', ..)
|
||||
* @param int $max Max length of shown ref
|
||||
* @param int $short 1=Return just URL
|
||||
* @param string $moretitle Add more text to title tooltip
|
||||
* @param int $notooltip 1=Disable tooltip
|
||||
* @param int $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @param int<0,2> $withpicto 0=No picto, 1=Include picto into link, 2=Only picto
|
||||
* @param string $option Where points the link ('', 'document', ..)
|
||||
* @param int $max Max length of shown ref
|
||||
* @param int<0,1> $short 1=Return just URL
|
||||
* @param string $moretitle Add more text to title tooltip
|
||||
* @param int<0,1> $notooltip 1=Disable tooltip
|
||||
* @param int<-1,1> $save_lastsearch_value -1=Auto, 0=No save of lastsearch_values when clicking, 1=Save lastsearch_values whenclicking
|
||||
* @return string String with URL
|
||||
*/
|
||||
public function getNomUrl($withpicto = 0, $option = '', $max = 0, $short = 0, $moretitle = '', $notooltip = 0, $save_lastsearch_value = -1)
|
||||
|
|
@ -2430,7 +2444,7 @@ class ExpenseReport extends CommonObject
|
|||
* Return list of people with permission to validate expense reports.
|
||||
* Search for permission "approve expense report"
|
||||
*
|
||||
* @return array|int Array of user ids, <0 if KO
|
||||
* @return int[]|int<-1,-1> Array of user ids, <0 if KO
|
||||
*/
|
||||
public function fetch_users_approver_expensereport()
|
||||
{
|
||||
|
|
@ -2469,10 +2483,10 @@ class ExpenseReport extends CommonObject
|
|||
*
|
||||
* @param string $modele Force le mnodele a utiliser ('' to not force)
|
||||
* @param Translate $outputlangs object lang a utiliser pour traduction
|
||||
* @param int $hidedetails Hide details of lines
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hideref Hide ref
|
||||
* @param ?array $moreparams Array to provide more information
|
||||
* @param int<0,1> $hidedetails Hide details of lines
|
||||
* @param int<0,1> $hidedesc Hide description
|
||||
* @param int<0,1> $hideref Hide ref
|
||||
* @param ?array<string,mixed> $moreparams Array to provide more information
|
||||
* @return int 0 if KO, 1 if OK
|
||||
*/
|
||||
public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
|
||||
|
|
@ -2499,8 +2513,8 @@ class ExpenseReport extends CommonObject
|
|||
/**
|
||||
* List of types
|
||||
*
|
||||
* @param int $active Active or not
|
||||
* @return array
|
||||
* @param int<0,1> $active Active or not
|
||||
* @return array<string,string>
|
||||
*/
|
||||
public function listOfTypes($active = 1)
|
||||
{
|
||||
|
|
@ -2786,7 +2800,7 @@ class ExpenseReport extends CommonObject
|
|||
|
||||
$ranges[$i] = $obj;
|
||||
}
|
||||
|
||||
'@phan-var-force Object[] $ranges';
|
||||
|
||||
for ($i = 0; $i < $num; $i++) {
|
||||
if ($i < ($num - 1)) {
|
||||
|
|
@ -2838,7 +2852,7 @@ class ExpenseReport extends CommonObject
|
|||
if ($selected >= 0) {
|
||||
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
if (array_key_exists('userauthor', $arraydata)) {
|
||||
if (array_key_exists('userauthor', $arraydata) && $arraydata['userauthor'] instanceof User) {
|
||||
$return .= '<br><span class="info-box-label">'.$arraydata['userauthor']->getNomUrl(-1).'</span>';
|
||||
}
|
||||
if (property_exists($this, 'date_debut') && property_exists($this, 'date_fin')) {
|
||||
|
|
|
|||
|
|
@ -59,6 +59,9 @@ class Holiday extends CommonObject
|
|||
*/
|
||||
public $fk_user;
|
||||
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $date_create = '';
|
||||
|
||||
/**
|
||||
|
|
@ -161,9 +164,19 @@ class Holiday extends CommonObject
|
|||
public $events = array();
|
||||
public $logs = array();
|
||||
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $optName = '';
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $optValue = '';
|
||||
public $optRowid = '';
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $optRowid = 0;
|
||||
|
||||
/**
|
||||
* Draft status
|
||||
|
|
@ -204,7 +217,7 @@ class Holiday extends CommonObject
|
|||
* Returns the reference to the following non used Order depending on the active numbering module
|
||||
* defined into HOLIDAY_ADDON
|
||||
*
|
||||
* @param Societe $objsoc third party object
|
||||
* @param ?Societe $objsoc third party object
|
||||
* @return string Holiday free reference
|
||||
*/
|
||||
public function getNextNumRef($objsoc)
|
||||
|
|
@ -1826,7 +1839,7 @@ class Holiday extends CommonObject
|
|||
* @param boolean $stringlist If true return a string list of id. If false, return an array with detail.
|
||||
* @param boolean $type If true, read Dolibarr user list, if false, return vacation balance list.
|
||||
* @param string $filters Filters. Warning: This must not contains data from user input.
|
||||
* @return array{rowid:int,id:int,name:string,lastname:string,firstname:string,gender:string,status:string,employee:string,photo:string,fk_user:int,type?:int,nb_holiday?:int}|string|int<-1,-1> Return an array
|
||||
* @return array<array{rowid:int,id:int,name:string,lastname:string,firstname:string,gender:string,status:int,employee:string,photo:string,fk_user:int,type?:int,nb_holiday?:int}>|string|int<-1,-1> Return an array
|
||||
*/
|
||||
public function fetchUsers($stringlist = true, $type = true, $filters = '')
|
||||
{
|
||||
|
|
@ -1961,16 +1974,16 @@ class Holiday extends CommonObject
|
|||
while ($i < $num) {
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
|
||||
$tab_result[$i]['rowid'] = $obj->rowid; // rowid of user
|
||||
$tab_result[$i]['id'] = $obj->rowid; // id of user
|
||||
$tab_result[$i]['rowid'] = (int) $obj->rowid; // rowid of user
|
||||
$tab_result[$i]['id'] = (int) $obj->rowid; // id of user
|
||||
$tab_result[$i]['name'] = $obj->lastname; // deprecated
|
||||
$tab_result[$i]['lastname'] = $obj->lastname;
|
||||
$tab_result[$i]['firstname'] = $obj->firstname;
|
||||
$tab_result[$i]['gender'] = $obj->gender;
|
||||
$tab_result[$i]['status'] = $obj->status;
|
||||
$tab_result[$i]['status'] = (int) $obj->status;
|
||||
$tab_result[$i]['employee'] = $obj->employee;
|
||||
$tab_result[$i]['photo'] = $obj->photo;
|
||||
$tab_result[$i]['fk_user'] = $obj->fk_user; // rowid of manager
|
||||
$tab_result[$i]['fk_user'] = (int) $obj->fk_user; // rowid of manager
|
||||
//$tab_result[$i]['type'] = $obj->type;
|
||||
//$tab_result[$i]['nb_holiday'] = $obj->nb_holiday;
|
||||
|
||||
|
|
@ -2037,7 +2050,7 @@ class Holiday extends CommonObject
|
|||
* Return list of people with permission to validate leave requests.
|
||||
* Search for permission "approve leave requests"
|
||||
*
|
||||
* @return array|int Array of user ids or -1 if error
|
||||
* @return int[]|int<-1,-1> Array of user ids or -1 if error
|
||||
*/
|
||||
public function fetch_users_approver_holiday()
|
||||
{
|
||||
|
|
@ -2266,9 +2279,9 @@ class Holiday extends CommonObject
|
|||
/**
|
||||
* Return array with list of types
|
||||
*
|
||||
* @param int $active Status of type. -1 = Both
|
||||
* @param int $affect Filter on affect (a request will change sold or not). -1 = Both
|
||||
* @return array Return array with list of types
|
||||
* @param int $active Status of type. -1 = Both
|
||||
* @param int $affect Filter on affect (a request will change sold or not). -1 = Both
|
||||
* @return array<int,array{id:int,rowid:int,code:string,label:string,affect:int,delay:int,newbymonth:int}> Return array with list of types
|
||||
*/
|
||||
public function getTypes($active = -1, $affect = -1)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2016 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* 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
|
||||
|
|
@ -264,7 +265,7 @@ print_barre_liste($title, $page, $_SERVER["PHP_SELF"], '', $sortfield, $sortorde
|
|||
include DOL_DOCUMENT_ROOT.'/core/tpl/massactions_pre.tpl.php';
|
||||
|
||||
if ($massaction == 'preincreaseholiday') {
|
||||
$langs->load("holiday", "hrm");
|
||||
$langs->loadLangs(array("holiday", "hrm"));
|
||||
require_once DOL_DOCUMENT_ROOT.'/holiday/class/holiday.class.php';
|
||||
$staticholiday = new Holiday($db);
|
||||
$arraytypeholidays = $staticholiday->getTypes(1, 1);
|
||||
|
|
@ -364,7 +365,7 @@ if (count($typeleaves) == 0) {
|
|||
// Supervisor
|
||||
if (!empty($arrayfields['cp.fk_user']['checked'])) {
|
||||
print '<td class="liste_titre">';
|
||||
print $form->select_dolusers($search_supervisor, 'search_supervisor', 1, null, 0, null, null, 0, 0, 0, '', 0, '', 'maxwidth150');
|
||||
print $form->select_dolusers($search_supervisor, 'search_supervisor', 1, null, 0, array(), '', 0, 0, 0, '', 0, '', 'maxwidth150');
|
||||
print '</td>';
|
||||
}
|
||||
// Type of leave request
|
||||
|
|
|
|||
|
|
@ -214,7 +214,7 @@ foreach ($dirmodels as $reldir) {
|
|||
$invoice = new Facture($db);
|
||||
$invoice->date = $now;
|
||||
$invoice->module_source = 'takepos';
|
||||
$invoice->pos_source = 1;
|
||||
$invoice->pos_source = '1';
|
||||
|
||||
// Info
|
||||
$htmltooltip = '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue