mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Qual: Fix several phan & stan notices (#31308)
* Qual: Fix several phan & stan notices # Qual: Fix several phan & stan notices Several fixes in files while fixing UnknownClass notices * Qual: Update prepare_head PHPDoc return types # Qual: Update prepare_head PHPDoc return types Provide detailed array return types for prepare_head functions. * Fix new phan notice * Better loadLangs typing and fix call to loadLangs * Fix new issues (stats) * Other fixes of new issues * Qual: update phan baseline
This commit is contained in:
parent
995f131ad2
commit
53cfbc35be
|
|
@ -9,36 +9,36 @@
|
|||
*/
|
||||
return [
|
||||
// # Issue statistics:
|
||||
// PhanPluginUnknownPropertyType : 1000+ occurrences
|
||||
// PhanUndeclaredProperty : 840+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 630+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 470+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 410+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 380+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 290+ occurrences
|
||||
// PhanUndeclaredProperty : 800+ occurrences
|
||||
// PhanPluginUnknownPropertyType : 740+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 600+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 430+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 380+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 320+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 270+ occurrences
|
||||
// PhanPossiblyUndeclaredVariable : 260+ occurrences
|
||||
// PhanTypeMismatchProperty : 180+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionReturnType : 140+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionParamType : 120+ occurrences
|
||||
// PhanTypeMismatchProperty : 170+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionParamType : 110+ occurrences
|
||||
// PhanTypeMismatchArgumentNullableInternal : 70+ occurrences
|
||||
// PhanPluginUndeclaredVariableIsset : 65+ occurrences
|
||||
// PhanPluginUnknownArrayPropertyType : 65+ occurrences
|
||||
// PhanPluginEmptyStatementIf : 50+ occurrences
|
||||
// PhanPluginUnknownArrayPropertyType : 60+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionReturnType : 55+ occurrences
|
||||
// PhanRedefineFunction : 50+ occurrences
|
||||
// PhanTypeSuspiciousNonTraversableForeach : 50+ occurrences
|
||||
// PhanTypeInvalidDimOffset : 35+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 30+ occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 25+ occurrences
|
||||
// PhanPluginEmptyStatementIf : 45+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 40+ occurrences
|
||||
// PhanTypeSuspiciousNonTraversableForeach : 30+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccess : 25+ occurrences
|
||||
// PhanTypeInvalidDimOffset : 25+ occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 15+ occurrences
|
||||
// PhanTypeComparisonFromArray : 15+ occurrences
|
||||
// PhanUndeclaredConstant : 15+ occurrences
|
||||
// PhanUndeclaredMethod : 15+ occurrences
|
||||
// PhanEmptyForeach : 10+ occurrences
|
||||
// PhanPluginConstantVariableNull : 10+ occurrences
|
||||
// PhanPluginSuspiciousParamPosition : 10+ occurrences
|
||||
// PhanPossiblyNullTypeMismatchProperty : 10+ occurrences
|
||||
// PhanTypeMismatchDimFetchNullable : 10+ occurrences
|
||||
// PhanUndeclaredMethod : 10+ occurrences
|
||||
// PhanPluginBothLiteralsBinaryOp : 8 occurrences
|
||||
// PhanPluginSuspiciousParamPosition : 8 occurrences
|
||||
// PhanPluginDuplicateExpressionBinaryOp : 7 occurrences
|
||||
// PhanParamTooMany : 5 occurrences
|
||||
// PhanPluginDuplicateArrayKey : 4 occurrences
|
||||
|
|
@ -51,11 +51,8 @@ return [
|
|||
'file_suppressions' => [
|
||||
'htdocs/accountancy/class/accountancycategory.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/accountancy/class/accountancyexport.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/accountancy/class/accountingjournal.class.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/accountancy/journal/purchasesjournal.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/adherents/canvas/actions_adherentcard_common.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/adherents/list.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/adherents/stats/index.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/admin/fckeditor.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/api/class/api_access.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/api/class/api_documents.class.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
|
|
@ -82,7 +79,6 @@ return [
|
|||
'htdocs/bom/bom_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/bom/class/api_boms.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/bom/class/bom.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/bom/lib/bom.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/bom/tpl/objectline_edit.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/bom/tpl/objectline_view.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/bookcal/availabilities_card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -91,11 +87,8 @@ return [
|
|||
'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/categories/class/api_categories.class.php' => ['PhanAccessMethodProtected', 'PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/categories/class/categorie.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/categories/class/categorie.class.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/categories/edit.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/index.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/categories/info.php' => ['PhanTypeMismatchDimFetch'],
|
||||
|
|
@ -122,16 +115,13 @@ return [
|
|||
'htdocs/comm/propal/card.php' => ['PhanTypeMismatchProperty'],
|
||||
'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'],
|
||||
'htdocs/commande/class/commande.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/commande/class/commandestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/commande/customer.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/commande/list.php' => ['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' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/bank/account_statement_document.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -155,21 +145,20 @@ return [
|
|||
'htdocs/compta/charges/index.php' => ['PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/compta/clients.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'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'],
|
||||
'htdocs/compta/facture/agenda-rec.php' => ['PhanPluginEmptyStatementIf'],
|
||||
'htdocs/compta/facture/card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/facture/class/api_invoices.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/facture/class/facture-rec.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/facture/class/facture.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/facture/class/facturestats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/facture/class/facturestats.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/facture/class/paymentterm.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/compta/facture/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/facture/invoicetemplate_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/facture/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/facture/note.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/facture/prelevement.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/facture/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/facture/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/compta/facture/tpl/linkedobjectblock.tpl.php' => ['PhanEmptyFQSENInClasslike', 'PhanInvalidFQSENInClasslike', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/facture/tpl/linkedobjectblockForRec.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/journal/purchasesjournal.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -245,7 +234,6 @@ return [
|
|||
'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' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/ajax/selectobject.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/ajax/selectsearchbox.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/core/boxes/box_actions.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
|
|
@ -317,7 +305,7 @@ return [
|
|||
'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/translate.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/class/utils.class.php' => ['PhanPluginConstantVariableNull', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/customreports.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetchNullable'],
|
||||
'htdocs/core/datepicker.php' => ['PhanTypeInvalidDimOffset'],
|
||||
|
|
@ -329,58 +317,32 @@ return [
|
|||
'htdocs/core/filemanagerdol/connectors/php/connector.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionParamType', 'PhanTypeInvalidDimOffset'],
|
||||
'htdocs/core/lib/accounting.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/admin.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/agenda.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/lib/agenda.lib.php' => ['PhanPluginConstantVariableNull', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'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', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/lib/contract.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/cron.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/customreports.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchDimFetch'],
|
||||
'htdocs/core/lib/date.lib.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/lib/doc.lib.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/ecm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/eventorganization.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/expedition.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/expensereport.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/files.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/fourn.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/ftp.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/lib/functions2.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/functionsnumtoword.lib.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/geturl.lib.php' => ['PhanPluginConstantVariableNull', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/lib/holiday.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/hrm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/images.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/lib/import.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/invoice.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/invoice2.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/ldap.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/loan.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/mailmanspip.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/memory.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/multicurrency.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/lib/oauth.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/order.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/payments.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/pdf.lib.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/prelevement.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/price.lib.php' => ['PhanPluginSuspiciousParamPosition', 'PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/product.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/project.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/receiptprinter.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/report.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/lib/resource.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/salaries.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/security.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/lib/signature.lib.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/socialnetwork.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/stock.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/takepos.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/tax.lib.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/lib/ticket.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/treeview.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/lib/website.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/core/lib/xcal.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/menus/standard/auguria.lib.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/core/menus/standard/eldy_menu.php' => ['PhanTypeInvalidDimOffset'],
|
||||
|
|
@ -456,8 +418,8 @@ return [
|
|||
'htdocs/core/modules/supplier_order/mod_commande_fournisseur_muguet.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/supplier_order/modules_commandefournisseur.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/modules/supplier_payment/doc/pdf_standard_supplierpayment.modules.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_proposal/doc/pdf_aurore.modules.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_proposal/doc/pdf_zenith.modules.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/syslog/mod_syslog_file.php' => ['PhanPluginDuplicateArrayKey'],
|
||||
'htdocs/core/modules/syslog/mod_syslog_syslog.php' => ['PhanPluginConstantVariableNull', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/ticket/doc/doc_generic_ticket_odt.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeSuspiciousNonTraversableForeach'],
|
||||
|
|
@ -517,7 +479,6 @@ return [
|
|||
'htdocs/don/card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/don/class/api_donations.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/don/class/don.class.php' => ['PhanParamTooMany', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/don/class/donstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/don/class/paymentdonation.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/don/document.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/don/index.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
|
|
@ -527,7 +488,6 @@ return [
|
|||
'htdocs/don/paiement/list.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/don/payment/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/don/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/don/stats/index.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/don/tpl/linkedobjectblock.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/ecm/class/ecmdirectory.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/ecm/class/ecmfiles.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -539,8 +499,6 @@ return [
|
|||
'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'],
|
||||
'htdocs/eventorganization/class/conferenceorbooth.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/eventorganization/class/conferenceorboothattendee.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/eventorganization/conferenceorbooth_card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/eventorganization/conferenceorbooth_contact.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -548,12 +506,10 @@ return [
|
|||
'htdocs/eventorganization/conferenceorboothattendee_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/eventorganization/conferenceorboothattendee_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/eventorganization/core/actions_massactions_mail.inc.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/eventorganization/lib/eventorganization_conferenceorbooth.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/expedition/card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expedition/class/api_shipments.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expedition/class/expedition.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/expedition/class/expeditionlinebatch.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/expedition/class/expeditionstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expedition/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/expedition/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/expedition/document.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -563,7 +519,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/expensereportstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/expensereport/payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/payment/info.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -576,7 +531,7 @@ return [
|
|||
'htdocs/fichinter/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/api_interventions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/fichinterstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/fichinter/class/fichinterstats.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/fichinter/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fichinter/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/filefunc.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -625,19 +580,12 @@ return [
|
|||
'htdocs/hrm/job_agenda.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/hrm/job_card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/hrm/job_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/hrm/lib/hrm.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/hrm/lib/hrm_job.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/hrm/lib/hrm_position.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/hrm/lib/hrm_skill.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/hrm/lib/hrm_skilldet.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/hrm/lib/hrm_skillrank.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/hrm/position_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/hrm/skill_card.php' => ['PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/skill_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/imports/class/import.class.php' => ['PhanPluginEmptyStatementIf'],
|
||||
'htdocs/imports/emptyexample.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/imports/import.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/install/check.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/install/fileconf.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/install/inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanRedefineFunction'],
|
||||
|
|
@ -648,7 +596,6 @@ return [
|
|||
'htdocs/install/upgrade.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/intracommreport/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/intracommreport/class/intracommreport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/intracommreport/lib/intracommreport.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/knowledgemanagement/class/knowledgerecord.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/knowledgemanagement/knowledgerecord_card.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -669,8 +616,6 @@ return [
|
|||
'htdocs/master.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/mrp/class/api_mos.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/mrp/class/mo.class.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/mrp/lib/mrp.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/mrp/lib/mrp_mo.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/mrp/mo_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/mrp/mo_movements.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/mrp/mo_production.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -681,7 +626,7 @@ return [
|
|||
'htdocs/opcachepreload.php' => ['PhanEmptyForeach'],
|
||||
'htdocs/opensurvey/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/opensurvey/class/opensurveysondage.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/opensurvey/lib/opensurvey.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/opensurvey/lib/opensurvey.lib.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/opensurvey/list.php' => ['PhanEmptyForeach', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/results.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/wizard/choix_date.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -690,12 +635,10 @@ return [
|
|||
'htdocs/partnership/class/partnership.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/class/partnershiputils.class.php' => ['PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/lib/partnership.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/partnership/partnership_card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/partnership/partnership_list.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/paypal/lib/paypal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/printing/index.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/printing/lib/printing.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/product/admin/product.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/ajax/products.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/canvas/product/actions_card_product.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'],
|
||||
|
|
@ -716,7 +659,6 @@ return [
|
|||
'htdocs/product/inventory/card.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/inventory/class/inventory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/inventory/inventory.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/inventory/lib/inventory.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/product/inventory/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -743,7 +685,6 @@ return [
|
|||
'htdocs/product/stock/stats/reception.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/stockatdate.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stock/stocktransfer/class/stocktransferline.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/stocktransfer/lib/stocktransfer.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/product/stock/stocktransfer/stocktransfer_card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/product/stock/stocktransfer/stocktransfer_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/stock/tpl/stockcorrection.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -755,7 +696,7 @@ return [
|
|||
'htdocs/projet/ajax/projects.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/projet/class/api_tasks.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/projet/class/projectstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/projet/class/projectstats.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/projet/class/task.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/projet/class/taskstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/projet/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeComparisonFromArray', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -807,7 +748,7 @@ return [
|
|||
'htdocs/public/ticket/view.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/webportal/tpl/menu.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/public/webportal/webportal.main.inc.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanRedefineFunction'],
|
||||
'htdocs/public/website/index.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/website/index.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/website/javascript.js.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/public/website/styles.css.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/reception/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -836,13 +777,12 @@ return [
|
|||
'htdocs/recruitment/recruitmentjobposition_note.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/resource/class/dolresource.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/resource/class/html.formresource.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeExpectedObjectPropAccess'],
|
||||
'htdocs/resource/element_resource.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/resource/element_resource.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/salaries/admin/salaries.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/salaries/class/api_salaries.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/salaries/class/paymentsalary.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/class/salariesstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/salaries/class/salary.class.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/salaries/class/salariesstats.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/salaries/document.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/info.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -852,7 +792,6 @@ return [
|
|||
'htdocs/societe/ajax/ajaxcompanies.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/societe/ajax/company.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/societe/canvas/actions_card_common.class.php' => ['PhanTypeSuspiciousNonTraversableForeach'],
|
||||
'htdocs/societe/card.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/societe/checkvat/checkVatPopup.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/societe/class/api_contacts.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/societe/class/api_thirdparties.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousNonTraversableForeach', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -869,15 +808,13 @@ return [
|
|||
'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'],
|
||||
'htdocs/stripe/lib/stripe.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/supplier_proposal/card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/class/api_supplier_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/class/supplier_proposal.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/class/supplier_proposal.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/supplier_proposal/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/support/inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanRedefineFunction'],
|
||||
'htdocs/takepos/admin/orderprinters.php' => ['PhanTypeMismatchDimFetch'],
|
||||
'htdocs/takepos/admin/terminal.php' => ['PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/takepos/ajax/ajax.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/takepos/floors.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/takepos/freezone.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -904,7 +841,7 @@ return [
|
|||
'htdocs/ticket/class/api_tickets.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/ticket/class/cticketcategory.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/class/ticket.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/class/ticketstats.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/ticket/class/ticketstats.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/ticket/contact.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/ticket/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/ticket/list.php' => ['PhanTypeComparisonFromArray'],
|
||||
|
|
@ -921,24 +858,20 @@ return [
|
|||
'htdocs/variants/combinations.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/variants/tpl/productattributevalueline_edit.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/variants/tpl/productattributevalueline_view.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/viewimage.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanRedefineFunction'],
|
||||
'htdocs/viewimage.php' => ['PhanRedefineFunction', 'PhanUndeclaredMethod'],
|
||||
'htdocs/webhook/class/api_webhook.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/webhook/class/target.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty'],
|
||||
'htdocs/webhook/lib/webhook.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/webhook/lib/webhook_target.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/webhook/class/target.class.php' => ['PhanUndeclaredMethod'],
|
||||
'htdocs/webhook/target_card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/webhook/target_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/webportal/class/context.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'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' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/webportal/class/webportalinvoice.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/webportal/class/webportalmember.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/webportal/class/webportalpropal.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/webportal/lib/webportal.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/webservices/server_actioncomm.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_category.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_category.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_contact.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_invoice.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_order.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -949,21 +882,17 @@ return [
|
|||
'htdocs/webservices/server_thirdparty.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_user.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/website/class/website.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/website/index.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownObjectMethodCall', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/website/lib/websiteaccount.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/website/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/website/samples/wrapper.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/website/websiteaccount_card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/workstation/class/api_workstations.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/workstation/class/workstation.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredProperty'],
|
||||
'htdocs/workstation/class/workstation.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/workstation/class/workstationresource.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/workstation/class/workstationusergroup.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/workstation/lib/workstation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/workstation/lib/workstation_workstation.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'htdocs/workstation/workstation_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/workstation/workstation_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/zapier/class/api_zapier.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/zapier/class/hook.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/zapier/lib/zapier.lib.php' => ['PhanPluginUnknownArrayFunctionReturnType'],
|
||||
'internal' => ['PhanUndeclaredConstant'],
|
||||
],
|
||||
// 'directory_suppressions' => ['src/directory_name' => ['PhanIssueName1', 'PhanIssueName2']] can be manually added if needed.
|
||||
|
|
|
|||
|
|
@ -462,7 +462,7 @@ class AccountingJournal extends CommonObject
|
|||
|
||||
$element = array(
|
||||
'ref' => dol_trunc($element_static->ref, 16, 'right', 'UTF-8', 1),
|
||||
'error' => $pre_data_info['error'],
|
||||
'error' => array_key_exists('error', $pre_data_info) ? $pre_data_info['error'] : '',
|
||||
'blocks' => array(),
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -546,7 +546,7 @@ if ($action == 'writebookkeeping' && !$error && $user->hasRight('accounting', 'b
|
|||
|
||||
if (getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT')) {
|
||||
if ($k == getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT')) {
|
||||
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta'];
|
||||
$bookkeeping->subledger_account = $tabcompany[$key]['code_compta_fournisseur'];
|
||||
$bookkeeping->subledger_label = $tabcompany[$key]['name'];
|
||||
} else {
|
||||
$bookkeeping->subledger_account = '';
|
||||
|
|
@ -1182,7 +1182,7 @@ if (empty($action) || $action == 'view') {
|
|||
print "<td>";
|
||||
if (getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_USE_AUXILIARY_ON_DEPOSIT')) {
|
||||
if ($k == getDolGlobalString('ACCOUNTING_ACCOUNT_SUPPLIER_DEPOSIT')) {
|
||||
print length_accounta($tabcompany[$key]['code_compta']);
|
||||
print length_accounta($tabcompany[$key]['code_compta_fournisseur']);
|
||||
}
|
||||
} elseif (($accountoshow == "") || $accountoshow == 'NotDefined') {
|
||||
print '<span class="error">' . $langs->trans("ThirdpartyAccountNotDefined") . '</span>';
|
||||
|
|
|
|||
|
|
@ -172,7 +172,7 @@ class AdherentStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total_diff:float,avg_diff:float,avg_weighted:float}> Array with nb, total amount, average for each year
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array with nb, total amount, average for each year
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2019 Maxime Kohlhaas <maxime@atm-consulting.fr>
|
||||
* Copyright (C) 2019-2023 Frédéric France <frederic.france@netlogic.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
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
/**
|
||||
* Prepare admin pages header
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function bomAdminPrepareHead()
|
||||
{
|
||||
|
|
@ -73,7 +74,7 @@ function bomAdminPrepareHead()
|
|||
* Prepare array of tabs for BillOfMaterials
|
||||
*
|
||||
* @param BOM $object BillOfMaterials
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function bomPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* 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
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
/**
|
||||
* Prepare admin pages header
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function bookcalAdminPrepareHead()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* 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
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
* Prepare array of tabs for Availabilities
|
||||
*
|
||||
* @param Availabilities $object Availabilities
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function availabilitiesPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* 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
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
* Prepare array of tabs for Calendar
|
||||
*
|
||||
* @param Calendar $object Calendar
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function calendarPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -263,12 +263,12 @@ class Categorie extends CommonObject
|
|||
public $cats = array();
|
||||
|
||||
/**
|
||||
* @var array Mother of table
|
||||
* @var array<int,int> Mother of table
|
||||
*/
|
||||
public $motherof = array();
|
||||
|
||||
/**
|
||||
* @var array children
|
||||
* @var Categorie[] children
|
||||
*/
|
||||
public $childs = array();
|
||||
|
||||
|
|
@ -338,7 +338,7 @@ class Categorie extends CommonObject
|
|||
/**
|
||||
* Get map list
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{id:int,code:string,cat_fk:string,cat_table:string,obj_class:string,obj_table:string}>
|
||||
*/
|
||||
public function getMapList()
|
||||
{
|
||||
|
|
@ -361,7 +361,7 @@ class Categorie extends CommonObject
|
|||
/**
|
||||
* Get MAP_ID
|
||||
*
|
||||
* @return array
|
||||
* @return array<string,int>
|
||||
*/
|
||||
public function getMapId()
|
||||
{
|
||||
|
|
@ -1105,7 +1105,7 @@ class Categorie extends CommonObject
|
|||
/**
|
||||
* Return direct children ids of a category into an array
|
||||
*
|
||||
* @return array|int Return integer <0 KO, array ok
|
||||
* @return Categorie[]|int Return integer <0 KO, array ok
|
||||
*/
|
||||
public function get_filles()
|
||||
{
|
||||
|
|
@ -1337,14 +1337,14 @@ class Categorie extends CommonObject
|
|||
/**
|
||||
* Returns all categories
|
||||
*
|
||||
* @param int $type Type of category (0, 1, ...)
|
||||
* @param ?int $type Type of category (0, 1, ...)
|
||||
* @param boolean $parent Just parent categories if true
|
||||
* @return array|int Table of Object Category, -1 on error
|
||||
* @return array<int,Categorie>|int<-1,-1> Table of Object Category, -1 on error
|
||||
*/
|
||||
public function get_all_categories($type = null, $parent = false)
|
||||
{
|
||||
// phpcs:enable
|
||||
if (!is_numeric($type)) {
|
||||
if (!is_numeric($type) && !is_null($type)) {
|
||||
$type = $this->MAP_ID[$type];
|
||||
}
|
||||
|
||||
|
|
@ -1376,8 +1376,8 @@ class Categorie extends CommonObject
|
|||
/**
|
||||
* Returns the top level categories (which are not child)
|
||||
*
|
||||
* @param int $type Type of category (0, 1, ...)
|
||||
* @return array
|
||||
* @param ?int $type Type of category (0, 1, ...)
|
||||
* @return array<int,Categorie>|int<-1,-1> Table of Object Category, -1 on error
|
||||
*/
|
||||
public function get_main_categories($type = null)
|
||||
{
|
||||
|
|
@ -1443,7 +1443,7 @@ class Categorie extends CommonObject
|
|||
* @param string $url Url ('', 'none' or 'urltouse')
|
||||
* @param int $nocolor 0
|
||||
* @param int $addpicto Add picto into link
|
||||
* @return array
|
||||
* @return string[]
|
||||
*/
|
||||
public function print_all_ways($sep = '>>', $url = '', $nocolor = 0, $addpicto = 0)
|
||||
{
|
||||
|
|
@ -1850,9 +1850,9 @@ class Categorie extends CommonObject
|
|||
/**
|
||||
* Add the image uploaded as $file to the directory $sdir/<category>-<id>/photos/
|
||||
*
|
||||
* @param string $sdir Root destination directory
|
||||
* @param array $file Uploaded file name
|
||||
* @return void
|
||||
* @param string $sdir Root destination directory
|
||||
* @param array{name:string,tmp_name:string} $file Uploaded file name
|
||||
* @return void
|
||||
*/
|
||||
public function add_photo($sdir, $file)
|
||||
{
|
||||
|
|
@ -1898,9 +1898,9 @@ class Categorie extends CommonObject
|
|||
/**
|
||||
* Return an array with all photos inside the directory
|
||||
*
|
||||
* @param string $dir Dir to scan
|
||||
* @param int $nbmax Nombre maximum de photos (0=pas de max)
|
||||
* @return array Tableau de photos
|
||||
* @param string $dir Dir to scan
|
||||
* @param int $nbmax Nombre maximum de photos (0=pas de max)
|
||||
* @return array<int,array{photo:string,photo_vignette:string}> Table with images
|
||||
*/
|
||||
public function liste_photos($dir, $nbmax = 0)
|
||||
{
|
||||
|
|
@ -2179,7 +2179,7 @@ class Categorie extends CommonObject
|
|||
*
|
||||
* @param string $type The category type (e.g Categorie::TYPE_WAREHOUSE)
|
||||
* @param string $rowIdName The name of the row id inside the whole sql query (e.g. "e.rowid")
|
||||
* @param Array $searchList A list with the selected categories
|
||||
* @param string[] $searchList A list with the selected categories
|
||||
* @return string A additional SQL SELECT query
|
||||
* @deprecated search on some categories must be done using a WHERE EXISTS or NOT EXISTS and not a LEFT JOIN
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -137,7 +137,7 @@ class PropaleStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with number by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -161,7 +161,7 @@ class PropaleStats extends Stats
|
|||
/**
|
||||
* Return propals number per year
|
||||
*
|
||||
* @return array Array with number by year
|
||||
* @return array<array{0:int,1:int}> Array of nb each year
|
||||
*
|
||||
*/
|
||||
public function getNbByYear()
|
||||
|
|
@ -186,7 +186,7 @@ class PropaleStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with amount by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with amount by month
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -211,7 +211,7 @@ class PropaleStats extends Stats
|
|||
* Return the propals amount average by month for a year
|
||||
*
|
||||
* @param int $year year for stats
|
||||
* @return array array with number by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with number by month
|
||||
*/
|
||||
public function getAverageByMonth($year)
|
||||
{
|
||||
|
|
@ -234,7 +234,7 @@ class PropaleStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array with nb, total amount, average for each year
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -334,7 +334,7 @@ print '</tr>';
|
|||
$oldyear = 0;
|
||||
foreach ($data as $val) {
|
||||
$year = $val['year'];
|
||||
while (!empty($year) && $oldyear > $year + 1) { // If we have empty year
|
||||
while (!empty($year) && $oldyear > (int) $year + 1) { // If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.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
|
||||
|
|
@ -150,7 +151,7 @@ class CommandeStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with number by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -174,7 +175,7 @@ class CommandeStats extends Stats
|
|||
/**
|
||||
* Return orders number per year
|
||||
*
|
||||
* @return array Array with number by year
|
||||
* @return array<array{0:int,1:int}> Array of nb each year
|
||||
*
|
||||
*/
|
||||
public function getNbByYear()
|
||||
|
|
@ -199,7 +200,7 @@ class CommandeStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with amount by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with amount by month
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -224,7 +225,7 @@ class CommandeStats extends Stats
|
|||
* Return the orders amount average by month for a year
|
||||
*
|
||||
* @param int $year year for stats
|
||||
* @return array array with number by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with number by month
|
||||
*/
|
||||
public function getAverageByMonth($year)
|
||||
{
|
||||
|
|
@ -247,7 +248,7 @@ class CommandeStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
@ -271,7 +272,7 @@ class CommandeStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $limit Limit
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values
|
||||
*/
|
||||
public function getAllByProduct($year, $limit = 10)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -136,6 +136,7 @@ $data = $stats->getNbByMonthWithPrevYear($endyear, $startyear);
|
|||
// $data = array(array('Lib',val1,val2,val3),...)
|
||||
|
||||
|
||||
$fileurlnb = '';
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
$filenamenb = $dir.'/ordersnbinyear-'.$user->id.'-'.$year.'.png';
|
||||
if ($mode == 'customer') {
|
||||
|
|
@ -183,6 +184,7 @@ $data = $stats->getAmountByMonthWithPrevYear($endyear, $startyear);
|
|||
//var_dump($data);
|
||||
// $data = array(array('Lib',val1,val2,val3),...)
|
||||
|
||||
$fileurlamount = '';
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
$filenameamount = $dir.'/ordersamountinyear-'.$user->id.'-'.$year.'.png';
|
||||
if ($mode == 'customer') {
|
||||
|
|
@ -228,6 +230,8 @@ if (!$mesg) {
|
|||
|
||||
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
|
||||
|
||||
|
||||
$fileurl_avg = '';
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
$filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png';
|
||||
if ($mode == 'customer') {
|
||||
|
|
@ -334,6 +338,8 @@ if ($user->admin) {
|
|||
}
|
||||
print '</td></tr>';
|
||||
// Category
|
||||
$cat_type = 0;
|
||||
$cat_label = '';
|
||||
if ($mode == 'customer') {
|
||||
$cat_type = Categorie::TYPE_CUSTOMER;
|
||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer"));
|
||||
|
|
@ -398,7 +404,7 @@ print '</tr>';
|
|||
$oldyear = 0;
|
||||
foreach ($data as $val) {
|
||||
$year = $val['year'];
|
||||
while (!empty($year) && $oldyear > $year + 1) { // If we have empty year
|
||||
while (!empty($year) && $oldyear > (int) $year + 1) { // If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (c) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 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
|
||||
|
|
@ -35,11 +36,26 @@ class DeplacementStats extends Stats
|
|||
*/
|
||||
public $table_element;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $socid;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $userid;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $from;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $field;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $where;
|
||||
|
||||
/**
|
||||
|
|
@ -47,7 +63,7 @@ class DeplacementStats extends Stats
|
|||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $socid Id third party
|
||||
* @param mixed $userid Id user for filter or array of user ids
|
||||
* @param int|int[] $userid Id user for filter or array of user ids
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($db, $socid = 0, $userid = 0)
|
||||
|
|
@ -78,7 +94,7 @@ class DeplacementStats extends Stats
|
|||
/**
|
||||
* Renvoie le nombre de facture par annee
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{0:int,1:int}> Array of nb each year
|
||||
*/
|
||||
public function getNbByYear()
|
||||
{
|
||||
|
|
@ -96,7 +112,7 @@ class DeplacementStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -118,7 +134,7 @@ class DeplacementStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -138,7 +154,7 @@ class DeplacementStats extends Stats
|
|||
* Return average amount
|
||||
*
|
||||
* @param int $year Year to scan
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with number by month
|
||||
*/
|
||||
public function getAverageByMonth($year)
|
||||
{
|
||||
|
|
@ -155,7 +171,7 @@ class DeplacementStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -167,6 +167,7 @@ if (!$mesg) {
|
|||
|
||||
$data = $stats->getAverageByMonthWithPrevYear($endyear, $startyear);
|
||||
|
||||
$filename_avg = '';
|
||||
if (!$user->hasRight('societe', 'client', 'voir')) {
|
||||
$filename_avg = $dir.'/ordersaverage-'.$user->id.'-'.$year.'.png';
|
||||
if ($mode == 'customer') {
|
||||
|
|
@ -282,7 +283,7 @@ print '</tr>';
|
|||
$oldyear = 0;
|
||||
foreach ($data as $val) {
|
||||
$year = $val['year'];
|
||||
while ($year && $oldyear > $year + 1) { // If we have empty year
|
||||
while ($year && $oldyear > (int) $year + 1) { // If we have empty year
|
||||
$oldyear--;
|
||||
print '<tr>';
|
||||
print '<td align="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'&mode='.$mode.'">'.$oldyear.'</a></td>';
|
||||
|
|
|
|||
|
|
@ -154,7 +154,7 @@ class FactureStats extends Stats
|
|||
/**
|
||||
* Return invoices number per year
|
||||
*
|
||||
* @return array Array with number by year
|
||||
* @return array<array{0:int,1:int}> Array of nb each year
|
||||
*/
|
||||
public function getNbByYear()
|
||||
{
|
||||
|
|
@ -228,7 +228,7 @@ class FactureStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total_diff:float,avg_diff:float,avg_weighted:float}> Array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ abstract class Stats
|
|||
* Return nb of elements, total amount and avg amount each year
|
||||
*
|
||||
* @param string $sql SQL request
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total_diff:float,avg_diff:float,avg_weighted:float}> Array with nb, total amount, average for each year
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array with nb, total amount, average for each year
|
||||
*/
|
||||
protected function _getAllByYear($sql)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -213,7 +213,7 @@ class Translate
|
|||
/**
|
||||
* Load translation files.
|
||||
*
|
||||
* @param array $domains Array of lang files to load
|
||||
* @param string[] $domains Array of lang files to load
|
||||
* @return int Return integer <0 if KO, 0 if already loaded or loading not required, >0 if OK
|
||||
*/
|
||||
public function loadLangs($domains)
|
||||
|
|
@ -243,12 +243,12 @@ class Translate
|
|||
* If $domain is "file@module" instead of "file" then we look for module lang file
|
||||
* in htdocs/custom/modules/mymodule/langs/code_CODE/file.lang
|
||||
* then in htdocs/module/langs/code_CODE/file.lang instead of htdocs/langs/code_CODE/file.lang
|
||||
* @param integer $alt 0 (try xx_ZZ then 1), 1 (try xx_XX then 2), 2 (try en_US)
|
||||
* @param int $alt 0 (try xx_ZZ then 1), 1 (try xx_XX then 2), 2 (try en_US)
|
||||
* @param int $stopafterdirection Stop when the DIRECTION tag is found (optimize speed)
|
||||
* @param string $forcelangdir To force a different lang directory
|
||||
* @param int $loadfromfileonly 1=Do not load overwritten translation from file or old conf.
|
||||
* @param int $forceloadifalreadynotfound Force attempt to reload lang file if it was previously not found
|
||||
* @param array $tabtranslatedomain Store translations to be stored in cache
|
||||
* @param array<string,string> $tabtranslatedomain Store translations to be stored in cache
|
||||
* @param string $langkey To create key for cachekey in recursivity
|
||||
* @return int Return integer <0 if KO, 0 if already loaded or loading not required, >0 if OK
|
||||
* @see loadLangs()
|
||||
|
|
@ -867,11 +867,11 @@ class Translate
|
|||
/**
|
||||
* Return list of all available languages
|
||||
*
|
||||
* @param string $langdir Directory to scan
|
||||
* @param integer $maxlength Max length for each value in combo box (will be truncated)
|
||||
* @param int $usecode 1=Show code instead of country name for language variant, 2=Show only code
|
||||
* @param int $mainlangonly 1=Show only main languages ('fr_FR' no' fr_BE', 'es_ES' not 'es_MX', ...)
|
||||
* @return array List of languages
|
||||
* @param string $langdir Directory to scan
|
||||
* @param int $maxlength Max length for each value in combo box (will be truncated)
|
||||
* @param int<0,1> $usecode 1=Show code instead of country name for language variant, 2=Show only code
|
||||
* @param int<0,1> $mainlangonly 1=Show only main languages ('fr_FR' no' fr_BE', 'es_ES' not 'es_MX', ...)
|
||||
* @return array<string,string> List of languages
|
||||
*/
|
||||
public function get_available_languages($langdir = DOL_DOCUMENT_ROOT, $maxlength = 0, $usecode = 0, $mainlangonly = 0)
|
||||
{
|
||||
|
|
@ -1195,7 +1195,7 @@ class Translate
|
|||
* Return an array with content of all loaded translation keys (found into this->tab_translate) so
|
||||
* we get a substitution array we can use for substitutions (for mail or ODT generation for example)
|
||||
*
|
||||
* @return array Array of translation keys lang_key => string_translation_loaded
|
||||
* @return array<string,string> Array of translation keys lang_key => string_translation_loaded
|
||||
*/
|
||||
public function get_translations_for_substitutions()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -2076,7 +2076,7 @@ function phpinfo_array()
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function company_admin_prepare_head()
|
||||
{
|
||||
|
|
@ -2115,7 +2115,7 @@ function company_admin_prepare_head()
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function email_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -512,7 +512,7 @@ function actions_prepare_head($object)
|
|||
* Define head array for tabs of agenda setup pages
|
||||
*
|
||||
* @param string $param Parameters to add to url
|
||||
* @return array Array of head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function calendars_prepare_head($param)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2018-2022 OpenDSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2022-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
|
||||
|
|
@ -178,7 +179,7 @@ function assetPrepareHead(Asset $object)
|
|||
* Prepare array of tabs for AssetModel
|
||||
*
|
||||
* @param AssetModel $object AssetModel
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function assetModelPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
* Return array of tabs to used on pages for third parties cards.
|
||||
*
|
||||
* @param Societe $object Object company shown
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function societe_prepare_head(Societe $object)
|
||||
{
|
||||
|
|
@ -477,7 +477,7 @@ function societe_prepare_head(Societe $object)
|
|||
* Return array of tabs to used on page
|
||||
*
|
||||
* @param Object $object Object for tabs
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function societe_prepare_head2($object)
|
||||
{
|
||||
|
|
@ -503,7 +503,7 @@ function societe_prepare_head2($object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function societe_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -142,7 +142,7 @@ function contract_prepare_head(Contrat $object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function contract_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@opn-concept.pro>
|
||||
* 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
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
/**
|
||||
* Return array of tabs to used on pages to setup cron module.
|
||||
*
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function cronadmin_prepare_head()
|
||||
{
|
||||
|
|
@ -56,7 +57,7 @@ function cronadmin_prepare_head()
|
|||
* Return array of tabs to used on a cron job
|
||||
*
|
||||
* @param Cronjob $object Object cron
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function cron_prepare_head(Cronjob $object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ function ecm_prepare_head_fm($object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function ecm_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021 Florian Henry <florian.henry@scopen.fr>
|
||||
* Copyright (C) 2023 Frédéric France <frederic.france@netlogic.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
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
/**
|
||||
* Prepare admin pages header
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function eventorganizationAdminPrepareHead()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -69,7 +69,7 @@ function expedition_prepare_head(Expedition $object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function expedition_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ function expensereport_prepare_head($object)
|
|||
* It loads tabs from modules looking for the entity payment
|
||||
*
|
||||
* @param PaymentExpenseReport $object Current payment object
|
||||
* @return array Tabs for the payment section
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function payment_expensereport_prepare_head(PaymentExpenseReport $object)
|
||||
{
|
||||
|
|
@ -127,7 +127,7 @@ function payment_expensereport_prepare_head(PaymentExpenseReport $object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function expensereport_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -283,7 +283,7 @@ function ordersupplier_prepare_head(CommandeFournisseur $object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function supplierorder_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2022 Frédéric France <frederic.france@netlogic.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
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
* Return array head with list of tabs to view object information
|
||||
*
|
||||
* @param Object $object Holiday
|
||||
* @return array head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function holiday_prepare_head($object)
|
||||
{
|
||||
|
|
@ -76,7 +77,7 @@ function holiday_prepare_head($object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information
|
||||
*
|
||||
* @return array head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function holiday_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ function establishment_prepare_head($object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information
|
||||
*
|
||||
* @return array head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function hrm_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2010 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.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
|
||||
|
|
@ -31,7 +32,7 @@
|
|||
*
|
||||
* @param string $param Params to add on url links
|
||||
* @param int $maxstep Limit steps to maxstep or no limit if 0
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function import_prepare_head($param, $maxstep = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@
|
|||
* Initialize the array of tabs for customer invoice
|
||||
*
|
||||
* @param Facture $object Invoice object
|
||||
* @return array Array of head tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function facture_prepare_head($object)
|
||||
{
|
||||
|
|
@ -164,7 +164,7 @@ function facture_prepare_head($object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function invoice_admin_prepare_head()
|
||||
{
|
||||
|
|
@ -248,7 +248,7 @@ function invoice_admin_prepare_head()
|
|||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @param FactureRec $object Invoice model object
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function invoice_rec_prepare_head($object)
|
||||
{
|
||||
|
|
@ -311,7 +311,7 @@ function invoice_rec_prepare_head($object)
|
|||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @param Facture $object Invoice object
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function supplier_invoice_rec_prepare_head($object)
|
||||
{
|
||||
|
|
@ -366,7 +366,7 @@ function getNumberInvoicesPieChart($mode)
|
|||
|
||||
$amount_mode = (getDolGlobalInt('FACTURE_VALIDATED_IN_AMOUNT') == 1);
|
||||
|
||||
$sql = "SELECT";
|
||||
$sql = "SELECT";
|
||||
$sql .= " sum(".$db->ifsql("f.date_lim_reglement < '".date_format($datenowsub30, 'Y-m-d')."'", $amount_mode ? "f.total_ht" : 1, 0).") as late30";
|
||||
$sql .= ", sum(".$db->ifsql("f.date_lim_reglement < '".date_format($datenowsub15, 'Y-m-d')."' AND f.date_lim_reglement >= '".date_format($datenowsub30, 'Y-m-d')."'", $amount_mode ? "f.total_ht" : 1, 0).") as late15";
|
||||
$sql .= ", sum(".$db->ifsql("f.date_lim_reglement < '".date_format($now, 'Y-m-d')."' AND f.date_lim_reglement >= '".date_format($datenowsub15, 'Y-m-d')."'", $amount_mode ? "f.total_ht" : 1, 0).") as latenow";
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
/**
|
||||
* Initialize the array of tabs for customer invoice
|
||||
*
|
||||
* @return array Array of head tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function ldap_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2006-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
|
||||
|
|
@ -24,7 +25,7 @@
|
|||
/**
|
||||
* Return array head with list of tabs to view object information
|
||||
*
|
||||
* @return array Tabs of the module
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function mailmanspip_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -56,7 +56,7 @@ function multicurrencyAdminPrepareHead()
|
|||
/**
|
||||
* Prepare array with list of currency tabs
|
||||
*
|
||||
* @param array $aCurrencies Currencies array
|
||||
* @param string[] $aCurrencies Currencies array
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function multicurrencyLimitPrepareHead($aCurrencies)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2012 Nicolas Villa aka Boyquotes http://informetic.fr
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@opn-concept.pro>
|
||||
* 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
|
||||
|
|
@ -359,7 +360,7 @@ function getSupportedOauth2Array()
|
|||
/**
|
||||
* Return array of tabs to used on pages to setup cron module.
|
||||
*
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function oauthadmin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@ function commande_prepare_head(Commande $object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function order_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2020 Abbes Bahfir <bafbes@gmail.com>
|
||||
* Copyright (C) 2021 Waël Almoman <info@almoman.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
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
* It loads tabs from modules looking for the entity payment
|
||||
*
|
||||
* @param Paiement $object Current payment object
|
||||
* @return array Tabs for the payment section
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs for the payment section
|
||||
*/
|
||||
function payment_prepare_head(Paiement $object)
|
||||
{
|
||||
|
|
@ -73,7 +74,7 @@ function payment_prepare_head(Paiement $object)
|
|||
* It loads tabs from modules looking for the entity payment
|
||||
*
|
||||
* @param int $id ID of bank line
|
||||
* @return array Tabs for the Bankline section
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs for the Banline section
|
||||
*/
|
||||
function bankline_prepare_head($id)
|
||||
{
|
||||
|
|
@ -108,7 +109,7 @@ function bankline_prepare_head($id)
|
|||
* It loads tabs from modules looking for the entity payment_supplier
|
||||
*
|
||||
* @param Paiement $object Current payment object
|
||||
* @return array Tabs for the payment section
|
||||
* @return array<array{0:string,1:string,2:string}> Tabs for the payment section
|
||||
*/
|
||||
function payment_supplier_prepare_head(Paiement $object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@ function prelevement_check_config($type = 'direct-debit')
|
|||
* @param BonPrelevement $object Member
|
||||
* @param int $nbOfInvoices No of invoices
|
||||
* @param int $nbOfSalaryInvoice No of salary invoices
|
||||
* @return array head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function bon_prelevement_prepare_head(BonPrelevement $object, $nbOfInvoices, $nbOfSalaryInvoice)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -193,6 +193,7 @@ function product_prepare_head($object)
|
|||
// Attachments
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/link.class.php';
|
||||
$upload_dir = '';
|
||||
if (isModEnabled("product") && ($object->type == Product::TYPE_PRODUCT)) {
|
||||
$upload_dir = $conf->product->multidir_output[$object->entity].'/'.dol_sanitizeFileName($object->ref);
|
||||
}
|
||||
|
|
@ -315,10 +316,10 @@ function productlot_prepare_head($object)
|
|||
|
||||
|
||||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
*/
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function product_admin_prepare_head()
|
||||
{
|
||||
global $langs, $conf, $user, $db;
|
||||
|
|
@ -378,7 +379,7 @@ function product_admin_prepare_head()
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function product_lot_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Frederic 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
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
* Define head array for tabs of receipt printer setup pages
|
||||
*
|
||||
* @param string $mode Mode
|
||||
* @return Array of head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function receiptprinteradmin_prepare_head($mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2013 Jean-François Ferry <jfefe@aternatik.fr>
|
||||
* Copyright (C) 2016 Gilles Poirier <gilles.poirier@netlogic.fr>
|
||||
* Copyright (C) 2023 Frédéric France <frederic.france@netlogic.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
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
* Prepare head for tabs
|
||||
*
|
||||
* @param Dolresource $object Object
|
||||
* @return array Array of head entries
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function resource_prepare_head($object)
|
||||
{
|
||||
|
|
@ -110,7 +111,7 @@ function resource_prepare_head($object)
|
|||
/**
|
||||
* Prepare head for admin tabs
|
||||
*
|
||||
* @return array Array of head entries
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function resource_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2023 Frédéric France <frederic.france@netlogic.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
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
* It loads tabs from modules looking for the entity salaries
|
||||
*
|
||||
* @param Paiement $object Current salaries object
|
||||
* @return array Tabs for the salaries section
|
||||
* @return array<array{0:string,1:string,2:string}> Tabs for the salaries section
|
||||
*/
|
||||
function salaries_prepare_head($object)
|
||||
{
|
||||
|
|
@ -98,7 +99,7 @@ function salaries_prepare_head($object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information
|
||||
*
|
||||
* @return array head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function salaries_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2023 Frédéric France <frederic.france@netlogic.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
|
||||
|
|
@ -22,7 +23,7 @@
|
|||
|
||||
/**
|
||||
* Function for return different onglet of socialnetworks admin page
|
||||
* @return array Tabs for the admin section
|
||||
* @return array<array{0:string,1:string,2:string}> Tabs for the admin section
|
||||
*/
|
||||
function socialnetwork_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ function stock_prepare_head($object)
|
|||
/**
|
||||
* Return array head with list of tabs to view object information.
|
||||
*
|
||||
* @return array head array with tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function stock_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2009 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.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
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
/**
|
||||
* Prepare array with list of tabs
|
||||
*
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function takepos_admin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
/**
|
||||
* Build tabs for admin page
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{0:string,1:string,2:string}>
|
||||
*/
|
||||
function ticketAdminPrepareHead()
|
||||
{
|
||||
|
|
@ -79,7 +79,7 @@ function ticketAdminPrepareHead()
|
|||
* Build tabs for a Ticket object
|
||||
*
|
||||
* @param Ticket $object Object Ticket
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function ticket_prepare_head($object)
|
||||
{
|
||||
|
|
@ -218,12 +218,12 @@ function generate_random_id($car = 16)
|
|||
/**
|
||||
* Show http header, open body tag and show HTML header banner for public pages for tickets
|
||||
*
|
||||
* @param string $title Title
|
||||
* @param string $head Head array
|
||||
* @param int $disablejs More content into html header
|
||||
* @param int $disablehead More content into html header
|
||||
* @param array $arrayofjs Array of complementary js files
|
||||
* @param array $arrayofcss Array of complementary css files
|
||||
* @param string $title Title
|
||||
* @param string $head Head array
|
||||
* @param int<0,1> $disablejs More content into html header
|
||||
* @param int<0,1> $disablehead More content into html header
|
||||
* @param string[] $arrayofjs Array of complementary js files
|
||||
* @param string[] $arrayofcss Array of complementary css files
|
||||
* @return void
|
||||
*/
|
||||
function llxHeaderTicket($title, $head = "", $disablejs = 0, $disablehead = 0, $arrayofjs = [], $arrayofcss = [])
|
||||
|
|
|
|||
|
|
@ -512,8 +512,8 @@ function dolWebsiteSaveContent($content)
|
|||
* @param string $containerref Ref of container to redirect to (Example: 'mypage' or 'mypage.php').
|
||||
* @param string $containeraliasalt Ref of alternative aliases to redirect to.
|
||||
* @param int $containerid Id of container.
|
||||
* @param int $permanent 0=Use temporary redirect 302, 1=Use permanent redirect 301
|
||||
* @param array $parameters Array of parameters to append to the URL.
|
||||
* @param int<0,1> $permanent 0=Use temporary redirect 302, 1=Use permanent redirect 301
|
||||
* @param array<string,mixed> $parameters Array of parameters to append to the URL.
|
||||
* @return void
|
||||
*/
|
||||
function redirectToContainer($containerref, $containeraliasalt = '', $containerid = 0, $permanent = 0, $parameters = array())
|
||||
|
|
@ -654,7 +654,7 @@ function includeContainer($containerref)
|
|||
* <?php getStructureData('software', array('name'=>'Name', 'os'=>'Windows', 'price'=>10)); ?>
|
||||
*
|
||||
* @param string $type 'blogpost', 'product', 'software', 'organization', 'qa', ...
|
||||
* @param array $data Array of data parameters for structured data
|
||||
* @param array<string,mixed> $data Array of data parameters for structured data
|
||||
* @return string HTML content
|
||||
*/
|
||||
function getStructuredData($type, $data = array())
|
||||
|
|
@ -862,7 +862,7 @@ function getStructuredData($type, $data = array())
|
|||
/**
|
||||
* Return HTML content to add as header card for an article, news or Blog Post or home page.
|
||||
*
|
||||
* @param array $params Array of parameters
|
||||
* @param ?array<string,mixed> $params Array of parameters
|
||||
* @return string HTML content
|
||||
*/
|
||||
function getSocialNetworkHeaderCards($params = null)
|
||||
|
|
@ -1106,7 +1106,7 @@ function getImagePublicURLOfObject($object, $no = 1, $extName = '')
|
|||
* Return array with list of all public files of a given object.
|
||||
*
|
||||
* @param Object $object Object
|
||||
* @return array List of public files of object
|
||||
* @return array<array{filename:string,position:int,url:string}> List of public files of object
|
||||
* @see getImagePublicURLOfObject()
|
||||
*/
|
||||
function getPublicFilesOfObject($object)
|
||||
|
|
@ -1163,11 +1163,11 @@ function getPublicFilesOfObject($object)
|
|||
* @param string $searchstring Search string
|
||||
* @param int $max Max number of answers
|
||||
* @param string $sortfield Sort Fields
|
||||
* @param string $sortorder Sort order ('DESC' or 'ASC')
|
||||
* @param 'DESC'|'ASC' $sortorder Sort order ('DESC' or 'ASC')
|
||||
* @param string $langcode Language code ('' or 'en', 'fr', 'es', ...)
|
||||
* @param array $otherfilters Other filters
|
||||
* @param int $status 0 or 1, or -1 for both
|
||||
* @return array Array with results of search
|
||||
* @param array<string,mixed> $otherfilters Other filters
|
||||
* @param int<-1,1> $status 0 or 1, or -1 for both
|
||||
* @return array{list?:WebsitePage[],code?:string,message?:string} Array with results of search
|
||||
*/
|
||||
function getPagesFromSearchCriterias($type, $algo, $searchstring, $max = 25, $sortfield = 'date_creation', $sortorder = 'DESC', $langcode = '', $otherfilters = [], $status = 1)
|
||||
{
|
||||
|
|
@ -1534,7 +1534,7 @@ function getAllImages($object, $objectpage, $urltograb, &$tmp, &$action, $modify
|
|||
* Retrieves the details of a news post by its ID.
|
||||
*
|
||||
* @param string $postId The ID of the news post to retrieve.
|
||||
* @return array|int Return array if OK, -1 if KO
|
||||
* @return array<string,mixed>|int<-1,-1> Return array if OK, -1 if KO
|
||||
*/
|
||||
function getNewsDetailsById($postId)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -559,7 +559,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
}
|
||||
if ($localtax2_type && $localtax2ligne != 0) {
|
||||
if (empty($this->localtax2[$localtax2_type][$localtax2_rate])) {
|
||||
$this->localtax2[$localtax2_type][$localtax2_rate] = $localtax2ligne;
|
||||
$this->localtax2[$localtax2_type][$localtax2_rate] = (float) $localtax2ligne;
|
||||
} else {
|
||||
$this->localtax2[$localtax2_type][$localtax2_rate] += $localtax2ligne;
|
||||
}
|
||||
|
|
@ -869,7 +869,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
* Show total to pay
|
||||
*
|
||||
* @param TCPDF $pdf Object PDF
|
||||
* @param Facture $object Object invoice
|
||||
* @param SupplierProposal $object Object proposal
|
||||
* @param int $deja_regle Montant deja regle
|
||||
* @param int $posy Position depart
|
||||
* @param Translate $outputlangs Object langs
|
||||
|
|
@ -1144,7 +1144,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
|
||||
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
|
||||
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
|
||||
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
|
||||
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, 5, $this->corner_radius, '1001', 'F', array(), explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1210,6 +1210,7 @@ class pdf_aurore extends ModelePDFSupplierProposal
|
|||
protected function _pagehead(&$pdf, $object, $showaddress, $outputlangs)
|
||||
{
|
||||
global $conf, $langs;
|
||||
'@phan-var-force SupplierProposal $object';
|
||||
|
||||
// Load traductions files required by page
|
||||
$outputlangs->loadLangs(array("main", "bills", "supplier_proposal", "companies"));
|
||||
|
|
|
|||
|
|
@ -694,7 +694,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
|
|||
}
|
||||
if ($localtax2_type && $localtax2ligne != 0) {
|
||||
if (empty($this->localtax2[$localtax2_type][$localtax2_rate])) {
|
||||
$this->localtax2[$localtax2_type][$localtax2_rate] = $localtax2ligne;
|
||||
$this->localtax2[$localtax2_type][$localtax2_rate] = (float) $localtax2ligne;
|
||||
} else {
|
||||
$this->localtax2[$localtax2_type][$localtax2_rate] += $localtax2ligne;
|
||||
}
|
||||
|
|
@ -1146,7 +1146,7 @@ class pdf_zenith extends ModelePDFSupplierProposal
|
|||
|
||||
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
|
||||
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
|
||||
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, $this->corner_radius, '1001', 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
|
||||
$pdf->RoundedRect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, $this->corner_radius, '1001', 'F', array(), explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (c) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
|
|
@ -38,7 +39,13 @@ class DonationStats extends Stats
|
|||
*/
|
||||
public $table_element;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $socid;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $userid;
|
||||
|
||||
/**
|
||||
|
|
@ -114,7 +121,7 @@ class DonationStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with number by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -132,7 +139,7 @@ class DonationStats extends Stats
|
|||
/**
|
||||
* Return shipments number per year
|
||||
*
|
||||
* @return array Array with number by year
|
||||
* @return array<array{0:int,1:int}> Array of nb each year
|
||||
*
|
||||
*/
|
||||
public function getNbByYear()
|
||||
|
|
@ -152,7 +159,7 @@ class DonationStats extends Stats
|
|||
*
|
||||
* @param int $year Year
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array of amount each month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of amount each month
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -171,7 +178,7 @@ class DonationStats extends Stats
|
|||
* Return average amount each month
|
||||
*
|
||||
* @param int $year Year
|
||||
* @return array Array of average each month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with number by month
|
||||
*/
|
||||
public function getAverageByMonth($year)
|
||||
{
|
||||
|
|
@ -189,7 +196,7 @@ class DonationStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ $WIDTH = DolGraph::getDefaultGraphSizeForStats('width');
|
|||
$HEIGHT = DolGraph::getDefaultGraphSizeForStats('height');
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs("donations");
|
||||
$langs->loadLangs(array("donations"));
|
||||
|
||||
$userid = GETPOSTINT('userid');
|
||||
$socid = GETPOSTINT('socid');
|
||||
|
|
@ -226,7 +226,7 @@ if (isModEnabled('category')) {
|
|||
$cat_type = Categorie::TYPE_CUSTOMER;
|
||||
$cat_label = $langs->trans("Category").' '.lcfirst($langs->trans("Customer"));
|
||||
print '<tr><td>'.$cat_label.'</td><td>';
|
||||
$cate_arbo = $form->select_all_categories($cat_type, null, 'parent', null, null, 1);
|
||||
$cate_arbo = $form->select_all_categories($cat_type, '', 'parent', 0, 0, 1);
|
||||
print img_picto('', 'category', 'class="pictofixedwidth"');
|
||||
print $form->multiselectarray('custcats', $cate_arbo, GETPOST('custcats', 'array'), 0, 0, 'widthcentpercentminusx maxwidth300');
|
||||
print '</td></tr>';
|
||||
|
|
@ -274,7 +274,7 @@ print '</tr>';
|
|||
$oldyear = 0;
|
||||
foreach ($data as $val) {
|
||||
$year = $val['year'];
|
||||
while (!empty($year) && $oldyear > $year + 1) {
|
||||
while (!empty($year) && $oldyear > (int) $year + 1) {
|
||||
$oldyear--;
|
||||
print '<tr class="oddeven" height="24">';
|
||||
print '<td class="center"><a href="'.$_SERVER["PHP_SELF"].'?year='.$oldyear.'">'.$oldyear.'</a></td>';
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
* Prepare array of tabs for EmailCollector
|
||||
*
|
||||
* @param EmailCollector $object EmailCollector
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function emailcollectorPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -120,18 +120,54 @@ class ConferenceOrBooth extends ActionComm
|
|||
'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'position' => 1000, 'notnull' => -1, 'visible' => -2,),
|
||||
'status' => array('type' => 'smallint', 'label' => 'Status', 'enabled' => 1, 'position' => 1000, 'notnull' => 1, 'visible' => 1, 'default' => '0', 'index' => 1, 'arrayofkeyval' => array('0' => 'EvntOrgDraft', '1' => 'EvntOrgSuggested', '2' => 'EvntOrgConfirmed', '3' => 'EvntOrgNotQualified', '4' => 'EvntOrgDone', '9' => 'EvntOrgCancelled'),),
|
||||
);
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $rowid;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $id;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $label;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_soc;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_project;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $note;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_action;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $datec;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_user_author;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_user_mod;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $import_key;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $status;
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
|
|
@ -714,7 +750,7 @@ class ConferenceOrBooth extends ActionComm
|
|||
}
|
||||
if (property_exists($this, 'amount')) {
|
||||
$return .= '<br>';
|
||||
$return .= '<span class="info-box-label amount">'.price($this->amount, 0, $langs, 1, -1, -1, $conf->currency).'</span>';
|
||||
$return .= '<span class="info-box-label amount">'.price($this->amount, 0, $langs, 1, -1, -1, $conf->currency).'</span>'; // @phan-suppress-current-line PhanUndeclaredProperty
|
||||
}
|
||||
if (method_exists($this, 'getLibStatut')) {
|
||||
$return .= '<br><div class="info-box-status">'.$this->getLibStatut(3).'</div>';
|
||||
|
|
@ -773,10 +809,10 @@ class ConferenceOrBooth extends ActionComm
|
|||
*
|
||||
* @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
|
||||
* @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)
|
||||
|
|
|
|||
|
|
@ -28,7 +28,7 @@
|
|||
*
|
||||
* @param ConferenceOrBooth $object ConferenceOrBooth
|
||||
* @param int $with_project Add project id to URL
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function conferenceorboothPrepareHead($object, $with_project = 0)
|
||||
{
|
||||
|
|
@ -116,7 +116,7 @@ function conferenceorboothPrepareHead($object, $with_project = 0)
|
|||
* Prepare array of tabs for ConferenceOrBooth Project tab
|
||||
*
|
||||
* @param Project $object Project
|
||||
* @return array
|
||||
* @return array<array{0:string,1:string,2:string}>
|
||||
*/
|
||||
function conferenceorboothProjectPrepareHead($object)
|
||||
{
|
||||
|
|
@ -191,7 +191,7 @@ function conferenceorboothProjectPrepareHead($object)
|
|||
* Prepare array of tabs for ConferenceOrBoothAttendees
|
||||
*
|
||||
* @param ConferenceOrBoothAttendee $object ConferenceOrBoothAttendee
|
||||
* @return array<array<int,string>> Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs
|
||||
*/
|
||||
function conferenceorboothAttendeePrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (c) 2005-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* 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
|
||||
|
|
@ -112,7 +113,7 @@ class ExpeditionStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with number by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -135,7 +136,7 @@ class ExpeditionStats extends Stats
|
|||
/**
|
||||
* Return shipments number per year
|
||||
*
|
||||
* @return array Array with number by year
|
||||
* @return array<array{0:int,1:int}> Array of nb each year
|
||||
*
|
||||
*/
|
||||
public function getNbByYear()
|
||||
|
|
@ -159,7 +160,7 @@ class ExpeditionStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with amount by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -183,7 +184,7 @@ class ExpeditionStats extends Stats
|
|||
* Return the orders amount average by month for a year
|
||||
*
|
||||
* @param int $year year for stats
|
||||
* @return array array with number by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with number by month
|
||||
*/
|
||||
public function getAverageByMonth($year)
|
||||
{
|
||||
|
|
@ -205,7 +206,7 @@ class ExpeditionStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ print '</tr>';
|
|||
$oldyear = 0;
|
||||
foreach ($data as $val) {
|
||||
$year = $val['year'];
|
||||
while (!empty($year) && $oldyear > $year + 1) { // If we have empty year
|
||||
while (!empty($year) && $oldyear > (int) $year + 1) { // If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (c) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.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
|
||||
|
|
@ -112,7 +113,7 @@ class ExpenseReportStats extends Stats
|
|||
/**
|
||||
* Return nb of expense report per year
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{0:int,1:int}> Array of nb each year
|
||||
*/
|
||||
public function getNbByYear()
|
||||
{
|
||||
|
|
@ -130,7 +131,7 @@ class ExpenseReportStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -152,7 +153,7 @@ class ExpenseReportStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -172,7 +173,7 @@ class ExpenseReportStats extends Stats
|
|||
* Return average amount
|
||||
*
|
||||
* @param int $year Year to scan
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with number by month
|
||||
*/
|
||||
public function getAverageByMonth($year)
|
||||
{
|
||||
|
|
@ -189,7 +190,7 @@ class ExpenseReportStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (c) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.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
|
||||
|
|
@ -39,7 +40,8 @@ $mode = GETPOSTISSET("mode") ? GETPOST("mode", 'aZ09') : 'customer';
|
|||
$object_status = GETPOST('object_status', 'intcomma');
|
||||
|
||||
$userid = GETPOSTINT('userid');
|
||||
$socid = GETPOSTINT('socid'); if ($socid < 0) {
|
||||
$socid = GETPOSTINT('socid');
|
||||
if ($socid < 0) {
|
||||
$socid = 0;
|
||||
}
|
||||
$id = GETPOSTINT('id');
|
||||
|
|
@ -272,7 +274,7 @@ print '</tr>';
|
|||
$oldyear = 0;
|
||||
foreach ($data as $val) {
|
||||
$year = $val['year'];
|
||||
while ($year && $oldyear > $year + 1) { // If we have empty year
|
||||
while ($year && $oldyear > (int) $year + 1) { // If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
|
|
|
|||
|
|
@ -91,7 +91,7 @@ class FichinterStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with number by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -114,7 +114,7 @@ class FichinterStats extends Stats
|
|||
/**
|
||||
* Return interventions number per year
|
||||
*
|
||||
* @return array Array with number by year
|
||||
* @return array<array{0:int,1:int}> Array of nb each year
|
||||
*
|
||||
*/
|
||||
public function getNbByYear()
|
||||
|
|
@ -138,7 +138,7 @@ class FichinterStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with amount by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with amount by month
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -162,7 +162,7 @@ class FichinterStats extends Stats
|
|||
* Return the intervention amount average by month for a year
|
||||
*
|
||||
* @param int $year year for stats
|
||||
* @return array array with number by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with number by month
|
||||
*/
|
||||
public function getAverageByMonth($year)
|
||||
{
|
||||
|
|
@ -184,7 +184,7 @@ class FichinterStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2016 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
|
||||
|
|
@ -271,7 +272,7 @@ print '</tr>';
|
|||
$oldyear = 0;
|
||||
foreach ($data as $val) {
|
||||
$year = $val['year'];
|
||||
while (!empty($year) && $oldyear > $year + 1) {
|
||||
while (!empty($year) && $oldyear > (int) $year + 1) {
|
||||
// If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@atm-consulting.fr>
|
||||
* Copyright (C) 2022 Frédéric France <frederic.france@netlogic.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
|
||||
|
|
@ -29,7 +30,7 @@
|
|||
/**
|
||||
* Prepare admin pages header
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function hrmAdminPrepareHead()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@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
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
* Prepare array of tabs for Job
|
||||
*
|
||||
* @param Job $object Job
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function jobPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@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
|
||||
|
|
@ -29,7 +30,7 @@
|
|||
* Prepare array of tabs for positions
|
||||
*
|
||||
* @param Position $object Position
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function positionCardPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@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
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
* Prepare array of tabs for Skill
|
||||
*
|
||||
* @param Skill $object Skill
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function skillPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@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
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
* Prepare array of tabs for Skilldet
|
||||
*
|
||||
* @param Skilldet $object Skilldet
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function skilldetPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2021 Greg Rastklan <greg.rastklan@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Jean-Pascal BOUDET <jean-pascal.boudet@atm-consulting.fr>
|
||||
* Copyright (C) 2021 Grégory BLEMAND <gregory.blemand@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
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
* Prepare array of tabs for SkillRank
|
||||
*
|
||||
* @param SkillRank $object SkillRank
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function skillrankPrepareHead($object)
|
||||
{
|
||||
|
|
@ -115,7 +116,7 @@ function displayRankInfos($selected_rank, $fk_skill, $inputname = 'TNote', $mode
|
|||
$skilldet = new Skilldet($db);
|
||||
$Lines = $skilldet->fetchAll('ASC', 'rankorder', 0, 0, '(fk_skill:=:'.((int) $fk_skill).')');
|
||||
|
||||
if (!is_array($Lines) && $Lines<0) {
|
||||
if (!is_array($Lines) && $Lines < 0) {
|
||||
setEventMessages($skilldet->error, $skilldet->errors, 'errors');
|
||||
}
|
||||
if (empty($Lines)) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) ---Put here your own copyright and developer email---
|
||||
* 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
|
||||
|
|
@ -24,7 +25,7 @@
|
|||
/**
|
||||
* Prepare admin pages header
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function intracommreportAdminPrepareHead()
|
||||
{
|
||||
|
|
@ -75,7 +76,7 @@ function intracommreportAdminPrepareHead()
|
|||
* Prepare array of tabs for IntraCommReport
|
||||
*
|
||||
* @param IntraCommReport $object IntraCommReport
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function intracommreportPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
/**
|
||||
* Define head array for tabs of marges tools setup pages
|
||||
*
|
||||
* @return Array of head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function marges_admin_prepare_head()
|
||||
{
|
||||
|
|
@ -55,7 +55,7 @@ function marges_admin_prepare_head()
|
|||
/**
|
||||
* Return array of tabs to used on pages for third parties cards.
|
||||
*
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function marges_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* 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
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
/**
|
||||
* Prepare admin pages header
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function mrpAdminPrepareHead()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) ---Put here your own copyright and developer email---
|
||||
* 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
|
||||
|
|
@ -26,7 +27,7 @@
|
|||
* Prepare array of tabs for Mo
|
||||
*
|
||||
* @param Mo $object Mo
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function moPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@
|
|||
* It loads tabs from modules looking for the entity Opensurveyso
|
||||
*
|
||||
* @param Opensurveysondage $object Current viewing poll
|
||||
* @return array Tabs for the opensurvey section
|
||||
* @return array<array{0:string,1:string,2:string}> Tabs for the opensurvey section
|
||||
*/
|
||||
function opensurvey_prepare_head(Opensurveysondage $object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021 Dorian Laurent <i.merraha@sofimedmaroc.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
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
/**
|
||||
* Prepare admin pages header
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function partnershipAdminPrepareHead()
|
||||
{
|
||||
|
|
@ -78,7 +79,7 @@ function partnershipAdminPrepareHead()
|
|||
* Prepare array of tabs for Partnership
|
||||
*
|
||||
* @param Partnership $object Partnership
|
||||
* @return array Array of tabs
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function partnershipPrepareHead($object)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -29,7 +29,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
|||
/**
|
||||
* Define head array for tabs of paypal tools setup pages
|
||||
*
|
||||
* @return Array of head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function paypaladmin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.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
|
||||
|
|
@ -28,7 +29,7 @@
|
|||
* Define head array for tabs of printing tools setup pages
|
||||
*
|
||||
* @param string $mode Mode
|
||||
* @return array Array of head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function printingAdminPrepareHead($mode)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* <one line to give the program's name and a brief idea of what it does.>
|
||||
* Copyright (C) 2015 ATM Consulting <support@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
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
/**
|
||||
* Define head array for tabs of inventory tools setup pages
|
||||
*
|
||||
* @return array Array of head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function inventoryAdminPrepareHead()
|
||||
{
|
||||
|
|
@ -64,7 +65,7 @@ function inventoryAdminPrepareHead()
|
|||
* @param string $title parameter
|
||||
* @param string $get parameter
|
||||
*
|
||||
* @return array Array of head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function inventoryPrepareHead(&$inventory, $title = 'Inventory', $get = '')
|
||||
{
|
||||
|
|
@ -75,7 +76,7 @@ function inventoryPrepareHead(&$inventory, $title = 'Inventory', $get = '')
|
|||
array(dol_buildpath('/product/inventory/inventory.php?id='.$inventory->id.$get, 1), $langs->trans('Inventory'), 'inventory')
|
||||
);
|
||||
|
||||
$h=2;
|
||||
$h = 2;
|
||||
|
||||
complete_head_from_modules($conf, $langs, $inventory, $head, $h, 'inventory');
|
||||
complete_head_from_modules($conf, $langs, $inventory, $head, $h, 'inventory', 'remove');
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2021 SuperAdmin
|
||||
* 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
|
||||
|
|
@ -25,7 +26,7 @@
|
|||
/**
|
||||
* Prepare admin pages header
|
||||
*
|
||||
* @return array
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function stocktransferAdminPrepareHead()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ class ProjectStats extends Stats
|
|||
/**
|
||||
* Return count, and sum of products
|
||||
*
|
||||
* @return array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
@ -237,7 +237,7 @@ class ProjectStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -262,7 +262,7 @@ class ProjectStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with amount by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with amount by month
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -374,7 +374,7 @@ class ProjectStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $wonlostfilter Add a filter on status won/lost
|
||||
* @return array Array with amount by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with amount by month
|
||||
*/
|
||||
public function getWeightedAmountByMonth($year, $wonlostfilter = 1)
|
||||
{
|
||||
|
|
@ -482,7 +482,7 @@ class ProjectStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with amount by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with amount by month
|
||||
*/
|
||||
public function getTransformRateByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -531,7 +531,7 @@ class ProjectStats extends Stats
|
|||
/**
|
||||
* Return average of entity by month
|
||||
* @param int $year year number
|
||||
* @return array
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array with number by month
|
||||
*/
|
||||
protected function getAverageByMonth($year)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014-2015 Florian HENRY <florian.henry@open-concept.pro>
|
||||
* 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
|
||||
|
|
@ -113,7 +114,7 @@ class TaskStats extends Stats
|
|||
/**
|
||||
* Return count, and sum of products
|
||||
*
|
||||
* @return array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
@ -173,7 +174,7 @@ class TaskStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -201,7 +202,7 @@ class TaskStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array with amount by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014-2015 Florian HENRY <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015-2021 Laurent Destailleur <ldestailleur@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
|
||||
|
|
@ -279,7 +280,7 @@ print '</tr>';
|
|||
$oldyear = 0;
|
||||
foreach ($data_all_year as $val) {
|
||||
$year = $val['year'];
|
||||
while ($year && $oldyear > $year + 1) { // If we have empty year
|
||||
while ($year && $oldyear > (int) $year + 1) { // If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2014-2015 Florian HENRY <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Laurent Destailleur <ldestailleur@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
|
||||
|
|
@ -190,7 +191,7 @@ print '</tr>';
|
|||
$oldyear = 0;
|
||||
foreach ($data_all_year as $val) {
|
||||
$year = $val['year'];
|
||||
while ($year && $oldyear > $year + 1) { // If we have empty year
|
||||
while ($year && $oldyear > (int) $year + 1) { // If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
print '<tr class="oddeven">';
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ $error = 0;
|
|||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
$eventtype = GETPOST("eventtype");
|
||||
$eventtype = GETPOSTINT("eventtype");
|
||||
$email = GETPOST("email");
|
||||
$societe = GETPOST("societe");
|
||||
$label = GETPOST("label");
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ $error = 0;
|
|||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
$eventtype = GETPOST("eventtype");
|
||||
$eventtype = GETPOSTINT("eventtype");
|
||||
$email = GETPOST("email");
|
||||
$societe = GETPOST("societe");
|
||||
$label = GETPOST("label");
|
||||
|
|
|
|||
|
|
@ -167,7 +167,7 @@ class ReceptionStats extends Stats
|
|||
* Return the orders amount average by month for a year
|
||||
*
|
||||
* @param int $year year for stats
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of average each month array with number by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of average each month
|
||||
*/
|
||||
public function getAverageByMonth($year)
|
||||
{
|
||||
|
|
@ -189,7 +189,7 @@ class ReceptionStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total_diff:float,avg_diff:float,avg_weighted:float}> Array with nb, total amount, average for each year
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -113,6 +113,7 @@ if ($reshook < 0) {
|
|||
|
||||
if (empty($reshook)) {
|
||||
$error = 0;
|
||||
$objstat = null;
|
||||
|
||||
if ($action == 'add_element_resource' && !$cancel) {
|
||||
$res = 0;
|
||||
|
|
@ -185,7 +186,7 @@ if (empty($reshook)) {
|
|||
}
|
||||
}
|
||||
|
||||
if (!$error && $res > 0) {
|
||||
if (!$error && $res > 0 && is_object($objstat)) {
|
||||
setEventMessages($langs->trans('ResourceLinkedWithSuccess'), null, 'mesgs');
|
||||
header("Location: ".$_SERVER['PHP_SELF'].'?element='.$element.'&element_id='.$objstat->id);
|
||||
exit;
|
||||
|
|
@ -195,15 +196,15 @@ if (empty($reshook)) {
|
|||
}
|
||||
|
||||
// Update resource
|
||||
if ($action == 'update_linked_resource' && $user->hasRight('resource', 'write') && !GETPOST('cancel', 'alpha')) {
|
||||
if ($action == 'update_linked_resource' && $user->hasRight('resource', 'write') && !GETPOST('cancel', 'alpha') && is_object($objstat)) {
|
||||
$res = $object->fetchElementResource($lineid);
|
||||
if ($res) {
|
||||
$object->busy = $busy;
|
||||
$object->mandatory = $mandatory;
|
||||
|
||||
if (getDolGlobalString('RESOURCE_USED_IN_EVENT_CHECK') && $object->element_type == 'action' && $object->resource_type == 'dolresource' && intval($object->busy) == 1) {
|
||||
$eventDateStart = $object->objelement->datep;
|
||||
$eventDateEnd = $object->objelement->datef;
|
||||
$eventDateStart = $object->objelement->datep; // @phan-suppress-current-line PhanUndeclaredProperty
|
||||
$eventDateEnd = $object->objelement->datef; // @phan-suppress-current-line PhanUndeclaredProperty
|
||||
$isFullDayEvent = $objstat->fulldayevent;
|
||||
if (empty($eventDateEnd)) {
|
||||
if ($isFullDayEvent) {
|
||||
|
|
@ -482,7 +483,7 @@ if (!$ret) {
|
|||
$listofcontactid = array(); // not used yet
|
||||
$listofotherid = array(); // not used yet
|
||||
print '<div class="assignedtouser">';
|
||||
print $form->select_dolusers_forevent('view', 'assignedtouser', 1, '', 0, '', '', 0, 0, 0, '', ($act->datep != $act->datef) ? 1 : 0, $listofuserid, $listofcontactid, $listofotherid);
|
||||
print $form->select_dolusers_forevent('view', 'assignedtouser', 1, array(), 0, '', array(), 0, 0, 0, '', ($act->datep != $act->datef) ? 1 : 0, $listofuserid, $listofcontactid, $listofotherid);
|
||||
print '</div>';
|
||||
/*if (in_array($user->id,array_keys($listofuserid)))
|
||||
{
|
||||
|
|
|
|||
|
|
@ -80,13 +80,14 @@ class PaymentSalary extends CommonObject
|
|||
public $datep = '';
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use $amount
|
||||
* @see $amount
|
||||
* @var float|string
|
||||
*/
|
||||
public $total;
|
||||
|
||||
/**
|
||||
* @var float Total amount of payment
|
||||
* @var float Total amount of payment
|
||||
*/
|
||||
public $amount;
|
||||
|
||||
|
|
@ -102,7 +103,7 @@ class PaymentSalary extends CommonObject
|
|||
|
||||
/**
|
||||
* @var string
|
||||
* @deprecated
|
||||
* @deprecated Use $num_payment
|
||||
*/
|
||||
public $num_paiement;
|
||||
|
||||
|
|
@ -295,7 +296,7 @@ class PaymentSalary extends CommonObject
|
|||
//$deposits=$tmpsalary->getSumDepositsUsed();
|
||||
$deposits = 0;
|
||||
$alreadypayed = price2num($paiement + $creditnotes + $deposits, 'MT');
|
||||
$remaintopay = price2num($tmpsalary->amount - $paiement - $creditnotes - $deposits, 'MT');
|
||||
$remaintopay = price2num((float) $tmpsalary->amount - $paiement - $creditnotes - $deposits, 'MT');
|
||||
if ($remaintopay == 0) {
|
||||
$result = $tmpsalary->setPaid($user);
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2018 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (c) 2018 Fidesio <contact@fidesio.com>
|
||||
* 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
|
||||
|
|
@ -47,7 +48,7 @@ class SalariesStats extends Stats
|
|||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $socid Id third party
|
||||
* @param mixed $userid Id user for filter or array of user ids
|
||||
* @param int|int[] $userid Id user for filter or array of user ids
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($db, $socid = 0, $userid = 0)
|
||||
|
|
@ -77,7 +78,7 @@ class SalariesStats extends Stats
|
|||
/**
|
||||
* Return the number of salary by year
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{0:int,1:int}> Array of nb each year
|
||||
*/
|
||||
public function getNbByYear()
|
||||
{
|
||||
|
|
@ -95,7 +96,7 @@ class SalariesStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array of values by month
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -117,7 +118,7 @@ class SalariesStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -137,7 +138,7 @@ class SalariesStats extends Stats
|
|||
* Return average amount
|
||||
*
|
||||
* @param int $year Year to scan
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values
|
||||
*/
|
||||
public function getAverageByMonth($year)
|
||||
{
|
||||
|
|
@ -154,7 +155,7 @@ class SalariesStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,10 +67,22 @@ class Salary extends CommonObject
|
|||
*/
|
||||
public $fk_user;
|
||||
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $datep;
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $datev;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $salary;
|
||||
/**
|
||||
* @var float|string
|
||||
*/
|
||||
public $amount;
|
||||
|
||||
/**
|
||||
|
|
@ -78,7 +90,13 @@ class Salary extends CommonObject
|
|||
*/
|
||||
public $fk_project;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $type_payment; // TODO Rename into type_payment_id
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_payment_code;
|
||||
|
||||
/**
|
||||
|
|
@ -86,7 +104,13 @@ class Salary extends CommonObject
|
|||
*/
|
||||
public $label;
|
||||
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $datesp;
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $dateep;
|
||||
|
||||
/**
|
||||
|
|
@ -116,19 +140,22 @@ class Salary extends CommonObject
|
|||
public $fk_user_modif;
|
||||
|
||||
/**
|
||||
* @var user User
|
||||
* @var User
|
||||
*/
|
||||
public $user;
|
||||
|
||||
/**
|
||||
* @var int 1 if salary paid COMPLETELY, 0 otherwise (do not use it anymore, use statut and close_code)
|
||||
* @deprecated
|
||||
* @var int<0,1> 1 if salary paid COMPLETELY, 0 otherwise (do not use it anymore, use statut and close_code)
|
||||
* @deprecated Use $status and $close_code
|
||||
*/
|
||||
public $paye;
|
||||
|
||||
const STATUS_UNPAID = 0;
|
||||
const STATUS_PAID = 1;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $resteapayer;
|
||||
|
||||
public $fields = array(
|
||||
|
|
@ -847,7 +874,9 @@ class Salary extends CommonObject
|
|||
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
|
||||
}
|
||||
if (!empty($arraydata['user']) && is_object($arraydata['user'])) {
|
||||
$return .= '<br><span class="info-box-label">'.$arraydata['user']->getNomUrl(empty($arraydata['user']->photo) ? 1 : -1, '', 0, 0, 16, 0, '', 'maxwidth100').'</span>';
|
||||
$user = $arraydata['user'];
|
||||
'@phan-var-force User $user';
|
||||
$return .= '<br><span class="info-box-label">'.$user->getNomUrl(empty($arraydata['user']->photo) ? 1 : -1, '', 0, 0, 16, 0, '', 'maxwidth100').'</span>';
|
||||
}
|
||||
if (property_exists($this, 'amount')) {
|
||||
$return .= '<br><span class="info-box-label amount">'.price($this->amount).'</span>';
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2016-2018 Frédéric France <frederic.france@netlogic.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
|
||||
|
|
@ -282,7 +283,7 @@ if ($action == 'create') {
|
|||
|
||||
print '<td class="right">'.price($sumpaid)."</td>";
|
||||
|
||||
print '<td class="right">'.price($objp->amount - $sumpaid)."</td>";
|
||||
print '<td class="right">'.price((float) $objp->amount - $sumpaid)."</td>";
|
||||
|
||||
print '<td class="center">';
|
||||
if ($sumpaid < $objp->amount) {
|
||||
|
|
@ -292,7 +293,7 @@ if ($action == 'create') {
|
|||
if (!empty($conf->use_javascript_ajax)) {
|
||||
print img_picto("Auto fill", 'rightarrow', "class='AutoFillAmount' data-rowid='".$namef."' data-value='".($objp->amount - $sumpaid)."'");
|
||||
} */
|
||||
$valuetoshow = GETPOSTISSET($namef) ? GETPOST($namef) : ($objp->amount - $sumpaid);
|
||||
$valuetoshow = GETPOSTISSET($namef) ? GETPOST($namef) : ((float) $objp->amount - $sumpaid);
|
||||
|
||||
print '<input type=hidden class="sum_remain" name="'.$nameRemain.'" value="'.$valuetoshow.'">';
|
||||
print '<input type="text" class="right width75" name="'.$namef.'" id="'.$namef.'" value="'.$valuetoshow.'">';
|
||||
|
|
|
|||
|
|
@ -240,7 +240,7 @@ print '</tr>';
|
|||
$oldyear = 0;
|
||||
foreach ($data as $val) {
|
||||
$year = $val['year'];
|
||||
while ($year && $oldyear > $year + 1) {
|
||||
while ($year && $oldyear > (int) $year + 1) {
|
||||
// If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
|
|
|
|||
|
|
@ -424,7 +424,7 @@ if ($resql) {
|
|||
// print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AlreadyPaid").' :</td><td class="right nowrap amountcard">'.price($totalpaid)."</td></tr>\n";
|
||||
// print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("AmountExpected").' :</td><td class="right nowrap amountcard">'.price($object->amount)."</td></tr>\n";
|
||||
|
||||
$resteapayer = $object->amount - $totalpaid;
|
||||
$resteapayer = (float) $object->amount - $totalpaid;
|
||||
// $cssforamountpaymentcomplete = 'amountpaymentcomplete';
|
||||
|
||||
// print '<tr><td colspan="'.$nbcols.'" class="right">'.$langs->trans("RemainderToPay")." :</td>";
|
||||
|
|
|
|||
|
|
@ -362,17 +362,17 @@ if (empty($reshook)) {
|
|||
$object->prefix_comm = GETPOST('prefix_comm', 'alphanohtml');
|
||||
$object->code_client = GETPOSTISSET('customer_code') ? GETPOST('customer_code', 'alpha') : GETPOST('code_client', 'alpha');
|
||||
$object->code_fournisseur = GETPOSTISSET('supplier_code') ? GETPOST('supplier_code', 'alpha') : GETPOST('code_fournisseur', 'alpha');
|
||||
$object->capital = GETPOST('capital', 'alphanohtml');
|
||||
$object->capital = GETPOSTFLOAT('capital');
|
||||
$object->barcode = GETPOST('barcode', 'alphanohtml');
|
||||
|
||||
$object->tva_intra = GETPOST('tva_intra', 'alphanohtml');
|
||||
$object->tva_assuj = GETPOST('assujtva_value', 'alpha');
|
||||
$object->tva_assuj = GETPOSTINT('assujtva_value');
|
||||
$object->vat_reverse_charge = GETPOST('vat_reverse_charge') == 'on' ? 1 : 0;
|
||||
$object->status = GETPOST('status', 'alpha');
|
||||
$object->status = GETPOSTINT('status');
|
||||
|
||||
// Local Taxes
|
||||
$object->localtax1_assuj = GETPOST('localtax1assuj_value', 'alpha');
|
||||
$object->localtax2_assuj = GETPOST('localtax2assuj_value', 'alpha');
|
||||
$object->localtax1_assuj = GETPOSTINT('localtax1assuj_value');
|
||||
$object->localtax2_assuj = GETPOSTINT('localtax2assuj_value');
|
||||
|
||||
$object->localtax1_value = GETPOST('lt1', 'alpha');
|
||||
$object->localtax2_value = GETPOST('lt2', 'alpha');
|
||||
|
|
@ -1040,8 +1040,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
}
|
||||
// Prospect / Customer
|
||||
if (GETPOST("type", 'aZ') == 'c') {
|
||||
if (getDolGlobalString('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) {
|
||||
$object->client = getDolGlobalString('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT');
|
||||
if (getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT')) {
|
||||
$object->client = getDolGlobalInt('THIRDPARTY_CUSTOMERTYPE_BY_DEFAULT');
|
||||
} else {
|
||||
$object->client = 3;
|
||||
}
|
||||
|
|
@ -1092,7 +1092,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
$object->fax = GETPOST('fax', 'alpha');
|
||||
$object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
|
||||
$object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL);
|
||||
$object->capital = GETPOST('capital', 'alphanohtml');
|
||||
$object->capital = GETPOSTFLOAT('capital');
|
||||
$paymentTermId = GETPOSTINT('cond_reglement_id'); // can be set by default values on create page and not already in get or post variables
|
||||
if (empty($paymentTermId) && !GETPOSTISSET('cond_reglement_id')) {
|
||||
$paymentTermId = getDolGlobalString('MAIN_DEFAULT_PAYMENT_TERM_ID');
|
||||
|
|
@ -1122,8 +1122,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
$object->localtax1_assuj = GETPOSTINT('localtax1assuj_value');
|
||||
$object->localtax2_assuj = GETPOSTINT('localtax2assuj_value');
|
||||
|
||||
$object->localtax1_value = GETPOSTINT('lt1');
|
||||
$object->localtax2_value = GETPOSTINT('lt2');
|
||||
$object->localtax1_value = GETPOST('lt1', 'alpha');
|
||||
$object->localtax2_value = GETPOST('lt2', 'alpha');
|
||||
|
||||
$object->tva_intra = GETPOST('tva_intra', 'alphanohtml');
|
||||
|
||||
|
|
@ -2089,7 +2089,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
$object->email = GETPOST('email', 'custom', 0, FILTER_SANITIZE_EMAIL);
|
||||
$object->no_email = GETPOSTINT("no_email");
|
||||
$object->url = GETPOST('url', 'custom', 0, FILTER_SANITIZE_URL);
|
||||
$object->capital = GETPOST('capital', 'alphanohtml');
|
||||
$object->capital = GETPOSTFLOAT('capital');
|
||||
$object->idprof1 = GETPOST('idprof1', 'alphanohtml');
|
||||
$object->idprof2 = GETPOST('idprof2', 'alphanohtml');
|
||||
$object->idprof3 = GETPOST('idprof3', 'alphanohtml');
|
||||
|
|
@ -2137,8 +2137,8 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
}
|
||||
|
||||
//Local Taxes
|
||||
$object->localtax1_assuj = GETPOST('localtax1assuj_value');
|
||||
$object->localtax2_assuj = GETPOST('localtax2assuj_value');
|
||||
$object->localtax1_assuj = GETPOSTINT('localtax1assuj_value');
|
||||
$object->localtax2_assuj = GETPOSTINT('localtax2assuj_value');
|
||||
|
||||
$object->localtax1_value = GETPOST('lt1');
|
||||
$object->localtax2_value = GETPOST('lt2');
|
||||
|
|
@ -2690,7 +2690,7 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($canvasdisplayactio
|
|||
// Capital
|
||||
print '<tr><td>'.$form->editfieldkey('Capital', 'capital', '', $object, 0).'</td>';
|
||||
print '<td colspan="3"><input type="text" name="capital" id="capital" size="10" value="';
|
||||
print $object->capital != '' ? dol_escape_htmltag(price($object->capital)) : '';
|
||||
print $object->capital != '' && $object->capital != 0 ? dol_escape_htmltag(price($object->capital)) : '';
|
||||
if (isModEnabled("multicurrency")) {
|
||||
print '"> <span class="hideonsmartphone">'.$langs->trans("Currency".$object->multicurrency_code).'</span></td></tr>';
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2017 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* 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
|
||||
|
|
@ -27,7 +28,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
|
|||
/**
|
||||
* Define head array for tabs of stripe tools setup pages
|
||||
*
|
||||
* @return Array of head
|
||||
* @return array<array{0:string,1:string,2:string}> Array of tabs to show
|
||||
*/
|
||||
function stripeadmin_prepare_head()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -290,7 +290,7 @@ if (empty($reshook)) {
|
|||
$object->cond_reglement_id = GETPOSTINT('cond_reglement_id');
|
||||
$object->mode_reglement_id = GETPOSTINT('mode_reglement_id');
|
||||
$object->fk_account = GETPOSTINT('fk_account');
|
||||
$object->socid = GETPOST('socid');
|
||||
$object->socid = GETPOSTINT('socid');
|
||||
$object->fk_project = GETPOSTINT('projectid');
|
||||
$object->model_pdf = GETPOST('model');
|
||||
$object->author = $user->id; // deprecated
|
||||
|
|
|
|||
|
|
@ -92,15 +92,25 @@ class SupplierProposal extends CommonObject
|
|||
*/
|
||||
protected $table_ref_field = 'ref';
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $socid; // Id client
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use $user_author_id
|
||||
* @see $user_author_id
|
||||
* @var int
|
||||
*/
|
||||
public $author;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $ref_fourn; //Reference saisie lors de l'ajout d'une ligne à la demande
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $ref_supplier; //Reference saisie lors de l'ajout d'une ligne à la demande
|
||||
|
||||
/**
|
||||
|
|
@ -120,43 +130,60 @@ class SupplierProposal extends CommonObject
|
|||
public $delivery_date;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use $date_creation
|
||||
* @see $date_creation
|
||||
* @var int|string
|
||||
*/
|
||||
public $datec;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use $date_validation
|
||||
* @see $date_validation
|
||||
* @var int|string
|
||||
*/
|
||||
public $datev;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $user_author_id;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use $price_ht
|
||||
* @see $price_ht
|
||||
* @var float
|
||||
*/
|
||||
public $price;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use $total_tva
|
||||
* @see $total_tva
|
||||
* @var float
|
||||
*/
|
||||
public $tva;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use $total_ttc
|
||||
* @see $total_ttc
|
||||
* @var float
|
||||
*/
|
||||
public $total;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $cond_reglement_code;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $cond_reglement_doc; // label doc
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $mode_reglement_code;
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use $mode_reglement_code
|
||||
* @var string Mode reglement
|
||||
*/
|
||||
public $mode_reglement;
|
||||
|
|
@ -166,12 +193,21 @@ class SupplierProposal extends CommonObject
|
|||
*/
|
||||
public $extraparams = array();
|
||||
public $lines = array();
|
||||
/**
|
||||
* @var SupplierProposalLine
|
||||
*/
|
||||
public $line;
|
||||
|
||||
public $labelStatus = array();
|
||||
public $labelStatusShort = array();
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $nbtodo;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $nbtodolate;
|
||||
|
||||
// Multicurrency
|
||||
|
|
@ -180,10 +216,25 @@ class SupplierProposal extends CommonObject
|
|||
*/
|
||||
public $fk_multicurrency;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $multicurrency_code;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $multicurrency_tx;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $multicurrency_total_ht;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $multicurrency_total_tva;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $multicurrency_total_ttc;
|
||||
|
||||
/**
|
||||
|
|
@ -361,15 +412,15 @@ class SupplierProposal extends CommonObject
|
|||
* et le desc doit deja avoir la bonne valeur (a l'appelant de gerer le multilangue)
|
||||
*
|
||||
* @param string $desc Description de la ligne
|
||||
* @param double $pu_ht Prix unitaire
|
||||
* @param double $qty Quantite
|
||||
* @param double $txtva Taux de tva
|
||||
* @param double $txlocaltax1 Local tax 1 rate
|
||||
* @param double $txlocaltax2 Local tax 2 rate
|
||||
* @param float $pu_ht Prix unitaire
|
||||
* @param float $qty Quantite
|
||||
* @param float $txtva Taux de tva
|
||||
* @param float $txlocaltax1 Local tax 1 rate
|
||||
* @param float $txlocaltax2 Local tax 2 rate
|
||||
* @param int $fk_product Product/Service ID predefined
|
||||
* @param double $remise_percent Percentage discount of the line
|
||||
* @param float $remise_percent Percentage discount of the line
|
||||
* @param string $price_base_type HT or TTC
|
||||
* @param double $pu_ttc Prix unitaire TTC
|
||||
* @param float $pu_ttc Prix unitaire TTC
|
||||
* @param int $info_bits Bits of type of lines
|
||||
* @param int $type Type of line (product, service)
|
||||
* @param int $rang Position of line
|
||||
|
|
@ -378,12 +429,12 @@ class SupplierProposal extends CommonObject
|
|||
* @param int $fk_fournprice Id supplier price. If 0, we will take best price. If -1 we keep it empty.
|
||||
* @param int $pa_ht Buying price without tax
|
||||
* @param string $label ???
|
||||
* @param array $array_options extrafields array
|
||||
* @param array<string,mixed> $array_options extrafields array
|
||||
* @param string $ref_supplier Supplier price reference
|
||||
* @param int $fk_unit Id of the unit to use.
|
||||
* @param string $origin 'order', 'supplier_proposal', ...
|
||||
* @param int $origin_id Id of origin line
|
||||
* @param double $pu_ht_devise Amount in currency
|
||||
* @param float $pu_ht_devise Amount in currency
|
||||
* @param int $date_start Date start
|
||||
* @param int $date_end Date end
|
||||
* @return int >0 if OK, <0 if KO
|
||||
|
|
@ -648,12 +699,12 @@ class SupplierProposal extends CommonObject
|
|||
* Update a proposal line
|
||||
*
|
||||
* @param int $rowid Id de la ligne
|
||||
* @param double $pu Unit price (HT or TTC depending on price_base_type)
|
||||
* @param double $qty Quantity
|
||||
* @param double $remise_percent Discount on line
|
||||
* @param double $txtva VAT rate
|
||||
* @param double $txlocaltax1 Local tax 1 rate
|
||||
* @param double $txlocaltax2 Local tax 2 rate
|
||||
* @param float $pu Unit price (HT or TTC depending on price_base_type)
|
||||
* @param float $qty Quantity
|
||||
* @param float $remise_percent Discount on line
|
||||
* @param float $txtva VAT rate
|
||||
* @param float $txlocaltax1 Local tax 1 rate
|
||||
* @param float $txlocaltax2 Local tax 2 rate
|
||||
* @param string $desc Description
|
||||
* @param string $price_base_type HT or TTC
|
||||
* @param int $info_bits Miscellaneous information
|
||||
|
|
@ -664,10 +715,10 @@ class SupplierProposal extends CommonObject
|
|||
* @param int $pa_ht Price (without tax) of product when it was bought
|
||||
* @param string $label ???
|
||||
* @param int $type 0/1=Product/service
|
||||
* @param array $array_options extrafields array
|
||||
* @param array<string,mixed> $array_options extrafields array
|
||||
* @param string $ref_supplier Supplier price reference
|
||||
* @param int $fk_unit Id of the unit to use.
|
||||
* @param double $pu_ht_devise Unit price in currency
|
||||
* @param float $pu_ht_devise Unit price in currency
|
||||
* @return int 0 if OK, <0 if KO
|
||||
*/
|
||||
public function updateline($rowid, $pu, $qty, $remise_percent, $txtva, $txlocaltax1 = 0, $txlocaltax2 = 0, $desc = '', $price_base_type = 'HT', $info_bits = 0, $special_code = 0, $fk_parent_line = 0, $skip_update_total = 0, $fk_fournprice = 0, $pa_ht = 0, $label = '', $type = 0, $array_options = [], $ref_supplier = '', $fk_unit = 0, $pu_ht_devise = 0)
|
||||
|
|
@ -1145,6 +1196,7 @@ class SupplierProposal extends CommonObject
|
|||
require_once DOL_DOCUMENT_ROOT."/core/modules/supplier_proposal/" . getDolGlobalString('SUPPLIER_PROPOSAL_ADDON').'.php';
|
||||
$obj = getDolGlobalString('SUPPLIER_PROPOSAL_ADDON');
|
||||
$modSupplierProposal = new $obj();
|
||||
'@phan-var-force ModeleNumRefSupplierProposal $modSupplierProposal';
|
||||
$this->ref = $modSupplierProposal->getNextValue($objsoc, $this);
|
||||
|
||||
// Create clone
|
||||
|
|
@ -1541,7 +1593,7 @@ class SupplierProposal extends CommonObject
|
|||
* Set an overall discount on the proposal
|
||||
*
|
||||
* @param User $user Object user that modify
|
||||
* @param double $remise Amount discount
|
||||
* @param float $remise Amount discount
|
||||
* @return int Return integer <0 if ko, >0 if ok
|
||||
*/
|
||||
/*
|
||||
|
|
@ -1574,7 +1626,7 @@ class SupplierProposal extends CommonObject
|
|||
* Set an absolute overall discount on the proposal
|
||||
*
|
||||
* @param User $user Object user that modify
|
||||
* @param double $remise Amount discount
|
||||
* @param float $remise Amount discount
|
||||
* @return int Return integer <0 if ko, >0 if ok
|
||||
*/
|
||||
/*
|
||||
|
|
@ -1774,7 +1826,7 @@ class SupplierProposal extends CommonObject
|
|||
}
|
||||
$productsupplier->id = $product->fk_product;
|
||||
|
||||
$productsupplier->update_buyprice($product->qty, $product->total_ht, $user, 'HT', $this->thirdparty, '', $ref_fourn, $product->tva_tx, 0, 0, 0, $product->info_bits, '', '', array(), '', $product->multicurrency_total_ht, 'HT', $multicurrency_tx, $product->multicurrency_code, '', '', '');
|
||||
$productsupplier->update_buyprice($product->qty, $product->total_ht, $user, 'HT', $this->thirdparty, 0, $ref_fourn, $product->tva_tx, 0, 0, 0, $product->info_bits, 0, '', array(), '', $product->multicurrency_total_ht, 'HT', $multicurrency_tx, $product->multicurrency_code, '', '', 0);
|
||||
}
|
||||
|
||||
return 1;
|
||||
|
|
@ -1930,7 +1982,7 @@ class SupplierProposal extends CommonObject
|
|||
* @param int $offset For pagination
|
||||
* @param string $sortfield Sort criteria
|
||||
* @param string $sortorder Sort order
|
||||
* @return array|int -1 if KO, array with result if OK
|
||||
* @return array<int,string>|array<int,array{id:int,ref:string,name:string}>|int<-1,-1> -1 if KO, array with result if OK
|
||||
*/
|
||||
public function liste_array($shortlist = 0, $draft = 0, $notcurrentuser = 0, $socid = 0, $limit = 0, $offset = 0, $sortfield = 'p.datec', $sortorder = 'DESC')
|
||||
{
|
||||
|
|
@ -2237,6 +2289,7 @@ class SupplierProposal extends CommonObject
|
|||
if ($resql) {
|
||||
$label = $labelShort = '';
|
||||
$status = '';
|
||||
$delay_warning = 0;
|
||||
if ($mode == 'opened') {
|
||||
$delay_warning = !empty($conf->supplier_proposal->cloture->warning_delay) ? $conf->supplier_proposal->cloture->warning_delay : 0;
|
||||
$status = self::STATUS_VALIDATED;
|
||||
|
|
@ -2430,6 +2483,7 @@ class SupplierProposal extends CommonObject
|
|||
}
|
||||
|
||||
$obj = new $classname();
|
||||
'@phan-var-force ModeleNumRefSupplierProposal $obj';
|
||||
$numref = "";
|
||||
$numref = $obj->getNextValue($soc, $this);
|
||||
|
||||
|
|
@ -2676,13 +2730,13 @@ class SupplierProposal extends CommonObject
|
|||
/**
|
||||
* Create a document onto disk according to template module.
|
||||
*
|
||||
* @param string $modele Force model to use ('' to not force)
|
||||
* @param Translate $outputlangs Object langs to use for output
|
||||
* @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 string $modele Force model to use ('' to not force)
|
||||
* @param Translate $outputlangs Object langs to use for output
|
||||
* @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)
|
||||
{
|
||||
|
|
@ -2821,6 +2875,9 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
*/
|
||||
public $fk_parent_attribute = 'fk_supplier_proposal';
|
||||
|
||||
/**
|
||||
* @var SupplierProposalLine
|
||||
*/
|
||||
public $oldline;
|
||||
|
||||
/**
|
||||
|
|
@ -2838,6 +2895,9 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
*/
|
||||
public $fk_parent_line;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $desc; // Description ligne
|
||||
|
||||
/**
|
||||
|
|
@ -2846,8 +2906,9 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
public $fk_product; // Id produit predefini
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use $product_type
|
||||
* @see $product_type
|
||||
* @var int
|
||||
*/
|
||||
public $fk_product_type;
|
||||
/**
|
||||
|
|
@ -2861,7 +2922,13 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
/**
|
||||
* @var float|string
|
||||
*/
|
||||
public $tva_tx;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $vat_src_code;
|
||||
|
||||
/**
|
||||
|
|
@ -2869,6 +2936,9 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
* @var float
|
||||
*/
|
||||
public $subprice;
|
||||
/**
|
||||
* @var float|string
|
||||
*/
|
||||
public $remise_percent;
|
||||
|
||||
/**
|
||||
|
|
@ -2876,6 +2946,9 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
*/
|
||||
public $fk_remise_except;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $rang = 0;
|
||||
|
||||
/**
|
||||
|
|
@ -2883,8 +2956,17 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
*/
|
||||
public $fk_fournprice;
|
||||
|
||||
/**
|
||||
* @var int|float|string
|
||||
*/
|
||||
public $pa_ht;
|
||||
/**
|
||||
* @var int|float
|
||||
*/
|
||||
public $marge_tx;
|
||||
/**
|
||||
* @var int|float
|
||||
*/
|
||||
public $marque_tx;
|
||||
|
||||
/**
|
||||
|
|
@ -2895,20 +2977,39 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
// 2: ecotaxe
|
||||
// 3: option line (when qty = 0)
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $info_bits = 0; // Liste d'options cumulables:
|
||||
// Bit 0: 0 si TVA normal - 1 if TVA NPR
|
||||
// Bit 1: 0 ligne normal - 1 if fixed reduction
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $total_ht; // Total HT de la ligne toute quantite et incluant la remise ligne
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $total_tva; // Total TVA de la ligne toute quantite et incluant la remise ligne
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $total_ttc; // Total TTC de la ligne toute quantite et incluant la remise ligne
|
||||
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $date_start;
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $date_end;
|
||||
|
||||
// From llx_product
|
||||
/**
|
||||
* @deprecated
|
||||
* @var string
|
||||
* @deprecated Use $product_ref
|
||||
* @see $product_ref
|
||||
*/
|
||||
public $ref;
|
||||
|
|
@ -2920,7 +3021,8 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
public $product_ref;
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @var string
|
||||
* @deprecated Use $product_label
|
||||
* @see $product_label
|
||||
*/
|
||||
public $libelle;
|
||||
|
|
@ -2943,16 +3045,43 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
*/
|
||||
public $product_desc;
|
||||
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $localtax1_tx; // Local tax 1
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $localtax2_tx; // Local tax 2
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $localtax1_type; // Local tax 1 type
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $localtax2_type; // Local tax 2 type
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $total_localtax1; // Line total local tax 1
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $total_localtax2; // Line total local tax 2
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $skip_update_total; // Skip update price total for special lines
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $ref_fourn;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $ref_supplier;
|
||||
|
||||
// Multicurrency
|
||||
|
|
@ -2961,10 +3090,25 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
*/
|
||||
public $fk_multicurrency;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $multicurrency_code;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $multicurrency_subprice;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $multicurrency_total_ht;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $multicurrency_total_tva;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $multicurrency_total_ttc;
|
||||
|
||||
/**
|
||||
|
|
@ -3085,10 +3229,10 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
$this->localtax2_tx = 0;
|
||||
}
|
||||
if (empty($this->localtax1_type)) {
|
||||
$this->localtax1_type = 0;
|
||||
$this->localtax1_type = '';
|
||||
}
|
||||
if (empty($this->localtax2_type)) {
|
||||
$this->localtax2_type = 0;
|
||||
$this->localtax2_type = '';
|
||||
}
|
||||
if (empty($this->total_localtax1)) {
|
||||
$this->total_localtax1 = 0;
|
||||
|
|
@ -3293,10 +3437,10 @@ class SupplierProposalLine extends CommonObjectLine
|
|||
$this->total_localtax2 = 0;
|
||||
}
|
||||
if (empty($this->localtax1_type)) {
|
||||
$this->localtax1_type = 0;
|
||||
$this->localtax1_type = '';
|
||||
}
|
||||
if (empty($this->localtax2_type)) {
|
||||
$this->localtax2_type = 0;
|
||||
$this->localtax2_type = '';
|
||||
}
|
||||
if (empty($this->marque_tx)) {
|
||||
$this->marque_tx = 0;
|
||||
|
|
|
|||
|
|
@ -4,6 +4,7 @@
|
|||
* Copyright (C) 2021 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* 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
|
||||
|
|
@ -452,6 +453,7 @@ if (getDolGlobalString('TAKEPOS_ADDON') == "terminal") {
|
|||
require_once $dir.$filebis;
|
||||
|
||||
$module = new $classname($db);
|
||||
'@phan-var-force ModeleNumRefFactures $module';
|
||||
|
||||
// Show modules according to features level
|
||||
if ($module->version == 'development' && getDolGlobalInt('MAIN_FEATURES_LEVEL') < 2) {
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2016 Jean-François Ferry <hello@librethic.io>
|
||||
* 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
|
||||
|
|
@ -46,7 +47,7 @@ class TicketStats extends Stats
|
|||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param int $socid Id third party
|
||||
* @param mixed $userid Id user for filter or array of user ids
|
||||
* @param int|int[] $userid Id user for filter or array of user ids
|
||||
* @return void
|
||||
*/
|
||||
public function __construct($db, $socid = 0, $userid = 0)
|
||||
|
|
@ -76,7 +77,7 @@ class TicketStats extends Stats
|
|||
/**
|
||||
* Renvoie le nombre de tickets par annee
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{0:int,1:int}> Array of values
|
||||
*/
|
||||
public function getNbByYear()
|
||||
{
|
||||
|
|
@ -93,7 +94,7 @@ class TicketStats extends Stats
|
|||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int}> Array with number by month
|
||||
*/
|
||||
public function getNbByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -110,11 +111,11 @@ class TicketStats extends Stats
|
|||
}
|
||||
|
||||
/**
|
||||
* Return th eamount of tickets for a month and a given year
|
||||
* Return the number of tickets for a month and a given year
|
||||
*
|
||||
* @param int $year Year to scan
|
||||
* @param int $format 0=Label of abscissa is a translated text, 1=Label of abscissa is month number, 2=Label of abscissa is first letter of month
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values
|
||||
*/
|
||||
public function getAmountByMonth($year, $format = 0)
|
||||
{
|
||||
|
|
@ -134,7 +135,7 @@ class TicketStats extends Stats
|
|||
* Return average amount
|
||||
*
|
||||
* @param int $year Year to scan
|
||||
* @return array Array of values
|
||||
* @return array<int<0,11>,array{0:int<1,12>,1:int|float}> Array of values
|
||||
*/
|
||||
public function getAverageByMonth($year)
|
||||
{
|
||||
|
|
@ -151,7 +152,7 @@ class TicketStats extends Stats
|
|||
/**
|
||||
* Return nb, total and average
|
||||
*
|
||||
* @return array Array of values
|
||||
* @return array<array{year:string,nb:string,nb_diff:float,total?:float,avg?:float,weighted?:float,total_diff?:float,avg_diff?:float,avg_weighted?:float}> Array of values
|
||||
*/
|
||||
public function getAllByYear()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2019 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
|
||||
|
|
@ -210,7 +211,7 @@ print '</tr>';
|
|||
$oldyear = 0;
|
||||
foreach ($data as $val) {
|
||||
$year = $val['year'];
|
||||
while (!empty($year) && $oldyear > $year + 1) { // If we have empty year
|
||||
while (!empty($year) && $oldyear > (int) $year + 1) { // If we have empty year
|
||||
$oldyear--;
|
||||
|
||||
print '<tr class="oddeven" height="24">';
|
||||
|
|
|
|||
|
|
@ -388,6 +388,7 @@ if ($modulepart == 'barcode') {
|
|||
$classname = "mod".ucfirst($generator);
|
||||
|
||||
$module = new $classname($db);
|
||||
'@phan-var-force ModeleBarCode $module';
|
||||
if ($module->encodingIsSupported($encoding)) {
|
||||
$result = $module->buildBarCode($code, $encoding, $readable);
|
||||
}
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user