mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-09 17:32:35 +01:00
Merge pull request #32772 from mdeweerd/qual/phan.2025.1.6
Qual: phan fixes
This commit is contained in:
@@ -9,34 +9,34 @@
|
||||
*/
|
||||
return [
|
||||
// # Issue statistics:
|
||||
// PhanUndeclaredProperty : 560+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 300+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 280+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 200+ occurrences
|
||||
// PhanUndeclaredProperty : 540+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 260+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 250+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 180+ occurrences
|
||||
// PhanTypeMismatchProperty : 130+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 180+ occurrences
|
||||
// PhanTypeMismatchProperty : 140+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 120+ occurrences
|
||||
// PhanPluginUndeclaredVariableIsset : 45+ occurrences
|
||||
// PhanRedefineFunction : 45+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccess : 45+ occurrences
|
||||
// PhanPluginUnknownPropertyType : 30+ occurrences
|
||||
// PhanTypeMismatchArgumentNullableInternal : 30+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccess : 40+ occurrences
|
||||
// PhanTypeInvalidDimOffset : 25+ occurrences
|
||||
// PhanPossiblyUndeclaredVariable : 20+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 20+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 25+ occurrences
|
||||
// PhanTypeMismatchArgumentNullableInternal : 20+ occurrences
|
||||
// PhanUndeclaredConstant : 15+ occurrences
|
||||
// PhanPluginEmptyStatementIf : 10+ occurrences
|
||||
// PhanTypeComparisonFromArray : 10+ occurrences
|
||||
// PhanUndeclaredMethod : 10+ occurrences
|
||||
// PhanEmptyForeach : 8 occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 8 occurrences
|
||||
// PhanPluginBothLiteralsBinaryOp : 7 occurrences
|
||||
// PhanEmptyForeach : 7 occurrences
|
||||
// PhanPluginSuspiciousParamPosition : 7 occurrences
|
||||
// PhanPluginBothLiteralsBinaryOp : 6 occurrences
|
||||
// PhanPluginDuplicateExpressionBinaryOp : 6 occurrences
|
||||
// PhanTypeArraySuspiciousNull : 6 occurrences
|
||||
// PhanParamTooMany : 5 occurrences
|
||||
// PhanPluginDuplicateArrayKey : 4 occurrences
|
||||
// PhanEmptyFQSENInClasslike : 3 occurrences
|
||||
// PhanInvalidFQSENInClasslike : 3 occurrences
|
||||
// PhanPossiblyUndeclaredVariable : 2 occurrences
|
||||
// PhanTypeMismatchDimAssignment : 2 occurrences
|
||||
// PhanTypeMismatchDimFetchNullable : 2 occurrences
|
||||
// PhanTypeMismatchReturn : 2 occurrences
|
||||
@@ -58,7 +58,7 @@ return [
|
||||
'htdocs/api/class/api_login.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/api/class/api_setup.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/api/class/api_status.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/asset/class/asset.class.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/asset/class/asset.class.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanTypeInvalidDimOffset'],
|
||||
'htdocs/asset/class/assetdepreciationoptions.class.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/asset/class/assetmodel.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/asset/tpl/accountancy_codes_edit.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
@@ -131,7 +131,7 @@ return [
|
||||
'htdocs/core/actions_addupdatedelete.inc.php' => ['PhanTypeMismatchDimFetch', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_massactions.inc.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_printing.inc.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_sendmails.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/actions_sendmails.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/ajax/ajaxdirtree.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/class/canvas.class.php' => ['PhanParamTooMany', 'PhanUndeclaredMethod'],
|
||||
'htdocs/core/class/ccountry.class.php' => ['PhanUndeclaredProperty'],
|
||||
@@ -151,7 +151,6 @@ return [
|
||||
'htdocs/core/class/notify.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/timespent.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/admin.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/customreports.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/files.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/functions2.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/pdf.lib.php' => ['PhanUndeclaredProperty'],
|
||||
@@ -175,42 +174,22 @@ return [
|
||||
'htdocs/core/modules/oauth/github_oauthcallback.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/project/doc/pdf_timespent.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/propale/doc/pdf_azur.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/propale/doc/pdf_cyan.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/reception/doc/pdf_squille.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/societe/mod_codecompta_aquarium.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/modules/societe/mod_codecompta_digitaria.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/modules/stock/doc/pdf_standard_stock.modules.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/stocktransfer/doc/pdf_eagle_proforma.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/stocktransfer/doc/pdf_eagle.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/stocktransfer/mod_stocktransfer_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_invoice/doc/doc_generic_supplier_invoice_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/supplier_invoice/doc/pdf_canelle.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/modules/supplier_order/doc/doc_generic_supplier_order_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'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_invoice/doc/pdf_canelle.modules.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/core/modules/supplier_order/doc/pdf_cornas.modules.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/supplier_order/doc/pdf_muscadet.modules.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', '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/ticket/doc/doc_generic_ticket_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/user/doc/doc_generic_user_odt.modules.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/workstation/mod_workstation_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/search_page.php' => ['PhanEmptyForeach', 'PhanPluginBothLiteralsBinaryOp'],
|
||||
'htdocs/core/tpl/ajaxrow.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/commonfields_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/document_actions_post_headers.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/extrafields_view.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/filemanager.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/formlayoutai.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/massactions_pre.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/notes.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/tpl/object_discounts.tpl.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/objectline_create.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/objectline_view.tpl.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/massactions_pre.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/objectline_view.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/tpl/onlinepaymentlinks.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/passwordforgotten.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/tpl/passwordreset.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
@@ -226,15 +205,16 @@ return [
|
||||
'htdocs/cron/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/debugbar/class/DataCollector/DolMemoryCollector.php' => ['PhanTypeMismatchReturn'],
|
||||
'htdocs/debugbar/class/DataCollector/DolQueryCollector.php' => ['PhanTypeMismatchReturn'],
|
||||
'htdocs/delivery/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/delivery/card.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/delivery/class/delivery.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/delivery/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/document.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/don/admin/donation.php' => ['PhanUndeclaredMethod'],
|
||||
'htdocs/don/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/don/card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/don/class/api_donations.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/don/class/don.class.php' => ['PhanParamTooMany'],
|
||||
'htdocs/don/document.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/don/index.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/don/info.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/don/list.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/don/note.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
@@ -259,7 +239,7 @@ return [
|
||||
'htdocs/expedition/document.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/expedition/list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expedition/note.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/expedition/shipment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expedition/shipment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/expensereport/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expensereport/class/api_expensereports.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expensereport/payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
@@ -270,12 +250,12 @@ return [
|
||||
'htdocs/expensereport/tpl/expensereport_linktofile.tpl.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/externalsite/frames.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fichinter/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/card-rec.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/api_interventions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fichinter/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/filefunc.inc.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/filefunc.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fourn/class/api_supplier_invoices.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/fourn/class/api_supplier_orders.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
@@ -289,7 +269,6 @@ return [
|
||||
'htdocs/fourn/contact.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/facture/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fourn/facture/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/fourn/facture/list-rec.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fourn/facture/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fourn/facture/paiement.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/facture/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
@@ -308,7 +287,7 @@ return [
|
||||
'htdocs/hrm/class/skill.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/class/skilldet.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/class/skillrank.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/core/tpl/objectline_view.tpl.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/core/tpl/objectline_view.tpl.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/evaluation_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/hrm/job_agenda.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/hrm/job_card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
@@ -319,10 +298,12 @@ return [
|
||||
'htdocs/imports/emptyexample.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/imports/import.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/install/check.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/install/fileconf.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/install/fileconf.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/install/inc.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/install/index.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/install/repair.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/install/repair.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/install/step2.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/install/step5.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/install/upgrade.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/intracommreport/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
@@ -347,6 +328,7 @@ return [
|
||||
'htdocs/opcachepreload.php' => ['PhanEmptyForeach'],
|
||||
'htdocs/opensurvey/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/class/opensurveysondage.class.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/opensurvey/list.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/opensurvey/results.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/wizard/choix_date.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/wizard/create_survey.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
@@ -363,11 +345,12 @@ return [
|
||||
'htdocs/product/class/html.formproduct.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/productfournisseurprice.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/document.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/index.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/product/inventory/card.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/inventory/class/inventory.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/inventory/inventory.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/inventory/list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/product/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/price.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/reassort.php' => ['PhanTypeExpectedObjectPropAccessButGotNull'],
|
||||
'htdocs/product/stats/card.php' => ['PhanTypeComparisonFromArray'],
|
||||
@@ -377,8 +360,8 @@ return [
|
||||
'htdocs/product/stock/class/entrepot.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/movement_card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/movement_list.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/movement_card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/movement_list.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/product.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/stock/productlot_card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/stock/productlot_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
@@ -401,7 +384,7 @@ return [
|
||||
'htdocs/projet/element.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/projet/ganttchart.inc.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/projet/ganttview.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/graph_opportunities.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/projet/graph_opportunities.inc.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/projet/stats/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/projet/tasks.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/projet/tasks/comment.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
@@ -436,6 +419,7 @@ return [
|
||||
'htdocs/public/project/viewandvote.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/recruitment/view.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/stripe/ipn.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/test/test_arrays.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/public/ticket/view.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/webportal/tpl/menu.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
@@ -447,13 +431,13 @@ return [
|
||||
'htdocs/reception/class/reception.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/reception/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/reception/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/reception/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/reception/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/reception/note.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/recruitment/admin/setup.php' => ['PhanEmptyForeach'],
|
||||
'htdocs/recruitment/admin/setup_candidatures.php' => ['PhanEmptyForeach'],
|
||||
'htdocs/recruitment/class/recruitmentcandidature.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/class/recruitmentjobposition.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/core/modules/recruitment/doc/pdf_standard_recruitmentjobposition.modules.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/core/modules/recruitment/mod_recruitmentcandidature_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/core/modules/recruitment/mod_recruitmentjobposition_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/recruitment/index.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
@@ -466,7 +450,6 @@ return [
|
||||
'htdocs/recruitment/recruitmentjobposition_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/recruitment/recruitmentjobposition_note.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/salaries/admin/salaries.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/salaries/class/api_salaries.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/salaries/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/salaries/paiement_salary.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
@@ -477,7 +460,7 @@ return [
|
||||
'htdocs/societe/class/api_thirdparties.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/societe/class/societe.class.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/societe/consumption.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/societe/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/societe/list.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/societe/paymentmodes.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/societe/price.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/societe/tpl/linesalesrepresentative.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
@@ -491,9 +474,10 @@ return [
|
||||
'htdocs/takepos/ajax/ajax.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/takepos/floors.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/takepos/freezone.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/takepos/index.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/takepos/invoice.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/takepos/pay.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/takepos/split.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/takepos/split.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/theme/eldy/badges.inc.php' => ['PhanRedefineFunction'],
|
||||
'htdocs/theme/eldy/btn.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/eldy/dropdown.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
@@ -512,7 +496,6 @@ return [
|
||||
'htdocs/ticket/class/ticket.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/index.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/ticket/list.php' => ['PhanTypeComparisonFromArray'],
|
||||
'htdocs/user/bank.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/user/card.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/user/class/api_users.class.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/user/class/user.class.php' => ['PhanUndeclaredProperty'],
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*/
|
||||
define('DOL_PROJECT_ROOT', __DIR__.'/../../..');
|
||||
@@ -367,7 +367,7 @@ return [
|
||||
// can also be written as 'vendor/phan/phan/.phan/plugins/AlwaysReturnPlugin.php'
|
||||
'DeprecateAliasPlugin',
|
||||
//'EmptyMethodAndFunctionPlugin',
|
||||
// 'InvalidVariableIssetPlugin',
|
||||
'InvalidVariableIssetPlugin',
|
||||
//'MoreSpecificElementTypePlugin',
|
||||
'NoAssertPlugin',
|
||||
'NotFullyQualifiedUsagePlugin',
|
||||
@@ -450,8 +450,8 @@ return [
|
||||
'PhanPluginRedundantAssignment', // Not essential, useless
|
||||
'PhanPluginDuplicateCatchStatementBody', // Requires PHP7.1 - 50+ occurrences
|
||||
|
||||
// 'PhanPluginUnknownArrayMethodParamType', // Too many troubles to manage. Is enabled in config_extended only.
|
||||
// 'PhanPluginUnknownArrayMethodReturnType', // Too many troubles to manage. Is enabled in config_extended only.
|
||||
// 'PhanPluginUnknownArrayMethodParamType', // All fixed, except in api_*
|
||||
// 'PhanPluginUnknownArrayMethodReturnType', // All fixed, except in api_*
|
||||
// 'PhanUndeclaredGlobalVariable', // Helps identify variables that are not set/defined - add '@phan-var-force TYPE $varname' in tpl or includes to help type the variable
|
||||
// 'PhanPluginUnknownObjectMethodCall', // False positive for some class. Is enabled in config_extended only.
|
||||
'PhanTypeSuspiciousNonTraversableForeach', // Reports on `foreach ($object as $key => $value)` which works without php notices, so we ignore it because this is intentional in the code.
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*/
|
||||
|
||||
@@ -95,8 +95,8 @@ $config['suppress_issue_types'] = [
|
||||
'PhanPluginRedundantAssignment', // Not essential, useless
|
||||
'PhanPluginDuplicateCatchStatementBody', // Requires PHP7.1 - 50+ occurrences
|
||||
|
||||
'PhanPluginUnknownArrayMethodParamType', // this option costs more time to be supported than it solves time
|
||||
'PhanPluginUnknownArrayMethodReturnType', // this option costs more time to be supported than it solves time
|
||||
'PhanPluginUnknownArrayMethodParamType', // All fixed, except in api_* at this time
|
||||
'PhanPluginUnknownArrayMethodReturnType', // All fixed, except in api_* at this time
|
||||
'PhanTypeSuspiciousNonTraversableForeach', // Reports on `foreach ($object as $key => $value)` which works without php notices, so we ignore it because this is intentional in the code.
|
||||
];
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
@@ -8,7 +9,7 @@
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Nick Fragoulis
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1491,6 +1492,7 @@ class FactureRec extends CommonInvoice
|
||||
'facturerec' => $facturerec, // it's an object which PHP passes by "reference", so modifiable by hooks.
|
||||
'this' => $this, // it's an object which PHP passes by "reference", so modifiable by hooks.
|
||||
);
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('afterCreationOfRecurringInvoice', $parameters, $facture); // note: $facture can be modified by hooks (warning: $facture can be null)
|
||||
|
||||
$i++;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 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
|
||||
@@ -117,7 +118,7 @@ if (empty($object->id)) {
|
||||
}
|
||||
|
||||
|
||||
if ($id > 0 ) {
|
||||
if ($id > 0) {
|
||||
$object = new FactureRec($db);
|
||||
$object->fetch($id);
|
||||
|
||||
@@ -129,7 +130,7 @@ if ($id > 0 ) {
|
||||
|
||||
print dol_get_fiche_head($head, 'note', $langs->trans("InvoiceCustomer"), -1, 'bill');
|
||||
|
||||
// Object card
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
@@ -152,7 +153,7 @@ if ($id > 0 ) {
|
||||
if ($action != 'classify') {
|
||||
$morehtmlref .= '<a class="editfielda" href="'.$_SERVER['PHP_SELF'].'?action=classify&token='.newToken().'&id='.$object->id.'">'.img_edit($langs->transnoentitiesnoconv('SetProject')).'</a> ';
|
||||
}
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
$morehtmlref .= $form->form_project($_SERVER['PHP_SELF'].'?id='.$object->id, $object->socid, (string) $object->fk_project, ($action == 'classify' ? 'projectid' : 'none'), 0, 0, 0, 1, '', 'maxwidth300');
|
||||
} else {
|
||||
if (!empty($object->fk_project)) {
|
||||
$proj = new Project($db);
|
||||
@@ -184,18 +185,18 @@ if ($id > 0 ) {
|
||||
|
||||
$substitutionarray = getCommonSubstitutionArray($langs, 2, null, $object);
|
||||
|
||||
$substitutionarray['__INVOICE_PREVIOUS_MONTH__'] = $langs->trans("PreviousMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'), '%m') . ')';
|
||||
$substitutionarray['__INVOICE_PREVIOUS_MONTH__'] = $langs->trans("PreviousMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree((int) $dateexample, -1, 'm'), '%m') . ')';
|
||||
$substitutionarray['__INVOICE_MONTH__'] = $langs->trans("MonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($dateexample, '%m') . ')';
|
||||
$substitutionarray['__INVOICE_NEXT_MONTH__'] = $langs->trans("NextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%m') . ')';
|
||||
$substitutionarray['__INVOICE_PREVIOUS_MONTH_TEXT__'] = $langs->trans("TextPreviousMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, -1, 'm'), '%B') . ')';
|
||||
$substitutionarray['__INVOICE_NEXT_MONTH__'] = $langs->trans("NextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree((int) $dateexample, 1, 'm'), '%m') . ')';
|
||||
$substitutionarray['__INVOICE_PREVIOUS_MONTH_TEXT__'] = $langs->trans("TextPreviousMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree((int) $dateexample, -1, 'm'), '%B') . ')';
|
||||
$substitutionarray['__INVOICE_MONTH_TEXT__'] = $langs->trans("TextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($dateexample, '%B') . ')';
|
||||
$substitutionarray['__INVOICE_NEXT_MONTH_TEXT__'] = $langs->trans("TextNextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, 1, 'm'), '%B') . ')';
|
||||
$substitutionarray['__INVOICE_PREVIOUS_YEAR__'] = $langs->trans("PreviousYearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, -1, 'y'), '%Y') . ')';
|
||||
$substitutionarray['__INVOICE_NEXT_MONTH_TEXT__'] = $langs->trans("TextNextMonthOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree((int) $dateexample, 1, 'm'), '%B') . ')';
|
||||
$substitutionarray['__INVOICE_PREVIOUS_YEAR__'] = $langs->trans("PreviousYearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree((int) $dateexample, -1, 'y'), '%Y') . ')';
|
||||
$substitutionarray['__INVOICE_YEAR__'] = $langs->trans("YearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date($dateexample, '%Y') . ')';
|
||||
$substitutionarray['__INVOICE_NEXT_YEAR__'] = $langs->trans("NextYearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree($dateexample, 1, 'y'), '%Y') . ')';
|
||||
$substitutionarray['__INVOICE_NEXT_YEAR__'] = $langs->trans("NextYearOfInvoice") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree((int) $dateexample, 1, 'y'), '%Y') . ')';
|
||||
// Only on template invoices
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(($object->date_when ? $object->date_when : dol_now()), 'dayhour') . ')';
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree(($object->date_when ? $object->date_when : dol_now()), $object->frequency, $object->unit_frequency), 'dayhour') . ')';
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_BEFORE_GEN__'] = $langs->trans("DateNextInvoiceBeforeGen") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(($object->date_when ? (int) $object->date_when : dol_now()), 'dayhour') . ')';
|
||||
$substitutionarray['__INVOICE_DATE_NEXT_INVOICE_AFTER_GEN__'] = $langs->trans("DateNextInvoiceAfterGen") . ' (' . $langs->trans("Example") . ': ' . dol_print_date(dol_time_plus_duree(($object->date_when ? (int) $object->date_when : dol_now()), $object->frequency, $object->unit_frequency), 'dayhour') . ')';
|
||||
$substitutionarray['__INVOICE_COUNTER_CURRENT__'] = $object->nb_gen_done;
|
||||
$substitutionarray['__INVOICE_COUNTER_MAX__'] = $object->nb_gen_max;
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2004-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
@@ -6,7 +7,7 @@
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -931,7 +932,7 @@ if ($object->id > 0) {
|
||||
|
||||
$tmpuser = new User($db);
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
$num = $db->num_rows($resql);
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2021 Jesus Jerez <jesusballesteros@protonmail.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 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
|
||||
@@ -51,7 +52,7 @@ if (isModEnabled('project')) {
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array('bills', 'banks', 'companies', 'suppliers', 'other'));
|
||||
|
||||
$id = GETPOST('id', 'int');
|
||||
$id = GETPOSTINT('id');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
@@ -105,7 +106,7 @@ include DOL_DOCUMENT_ROOT.'/core/actions_linkedfiles.inc.php';
|
||||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$form = new Form($db);
|
||||
|
||||
$title = $langs->trans('Payment')." - ".$langs->trans('Documents');
|
||||
llxHeader('', $title);
|
||||
@@ -120,8 +121,8 @@ if ($object->id > 0) {
|
||||
$morehtmlref = '<div class="refidno">';
|
||||
|
||||
// Date of payment
|
||||
$morehtmlref .= $form->editfieldkey("Date", 'datep', $object->date, $object, $object->statut == 0 && ($user->hasRight('facture', 'creer')), 'datehourpicker', '', 0, 3).': ';
|
||||
$morehtmlref .= $form->editfieldval("Date", 'datep', $object->date, $object, $object->statut == 0 && ($user->hasRight('facture', 'creer')), 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded'));
|
||||
$morehtmlref .= $form->editfieldkey("Date", 'datep', $object->date, $object, (int) ($object->statut == 0 && ($user->hasRight('facture', 'creer'))), 'datehourpicker', '', 0, 3).': ';
|
||||
$morehtmlref .= $form->editfieldval("Date", 'datep', $object->date, $object, (int) ($object->statut == 0 && ($user->hasRight('facture', 'creer'))), 'datehourpicker', '', null, $langs->trans('PaymentDateUpdateSucceeded'));
|
||||
|
||||
// Payment mode
|
||||
$morehtmlref .= '<br>'.$langs->trans('PaymentMode').' : ';
|
||||
@@ -158,7 +159,7 @@ if ($object->id > 0) {
|
||||
dol_banner_tab($object, 'ref', $linkback, 1, 'ref', 'ref', $morehtmlref);
|
||||
|
||||
// Build file list
|
||||
$filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ?SORT_DESC:SORT_ASC), 1);
|
||||
$filearray = dol_dir_list($upload_dir, "files", 0, '', '(\.meta|_preview.*\.png)$', $sortfield, (strtolower($sortorder) == 'desc' ? SORT_DESC : SORT_ASC), 1);
|
||||
$totalsize = 0;
|
||||
foreach ($filearray as $key => $file) {
|
||||
$totalsize += $file['size'];
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2015-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2021 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2018 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2019 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -1941,6 +1942,7 @@ $parameters['uploaddir'] = $uploaddir;
|
||||
$parameters['massaction'] = $massaction;
|
||||
$parameters['diroutputmassaction'] = isset($diroutputmassaction) ? $diroutputmassaction : null;
|
||||
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('doMassActions', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2011-2022 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011-2023 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>
|
||||
* Copyright (C) 2024-2025 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
|
||||
@@ -161,7 +162,7 @@ class FileUpload
|
||||
'options' => &$options,
|
||||
'element' => $element
|
||||
),
|
||||
$object,
|
||||
$object, // @phan-suppress-current-line PhanTypeMismatchArgumentNullable
|
||||
$action
|
||||
);
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (c) 2002-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Benoit Mortier <benoit.mortier@opensides.be>
|
||||
@@ -100,18 +101,18 @@ class Form
|
||||
/**
|
||||
* Output key field for an editable field
|
||||
*
|
||||
* @param string $text Text of label or key to translate
|
||||
* @param string $htmlname Name of select field ('edit' prefix will be added)
|
||||
* @param string $preselected Value to show/edit (not used in this function)
|
||||
* @param object $object Object (on the page we show)
|
||||
* @param boolean $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field.
|
||||
* @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'dayhour' or 'datehourpicker' 'checkbox:ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...)
|
||||
* @param string $moreparam More param to add on a href URL.
|
||||
* @param int $fieldrequired 1 if we want to show field as mandatory using the "fieldrequired" CSS.
|
||||
* @param int $notabletag 1=Do not output table tags but output a ':', 2=Do not output table tags and no ':', 3=Do not output table tags but output a ' '
|
||||
* @param string $paramid Key of parameter for id ('id', 'socid')
|
||||
* @param string $help Tooltip help
|
||||
* @return string HTML edit field
|
||||
* @param string $text Text of label or key to translate
|
||||
* @param string $htmlname Name of select field ('edit' prefix will be added)
|
||||
* @param string $preselected Value to show/edit (not used in this function)
|
||||
* @param object $object Object (on the page we show)
|
||||
* @param int<0,1> $perm Permission to allow button to edit parameter. Set it to 0 to have a not edited field.
|
||||
* @param string $typeofdata Type of data ('string' by default, 'email', 'amount:99', 'numeric:99', 'text' or 'textarea:rows:cols', 'datepicker' ('day' do not work, don't know why), 'dayhour' or 'datehourpicker' 'checkbox:ckeditor:dolibarr_zzz:width:height:savemethod:1:rows:cols', 'select;xxx[:class]'...)
|
||||
* @param string $moreparam More param to add on a href URL.
|
||||
* @param int $fieldrequired 1 if we want to show field as mandatory using the "fieldrequired" CSS.
|
||||
* @param int<0,3> $notabletag 1=Do not output table tags but output a ':', 2=Do not output table tags and no ':', 3=Do not output table tags but output a ' '
|
||||
* @param string $paramid Key of parameter for id ('id', 'socid')
|
||||
* @param string $help Tooltip help
|
||||
* @return string HTML edit field
|
||||
*/
|
||||
public function editfieldkey($text, $htmlname, $preselected, $object, $perm, $typeofdata = 'string', $moreparam = '', $fieldrequired = 0, $notabletag = 0, $paramid = 'id', $help = '')
|
||||
{
|
||||
@@ -200,23 +201,23 @@ class Form
|
||||
/**
|
||||
* Output value of a field for an editable field
|
||||
*
|
||||
* @param string $text Text of label (not used in this function)
|
||||
* @param string $htmlname Name of select field
|
||||
* @param string $value Value to show/edit
|
||||
* @param CommonObject $object Object (that we want to show)
|
||||
* @param boolean $perm Permission to allow button to edit parameter
|
||||
* @param string $typeofdata Type of data ('string' by default, 'checkbox', 'email', 'phone', 'amount:99', 'numeric:99',
|
||||
* @param string $text Text of label (not used in this function)
|
||||
* @param string $htmlname Name of select field
|
||||
* @param string|int $value Value to show/edit
|
||||
* @param CommonObject $object Object (that we want to show)
|
||||
* @param bool|int<0,1> $perm Permission to allow button to edit parameter
|
||||
* @param string $typeofdata Type of data ('string' by default, 'checkbox', 'email', 'phone', 'amount:99', 'numeric:99',
|
||||
* 'text' or 'textarea:rows:cols%', 'safehtmlstring', 'restricthtml',
|
||||
* 'datepicker' ('day' do not work, don't know why), 'dayhour' or 'datehourpicker', 'ckeditor:dolibarr_zzz:width:height:savemethod:toolbarstartexpanded:rows:cols', 'select;xkey:xval,ykey:yval,...')
|
||||
* @param string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formatted price instead of numeric value, or a select combo). Use '' to use same than $value
|
||||
* @param ?string $editvalue When in edit mode, use this value as $value instead of value (for example, you can provide here a formatted price instead of numeric value, or a select combo). Use '' to use same than $value
|
||||
* @param ?CommonObject $extObject External object ???
|
||||
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
|
||||
* @param string|array<string,string>|null $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
|
||||
* @param string $moreparam More param to add on the form on action href URL parameter
|
||||
* @param int $notabletag Do no output table tags
|
||||
* @param int<0,1> $notabletag Do no output table tags
|
||||
* @param string $formatfunc Call a specific method of $object->$formatfunc to output field in view mode (For example: 'dol_print_email')
|
||||
* @param string $paramid Key of parameter for id ('id', 'socid')
|
||||
* @param string $gm 'auto' or 'tzuser' or 'tzuserrel' or 'tzserver' (when $typeofdata is a date)
|
||||
* @param array<string,int> $moreoptions Array with more options. For example array('addnowlink'=>1), array('valuealreadyhtmlescaped'=>1)
|
||||
* @param array<string,int> $moreoptions Array with more options. For example array('addnowlink'=>1), array('valuealreadyhtmlescaped'=>1)
|
||||
* @param string $editaction [=''] use GETPOST default action or set action to edit mode
|
||||
* @return string HTML edit field
|
||||
*/
|
||||
@@ -487,9 +488,9 @@ class Form
|
||||
* @param string $htmlname DIV ID (field name)
|
||||
* @param int $condition Condition to edit
|
||||
* @param string $inputType Type of input ('string', 'numeric', 'datepicker' ('day' do not work, don't know why), 'textarea:rows:cols', 'ckeditor:dolibarr_zzz:width:height:?:1:rows:cols', 'select:loadmethod:savemethod:buttononly')
|
||||
* @param string $editvalue When in edit mode, use this value as $value instead of value
|
||||
* @param ?string $editvalue When in edit mode, use this value as $value instead of value
|
||||
* @param ?CommonObject $extObject External object
|
||||
* @param mixed $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
|
||||
* @param string|array<string,string>|null $custommsg String or Array of custom messages : eg array('success' => 'MyMessage', 'error' => 'MyMessage')
|
||||
* @return string HTML edit in place
|
||||
*/
|
||||
protected function editInPlace($object, $value, $htmlname, $condition, $inputType = 'textarea', $editvalue = null, $extObject = null, $custommsg = null)
|
||||
@@ -2132,7 +2133,7 @@ class Form
|
||||
* @param int $disabled If select list must be disabled
|
||||
* @param int[]|''|'hierarchy'|'hierarchyme' $include Array list of users id to include. User '' for all users or 'hierarchy' to have only supervised users or 'hierarchyme' to have supervised + me
|
||||
* @param int[]|'' $enableonly Array list of users id to be enabled. If defined, it means that others will be disabled
|
||||
* @param string $force_entity '0' or list of Ids of environment to force, separated by a coma, or 'default' = do no extend to all entities allowed to superadmin.
|
||||
* @param string $force_entity '0' or list of Ids of environment to force, separated by a comma, or 'default' = do no extend to all entities allowed to superadmin.
|
||||
* @param int $maxlength Maximum length of string into list (0=no limit)
|
||||
* @param int<-1,1> $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status
|
||||
* @param string $morefilter Add more filters into sql request (Example: '(employee:=:1)'). This value must not come from user input.
|
||||
@@ -6060,11 +6061,11 @@ class Form
|
||||
/**
|
||||
* Show a form to select a project
|
||||
*
|
||||
* @param int $page Page
|
||||
* @param string $page Page
|
||||
* @param int $socid Id third party (-1=all, 0=only projects not linked to a third party, id=projects not linked or linked to third party id)
|
||||
* @param string $selected Id preselected project
|
||||
* @param string $htmlname Name of select field
|
||||
* @param int $discard_closed Discard closed projects (0=Keep,1=hide completely except $selected,2=Disable)
|
||||
* @param int<0,2> $discard_closed Discard closed projects (0=Keep,1=hide completely except $selected,2=Disable)
|
||||
* @param int $maxlength Max length
|
||||
* @param int $forcefocus Force focus on field (works with javascript only)
|
||||
* @param int<0,1> $nooutput No print is done. String is returned.
|
||||
@@ -6116,7 +6117,7 @@ class Form
|
||||
/**
|
||||
* Show a form to select payment conditions
|
||||
*
|
||||
* @param int $page Page
|
||||
* @param string $page Page
|
||||
* @param string $selected Id condition pre-selectionne
|
||||
* @param string $htmlname Name of select html field
|
||||
* @param int $addempty Add empty entry
|
||||
@@ -6177,7 +6178,7 @@ class Form
|
||||
/**
|
||||
* Show a form to select a delivery delay
|
||||
*
|
||||
* @param int $page Page
|
||||
* @param string $page Page
|
||||
* @param string $selected Id condition pre-selectionne
|
||||
* @param string $htmlname Name of select html field
|
||||
* @param int $addempty Add an empty entry
|
||||
@@ -9066,7 +9067,7 @@ class Form
|
||||
* @param string $morecss Add more class to css styles
|
||||
* @param int $callurlonselect If set to 1, some code is added so an url return by the ajax is called when value is selected.
|
||||
* @param string $placeholder String to use as placeholder
|
||||
* @param integer $acceptdelayedhtml 1 = caller is requesting to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect)
|
||||
* @param int<0,1> $acceptdelayedhtml 1 = caller is requesting to have html js content not returned but saved into global $delayedhtmlcontent (so caller can show it at end of page to avoid flash FOUC effect)
|
||||
* @return string HTML select string
|
||||
* @see selectArrayFilter(), ajax_combobox() in ajax.lib.php
|
||||
*/
|
||||
@@ -11721,10 +11722,10 @@ class Form
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
/**
|
||||
* Load into cache list of invoice subtypes
|
||||
*
|
||||
* @return int Nb of lines loaded, <0 if KO
|
||||
*/
|
||||
* Load into cache list of invoice subtypes
|
||||
*
|
||||
* @return int Nb of lines loaded, <0 if KO
|
||||
*/
|
||||
public function load_cache_invoice_subtype()
|
||||
{
|
||||
// phpcs:enable
|
||||
@@ -11767,15 +11768,15 @@ class Form
|
||||
|
||||
|
||||
/**
|
||||
* Return list of invoice subtypes.
|
||||
*
|
||||
* @param int $selected Id of invoice subtype to preselect by default
|
||||
* @param string $htmlname Select field name
|
||||
* @param int<0,1> $addempty Add an empty entry
|
||||
* @param int<0,1> $noinfoadmin 0=Add admin info, 1=Disable admin info
|
||||
* @param string $morecss Add more CSS on select tag
|
||||
* @return string String for the HTML select component
|
||||
*/
|
||||
* Return list of invoice subtypes.
|
||||
*
|
||||
* @param int $selected Id of invoice subtype to preselect by default
|
||||
* @param string $htmlname Select field name
|
||||
* @param int<0,1> $addempty Add an empty entry
|
||||
* @param int<0,1> $noinfoadmin 0=Add admin info, 1=Disable admin info
|
||||
* @param string $morecss Add more CSS on select tag
|
||||
* @return string String for the HTML select component
|
||||
*/
|
||||
public function getSelectInvoiceSubtype($selected = 0, $htmlname = 'subtypeid', $addempty = 0, $noinfoadmin = 0, $morecss = '')
|
||||
{
|
||||
global $langs, $user;
|
||||
|
||||
@@ -810,7 +810,7 @@ class FormCompany extends Form
|
||||
/**
|
||||
* Return a select list with types of contacts
|
||||
*
|
||||
* @param Object $object Object to use to find type of contact
|
||||
* @param ?Object $object Object to use to find type of contact
|
||||
* @param string $selected Default selected value
|
||||
* @param string $htmlname HTML select name
|
||||
* @param string $source Source ('internal' or 'external')
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2008-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2014 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2016 Juanjo Menent <jmenent@2byte.es>
|
||||
@@ -8,7 +9,7 @@
|
||||
* Copyright (C) 2015 Bahfir Abbes <bafbes@gmail.com>
|
||||
* Copyright (C) 2016-2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -310,6 +311,7 @@ class FormFile
|
||||
}
|
||||
|
||||
$parameters = array('socid' => (isset($GLOBALS['socid']) ? $GLOBALS['socid'] : ''), 'id' => (isset($GLOBALS['id']) ? $GLOBALS['id'] : ''), 'url' => $url, 'perm' => $perm, 'options' => $options);
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$res = $hookmanager->executeHooks('formattachOptionsUpload', $parameters, $object);
|
||||
if (empty($res)) {
|
||||
$out = '<div class="'.($usewithoutform ? 'inline-block valignmiddle' : (($nooutput == 2 ? '' : 'attacharea ').'attacharea'.$htmlname)).'">'.$out.'</div>';
|
||||
@@ -1349,6 +1351,7 @@ class FormFile
|
||||
'title' => $title,
|
||||
'url' => $url
|
||||
);
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('showFilesList', $parameters, $object);
|
||||
|
||||
if (!empty($reshook)) { // null or '' for bypass
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
@@ -409,21 +410,21 @@ function fillArrayOfGroupBy($object, $tablealias, $labelofobject, &$arrayofgroup
|
||||
if (in_array($val['type'], array('timestamp', 'date', 'datetime'))) {
|
||||
$position = (empty($val['position']) ? 0 : intval($val['position']));
|
||||
$arrayofgroupby[$tablealias.'.'.$key.'-year'] = array(
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val['label']).' <span class="opacitymedium">('.$YYYY.')</span>',
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val['label']).' <span class="opacitymedium">('.$YYYY.')</span>', // @phan-suppress-current-line PhanUndeclaredProperty
|
||||
'labelnohtml' => $labelofobject.': '.$langs->trans($val['label']),
|
||||
'position' => ($position + ($count * 100000)).'.1',
|
||||
'table' => $object->table_element,
|
||||
'tablefromt' => $tablepath
|
||||
);
|
||||
$arrayofgroupby[$tablealias.'.'.$key.'-month'] = array(
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val['label']).' <span class="opacitymedium">('.$YYYY.'-'.$MM.')</span>',
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val['label']).' <span class="opacitymedium">('.$YYYY.'-'.$MM.')</span>', // @phan-suppress-current-line PhanUndeclaredProperty
|
||||
'labelnohtml' => $labelofobject.': '.$langs->trans($val['label']),
|
||||
'position' => ($position + ($count * 100000)).'.2',
|
||||
'table' => $object->table_element,
|
||||
'tablefromt' => $tablepath
|
||||
);
|
||||
$arrayofgroupby[$tablealias.'.'.$key.'-day'] = array(
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val['label']).' <span class="opacitymedium">('.$YYYY.'-'.$MM.'-'.$DD.')</span>',
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val['label']).' <span class="opacitymedium">('.$YYYY.'-'.$MM.'-'.$DD.')</span>', // @phan-suppress-current-line PhanUndeclaredProperty
|
||||
'labelnohtml' => $labelofobject.': '.$langs->trans($val['label']),
|
||||
'position' => ($position + ($count * 100000)).'.3',
|
||||
'table' => $object->table_element,
|
||||
@@ -432,7 +433,7 @@ function fillArrayOfGroupBy($object, $tablealias, $labelofobject, &$arrayofgroup
|
||||
} else {
|
||||
$position = (empty($val['position']) ? 0 : intval($val['position']));
|
||||
$arrayofgroupby[$tablealias.'.'.$key] = array(
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val['label']),
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val['label']), // @phan-suppress-current-line PhanUndeclaredProperty
|
||||
'labelnohtml' => $labelofobject.': '.$langs->trans($val['label']),
|
||||
'position' => ($position + ($count * 100000)),
|
||||
'table' => $object->table_element,
|
||||
@@ -455,14 +456,14 @@ function fillArrayOfGroupBy($object, $tablealias, $labelofobject, &$arrayofgroup
|
||||
if (in_array($extrafields->attributes[$object->table_element]['type'][$key], array('timestamp', 'date', 'datetime'))) {
|
||||
$position = (empty($extrafields->attributes[$object->table_element]['pos'][$key]) ? 0 : intval($extrafields->attributes[$object->table_element]['pos'][$key]));
|
||||
$arrayofgroupby[preg_replace('/^t/', 'te', $tablealias).'.'.$key.'-year'] = array(
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val).' <span class="opacitymedium">('.$YYYY.')</span>',
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val).' <span class="opacitymedium">('.$YYYY.')</span>', // @phan-suppress-current-line PhanUndeclaredProperty
|
||||
'labelnohtml' => $labelofobject.': '.$langs->trans($val),
|
||||
'position' => ($position + ($count * 100000)).'.1',
|
||||
'table' => $object->table_element,
|
||||
'tablefromt' => $tablepath
|
||||
);
|
||||
$arrayofgroupby[preg_replace('/^t/', 'te', $tablealias).'.'.$key.'-month'] = array(
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val).' <span class="opacitymedium">('.$YYYY.'-'.$MM.')</span>',
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val).' <span class="opacitymedium">('.$YYYY.'-'.$MM.')</span>', // @phan-suppress-current-line PhanUndeclaredProperty
|
||||
'labelnohtml' => $labelofobject.': '.$langs->trans($val),
|
||||
'position' => ($position + ($count * 100000)).'.2',
|
||||
'table' => $object->table_element,
|
||||
@@ -570,7 +571,7 @@ function fillArrayOfFilterFields($object, $tablealias, $labelofobject, &$arrayof
|
||||
|
||||
$position = (empty($val['position']) ? 0 : intval($val['position']));
|
||||
$arrayoffields[$tablealias.'.'.$key] = array(
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val['label']),
|
||||
'label' => img_picto('', (empty($object->picto) ? 'generic' : $object->picto), 'class="pictofixedwidth"').' '.$labelofobject.': '.$langs->trans($val['label']), // @phan-suppress-current-line PhanUndeclaredProperty
|
||||
'labelnohtml' => $labelofobject.': '.$langs->trans($val['label']),
|
||||
'position' => ($position + ($count * 100000)),
|
||||
'table' => $object->table_element,
|
||||
|
||||
@@ -495,6 +495,7 @@ function getEntity($element, $shared = 1, $currentobject = null)
|
||||
'currentobject' => $currentobject,
|
||||
'out' => $out
|
||||
);
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('hookGetEntity', $parameters, $currentobject, $action); // Note that $action and $object may have been modified by some hooks
|
||||
|
||||
if (is_numeric($reshook)) {
|
||||
@@ -3426,7 +3427,7 @@ function dol_strftime($fmt, $ts = false, $is_gmt = false)
|
||||
* Output date in a string format according to outputlangs (or langs if not defined).
|
||||
* Return charset is always UTF-8, except if encodetoouput is defined. In this case charset is output charset
|
||||
*
|
||||
* @param int|string $time GM Timestamps date
|
||||
* @param null|int|string $time GM Timestamps date
|
||||
* @param string $format Output date format (tag of strftime function)
|
||||
* "%d %b %Y",
|
||||
* "%d/%m/%Y %H:%M",
|
||||
@@ -3448,7 +3449,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs =
|
||||
global $conf, $langs;
|
||||
|
||||
// If date undefined or "", we return ""
|
||||
if (dol_strlen($time) == 0) {
|
||||
if (dol_strlen((string) $time) == 0) {
|
||||
return ''; // $time=0 allowed (it means 01/01/1970 00:00:00)
|
||||
}
|
||||
|
||||
@@ -5787,7 +5788,7 @@ function img_error($titlealt = 'default')
|
||||
* Show next logo
|
||||
*
|
||||
* @param string $titlealt Text on alt and title of image. Alt only if param notitle is set to 1. If text is "TextA:TextB", use Text A on alt and Text B on title.
|
||||
* @param string $moreatt Add more attribute on img tag (For example 'style="float: right"')
|
||||
* @param string $moreatt Add more attribute on img tag (For example 'style="float: right"')
|
||||
* @return string Return img tag
|
||||
*/
|
||||
function img_next($titlealt = 'default', $moreatt = '')
|
||||
@@ -6263,16 +6264,16 @@ function dol_print_error_email($prefixcode, $errormessage = '', $errormessages =
|
||||
/**
|
||||
* Show title line of an array
|
||||
*
|
||||
* @param string $name Label of field
|
||||
* @param ?string $name Label of field
|
||||
* @param string $file Url used when we click on sort picto
|
||||
* @param string $field Field to use for new sorting
|
||||
* @param string $begin ("" by default)
|
||||
* @param string $moreparam Add more parameters on sort url links ("" by default)
|
||||
* @param string $moreattrib Options of attribute td ("" by default)
|
||||
* @param string $sortfield Current field used to sort
|
||||
* @param string $sortorder Current sort order
|
||||
* @param ?string $sortfield Current field used to sort
|
||||
* @param ?string $sortorder Current sort order
|
||||
* @param string $prefix Prefix for css. Use space after prefix to add your own CSS tag, for example 'mycss '.
|
||||
* @param string $tooltip Tooltip
|
||||
* @param ?string $tooltip Tooltip
|
||||
* @param int $forcenowrapcolumntitle No need for use 'wrapcolumntitle' css style
|
||||
* @return void
|
||||
*/
|
||||
@@ -6284,19 +6285,19 @@ function print_liste_field_titre($name, $file = "", $field = "", $begin = "", $m
|
||||
/**
|
||||
* Get title line of an array
|
||||
*
|
||||
* @param string $name Translation key of field to show or complete HTML string to show
|
||||
* @param int $thead 0=To use with standard table format, 1=To use inside <thead><tr>, 2=To use with <div>
|
||||
* @param string $file Url used when we click on sort picto
|
||||
* @param string $field Field to use for new sorting. Empty if this field is not sortable. Example "t.abc" or "t.abc,t.def"
|
||||
* @param string $begin ("" by default)
|
||||
* @param string $moreparam Add more parameters on sort url links ("" by default)
|
||||
* @param string $moreattrib Add more attributes on th ("" by default). To add more css class, use param $prefix.
|
||||
* @param string $sortfield Current field used to sort (Ex: 'd.datep,d.id')
|
||||
* @param string $sortorder Current sort order (Ex: 'asc,desc')
|
||||
* @param string $prefix Prefix for css. Use space after prefix to add your own CSS tag, for example 'mycss '.
|
||||
* @param int $disablesortlink 1=Disable sort link
|
||||
* @param string $tooltip Tooltip
|
||||
* @param int $forcenowrapcolumntitle No need for use 'wrapcolumntitle' css style
|
||||
* @param ?string $name Translation key of field to show or complete HTML string to show
|
||||
* @param int<0,2> $thead 0=To use with standard table format, 1=To use inside <thead><tr>, 2=To use with <div>
|
||||
* @param string $file Url used when we click on sort picto
|
||||
* @param string $field Field to use for new sorting. Empty if this field is not sortable. Example "t.abc" or "t.abc,t.def"
|
||||
* @param string $begin ("" by default)
|
||||
* @param string $moreparam Add more parameters on sort url links ("" by default)
|
||||
* @param string $moreattrib Add more attributes on th ("" by default). To add more css class, use param $prefix.
|
||||
* @param ?string $sortfield Current field used to sort (Ex: 'd.datep,d.id')
|
||||
* @param ?string $sortorder Current sort order (Ex: 'asc,desc')
|
||||
* @param string $prefix Prefix for css. Use space after prefix to add your own CSS tag, for example 'mycss '.
|
||||
* @param int<0,1> $disablesortlink 1=Disable sort link
|
||||
* @param ?string $tooltip Tooltip
|
||||
* @param int<0,1> $forcenowrapcolumntitle No need to use 'wrapcolumntitle' css style
|
||||
* @return string
|
||||
*/
|
||||
function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin = "", $moreparam = "", $moreattrib = "", $sortfield = "", $sortorder = "", $prefix = "", $disablesortlink = 0, $tooltip = '', $forcenowrapcolumntitle = 0)
|
||||
@@ -6308,7 +6309,7 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
|
||||
$prefix .= 'right '; // For backward compatibility
|
||||
}
|
||||
|
||||
$sortorder = strtoupper($sortorder);
|
||||
$sortorder = strtoupper((string) $sortorder);
|
||||
$out = '';
|
||||
$sortimg = '';
|
||||
|
||||
@@ -6317,7 +6318,7 @@ function getTitleFieldOfList($name, $thead = 0, $file = "", $field = "", $begin
|
||||
$tag = 'div';
|
||||
}
|
||||
|
||||
$tmpsortfield = explode(',', $sortfield);
|
||||
$tmpsortfield = explode(',', (string) $sortfield);
|
||||
$sortfield1 = trim($tmpsortfield[0]); // If $sortfield is 'd.datep,d.id', it becomes 'd.datep'
|
||||
$tmpfield = explode(',', $field);
|
||||
$field1 = trim($tmpfield[0]); // If $field is 'd.datep,d.id', it becomes 'd.datep'
|
||||
@@ -6495,8 +6496,8 @@ function load_fiche_titre($title, $morehtmlright = '', $picto = 'generic', $pict
|
||||
* @param int|null $page Numero of page to show in navigation links (required)
|
||||
* @param string $file Url of page (required)
|
||||
* @param string $options More parameters for links ('' by default, does not include sortfield neither sortorder). Value must be 'urlencoded' before calling function.
|
||||
* @param string $sortfield Field to sort on ('' by default)
|
||||
* @param string $sortorder Order to sort ('' by default)
|
||||
* @param ?string $sortfield Field to sort on ('' by default)
|
||||
* @param ?string $sortorder Order to sort ('' by default)
|
||||
* @param string $morehtmlcenter String in the middle ('' by default). We often find here string $massaction coming from $form->selectMassAction()
|
||||
* @param int $num Number of records found by select with limit+1
|
||||
* @param int|string $totalnboflines Total number of records/lines for all pages (if known). Use a negative value of number to not show number. Use '' if unknown.
|
||||
@@ -7147,8 +7148,8 @@ function showDimensionInBestUnit($dimension, $unit, $type, $outputlangs, $round
|
||||
*
|
||||
* @param float|string $vatrate Vat rate. Can be '8.5' or '8.5 (VATCODEX)' for example
|
||||
* @param int $local Local tax to search and return (1 or 2 return only tax rate 1 or tax rate 2)
|
||||
* @param Societe $thirdparty_buyer Object of buying third party
|
||||
* @param Societe $thirdparty_seller Object of selling third party ($mysoc if not defined)
|
||||
* @param ?Societe $thirdparty_buyer Object of buying third party
|
||||
* @param ?Societe $thirdparty_seller Object of selling third party ($mysoc if not defined)
|
||||
* @param int $vatnpr If vat rate is NPR or not
|
||||
* @return int<0,0>|string 0 if not found, localtax rate if found (Can be '20', '-19:-15:-9')
|
||||
* @see get_default_tva()
|
||||
@@ -7416,8 +7417,8 @@ function getTaxesFromId($vatrate, $buyer = null, $seller = null, $firstparamisid
|
||||
*
|
||||
* @param int|string $vatrate VAT ID or Rate+Code. Value can be value or the string with code into parenthesis or rowid if $firstparamisid is 1. Example: '8.5' or '8.5 (8.5NPR)' or 123.
|
||||
* @param int<0,2> $local Number of localtax (1 or 2, or 0 to return 1 & 2)
|
||||
* @param Societe $buyer Company object
|
||||
* @param Societe $seller Company object
|
||||
* @param ?Societe $buyer Company object
|
||||
* @param ?Societe $seller Company object
|
||||
* @param int<0,1> $firstparamisid 1 if first param is ID into table instead of Rate+code (use this if you can)
|
||||
* @return array{}|array{0:string,1:int|string,2:string,3:string}|array{0:string,1:int|string,2:string,3:int|string,4:string,5:string} array(localtax_type1('1-6' or '0' if not found), rate localtax1, localtax_type2, rate localtax2, accountancycodecust, accountancycodesupp)
|
||||
* @see getTaxesFromId()
|
||||
@@ -11309,6 +11310,7 @@ function complete_head_from_modules($conf, $langs, $object, &$head, &$h, $type,
|
||||
// No need to make a return $head. Var is modified as a reference
|
||||
if (!empty($hookmanager)) {
|
||||
$parameters = array('object' => $object, 'mode' => $mode, 'head' => &$head, 'filterorigmodule' => $filterorigmodule);
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('completeTabsHead', $parameters, $object);
|
||||
if ($reshook > 0) { // Hook ask to replace completely the array
|
||||
$head = $hookmanager->resArray;
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2006-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
@@ -14,7 +15,7 @@
|
||||
* Copyright (C) 2020 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021-2022 Anthony Berton <anthony.berton@bb2a.fr>
|
||||
* Copyright (C) 2023-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -454,6 +455,7 @@ function pdf_build_address($outputlangs, $sourcecompany, $targetcompany = '', $t
|
||||
if (is_object($hookmanager)) {
|
||||
$parameters = array('sourcecompany' => &$sourcecompany, 'targetcompany' => &$targetcompany, 'targetcontact' => &$targetcontact, 'outputlangs' => $outputlangs, 'mode' => $mode, 'usecontact' => $usecontact);
|
||||
$action = '';
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('pdf_build_address', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
$stringaddress .= $hookmanager->resPrint;
|
||||
}
|
||||
@@ -2678,7 +2680,7 @@ function pdf_getLinkedObjects(&$object, $outputlangs)
|
||||
$reshook = $hookmanager->executeHooks('pdf_getLinkedObjects', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
|
||||
if (empty($reshook)) {
|
||||
$linkedobjects = array_replace($linkedobjects, $hookmanager->resArray); // array_replace is used to preserve keys
|
||||
} elseif ($reshook>0) {
|
||||
} elseif ($reshook > 0) {
|
||||
// The array must be reinserted even if it is empty because clearing the array could be one of the actions performed by the hook.
|
||||
$linkedobjects = $hookmanager->resArray;
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* Copyright (C) 2012 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2012-2014 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -47,8 +47,8 @@
|
||||
* @param float $remise_percent_global 0
|
||||
* @param string $price_base_type 'HT'=Unit price parameter $pu is HT, 'TTC'=Unit price parameter $pu is TTC (HT+VAT but not Localtax. TODO Add also mode 'INCT' when pu is price HT+VAT+LT1+LT2)
|
||||
* @param int $info_bits Miscellaneous information on line
|
||||
* @param int<0,1> $type 0/1=Product/service
|
||||
* @param Societe|string $seller Thirdparty seller (we need $seller->country_id property). Provided only if seller is the supplier, otherwise $seller will be $mysoc.
|
||||
* @param int<0,1> $type 0/1=Product/service
|
||||
* @param string|Societe|string $seller Third party seller (we need $seller->country_id property). Provided only if seller is the supplier, otherwise $seller will be $mysoc.
|
||||
* @param array{0:string,1:int|string,2:string,3:string}|array{0:string,1:int|string,2:string,3:int|string,4:string,5:string} $localtaxes_array Array with localtaxes info array('0'=>type1,'1'=>rate1,'2'=>type2,'3'=>rate2) (loaded by getLocalTaxesFromRate(vatrate, 0, ...) function).
|
||||
* @param float $progress Situation invoices progress (value from 0 to 100, 100 by default)
|
||||
* @param float $multicurrency_tx Currency rate (1 by default)
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@ope-concept.pro>
|
||||
* Copyright (C) 2016 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -617,11 +618,11 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
|
||||
// Replace tags of lines for contacts task
|
||||
$sourcearray = array('internal', 'external');
|
||||
$contact_arrray = array();
|
||||
$contact_array = array();
|
||||
foreach ($sourcearray as $source) {
|
||||
$contact_temp = $object->liste_contact(-1, $source);
|
||||
if ((is_array($contact_temp) && count($contact_temp) > 0)) {
|
||||
$contact_arrray = array_merge($contact_arrray, $contact_temp);
|
||||
$contact_array = array_merge($contact_array, $contact_temp);
|
||||
}
|
||||
}
|
||||
// Check for segment
|
||||
@@ -633,8 +634,8 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$foundtagforlines = 0;
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
if ($foundtagforlines && (is_array($contact_arrray) && count($contact_arrray) > 0)) {
|
||||
foreach ($contact_arrray as $contact) {
|
||||
if ($foundtagforlines && (is_array($contact_array) && count($contact_array) > 0)) {
|
||||
foreach ($contact_array as $contact) {
|
||||
if ($contact['source'] == 'internal') {
|
||||
$objectdetail = new User($this->db);
|
||||
$objectdetail->fetch($contact['id']);
|
||||
@@ -646,6 +647,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$soc = new Societe($this->db);
|
||||
$soc->fetch($contact['socid']);
|
||||
$contact['socname'] = $soc->name;
|
||||
} else {
|
||||
dol_syslog(get_class().'::'.__METHOD__.' Unexpected contact source:'.$contact['source'], LOG_WARNING);
|
||||
$objectdetail = null;
|
||||
}
|
||||
$contact['fullname'] = is_object($objectdetail) ? $objectdetail->getFullName($outputlangs, 1) : null;
|
||||
|
||||
@@ -793,11 +797,11 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
|
||||
// Replace tags of lines for contacts
|
||||
$sourcearray = array('internal', 'external');
|
||||
$contact_arrray = array();
|
||||
$contact_array = array();
|
||||
foreach ($sourcearray as $source) {
|
||||
$contact_temp = $project->liste_contact(-1, $source);
|
||||
if ((is_array($contact_temp) && count($contact_temp) > 0)) {
|
||||
$contact_arrray = array_merge($contact_arrray, $contact_temp);
|
||||
$contact_array = array_merge($contact_array, $contact_temp);
|
||||
}
|
||||
}
|
||||
// Check for segment
|
||||
@@ -809,9 +813,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$foundtagforlines = 0;
|
||||
dol_syslog($e->getMessage(), LOG_INFO);
|
||||
}
|
||||
if ($foundtagforlines && (is_array($contact_arrray) && count($contact_arrray) > 0)) {
|
||||
if ($foundtagforlines && (is_array($contact_array) && count($contact_array) > 0)) {
|
||||
try {
|
||||
foreach ($contact_arrray as $contact) {
|
||||
foreach ($contact_array as $contact) {
|
||||
if ($contact['source'] == 'internal') {
|
||||
$objectdetail = new User($this->db);
|
||||
$objectdetail->fetch($contact['id']);
|
||||
@@ -823,6 +827,9 @@ class doc_generic_task_odt extends ModelePDFTask
|
||||
$soc = new Societe($this->db);
|
||||
$soc->fetch($contact['socid']);
|
||||
$contact['socname'] = $soc->name;
|
||||
} else {
|
||||
dol_syslog(get_class().'::'.__METHOD__.' Unexpected contact source:'.$contact['source'], LOG_ERR);
|
||||
continue;
|
||||
}
|
||||
$contact['fullname'] = $objectdetail->getFullName($outputlangs, 1);
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2004-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
* Copyright (C) 2006-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -49,10 +50,19 @@ class mod_codecompta_aquarium extends ModeleAccountancyCode
|
||||
*/
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
/**
|
||||
* @var string Prefix customer accountancy code
|
||||
*/
|
||||
public $prefixcustomeraccountancycode;
|
||||
|
||||
/**
|
||||
* @var string Prefix supplier accountancy code
|
||||
*/
|
||||
public $prefixsupplieraccountancycode;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $position = 20;
|
||||
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2019-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -45,24 +46,31 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
public $version = 'dolibarr'; // 'development', 'experimental', 'dolibarr'
|
||||
|
||||
/**
|
||||
* Prefix customer accountancy code
|
||||
* @var string
|
||||
* @var string Prefix customer accountancy code
|
||||
*/
|
||||
public $prefixcustomeraccountancycode;
|
||||
|
||||
/**
|
||||
* Prefix supplier accountancy code
|
||||
* @var string
|
||||
* @var string Prefix supplier accountancy code
|
||||
*/
|
||||
public $prefixsupplieraccountancycode;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $position = 30;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $code;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $customeraccountancycodecharacternumber;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $supplieraccountancycodecharacternumber;
|
||||
|
||||
|
||||
@@ -178,7 +186,9 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
$s .= "<br>\n";
|
||||
|
||||
if (!isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL)) {
|
||||
$thirdpartylabelexample = preg_replace('/([^a-z0-9])/i', '', $mysoc->name);
|
||||
$thirdpartylabelexample = (string) preg_replace('/([^a-z0-9])/i', '', $mysoc->name);
|
||||
} else {
|
||||
$thirdpartylabelexample = '';
|
||||
}
|
||||
$s .= "<br>\n";
|
||||
$s .= $this->prefixcustomeraccountancycode.strtoupper(substr($thirdpartylabelexample, 0, (int) $this->customeraccountancycodecharacternumber));
|
||||
@@ -191,8 +201,8 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
/**
|
||||
* Set accountancy account code for a third party into this->code
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param Societe $societe Third party object
|
||||
* @param DoliDB $db Database handler
|
||||
* @param Societe $societe Third party object
|
||||
* @param string $type 'customer' or 'supplier'
|
||||
* @return int >=0 if OK, <0 if KO
|
||||
*/
|
||||
@@ -209,11 +219,11 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
dol_syslog("mod_codecompta_digitaria::get_code search code for type=".$type." & company=".(!empty($societe->name) ? $societe->name : ''));
|
||||
|
||||
if ($type == 'supplier') {
|
||||
$codetouse = $societe->name;
|
||||
$codetouse = (string) $societe->name;
|
||||
$prefix = $this->prefixsupplieraccountancycode;
|
||||
$width = $this->supplieraccountancycodecharacternumber;
|
||||
} elseif ($type == 'customer') {
|
||||
$codetouse = $societe->name;
|
||||
$codetouse = (string) $societe->name;
|
||||
$prefix = $this->prefixcustomeraccountancycode;
|
||||
$width = $this->customeraccountancycodecharacternumber;
|
||||
} else {
|
||||
@@ -228,11 +238,11 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
}
|
||||
// Remove special char if COMPANY_DIGITARIA_REMOVE_SPECIAL is set to 1 or not set (default)
|
||||
if (!isset($conf->global->COMPANY_DIGITARIA_REMOVE_SPECIAL) || getDolGlobalString('COMPANY_DIGITARIA_REMOVE_SPECIAL')) {
|
||||
$codetouse = preg_replace('/([^a-z0-9])/i', '', $codetouse);
|
||||
$codetouse = (string) preg_replace('/([^a-z0-9])/i', '', $codetouse);
|
||||
}
|
||||
// Apply a regex replacement pattern on code if COMPANY_DIGITARIA_CLEAN_REGEX is set. Value must be a regex with parenthesis. The part into parenthesis is kept, the rest removed.
|
||||
if (getDolGlobalString('COMPANY_DIGITARIA_CLEAN_REGEX')) { // Example: $conf->global->COMPANY_DIGITARIA_CLEAN_REGEX='^..(..)..';
|
||||
$codetouse = preg_replace('/' . getDolGlobalString('COMPANY_DIGITARIA_CLEAN_REGEX').'/', '\1\2\3', $codetouse);
|
||||
$codetouse = (string) preg_replace('/' . getDolGlobalString('COMPANY_DIGITARIA_CLEAN_REGEX').'/', '\1\2\3', $codetouse);
|
||||
}
|
||||
|
||||
$this->code = $prefix.strtoupper(substr($codetouse, 0, (int) $width));
|
||||
@@ -248,11 +258,9 @@ class mod_codecompta_digitaria extends ModeleAccountancyCode
|
||||
|
||||
if ($i <= 9) {
|
||||
$a = 1;
|
||||
}
|
||||
if ($i >= 10 && $i <= 99) {
|
||||
} elseif ($i <= 99) { // Also >= 10
|
||||
$a = 2;
|
||||
}
|
||||
if ($i >= 100 && $i <= 999) {
|
||||
} else { // ($i >= 100 && $i <= 999) {
|
||||
$a = 3;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@stocks.sourceforge.net>
|
||||
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2022 Nicolas Silobre <nsilobre@ns-info90.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
@@ -41,16 +42,46 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/pdf.lib.php';
|
||||
*/
|
||||
class pdf_standard_stock extends ModelePDFStock
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $wref;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxdesc;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxlabel;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtva;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxqty;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxup;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxunit;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxdiscount;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $postotalht;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $tabTitleHeight;
|
||||
|
||||
|
||||
@@ -390,6 +421,7 @@ class pdf_standard_stock extends ModelePDFStock
|
||||
$pdf->MultiCell($this->posxdiscount - $this->posxunit - 0.8, 3, price(price2num($objp->ppmp * $objp->value, 'MT'), 0, $outputlangs), 0, 'R');
|
||||
$totalvalue += price2num($objp->ppmp * $objp->value, 'MT');
|
||||
|
||||
$pricemin = 0;
|
||||
// Price sell min
|
||||
if (!getDolGlobalString('PRODUIT_MULTIPRICES')) {
|
||||
$pricemin = $objp->price;
|
||||
@@ -806,6 +838,7 @@ class pdf_standard_stock extends ModelePDFStock
|
||||
$sql = "SELECT max(m.datem) as datem";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."stock_mouvement as m";
|
||||
$sql .= " WHERE m.fk_entrepot = ".((int) $object->id);
|
||||
$lastmovementdate = 0;
|
||||
$resqlbis = $this->db->query($sql);
|
||||
if ($resqlbis) {
|
||||
$obj = $this->db->fetch_object($resqlbis);
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2014-2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -1167,6 +1168,8 @@ class pdf_eagle extends ModelePDFStockTransfer
|
||||
|
||||
if (!empty($thirdparty)) {
|
||||
$carac_emetteur_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
|
||||
} else {
|
||||
$carac_emetteur_name = '';
|
||||
}
|
||||
|
||||
if ($usecontact) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
@@ -9,7 +10,7 @@
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -208,6 +209,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
|
||||
}
|
||||
|
||||
$arephoto = false;
|
||||
$realpath = null;
|
||||
foreach ($pdir as $midir) {
|
||||
if (!$arephoto) {
|
||||
$dir = $conf->product->dir_output.'/'.$midir;
|
||||
@@ -640,6 +642,8 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
|
||||
$pmp = $object->lines[$i]->pmp;
|
||||
$this->printStdColumnContent($pdf, $curY, 'subprice', price($pmp));
|
||||
$nexY = max($pdf->GetY(), $nexY);
|
||||
} else {
|
||||
$pmp = 0;
|
||||
}
|
||||
|
||||
// Quantity
|
||||
@@ -1158,7 +1162,7 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
|
||||
|
||||
//$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')));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1376,6 +1380,8 @@ class pdf_eagle_proforma extends ModelePDFStockTransfer
|
||||
|
||||
if (!empty($thirdparty)) {
|
||||
$carac_emetteur_name = pdfBuildThirdpartyName($thirdparty, $outputlangs);
|
||||
} else {
|
||||
$carac_emetteur_name = '';
|
||||
}
|
||||
|
||||
if ($usecontact) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
@@ -6,7 +7,7 @@
|
||||
* Copyright (C) 2018-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019 Tim Otte <otte@meuser.it>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -244,6 +245,7 @@ class doc_generic_supplier_invoice_odt extends ModelePDFSuppliersInvoices
|
||||
if ($object->specimen) {
|
||||
$dir = $conf->fournisseur->facture->dir_output;
|
||||
$file = $dir."/SPECIMEN.pdf";
|
||||
$objectref = 'SPECIMEN_REF';
|
||||
} else {
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
$objectrefsupplier = dol_sanitizeFileName($object->ref_supplier);
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -872,7 +873,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
||||
|
||||
//$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')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
@@ -6,7 +7,7 @@
|
||||
* Copyright (C) 2018-2019 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019 Tim Otte <otte@meuser.it>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -241,6 +242,7 @@ class doc_generic_supplier_order_odt extends ModelePDFSuppliersOrders
|
||||
if ($object->specimen) {
|
||||
$dir = $conf->fournisseur->commande->dir_output;
|
||||
$file = $dir."/SPECIMEN.pdf";
|
||||
$objectref = "SPECIMEN_REF";
|
||||
} else {
|
||||
$objectref = dol_sanitizeFileName($object->ref);
|
||||
$objectrefsupplier = dol_sanitizeFileName($object->ref_supplier);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
@@ -7,7 +8,7 @@
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 William Mead <william.mead@manchenumerique.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -313,7 +314,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
// Does we have at least one line with discount $this->atleastonediscount
|
||||
foreach ($object->lines as $line) {
|
||||
if ($line->remise_percent) {
|
||||
$this->atleastonediscount = true;
|
||||
$this->atleastonediscount = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -1176,7 +1177,7 @@ class pdf_cornas extends ModelePDFSuppliersOrders
|
||||
|
||||
//$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')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2011 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
|
||||
@@ -6,7 +7,7 @@
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -1030,7 +1031,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
|
||||
|
||||
//$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')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2005-2008 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -150,6 +151,7 @@ class mod_commande_fournisseur_muguet extends ModeleNumRefSuppliersOrders
|
||||
$sql .= " WHERE ref LIKE '".$db->escape($this->prefix)."____-%'";
|
||||
$sql .= " AND entity = ".$conf->entity;
|
||||
|
||||
$max = 0;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2003-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
|
||||
@@ -6,7 +7,7 @@
|
||||
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
|
||||
* Copyright (C) 2011-2016 Philippe Grand <philippe.grand@atoo-net.com>
|
||||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -40,21 +41,67 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php'; // requir
|
||||
*/
|
||||
abstract class ModelePDFSuppliersOrders extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxpicture;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtva;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxup;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxqty;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxunit;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxdesc;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxdiscount;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $postotalht;
|
||||
|
||||
/**
|
||||
* @var array<string,float>
|
||||
*/
|
||||
public $tva;
|
||||
/**
|
||||
* @var array<string,array{amount:float}>
|
||||
*/
|
||||
public $tva_array;
|
||||
/**
|
||||
* Local tax rates Array[tax_type][tax_rate]
|
||||
*
|
||||
* @var array<int,array<string,float>>
|
||||
*/
|
||||
public $localtax1;
|
||||
/**
|
||||
* Local tax rates Array[tax_type][tax_rate]
|
||||
*
|
||||
* @var array<int,array<string,float>>
|
||||
*/
|
||||
public $localtax2;
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $atleastoneratenotnull = 0;
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $atleastonediscount = 0;
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2010-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2022 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -73,12 +74,33 @@ class pdf_standard_supplierpayment extends ModelePDFSuppliersPayments
|
||||
*/
|
||||
public $version = 'dolibarr';
|
||||
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxdate;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxreffacturefourn;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxreffacture;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtype;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtotalht;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtva;
|
||||
/**
|
||||
* @var float
|
||||
*/
|
||||
public $posxtotalttc;
|
||||
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -293,6 +294,7 @@ class doc_generic_ticket_odt extends ModelePDFTicket
|
||||
$result = $object->fetch_contact($arrayidcontact[0]);
|
||||
}
|
||||
|
||||
$contactobject = null;
|
||||
// Recipient name
|
||||
if (!empty($usecontact)) {
|
||||
// We can use the company of contact instead of thirdparty company
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2010-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2012 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -327,6 +328,7 @@ class doc_generic_user_odt extends ModelePDFUser
|
||||
$result = $object->fetch_contact($arrayidcontact[0]);
|
||||
}
|
||||
|
||||
$contactobject = null;
|
||||
// Recipient name
|
||||
if (!empty($usecontact)) {
|
||||
if ($object->contact->socid != $object->thirdparty->id && (!isset($conf->global->MAIN_USE_COMPANY_NAME_OF_CONTACT) || getDolGlobalString('MAIN_USE_COMPANY_NAME_OF_CONTACT'))) {
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2005-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This file is a modified version of datepicker.php from phpBSM to fix some
|
||||
* bugs, to add new features and to dramatically increase speed.
|
||||
@@ -128,7 +130,7 @@ $hookmanager->initHooks(array('searchform'));
|
||||
// Define $searchform
|
||||
$searchform = '';
|
||||
|
||||
if ($conf->use_javascript_ajax && 1 == 2) { // select2 is not best with smartphone
|
||||
if ($conf->use_javascript_ajax && 1 == 2) { // select2 is not best with smartphone @phan-suppress-current-line PhanPluginBothLiteralsBinaryOp
|
||||
if (!is_object($form)) {
|
||||
$form = new Form($db);
|
||||
}
|
||||
@@ -142,7 +144,7 @@ if ($conf->use_javascript_ajax && 1 == 2) { // select2 is not best with smartp
|
||||
|
||||
$i = 0;
|
||||
$accesskeyalreadyassigned = array();
|
||||
foreach ($arrayresult as $key => $val) {
|
||||
foreach ($arrayresult as $key => $val) { // @phan-suppress-current-line PhanEmptyForeach
|
||||
$tmp = explode('?', $val['url']);
|
||||
$urlaction = $tmp[0];
|
||||
$keysearch = 'search_all';
|
||||
@@ -162,7 +164,7 @@ if ($conf->use_javascript_ajax && 1 == 2) { // select2 is not best with smartp
|
||||
|
||||
|
||||
// Execute hook printSearchForm
|
||||
$parameters = array('searchform'=>$searchform);
|
||||
$parameters = array('searchform' => $searchform);
|
||||
$reshook = $hookmanager->executeHooks('printSearchForm', $parameters); // Note that $action and $object may have been modified by some hooks
|
||||
if (empty($reshook)) {
|
||||
$searchform .= $hookmanager->resPrint;
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2010-2016 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 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
|
||||
@@ -41,6 +42,10 @@ if (empty($object) || !is_object($object)) {
|
||||
print "Error, template page ".basename(__FILE__)." can't be called with no object defined.";
|
||||
exit;
|
||||
}
|
||||
'
|
||||
@phan-var-force ?string $fk_element
|
||||
@phan-var-force ?Task[] $tasksarray
|
||||
';
|
||||
|
||||
?>
|
||||
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 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,6 +40,10 @@ if (empty($conf) || !is_object($conf)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
exit(1);
|
||||
}
|
||||
|
||||
'
|
||||
@phan-var-force ?string $keyforbreak
|
||||
';
|
||||
if (!is_object($form)) {
|
||||
$form = new Form($db);
|
||||
}
|
||||
@@ -50,7 +55,7 @@ if (!is_object($form)) {
|
||||
$object->fields = dol_sort_array($object->fields, 'position');
|
||||
|
||||
foreach ($object->fields as $key => $val) {
|
||||
if (!empty($keyforbreak) && $key == $keyforbreak) {
|
||||
if (isset($keyforbreak) && !empty($keyforbreak) && $key == $keyforbreak) {
|
||||
break; // key used for break on second column
|
||||
}
|
||||
|
||||
@@ -139,7 +144,7 @@ $rightpart = '';
|
||||
$alreadyoutput = 1;
|
||||
foreach ($object->fields as $key => $val) {
|
||||
if ($alreadyoutput) {
|
||||
if (!empty($keyforbreak) && $key == $keyforbreak) {
|
||||
if (isset($keyforbreak) && !empty($keyforbreak) && $key == $keyforbreak) {
|
||||
$alreadyoutput = 0; // key used for break on second column
|
||||
} else {
|
||||
continue;
|
||||
@@ -166,7 +171,7 @@ foreach ($object->fields as $key => $val) {
|
||||
if ($val['type'] == 'text' || $val['type'] == 'html') {
|
||||
$rightpart .= ' tdtop';
|
||||
}
|
||||
$rightpart.= '">';
|
||||
$rightpart .= '">';
|
||||
$labeltoshow = '';
|
||||
if (!empty($val['help'])) {
|
||||
$labeltoshow .= $form->textwithpicto($langs->trans($val['label']), $langs->trans($val['help']));
|
||||
@@ -206,7 +211,7 @@ foreach ($object->fields as $key => $val) {
|
||||
$out = $object->showOutputField($val, $key, $value, '', '', '', 0);
|
||||
$rightpart .= showValueWithClipboardCPButton($out, 0, $out);
|
||||
} else {
|
||||
$rightpart.= $object->showOutputField($val, $key, $value, '', '', '', 0);
|
||||
$rightpart .= $object->showOutputField($val, $key, $value, '', '', '', 0);
|
||||
}
|
||||
}
|
||||
if (preg_match('/^(text|html)/', $val['type'])) {
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
* Copyright (C) 2013-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015-2016 Charlie BENKE <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -32,6 +32,12 @@
|
||||
* @var User $user
|
||||
* @var ?string $permission
|
||||
*/
|
||||
'
|
||||
@phan-var-force ?CommonObject $object
|
||||
@phan-var-force ?CommonObject $objectsrc
|
||||
@phan-var-force ?string $permission
|
||||
';
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($object) || !is_object($object)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
@@ -39,11 +45,6 @@ if (empty($object) || !is_object($object)) {
|
||||
}
|
||||
|
||||
|
||||
'
|
||||
@phan-var-force ?CommonObject $object
|
||||
@phan-var-force ?CommonObject $objectsrc
|
||||
@phan-var-force ?string $permission
|
||||
';
|
||||
if (empty($preselectedtypeofcontact)) {
|
||||
$preselectedtypeofcontact = 0;
|
||||
}
|
||||
@@ -128,7 +129,7 @@ if ($permission) {
|
||||
<div class="tagtd"><span class="paddingleft"><?php echo getDolGlobalString('MAIN_INFO_SOCIETE_NOM'); ?></span></div>
|
||||
<!-- <div class="nowrap tagtd"><?php echo img_object('', 'user').' '.$langs->trans("Users"); ?></div> -->
|
||||
<div class="tagtd maxwidthonsmartphone">
|
||||
<?php echo img_object('', 'user', 'class="pictofixedwidth"').$form->select_dolusers($user->id, 'userid', 1, (!empty($userAlreadySelected) ? $userAlreadySelected : null), 0, '', '', 0, 56, 0, '', 0, '', 'minwidth100imp widthcentpercentminusxx maxwidth400 userselectcontact');
|
||||
<?php echo img_object('', 'user', 'class="pictofixedwidth"').$form->select_dolusers($user->id, 'userid', 1, (!empty($userAlreadySelected) ? $userAlreadySelected : null), 0, '', '', '0', 56, 0, '', 0, '', 'minwidth100imp widthcentpercentminusxx maxwidth400 userselectcontact');
|
||||
if (empty($hideaddcontactforgroups) && $module == 'project') {
|
||||
print '<span> '.$langs->trans("or").' </span>';
|
||||
echo img_object('', 'group', 'class="pictofixedwidth"').$form->select_dolgroups(0, 'groupid', 1, '', 0, '', array(), '0', false, 'minwidth100imp widthcentpercentminusxx maxwidth400 groupselectcontact');
|
||||
@@ -384,6 +385,7 @@ print "<!-- TEMPLATE CONTACTS HOOK BEGIN HERE -->\n";
|
||||
if (is_object($hookmanager)) {
|
||||
$hookmanager->initHooks(array('contacttpl'));
|
||||
$parameters = array();
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('formContactTpl', $parameters, $object, $action);
|
||||
}
|
||||
print "<!-- END PHP TEMPLATE CONTACTS -->\n";
|
||||
|
||||
@@ -1,9 +1,11 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 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
|
||||
@@ -40,6 +42,14 @@ if (empty($langs) || !is_object($langs)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
exit(1);
|
||||
}
|
||||
'
|
||||
@phan-var-force array<array{name:string,path:string,level1name:string,relativename:string,fullname:string,date:string,size:int,perm:int,type:string,position_name:string,cover:string,keywords:string,acl:string,rowid:int,label:string,share:string}> $filearray
|
||||
@phan-var-force ?int<0,1> $permtoedit
|
||||
@phan-var-force ?int<0,1> $permission
|
||||
@phan-var-force int<0,1> $permissiontoadd
|
||||
@phan-var-force ?string $savingdocmask
|
||||
@phan-var-force ?string $param
|
||||
';
|
||||
|
||||
|
||||
$langs->load("link");
|
||||
@@ -67,7 +77,7 @@ if (in_array($modulepart, array('product', 'produit', 'societe', 'user', 'ticket
|
||||
$disablemove = 0;
|
||||
}
|
||||
$parameters = array();
|
||||
$reshook = $hookmanager->executeHooks('isLinkedDocumentObjectNotMovable', $parameters, $object);
|
||||
$reshook = $hookmanager->executeHooks('isLinkedDocumentObjectNotMovable', $parameters, $object); // @phan-suppress-current-line PhanTypeMismatchArgumentNullable
|
||||
if ($reshook) {
|
||||
$disablemove = $hookmanager->resArray['disablemove'];
|
||||
}
|
||||
@@ -191,7 +201,7 @@ $formfile->listOfLinks(
|
||||
$object,
|
||||
$permission,
|
||||
$action,
|
||||
GETPOSTINT('linkid'),
|
||||
(string) GETPOSTINT('linkid'),
|
||||
$param,
|
||||
'formaddlink',
|
||||
array('afterlinktitle' => $formToAddALink, 'showhideaddbutton' => 1)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
/* Copyright (C) 2014 Maxime Kohlhaas <support@atm-consulting.fr>
|
||||
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 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,15 +25,15 @@
|
||||
* $parameters
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var CommonObject $object
|
||||
* @var Conf $conf
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var string $action
|
||||
* @var array<string,mixed> $parameters
|
||||
*/
|
||||
/**
|
||||
* @var CommonObject $object
|
||||
* @var Conf $conf
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var string $action
|
||||
* @var array<string,mixed> $parameters
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || !is_object($conf)) {
|
||||
@@ -62,6 +63,7 @@ if (!isset($parameters)) {
|
||||
@phan-var-force Conf $conf
|
||||
@phan-var-force Translate $conf
|
||||
@phan-var-force array<string,mixed> $parameters
|
||||
@phan-var-force ?string $tpl_context
|
||||
';
|
||||
|
||||
$reshook = $hookmanager->executeHooks('formObjectOptions', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || !is_object($conf)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
exit(1);
|
||||
}
|
||||
'
|
||||
@phan-var-force ?int<0,1> $disablesortlink
|
||||
';
|
||||
|
||||
if (empty($extrafieldsobjectkey) && is_object($object)) {
|
||||
$extrafieldsobjectkey = $object->table_element;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -35,6 +35,14 @@ if (empty($conf) || !is_object($conf)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
'
|
||||
@phan-var-force Website $website
|
||||
@phan-var-force string $filepathnoext
|
||||
@phan-var-force string $pageid
|
||||
@phan-var-force EcmDirectory $ecmdir
|
||||
@phan-var-force int $section
|
||||
';
|
||||
|
||||
?>
|
||||
|
||||
<!-- BEGIN PHP TEMPLATE core/tpl/filemanager.tpl.php -->
|
||||
@@ -50,8 +58,6 @@ if (empty($module)) {
|
||||
$module = 'ecm';
|
||||
}
|
||||
|
||||
'@phan-var-force Website $website';
|
||||
|
||||
$permtoadd = 0;
|
||||
$permtoupload = 0;
|
||||
$showroot = 0;
|
||||
@@ -106,6 +112,7 @@ if ($module == 'ecm') {
|
||||
print '</a>';
|
||||
}
|
||||
if ($permtoadd && GETPOSTISSET('website')) { // If on file manager to manage medias of a web site
|
||||
// @phan-suppress-next-line PhanTypeExpectedObjectPropAccess
|
||||
print '<a id="agenerateimgwebp" href="'.$_SERVER["PHP_SELF"].'?action=confirmconvertimgwebp&token='.newToken().'&website='.urlencode($website->ref).'" class="inline-block valignmiddle toolbarbutton paddingtop" title="'.dol_escape_htmltag($langs->trans("GenerateImgWebp")).'">';
|
||||
print img_picto('', 'images', '', 0, 0, 0, '', 'size15x flip marginrightonly');
|
||||
print '</a>';
|
||||
@@ -218,7 +225,7 @@ if ($action == 'confirmconvertimgwebp') {
|
||||
$formquestion['section'] = array('type' => 'hidden', 'value' => $section, 'name' => 'section');
|
||||
$formquestion['filetoregenerate'] = array('type' => 'hidden', 'value' => $file, 'name' => 'filetoregenerate');
|
||||
if ($module == 'medias') {
|
||||
$formquestion['website'] = array('type' => 'hidden', 'value' => $website->ref, 'name' => 'website');
|
||||
$formquestion['website'] = array('type' => 'hidden', 'value' => $website->ref, 'name' => 'website'); // @phan-suppress-current-line PhanTypeExpectedObjectPropAccess
|
||||
}
|
||||
$param = '';
|
||||
if (!empty($sortfield)) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2024 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -54,6 +54,9 @@ if (empty($htmlname)) {
|
||||
@phan-var-force ?FormMail $formmail
|
||||
@phan-var-force string $showlinktolayout
|
||||
@phan-var-force string $showlinktolayoutlabel
|
||||
@phan-var-force string $showlinktoai
|
||||
@phan-var-force string $showlinktoailabel
|
||||
@phan-var-force ?string $out
|
||||
';
|
||||
|
||||
if (!isset($out)) {
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 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
|
||||
@@ -21,7 +23,10 @@
|
||||
* @var Form $form
|
||||
* @var Translate $langs
|
||||
*/
|
||||
'@phan-var-force array{nbfield:int,type?:array<int,string>,pos?:array<int,int>,val?:array<int,float>} $totalarray';
|
||||
'
|
||||
@phan-var-force array{nbfield:int,type?:array<int,string>,pos?:array<int,int>,val?:array<int,float>} $totalarray
|
||||
@phan-var-force ?string $sqlfields
|
||||
';
|
||||
|
||||
if (!function_exists('printTotalValCell')) { // allow two list with total on same screen
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2013 Cédric Salvador <csalvador@gpcsolutions.fr>
|
||||
* Copyright (C) 2013-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -55,8 +56,12 @@
|
||||
* @var int[] $arrayofselected
|
||||
*/
|
||||
'
|
||||
@phan-var-force string $string
|
||||
@phan-var-force CommonObject $objecttmp
|
||||
@phan-var-force int[] $toselect
|
||||
@phan-var-force ?string $uploaddir
|
||||
@phan-var-force int<0,1> $withmaindocfilemail
|
||||
@phan-var-force string $sendto
|
||||
';
|
||||
|
||||
if (!empty($sall) || !empty($search_all)) {
|
||||
@@ -81,7 +86,7 @@ if ($massaction == 'preclonetasks') {
|
||||
$formquestion = array(
|
||||
// TODO If list of project is long and project is not on a thirdparty, the combo may be very long.
|
||||
// Solution: Allow only sameproject for cloning tasks ?
|
||||
array('type' => 'other', 'name' => 'projectid', 'label' => $langs->trans('Project') .': ', 'value' => $form->selectProjects($object->id, 'projectid', '', 0, 1, '', 0, array(), $object->socid, '1', 1, '', null, 1)),
|
||||
array('type' => 'other', 'name' => 'projectid', 'label' => $langs->trans('Project') .': ', 'value' => $form->selectProjects($object->id, 'projectid', '', 0, 1, '', 0, array(), $object->socid, '1', 1, '', array(), 1)),
|
||||
);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'] . '?id=' . $object->id . $selected, $langs->trans('ConfirmMassClone'), '', 'clonetasks', $formquestion, '', 1, 300, 590);
|
||||
}
|
||||
@@ -113,7 +118,7 @@ if ($massaction == 'preaffecttag' && isModEnabled('category')) {
|
||||
'type' => 'other',
|
||||
'name' => 'affecttag_'.$categ_type['code'],
|
||||
'label' => '',
|
||||
'value' => $form->multiselectarray('contcats_'.$categ_type['code'], $categ_arbo_tmp, GETPOST('contcats_'.$categ_type['code'], 'array'), null, null, '', 0, '60%', '', '', $langs->transnoentitiesnoconv("SelectTheTagsToAssign"))
|
||||
'value' => $form->multiselectarray('contcats_'.$categ_type['code'], $categ_arbo_tmp, GETPOST('contcats_'.$categ_type['code'], 'array'), 0, 0, '', 0, '60%', '', '', $langs->transnoentitiesnoconv("SelectTheTagsToAssign"))
|
||||
);
|
||||
}
|
||||
$formquestion[] = array(
|
||||
@@ -418,7 +423,7 @@ if ($massaction == 'presetcommercial') {
|
||||
$formquestion[] = array('type' => 'other',
|
||||
'name' => 'affectedcommercial',
|
||||
'label' => $form->editfieldkey('AllocateCommercial', 'commercial_id', '', $object, 0),
|
||||
'value' => $form->multiselectarray('commercial', $userlist, null, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1));
|
||||
'value' => $form->multiselectarray('commercial', $userlist, array(), 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1));
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmAllocateCommercial"), $langs->trans("ConfirmAllocateCommercialQuestion", count($toselect)), "affectcommercial", $formquestion, 1, 0, 200, 500, 1);
|
||||
}
|
||||
if ($massaction == 'unsetcommercial') {
|
||||
@@ -427,7 +432,7 @@ if ($massaction == 'unsetcommercial') {
|
||||
$formquestion[] = array('type' => 'other',
|
||||
'name' => 'unassigncommercial',
|
||||
'label' => $form->editfieldkey('UnallocateCommercial', 'commercial_id', '', $object, 0),
|
||||
'value' => $form->multiselectarray('commercial', $userlist, null, 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1));
|
||||
'value' => $form->multiselectarray('commercial', $userlist, array(), 0, 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0, '', '', '', 1));
|
||||
print $form->formconfirm($_SERVER["PHP_SELF"], $langs->trans("ConfirmUnallocateCommercial"), $langs->trans("ConfirmUnallocateCommercialQuestion", count($toselect)), "unassigncommercial", $formquestion, 1, 0, 200, 500, 1);
|
||||
}
|
||||
|
||||
@@ -437,7 +442,7 @@ if ($massaction == 'preapproveleave') {
|
||||
|
||||
// Allow Pre-Mass-Action hook (eg for confirmation dialog)
|
||||
if (empty($toselect)) {
|
||||
$toselect=[];
|
||||
$toselect = [];
|
||||
}
|
||||
$parameters = array(
|
||||
'toselect' => &$toselect,
|
||||
@@ -445,6 +450,7 @@ $parameters = array(
|
||||
'massaction' => $massaction
|
||||
);
|
||||
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('doPreMassActions', $parameters, $object, $action);
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2014-2020 Laurent Destailleur <eldy@destailleur.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 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,6 +32,11 @@ if (empty($object) || !is_object($object)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
exit(1);
|
||||
}
|
||||
'
|
||||
@phan-var-force ?int<0,1> $permissionnote
|
||||
@phan-var-force string $moreparam
|
||||
@phan-var-force ?int $colwidth
|
||||
';
|
||||
|
||||
// $permissionnote must be defined by caller. For example $permissionnote=$user->rights->module->create
|
||||
// $cssclass must be defined by caller. For example $cssclass='fieldtitle'
|
||||
@@ -126,7 +132,7 @@ print '<div class="tagtable border table-border tableforfield centpercent">'."\n
|
||||
print '<div class="tagtr table-border-row">'."\n";
|
||||
$editmode = (GETPOST('action', 'aZ09') == 'edit'.$note_public);
|
||||
print '<div class="tagtd tagtdnote tdtop'.($editmode ? '' : ' sensiblehtmlcontent').' table-key-border-col'.(empty($cssclass) ? '' : ' '.$cssclass).'"'.($colwidth ? ' style="width: '.$colwidth.'%"' : '').'>'."\n";
|
||||
print $form->editfieldkey((empty($textNotePub) ? "NotePublic" : $textNotePub), $note_public, $value_public, $object, $permission, $typeofdatapub, $moreparam, '', 0);
|
||||
print $form->editfieldkey((empty($textNotePub) ? "NotePublic" : $textNotePub), $note_public, $value_public, $object, $permission, $typeofdatapub, $moreparam, 0, 0);
|
||||
print '</div>'."\n";
|
||||
print '<div class="tagtd wordbreak table-val-border-col'.($editmode ? '' : ' sensiblehtmlcontent').'">'."\n";
|
||||
print $form->editfieldval("NotePublic", $note_public, $value_public, $object, $permission, $typeofdatapub, '', null, null, $moreparam, 1)."\n";
|
||||
@@ -137,7 +143,7 @@ if (empty($user->socid)) {
|
||||
print '<div class="tagtr table-border-row">'."\n";
|
||||
$editmode = (GETPOST('action', 'aZ09') == 'edit'.$note_private);
|
||||
print '<div class="tagtd tagtdnote tdtop'.($editmode ? '' : ' sensiblehtmlcontent').' table-key-border-col'.(empty($cssclass) ? '' : ' '.$cssclass).'"'.($colwidth ? ' style="width: '.$colwidth.'%"' : '').'>'."\n";
|
||||
print $form->editfieldkey((empty($textNotePrive) ? "NotePrivate" : $textNotePrive), $note_private, $value_private, $object, $permission, $typeofdatapriv, $moreparam, '', 0);
|
||||
print $form->editfieldkey((empty($textNotePrive) ? "NotePrivate" : $textNotePrive), $note_private, $value_private, $object, $permission, $typeofdatapriv, $moreparam, 0, 0);
|
||||
print '</div>'."\n";
|
||||
print '<div class="tagtd wordbreak table-val-border-col'.($editmode ? '' : ' sensiblehtmlcontent').'">'."\n";
|
||||
print $form->editfieldval("NotePrivate", $note_private, $value_private, $object, $permission, $typeofdatapriv, '', null, null, $moreparam, 1);
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2018 ATM Consulting <support@atm-consulting.fr>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 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
|
||||
@@ -17,7 +19,7 @@
|
||||
*
|
||||
* Needs the following variables defined:
|
||||
* $object Proposal, order, invoice (including supplier versions)
|
||||
* $thirdparty Thirdparty of object
|
||||
* $thirdparty Third party of object
|
||||
* $absolute_discount Amount of fixed discounts available
|
||||
* $absolute_creditnote Amount of credit notes available
|
||||
* $discount_type 0 => Customer discounts, 1 => Supplier discounts
|
||||
@@ -30,6 +32,16 @@
|
||||
*/
|
||||
print '<!-- BEGIN object_discounts.tpl.php -->'."\n";
|
||||
|
||||
'
|
||||
@phan-var-force Propal|Commande|CommandeFournisseur|Facture|FactureFournisseur $object
|
||||
@phan-var-force Societe $thirdparty
|
||||
@phan-var-force string $backtopage
|
||||
@phan-var-force string $filtercreditnote
|
||||
@phan-var-force string $filterabsolutediscount
|
||||
@phan-var-force int<0,1> $discount_type
|
||||
@phan-var-force int $resteapayer
|
||||
';
|
||||
|
||||
$objclassname = get_class($object);
|
||||
$isInvoice = in_array($object->element, array('facture', 'invoice', 'facture_fourn', 'invoice_supplier'));
|
||||
$isNewObject = empty($object->id) && empty($object->rowid);
|
||||
@@ -91,6 +103,7 @@ if ($absolute_discount > 0) {
|
||||
} else {
|
||||
// Discount available of type fixed amount (not credit note)
|
||||
$more = $addabsolutediscount;
|
||||
// TODO: Check $resteapayer - is '$maxvalue' in form_remise_dispo()
|
||||
$form->form_remise_dispo($_SERVER["PHP_SELF"].'?facid='.$object->id, GETPOST('discountid'), 'remise_id', $thirdparty->id, $absolute_discount, $filterabsolutediscount, $resteapayer, $more, 0, $discount_type);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
* Copyright (C) 2022 OpenDSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2025 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
|
||||
@@ -50,8 +51,13 @@ if (empty($object) || !is_object($object)) {
|
||||
exit;
|
||||
}
|
||||
|
||||
'@phan-var-force CommonObject $this
|
||||
@phan-var-force CommonObject $object';
|
||||
'
|
||||
@phan-var-force CommonObject $this
|
||||
@phan-var-force CommonObject $object
|
||||
@phan-var-force Societe $buyer
|
||||
@phan-var-force Societe $seller
|
||||
@phan-var-force int<0,1> $usehm
|
||||
';
|
||||
|
||||
$usemargins = 0;
|
||||
if (isModEnabled('margin') && !empty($object->element) && in_array($object->element, array('facture', 'facturerec', 'propal', 'commande'))) {
|
||||
@@ -457,6 +463,7 @@ if ($nolinesbefore) {
|
||||
}
|
||||
print '<td class="nobottom linecolvat right">';
|
||||
$coldisplay++;
|
||||
$type_tva = 0;
|
||||
if ($object->element == 'propal' || $object->element == 'commande' || $object->element == 'facture' || $object->element == 'facturerec') {
|
||||
$type_tva = 1;
|
||||
} elseif ($object->element == 'supplier_proposal' || $object->element == 'order_supplier' || $object->element == 'invoice_supplier' || $object->element == 'invoice_supplier_rec') {
|
||||
@@ -487,7 +494,7 @@ if ($nolinesbefore) {
|
||||
<td class="nobottom linecoluttc right">
|
||||
<input type="text" name="price_ttc" id="price_ttc" class="flat right width50" value="<?php echo(GETPOSTISSET("price_ttc") ? GETPOST("price_ttc", 'alpha', 2) : ''); ?>">
|
||||
</td>
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
$coldisplay++;
|
||||
?>
|
||||
@@ -526,21 +533,21 @@ if ($nolinesbefore) {
|
||||
$coldisplay++; ?>
|
||||
<td class="nobottom margininfos linecolmargin right">
|
||||
<!-- For predef product -->
|
||||
<?php if (isModEnabled("product") || isModEnabled("service")) { ?>
|
||||
<?php if (isModEnabled("product") || isModEnabled("service")) { ?>
|
||||
<select id="fournprice_predef" name="fournprice_predef" class="flat minwidth75imp maxwidth150" style="display: none;"></select>
|
||||
<?php } ?>
|
||||
<?php } ?>
|
||||
<!-- For free product -->
|
||||
<input type="text" id="buying_price" name="buying_price" class="flat maxwidth75 right" value="<?php echo(GETPOSTISSET("buying_price") ? GETPOST("buying_price", 'alpha', 2) : ''); ?>">
|
||||
</td>
|
||||
<?php
|
||||
if (getDolGlobalString('DISPLAY_MARGIN_RATES')) {
|
||||
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right width40" type="text" id="np_marginRate" name="np_marginRate" value="'.(GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", 'alpha', 2) : '').'"><span class="np_marginRate opacitymedium hideonsmartphone">%</span></td>';
|
||||
$coldisplay++;
|
||||
}
|
||||
if (getDolGlobalString('DISPLAY_MARK_RATES')) {
|
||||
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right width40" type="text" id="np_markRate" name="np_markRate" value="'.(GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : '').'"><span class="np_markRate opacitymedium hideonsmartphone">%</span></td>';
|
||||
$coldisplay++;
|
||||
}
|
||||
<?php
|
||||
if (getDolGlobalString('DISPLAY_MARGIN_RATES')) {
|
||||
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right width40" type="text" id="np_marginRate" name="np_marginRate" value="'.(GETPOSTISSET("np_marginRate") ? GETPOST("np_marginRate", 'alpha', 2) : '').'"><span class="np_marginRate opacitymedium hideonsmartphone">%</span></td>';
|
||||
$coldisplay++;
|
||||
}
|
||||
if (getDolGlobalString('DISPLAY_MARK_RATES')) {
|
||||
echo '<td class="nobottom nowraponall margininfos right"><input class="flat right width40" type="text" id="np_markRate" name="np_markRate" value="'.(GETPOSTISSET("np_markRate") ? GETPOST("np_markRate", 'alpha', 2) : '').'"><span class="np_markRate opacitymedium hideonsmartphone">%</span></td>';
|
||||
$coldisplay++;
|
||||
}
|
||||
}
|
||||
}
|
||||
$coldisplay += $colspan;
|
||||
@@ -561,6 +568,8 @@ if ((isModEnabled("service") || ($object->element == 'contrat')) && $dateSelecto
|
||||
$date_end = dol_mktime(GETPOSTINT('date_starthour'), GETPOSTINT('date_startmin'), 0, GETPOSTINT('date_endmonth'), GETPOSTINT('date_endday'), GETPOSTINT('date_endyear'));
|
||||
|
||||
$prefillDates = false;
|
||||
$date_start_prefill = 0;
|
||||
$date_end_prefill = 0;
|
||||
|
||||
if (getDolGlobalString('MAIN_FILL_SERVICE_DATES_FROM_LAST_SERVICE_LINE') && !empty($object->lines)) {
|
||||
for ($i = count($object->lines) - 1; $i >= 0; $i--) {
|
||||
@@ -815,7 +824,7 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) {
|
||||
}
|
||||
}
|
||||
});
|
||||
<?php
|
||||
<?php
|
||||
} ?>
|
||||
|
||||
/* When changing predefined product, we reload list of supplier prices required for margin combo */
|
||||
@@ -932,7 +941,7 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) {
|
||||
if (getDolGlobalInt('PRODUIT_AUTOFILL_DESC') == 1) {
|
||||
if (getDolGlobalInt('MAIN_MULTILANGS') && getDolGlobalString('PRODUIT_TEXTS_IN_THIRDPARTY_LANGUAGE')) { ?>
|
||||
var proddesc = data.desc_trans;
|
||||
<?php
|
||||
<?php
|
||||
} else { ?>
|
||||
var proddesc = data.desc;
|
||||
<?php
|
||||
@@ -947,7 +956,7 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) {
|
||||
editor.setData(proddesc);
|
||||
}
|
||||
}
|
||||
<?php
|
||||
<?php
|
||||
} else { ?>
|
||||
jQuery('#dp_desc').text(proddesc);
|
||||
<?php
|
||||
@@ -959,13 +968,13 @@ if (!empty($usemargins) && $user->hasRight('margins', 'creer')) {
|
||||
jQuery.each(data.array_options, function( key, value ) {
|
||||
jQuery('div[class*="det'+key.replace('options_','_extras_')+'"] > #'+key).val(value);
|
||||
});
|
||||
<?php
|
||||
<?php
|
||||
} ?>
|
||||
},
|
||||
'json'
|
||||
);
|
||||
}
|
||||
<?php
|
||||
<?php
|
||||
}
|
||||
|
||||
if (!empty($usemargins) && $user->hasRight('margins', 'creer')) {
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2017 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2022 OpenDSI <support@open-dsi.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
@@ -75,6 +75,7 @@ if (empty($object) || !is_object($object)) {
|
||||
@phan-var-force ?Product $product_static
|
||||
@phan-var-force string $text
|
||||
@phan-var-force string $description
|
||||
@phan-var-force Object $objp
|
||||
';
|
||||
|
||||
global $mysoc;
|
||||
@@ -128,7 +129,7 @@ $coldisplay = 0;
|
||||
<?php
|
||||
|
||||
|
||||
$parameters = ['line' => $line, 'i' =>& $i, 'coldisplay' =>& $coldisplay];
|
||||
$parameters = ['line' => $line, 'i' => & $i, 'coldisplay' => & $coldisplay];
|
||||
$reshook = $hookmanager->executeHooks('objectLineView_BeforeProduct', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
|
||||
@@ -274,7 +275,7 @@ if (($line->info_bits & 2) == 2) {
|
||||
}
|
||||
|
||||
|
||||
$parameters = ['line' => $line, 'i' =>& $i, 'coldisplay' =>& $coldisplay];
|
||||
$parameters = ['line' => $line, 'i' => & $i, 'coldisplay' => & $coldisplay];
|
||||
$reshook = $hookmanager->executeHooks('objectLineView_BeforeProductExtrafield', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Line extrafield
|
||||
@@ -288,7 +289,7 @@ if (($line->info_bits & 2) == 2) {
|
||||
}
|
||||
}
|
||||
|
||||
$parameters = ['line' => $line, 'i' =>& $i, 'coldisplay' =>& $coldisplay];
|
||||
$parameters = ['line' => $line, 'i' => & $i, 'coldisplay' => & $coldisplay];
|
||||
$reshook = $hookmanager->executeHooks('objectLineView_ProductSupplier', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
if (empty($reshook)) {
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2009-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
@@ -7,7 +8,7 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2023-2024 Nick Fragoulis
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -1486,6 +1487,7 @@ class FactureFournisseurRec extends CommonInvoice
|
||||
'facturerec' => $facturerec, // it's an object which PHP passes by "reference", so modifiable by hooks.
|
||||
'this' => $this, // it's an object which PHP passes by "reference", so modifiable by hooks.
|
||||
);
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('afterCreationOfRecurringInvoice', $parameters, $new_fac_fourn); // note: $facture can be modified by hooks (warning: $facture can be null)
|
||||
|
||||
$i++;
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
* Copyright (C) 2013 Florian Henry <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2025 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
|
||||
@@ -118,7 +119,7 @@ if (empty($object->id)) {
|
||||
}
|
||||
|
||||
|
||||
if ($id > 0 ) {
|
||||
if ($id > 0) {
|
||||
$object = new FactureFournisseurRec($db);
|
||||
$object->fetch($id);
|
||||
|
||||
@@ -130,7 +131,7 @@ if ($id > 0 ) {
|
||||
|
||||
print dol_get_fiche_head($head, 'note', $langs->trans("InvoiceCustomer"), -1, 'bill');
|
||||
|
||||
// Object card
|
||||
// Object card
|
||||
// ------------------------------------------------------------
|
||||
$linkback = '<a href="'.DOL_URL_ROOT.'/compta/facture/list.php?restore_lastsearch_values=1'.(!empty($socid) ? '&socid='.$socid : '').'">'.$langs->trans("BackToList").'</a>';
|
||||
|
||||
@@ -142,7 +143,7 @@ if ($id > 0 ) {
|
||||
}
|
||||
$morehtmlref .= '<div class="refidno">';
|
||||
//Ref supplier
|
||||
$morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, '', 'string', '', 0, 1);
|
||||
$morehtmlref .= $form->editfieldkey("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, 0, 'string', '', 0, 1);
|
||||
$morehtmlref .= $form->editfieldval("RefSupplier", 'ref_supplier', $object->ref_supplier, $object, $usercancreate, 'string', '', null, null, '', 1);
|
||||
// Thirdparty
|
||||
$morehtmlref .= '<br>' . $langs->trans('ThirdParty') . ' : ' . $object->thirdparty->getNomUrl(1);
|
||||
|
||||
@@ -10,7 +10,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>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -72,6 +72,7 @@ $coldisplay = 0;
|
||||
<?php } ?>
|
||||
<td class="linecollabel"><?php $coldisplay++; ?><div id="line_<?php print $line->id; ?>"></div>
|
||||
<?php
|
||||
$resSkill = 0;
|
||||
if ($line->fk_skill > 0) {
|
||||
$skill = new Skill($this->db);
|
||||
$resSkill = $skill->fetch($line->fk_skill);
|
||||
@@ -93,9 +94,9 @@ if ($line->fk_skill > 0) {
|
||||
<?php
|
||||
|
||||
// Add description in form
|
||||
if ($line->fk_skill > 0 && $resSkill > 0) {
|
||||
//print $skill->description;
|
||||
}
|
||||
//if ($line->fk_skill > 0 && $resSkill > 0) {
|
||||
//print $skill->description;
|
||||
//}
|
||||
|
||||
?>
|
||||
</td>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -41,7 +41,7 @@ if (!empty($object->table_element_line)) {
|
||||
@phan-var-force string $note_private
|
||||
@phan-var-force int $colwidth
|
||||
@phan-var-force string $moreparam
|
||||
@phan-var-force bool $permission
|
||||
@phan-var-force int $permission
|
||||
@phan-var-force string $typeofdata
|
||||
@phan-var-force string $value_public
|
||||
@phan-var-force string $value_private
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2006-2023 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
@@ -7,7 +8,7 @@
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2019-2021 Christophe Battarel <christophe@altairis.fr>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
* Copyright (C) 2024 Solution Libre SAS <contact@solution-libre.fr>
|
||||
*
|
||||
@@ -50,6 +51,9 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/html.formintervention.class.php';
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
'
|
||||
@phan-var-force ?string $uploaddir
|
||||
';
|
||||
|
||||
// Load translation files required by the page
|
||||
$langsLoad = array('projects', 'bills', 'orders', 'companies');
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2021 Waël Almoman <info@almoman.com>
|
||||
* Copyright (C) 2021 Dorian Vabre <dorian.vabre@gmail.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -52,7 +52,7 @@ if (!defined('NOBROWSERNOTIF')) {
|
||||
}
|
||||
|
||||
if (!defined('XFRAMEOPTIONS_ALLOWALL')) {
|
||||
define('XFRAMEOPTIONS_ALLOWALL', '1');
|
||||
define('XFRAMEOPTIONS_ALLOWALL', '1');
|
||||
}
|
||||
|
||||
// For MultiCompany module.
|
||||
@@ -2153,6 +2153,7 @@ if ($action != 'dopayment') {
|
||||
'source' => $source,
|
||||
'object' => $object
|
||||
];
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('doCheckStatus', $parameters, $object, $action);
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
@@ -2816,6 +2817,7 @@ if (preg_match('/^dopayment/', $action)) { // If we chose/clicked on the payme
|
||||
'tag' => GETPOST("tag", 'alpha'),
|
||||
'dopayment' => GETPOST('dopayment', 'alpha')
|
||||
];
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('doPayment', $parameters, $object, $action);
|
||||
if ($reshook < 0) {
|
||||
setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
|
||||
|
||||
@@ -1,10 +1,11 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2001-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2016 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2023-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Benjamin Falière <benjamin.faliere@altairis.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
@@ -642,6 +643,7 @@ $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."element_element as ee ON e.rowid = ee.fk_s
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."delivery as l ON l.rowid = ee.fk_target";
|
||||
// Add table from hooks
|
||||
$parameters = array();
|
||||
// @phan-suppress-next-line PhanTypeMismatchArgumentNullable
|
||||
$reshook = $hookmanager->executeHooks('printFieldListFrom', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
$sql .= $hookmanager->resPrint;
|
||||
$sql .= " WHERE e.entity IN (".getEntity('reception').")";
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2004-2014 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2008 Raphael Bertrand <raphael.bertrand@resultic.fr>
|
||||
@@ -9,7 +10,7 @@
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2017 Ferran Marcet <fmarcet@2byte.es>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@@ -696,7 +697,7 @@ class pdf_standard_recruitmentjobposition extends ModelePDFRecruitmentJobPositio
|
||||
if (empty($hidetop)) {
|
||||
//$conf->global->MAIN_PDF_TITLE_BACKGROUND_COLOR='230,230,230';
|
||||
if (getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')) {
|
||||
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', null, explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
|
||||
$pdf->Rect($this->marge_gauche, $tab_top, $this->page_largeur - $this->marge_droite - $this->marge_gauche, $this->tabTitleHeight, 'F', array(), explode(',', getDolGlobalString('MAIN_PDF_TITLE_BACKGROUND_COLOR')));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1,9 +1,10 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2005-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Charlie BENKE <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2017-2019 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -367,6 +368,7 @@ $sql .= " AND p.fk_salary = s.rowid";
|
||||
$sql .= " AND s.entity IN (".getEntity('tax').")";
|
||||
$sql .= " ORDER BY dp DESC";
|
||||
|
||||
$resteapayer = 0;
|
||||
//print $sql;
|
||||
$resql = $db->query($sql);
|
||||
if ($resql) {
|
||||
@@ -560,7 +562,7 @@ if ($resql) {
|
||||
|
||||
$tmpuser = new User($db);
|
||||
|
||||
$num = $db->num_rows($result);
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num > 0) {
|
||||
while ($i < $num) {
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
/* Copyright (C) 2002-2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2003 Jean-Louis Bergamo <jlb@j1b.org>
|
||||
* Copyright (C) 2004-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
@@ -7,7 +8,7 @@
|
||||
* Copyright (C) 2015-2016 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015-2024 Alexandre Spangaro <alexandre@inovea-conseil.com>
|
||||
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@@ -114,8 +115,8 @@ if (empty($account->userid)) {
|
||||
|
||||
// Define value to know what current user can do on users
|
||||
$selfpermission = ($user->id == $id && $user->hasRight('user', 'self', 'creer'));
|
||||
$usercanadd = (!empty($user->admin) || $user->hasRight('user', 'user', 'creer') || $user->hasRight('hrm', 'write_personal_information', 'write') );
|
||||
$usercanread = (!empty($user->admin) || $user->hasRight('user', 'user', 'lire') || $user->hasRight('hrm', 'read_personal_information', 'read') );
|
||||
$usercanadd = (!empty($user->admin) || $user->hasRight('user', 'user', 'creer') || $user->hasRight('hrm', 'write_personal_information', 'write'));
|
||||
$usercanread = (!empty($user->admin) || $user->hasRight('user', 'user', 'lire') || $user->hasRight('hrm', 'read_personal_information', 'read'));
|
||||
$permissiontoaddbankaccount = ($user->hasRight('salaries', 'write') || $user->hasRight('hrm', 'employee', 'write') || $user->hasRight('user', 'user', 'creer') || $selfpermission);
|
||||
$permissiontoreadhr = $user->hasRight('hrm', 'read_personal_information', 'read') || $user->hasRight('hrm', 'write_personal_information', 'write');
|
||||
$permissiontowritehr = $user->hasRight('hrm', 'write_personal_information', 'write');
|
||||
@@ -1035,6 +1036,10 @@ if ($id && ($action == 'edit' || $action == 'create') && $permissiontoaddbankacc
|
||||
foreach ($bankaccount->getFieldsToShow(1) as $val) {
|
||||
$require = false;
|
||||
$tooltip = '';
|
||||
$name = 'UNKNOWN';
|
||||
$size = '8';
|
||||
$content = 'UNKNOWN';
|
||||
|
||||
if ($val == 'BankCode') {
|
||||
$name = 'code_banque';
|
||||
$size = 8;
|
||||
|
||||
Reference in New Issue
Block a user