Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
b03684c0ee
150 changed files with 938 additions and 1211 deletions
File diff suppressed because it is too large
Load diff
|
|
@ -9,46 +9,49 @@
|
|||
*/
|
||||
return [
|
||||
// # Issue statistics:
|
||||
// PhanUndeclaredProperty : 560+ occurrences
|
||||
// PhanUndeclaredProperty : 570+ occurrences
|
||||
// PhanPossiblyUndeclaredGlobalVariable : 520+ occurrences
|
||||
// PhanUndeclaredGlobalVariable : 350+ occurrences
|
||||
// PhanPluginUnknownPropertyType : 330+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 330+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 230+ occurrences
|
||||
// PhanPossiblyUndeclaredVariable : 180+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 160+ occurrences
|
||||
// PhanTypeMismatchArgumentProbablyReal : 320+ occurrences
|
||||
// PhanPluginUnknownArrayMethodReturnType : 220+ occurrences
|
||||
// PhanPluginUnknownPropertyType : 200+ occurrences
|
||||
// PhanTypeMismatchProperty : 160+ occurrences
|
||||
// PhanPluginUnknownArrayMethodParamType : 140+ occurrences
|
||||
// PhanPossiblyUndeclaredVariable : 120+ occurrences
|
||||
// PhanPluginUndeclaredVariableIsset : 65+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionParamType : 60+ occurrences
|
||||
// PhanTypeMismatchArgumentNullableInternal : 60+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionReturnType : 50+ occurrences
|
||||
// PhanPluginEmptyStatementIf : 45+ occurrences
|
||||
// PhanTypeMismatchArgumentNullableInternal : 50+ occurrences
|
||||
// PhanRedefineFunction : 45+ occurrences
|
||||
// PhanTypeExpectedObjectPropAccess : 40+ occurrences
|
||||
// PhanTypeInvalidDimOffset : 35+ occurrences
|
||||
// PhanPluginEmptyStatementIf : 35+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionParamType : 35+ occurrences
|
||||
// PhanPluginUnknownArrayFunctionReturnType : 30+ occurrences
|
||||
// PhanTypeInvalidDimOffset : 30+ occurrences
|
||||
// PhanTypeMismatchDimFetch : 30+ occurrences
|
||||
// PhanPluginUnknownArrayPropertyType : 15+ occurrences
|
||||
// PhanPluginUnknownObjectMethodCall : 15+ occurrences
|
||||
// PhanUndeclaredConstant : 15+ occurrences
|
||||
// PhanEmptyForeach : 10+ occurrences
|
||||
// PhanPluginUnknownArrayPropertyType : 10+ occurrences
|
||||
// PhanTypeArraySuspiciousNull : 10+ occurrences
|
||||
// PhanTypeComparisonFromArray : 10+ occurrences
|
||||
// PhanTypeMismatchDimFetchNullable : 10+ occurrences
|
||||
// PhanUndeclaredMethod : 10+ occurrences
|
||||
// PhanPluginSuspiciousParamPosition : 9 occurrences
|
||||
// PhanPluginBothLiteralsBinaryOp : 8 occurrences
|
||||
// PhanPossiblyNullTypeMismatchProperty : 8 occurrences
|
||||
// PhanPluginSuspiciousParamPosition : 8 occurrences
|
||||
// PhanPluginDuplicateExpressionBinaryOp : 7 occurrences
|
||||
// PhanPluginConstantVariableNull : 6 occurrences
|
||||
// PhanParamTooMany : 5 occurrences
|
||||
// PhanPossiblyNullTypeMismatchProperty : 5 occurrences
|
||||
// PhanPluginDuplicateArrayKey : 4 occurrences
|
||||
// PhanEmptyFQSENInClasslike : 3 occurrences
|
||||
// PhanInvalidFQSENInClasslike : 3 occurrences
|
||||
// PhanTypeExpectedObjectPropAccessButGotNull : 2 occurrences
|
||||
// PhanTypeMismatchDimAssignment : 2 occurrences
|
||||
// PhanAccessMethodProtected : 1 occurrence
|
||||
// PhanParamTooFew : 1 occurrence
|
||||
// PhanPluginRedundantReturnComment : 1 occurrence
|
||||
// PhanTypeConversionFromArray : 1 occurrence
|
||||
// PhanTypeMismatchArgumentReal : 1 occurrence
|
||||
// PhanTypeMismatchReturn : 1 occurrence
|
||||
// PhanTypeSuspiciousStringExpression : 1 occurrence
|
||||
|
||||
// Currently, file_suppressions and directory_suppressions are the only supported suppressions
|
||||
'file_suppressions' => [
|
||||
|
|
@ -119,7 +122,7 @@ return [
|
|||
'htdocs/commande/list.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/commande/list_det.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeInvalidDimOffset', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/commande/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/compta/accounting-files.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/accounting-files.php' => ['PhanTypeMismatchDimFetch', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/compta/bank/account_statement_document.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/bank/annuel.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/bank/bankentries_list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
|
|
@ -163,7 +166,6 @@ return [
|
|||
'htdocs/compta/paiement/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/compta/paiement/cheque/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/paiement/cheque/list.php' => ['PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/paiement/class/paiement.class.php' => ['PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/compta/paiement/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/paiement_charge.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/compta/paiement_vat.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -256,7 +258,7 @@ return [
|
|||
'htdocs/core/class/notify.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/class/smtps.class.php' => ['PhanTypeConversionFromArray'],
|
||||
'htdocs/core/class/timespent.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/customreports.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetchNullable'],
|
||||
'htdocs/core/customreports.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginRedundantReturnComment', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchDimFetchNullable'],
|
||||
'htdocs/core/datepicker.php' => ['PhanTypeInvalidDimOffset'],
|
||||
'htdocs/core/db/sqlite3.class.php' => ['PhanTypeMismatchReturn'],
|
||||
'htdocs/core/extrafieldsinimport.inc.php' => ['PhanTypeMismatchArgumentNullableInternal'],
|
||||
|
|
@ -269,14 +271,12 @@ return [
|
|||
'htdocs/core/lib/images.lib.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/core/lib/pdf.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/project.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/lib/xcal.lib.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/action/doc/pdf_standard_actions.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/lib/xcal.lib.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/asset/doc/pdf_standard_asset.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/asset/mod_asset_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/barcode/doc/phpbarcode.modules.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/barcode/mod_barcode_product_standard.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/modules/bom/mod_bom_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/cheque/doc/pdf_blochet.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/cheque/modules_chequereceipts.php' => ['PhanParamTooFew', 'PhanPluginSuspiciousParamPosition'],
|
||||
'htdocs/core/modules/commande/doc/pdf_einstein.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/commande/doc/pdf_eratosthene.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -299,8 +299,6 @@ return [
|
|||
'htdocs/core/modules/mailings/contacts1.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/mailings/modules_mailings.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/modules/mailings/thirdparties.modules.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/core/modules/member/doc/doc_generic_member_odt.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/member/doc/pdf_standard_member.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/modules/member/modules_cards.php' => ['PhanPluginUnknownArrayFunctionParamType'],
|
||||
'htdocs/core/modules/movement/doc/pdf_standard_movementstock.modules.php' => ['PhanPluginDuplicateExpressionBinaryOp', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/mrp/doc/pdf_vinci.modules.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -308,8 +306,6 @@ return [
|
|||
'htdocs/core/modules/oauth/github_oauthcallback.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/core/modules/printing/modules_printing.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/core/modules/printing/printgcp.modules.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/core/modules/printsheet/doc/pdf_standardlabel.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/modules/printsheet/doc/pdf_tcpdflabel.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/core/modules/printsheet/modules_labels.php' => ['PhanParamTooMany'],
|
||||
'htdocs/core/modules/product/doc/pdf_standard.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -318,7 +314,6 @@ return [
|
|||
'htdocs/core/modules/propale/doc/pdf_azur.modules.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/propale/doc/pdf_cyan.modules.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/propale/modules_propale.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/modules/rapport/pdf_paiement.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/core/modules/reception/doc/pdf_squille.modules.php' => ['PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/modules/societe/mod_codecompta_aquarium.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/core/modules/societe/mod_codecompta_digitaria.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
|
|
@ -364,14 +359,10 @@ return [
|
|||
'htdocs/core/triggers/interface_20_modWorkflow_WorkflowManager.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/triggers/interface_50_modAgenda_ActionsAuto.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/triggers/interface_50_modMailmanspip_Mailmanspipsynchro.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/core/triggers/interface_50_modNotification_Notification.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess'],
|
||||
'htdocs/core/triggers/interface_80_modStripe_Stripe.class.php' => ['PhanPluginEmptyStatementIf', 'PhanUndeclaredProperty'],
|
||||
'htdocs/core/triggers/interface_90_modSociete_ContactRoles.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/cron/card.php' => ['PhanPluginBothLiteralsBinaryOp'],
|
||||
'htdocs/cron/class/cronjob.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/cron/list.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/datapolicy/class/datapolicycron.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/debugbar/class/DataCollector/DolConfigCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/debugbar/class/DataCollector/DolExceptionsCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/debugbar/class/DataCollector/DolMemoryCollector.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
|
|
@ -387,7 +378,7 @@ return [
|
|||
'htdocs/don/admin/donation.php' => ['PhanUndeclaredMethod'],
|
||||
'htdocs/don/card.php' => ['PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/don/class/api_donations.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/don/class/don.class.php' => ['PhanParamTooMany', 'PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/don/class/don.class.php' => ['PhanParamTooMany'],
|
||||
'htdocs/don/class/paymentdonation.class.php' => ['PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/don/document.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/don/index.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
|
|
@ -403,9 +394,7 @@ return [
|
|||
'htdocs/ecm/class/htmlecm.form.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/ecm/dir_card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/ecm/index.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/emailcollector/class/emailcollectoraction.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/emailcollector/class/emailcollectorfilter.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/emailcollector/class/emailcollector.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/eventorganization/class/conferenceorboothattendee.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/eventorganization/conferenceorbooth_card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/eventorganization/conferenceorbooth_contact.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -416,7 +405,6 @@ return [
|
|||
'htdocs/expedition/card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expedition/class/api_shipments.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expedition/class/expedition.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/expedition/class/expeditionlinebatch.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/expedition/contact.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/expedition/dispatch.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/expedition/document.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -425,7 +413,6 @@ return [
|
|||
'htdocs/expedition/shipment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/card.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/expensereport/class/api_expensereports.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/expensereport/class/paymentexpensereport.class.php' => ['PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/expensereport/payment/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/payment/info.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/expensereport/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
|
|
@ -437,17 +424,14 @@ return [
|
|||
'htdocs/fichinter/card-rec.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/api_interventions.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/fichinterrec.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/fichinter/class/fichinterstats.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/fichinter/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fichinter/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'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'],
|
||||
'htdocs/fourn/class/fournisseur.class.php' => ['PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/fourn/class/fournisseur.commande.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fourn/class/paiementfourn.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/fourn/commande/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fourn/class/fournisseur.commande.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/fourn/commande/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimAssignment', 'PhanTypeMismatchProperty', 'PhanTypeSuspiciousStringExpression', 'PhanUndeclaredProperty'],
|
||||
'htdocs/fourn/commande/contact.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/commande/dispatch.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/fourn/commande/document.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -486,7 +470,6 @@ return [
|
|||
'htdocs/hrm/position_list.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/hrm/skill_card.php' => ['PhanTypeExpectedObjectPropAccess', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/hrm/skill_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/imports/class/import.class.php' => ['PhanPluginEmptyStatementIf'],
|
||||
'htdocs/imports/emptyexample.php' => ['PhanRedefineFunction', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/imports/import.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/install/check.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
|
|
@ -498,21 +481,16 @@ return [
|
|||
'htdocs/install/step5.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/install/upgrade.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal'],
|
||||
'htdocs/intracommreport/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/intracommreport/class/intracommreport.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/knowledgemanagement/class/api_knowledgemanagement.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/knowledgemanagement/class/knowledgerecord.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/knowledgemanagement/knowledgerecord_card.php' => ['PhanPluginEmptyStatementIf', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/knowledgemanagement/knowledgerecord_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/loan/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/loan/class/loan.class.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/loan/class/loanschedule.class.php' => ['PhanPluginUnknownArrayMethodReturnType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/loan/class/paymentloan.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/loan/document.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/loan/info.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/loan/note.php' => ['PhanPluginUnknownObjectMethodCall', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/loan/payment/payment.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/loan/schedule.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/mailmanspip/class/mailmanspip.class.php' => ['PhanPluginUnknownArrayPropertyType'],
|
||||
'htdocs/margin/customerMargins.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/margin/productMargins.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/master.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
|
|
@ -523,18 +501,17 @@ return [
|
|||
'htdocs/mrp/mo_production.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/mrp/tpl/linkedobjectblock.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/mrp/tpl/originproductline.tpl.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/multicurrency/class/api_multicurrencies.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/multicurrency/class/multicurrency.class.php' => ['PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/multicurrency/class/api_multicurrencies.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/multicurrency/class/multicurrency.class.php' => ['PhanTypeExpectedObjectPropAccess'],
|
||||
'htdocs/opcachepreload.php' => ['PhanEmptyForeach'],
|
||||
'htdocs/opensurvey/card.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/opensurvey/class/opensurveysondage.class.php' => ['PhanPluginUnknownPropertyType', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/opensurvey/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/class/opensurveysondage.class.php' => ['PhanTypeMismatchProperty'],
|
||||
'htdocs/opensurvey/list.php' => ['PhanEmptyForeach', 'PhanPluginUndeclaredVariableIsset', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/results.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentNullableInternal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/wizard/choix_date.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/opensurvey/wizard/create_survey.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/partnership/class/api_partnerships.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/partnership/class/partnership.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/class/partnershiputils.class.php' => ['PhanPluginUnknownObjectMethodCall'],
|
||||
'htdocs/partnership/core/modules/partnership/mod_partnership_advanced.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/partnership/partnership_card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/partnership/partnership_list.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -544,14 +521,9 @@ return [
|
|||
'htdocs/product/card.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/product/class/api_products.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/html.formproduct.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/product.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/product/class/productbatch.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/class/productfournisseurprice.class.php' => ['PhanUndeclaredMethod', 'PhanUndeclaredProperty'],
|
||||
'htdocs/product/class/propalmergepdfproduct.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/document.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/dynamic_price/class/price_global_variable.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/dynamic_price/class/price_global_variable_updater.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/dynamic_price/class/price_parser.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType'],
|
||||
'htdocs/product/index.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/product/inventory/card.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/product/inventory/class/inventory.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -634,7 +606,7 @@ return [
|
|||
'htdocs/public/project/suggestconference.php' => ['PhanRedefineFunction', 'PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/public/project/viewandvote.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/recruitment/view.php' => ['PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/stripe/ipn.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanTypeMismatchProperty', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/stripe/ipn.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/public/test/test_arrays.php' => ['PhanPluginUndeclaredVariableIsset'],
|
||||
'htdocs/public/test/test_forms.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/public/ticket/create_ticket.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchDimFetchNullable', 'PhanTypeMismatchProperty'],
|
||||
|
|
@ -673,7 +645,6 @@ return [
|
|||
'htdocs/salaries/card.php' => ['PhanPossiblyUndeclaredGlobalVariable'],
|
||||
'htdocs/salaries/class/api_salaries.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType'],
|
||||
'htdocs/salaries/class/paymentsalary.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPluginUnknownArrayPropertyType', 'PhanPluginUnknownPropertyType', 'PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/salaries/class/salariesstats.class.php' => ['PhanPluginUnknownPropertyType'],
|
||||
'htdocs/salaries/list.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/salaries/paiement_salary.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/salaries/virement_request.php' => ['PhanPossiblyUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
|
|
@ -691,7 +662,7 @@ return [
|
|||
'htdocs/societe/tpl/linesalesrepresentative.tpl.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/societe/website.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/stripe/class/actions_stripe.class.php' => ['PhanPluginBothLiteralsBinaryOp', 'PhanPluginSuspiciousParamPosition'],
|
||||
'htdocs/stripe/class/stripe.class.php' => ['PhanPluginConstantVariableNull', 'PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/stripe/class/stripe.class.php' => ['PhanPluginEmptyStatementIf', 'PhanPossiblyUndeclaredVariable', 'PhanTypeExpectedObjectPropAccess', 'PhanTypeMismatchProperty'],
|
||||
'htdocs/supplier_proposal/card.php' => ['PhanUndeclaredGlobalVariable', 'PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/class/api_supplier_proposals.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/supplier_proposal/class/supplier_proposal.class.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -718,7 +689,7 @@ return [
|
|||
'htdocs/theme/md/info-box.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/theme/md/progress.inc.php' => ['PhanUndeclaredGlobalVariable'],
|
||||
'htdocs/ticket/card.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/class/actions_ticket.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/class/actions_ticket.class.php' => ['PhanPluginUnknownPropertyType', 'PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/class/api_tickets.class.php' => ['PhanPluginUnknownArrayMethodParamType', 'PhanPluginUnknownArrayMethodReturnType', 'PhanPossiblyUndeclaredVariable'],
|
||||
'htdocs/ticket/class/cticketcategory.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/ticket/class/ticket.class.php' => ['PhanUndeclaredProperty'],
|
||||
|
|
@ -743,7 +714,7 @@ return [
|
|||
'htdocs/webhook/target_list.php' => ['PhanTypeMismatchArgumentProbablyReal'],
|
||||
'htdocs/webportal/class/context.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/webportal/class/controller.class.php' => ['PhanPluginUnknownArrayMethodParamType'],
|
||||
'htdocs/webportal/class/html.formcardwebportal.class.php' => ['PhanPossiblyNullTypeMismatchProperty', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webportal/class/html.formcardwebportal.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/webportal/class/html.formlistwebportal.class.php' => ['PhanPluginUnknownArrayPropertyType', 'PhanPossiblyUndeclaredVariable', 'PhanTypeMismatchArgumentProbablyReal', 'PhanUndeclaredProperty'],
|
||||
'htdocs/webportal/class/webportalpropal.class.php' => ['PhanUndeclaredProperty'],
|
||||
'htdocs/webservices/server_actioncomm.php' => ['PhanPluginUnknownArrayFunctionParamType', 'PhanPluginUnknownArrayFunctionReturnType', 'PhanUndeclaredProperty'],
|
||||
|
|
|
|||
|
|
@ -223,7 +223,7 @@ return [
|
|||
'simplify_ast' => true,
|
||||
'analyzed_file_extensions' => ['php','inc'],
|
||||
'globals_type_map' => [
|
||||
'_Avery_Labels' => 'array<string,array{name:string,paper-size:string,orientation:string,metric:string,marginLeft:float,marginTop:float,NX:int,NY:int,SpaceX:float,SpaceY:float,width:float,height:float,font-size:float,custom_x:float,custom_y:float}>',
|
||||
'_Avery_Labels' => 'array<string,array{name:string,paper-size:string|array{0:float,1:float},orientation:string,metric:string,marginLeft:float,marginTop:float,NX:int,NY:int,SpaceX:float,SpaceY:float,width:float,height:float,font-size:float,custom_x:float,custom_y:float}>',
|
||||
'action' => 'string',
|
||||
'actioncode' => 'string',
|
||||
'badgeStatus0' => 'string',
|
||||
|
|
|
|||
|
|
@ -203,8 +203,8 @@ foreach ($object->fields as $key => $val) {
|
|||
$arrayfields[$tableprefix.'.'.$key] = array(
|
||||
'label' => $val['label'],
|
||||
'checked' => (($visible < 0) ? 0 : 1),
|
||||
'enabled' => (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)),
|
||||
'position' => $val['position'],
|
||||
'enabled' => (int) (abs($visible) != 3 && (bool) dol_eval($val['enabled'], 1)),
|
||||
'position' => (int) $val['position'],
|
||||
'help' => isset($val['help']) ? $val['help'] : ''
|
||||
);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,6 +33,8 @@ require_once DOL_DOCUMENT_ROOT.'/dav/dav.lib.php';
|
|||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_root
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/fichinter.lib.php';
|
|||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_root
|
||||
*/
|
||||
|
||||
if (!$user->admin) {
|
||||
|
|
|
|||
|
|
@ -303,7 +303,7 @@ if (empty($mysoc->country_code)) {
|
|||
$localtax_array = getLocalTaxesFromRate($vattxt, 0, $mysoc, $mysoc);
|
||||
|
||||
$s = 10 / 3;
|
||||
$tmparray = calcul_price_total($qty, price2num($s, 'MU'), 0, $vat, -1, -1, 0, 'HT', 0, 0, $mysoc, $localtax_array);
|
||||
$tmparray = calcul_price_total($qty, (float) price2num($s, 'MU'), 0, $vat, -1, -1, 0, 'HT', 0, 0, $mysoc, $localtax_array);
|
||||
print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
|
||||
print ' x <span class="opacitymedium">'.$langs->trans("Quantity").":</span> ".$qty;
|
||||
print ' - <span class="opacitymedium">'.$langs->trans("VAT").':</span> '.$vat.'%';
|
||||
|
|
@ -314,13 +314,13 @@ if (empty($mysoc->country_code)) {
|
|||
}
|
||||
|
||||
if (getDolGlobalString('MAIN_ADD_MORE_EXAMPLE_IN_ACCURANCY_SETUP')) {
|
||||
$qty = '1.234';
|
||||
$qty = 1.234;
|
||||
$vattxt = $vat.($vatarray['code'] ? ' ('.$vatarray['code'].')' : '');
|
||||
|
||||
$localtax_array = getLocalTaxesFromRate($vattxt, 0, $mysoc, $mysoc);
|
||||
|
||||
$s = 10 / 3;
|
||||
$tmparray = calcul_price_total($qty, price2num($s, 'MU'), 0, $vat, -1, -1, 0, 'HT', 0, 0, $mysoc, $localtax_array);
|
||||
$tmparray = calcul_price_total($qty, (float) price2num($s, 'MU'), 0, $vat, -1, -1, 0, 'HT', 0, 0, $mysoc, $localtax_array);
|
||||
print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
|
||||
print ' x <span class="opacitymedium">'.$langs->trans("Quantity").":</span> ".$qty;
|
||||
print ' - <span class="opacitymedium">'.$langs->trans("VAT").':</span> '.$vat.'%';
|
||||
|
|
@ -340,7 +340,7 @@ if (empty($mysoc->country_code)) {
|
|||
$s = 10 / 3;
|
||||
$qty = 1;
|
||||
$vat = 10;
|
||||
$tmparray = calcul_price_total($qty, price2num($s, 'MU'), 0, $vat, -1, -1, 0, 'HT', 0, 0, $mysoc, $localtax_array);
|
||||
$tmparray = calcul_price_total($qty, (float) price2num($s, 'MU'), 0, $vat, -1, -1, 0, 'HT', 0, 0, $mysoc, $localtax_array);
|
||||
print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
|
||||
print ' x <span class="opacitymedium">'.$langs->trans("Quantity").":</span> ".$qty;
|
||||
print ' - <span class="opacitymedium">'.$langs->trans("VAT").":</span> ".$vat.'%';
|
||||
|
|
@ -349,7 +349,7 @@ if (empty($mysoc->country_code)) {
|
|||
$s = 10 / 3;
|
||||
$qty = 2;
|
||||
$vat = 10;
|
||||
$tmparray = calcul_price_total($qty, price2num($s, 'MU'), 0, $vat, -1, -1, 0, 'HT', 0, 0, $mysoc, $localtax_array);
|
||||
$tmparray = calcul_price_total($qty, (float) price2num($s, 'MU'), 0, $vat, -1, -1, 0, 'HT', 0, 0, $mysoc, $localtax_array);
|
||||
print '<span class="opacitymedium">'.$langs->trans("UnitPriceOfProduct").":</span> ".price2num($s, 'MU');
|
||||
print ' x <span class="opacitymedium">'.$langs->trans("Quantity").":</span> ".$qty;
|
||||
print ' - <span class="opacitymedium">'.$langs->trans("VAT").":</span> ".$vat.'%';
|
||||
|
|
|
|||
|
|
@ -41,6 +41,8 @@ $supportedoauth2array = getSupportedOauth2Array();
|
|||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_root
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ $action = GETPOST('action', 'aZ09');
|
|||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_db_pass
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ require '../../main.inc.php';
|
|||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_db_pass
|
||||
*/
|
||||
|
||||
$langs->load("admin");
|
||||
|
|
|
|||
|
|
@ -36,6 +36,8 @@ require_once DOL_DOCUMENT_ROOT."/core/class/html.formcategory.class.php";
|
|||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_root
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
|
|
|
|||
|
|
@ -38,6 +38,8 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/files.lib.php';
|
|||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_root
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/localtax/class/localtax.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -876,7 +876,7 @@ class Paiement extends CommonObject
|
|||
$fac = new Facture($this->db);
|
||||
$fac->fetch($key);
|
||||
$fac->fetch_thirdparty();
|
||||
if (!in_array($fac->thirdparty->id, $linkaddedforthirdparty)) { // Not yet done for this thirdparty
|
||||
if (!in_array($fac->thirdparty->id, $linkaddedforthirdparty)) { // Not yet done for this thirdparty @phan-suppress-current-line PhanPossiblyUndeclaredVariable
|
||||
$result = $acc->add_url_line(
|
||||
$bank_line_id,
|
||||
$fac->thirdparty->id,
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -47,6 +47,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountingaccount.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ require_once DOL_DOCUMENT_ROOT.'/accountancy/class/accountancycategory.class.php
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ require_once DOL_DOCUMENT_ROOT . '/expensereport/class/paymentexpensereport.clas
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -59,6 +59,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -41,6 +41,7 @@
|
|||
@phan-var-force string $hideref
|
||||
';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var CommonObject $object
|
||||
* @var CommonObject $this
|
||||
* @var DoliDB $db
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
* \brief Code for actions on comments pages
|
||||
*/
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -27,7 +28,13 @@
|
|||
// $object must be defined
|
||||
// $langs must be defined
|
||||
// $hidedetails, $hidedesc, $hideref must de defined
|
||||
|
||||
/**
|
||||
* @var CommonObject $object
|
||||
* @var Conf $conf
|
||||
* @var Translate $langs
|
||||
*
|
||||
* @var string $action
|
||||
*/
|
||||
if ($action == 'up' && $permissiontoedit) {
|
||||
$object->line_up(GETPOST('rowid'));
|
||||
|
||||
|
|
|
|||
|
|
@ -24,9 +24,18 @@
|
|||
// Variable $confirm must be defined.
|
||||
// If variable $permissiontoadd is defined, we check it is true. Note: A test on permission should already have been done into the restrictedArea() method called by parent page.
|
||||
|
||||
//var_dump($upload_dir);
|
||||
//var_dump($upload_dirold);
|
||||
|
||||
/**
|
||||
* @var CommonObject $object
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $upload_dir
|
||||
* @var string $upload_dirold
|
||||
* @var string $confirm
|
||||
*/
|
||||
|
||||
// Protection to understand what happen when submitting files larger than post_max_size
|
||||
if (GETPOSTINT('uploadform') && empty($_POST) && empty($_FILES)) {
|
||||
|
|
|
|||
|
|
@ -38,12 +38,14 @@
|
|||
// $confirm
|
||||
/**
|
||||
* @var CommonObject $object
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var ExtraFields $extrafields
|
||||
* @var HookManager $hookmanager
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_root
|
||||
* @var ?string $permissiontoread
|
||||
* @var ?string $permissiontodelete
|
||||
* @var ?string $permissiontoclose
|
||||
|
|
@ -151,6 +153,7 @@ if (!$error && $massaction == 'confirm_presend') {
|
|||
foreach ($toselect as $toselectid) {
|
||||
$objecttmp = new $objectclass($db); // we must create new instance because instance is saved into $listofobjectref array for future use
|
||||
'@phan-var-force CommonObject $objecttmp';
|
||||
/** @var CommonObject $objecttmp */
|
||||
$result = $objecttmp->fetch($toselectid);
|
||||
if ($result > 0) {
|
||||
$listofobjectid[$toselectid] = $toselectid;
|
||||
|
|
@ -159,21 +162,27 @@ if (!$error && $massaction == 'confirm_presend') {
|
|||
$tmpobjectid = ($objecttmp->fk_soc ? $objecttmp->fk_soc : $objecttmp->socid);
|
||||
if ($objecttmp->element == 'societe') {
|
||||
'@phan-var-force Societe $objecttmp';
|
||||
/** @var Societe $objecttmp */
|
||||
$tmpobjectid = $objecttmp->id;
|
||||
} elseif ($objecttmp->element == 'contact') {
|
||||
'@phan-var-force Contact $objecttmp';
|
||||
/** @var Contact $objecttmp */
|
||||
$tmpobjectid = $objecttmp->id;
|
||||
} elseif ($objecttmp->element == 'expensereport') {
|
||||
'@phan-var-force ExpenseReport $objecttmp';
|
||||
/** @var ExpenseReport $objecttmp */
|
||||
$tmpobjectid = $objecttmp->fk_user_author;
|
||||
} elseif ($objecttmp->element == 'partnership' && getDolGlobalString('PARTNERSHIP_IS_MANAGED_FOR') == 'member') {
|
||||
'@phan-var-force Partnership $objecttmp';
|
||||
/** @var Partnership $objecttmp */
|
||||
$tmpobjectid = $objecttmp->fk_member;
|
||||
} elseif ($objecttmp->element == 'holiday') {
|
||||
'@phan-var-force Holiday $objecttmp';
|
||||
/** @var Holiday $objecttmp */
|
||||
$tmpobjectid = $objecttmp->fk_user;
|
||||
} elseif ($objecttmp->element == 'conferenceorboothattendee') {
|
||||
'@phan-var-force ConferenceOrBoothAttendee $objecttmp';
|
||||
/** @var ConferenceOrBoothAttendee $objecttmp */
|
||||
$tmpobjectid = $objecttmp->id;
|
||||
}
|
||||
if (empty($tmpobjectid)) {
|
||||
|
|
@ -182,6 +191,7 @@ if (!$error && $massaction == 'confirm_presend') {
|
|||
|
||||
if ($objectclass == 'Facture') {
|
||||
'@phan-var-force Facture $objecttmp';
|
||||
/** @var Facture $objecttmp */
|
||||
$tmparraycontact = array();
|
||||
$tmparraycontact = $objecttmp->liste_contact(-1, 'external', 0, 'BILLING');
|
||||
if (is_array($tmparraycontact) && count($tmparraycontact) > 0) {
|
||||
|
|
@ -191,6 +201,7 @@ if (!$error && $massaction == 'confirm_presend') {
|
|||
}
|
||||
} elseif ($objectclass == 'CommandeFournisseur') {
|
||||
'@phan-var-force CommandeFournisseur $objecttmp';
|
||||
/** @var CommandeFournisseur $objecttmp */
|
||||
$tmparraycontact = array();
|
||||
$tmparraycontact = $objecttmp->liste_contact(-1, 'external', 0, 'CUSTOMER');
|
||||
if (is_array($tmparraycontact) && count($tmparraycontact) > 0) {
|
||||
|
|
@ -299,19 +310,19 @@ if (!$error && $massaction == 'confirm_presend') {
|
|||
|
||||
foreach ($listofobjectref[$thirdpartyid] as $objectid => $objectobj) {
|
||||
//var_dump($thirdpartyid.' - '.$objectid.' - '.$objectobj->statut);
|
||||
if ($objectclass == 'Propal' && $objectobj->statut == Propal::STATUS_DRAFT) {
|
||||
if ($objectclass == 'Propal' && $objectobj->status == Propal::STATUS_DRAFT) {
|
||||
$langs->load("errors");
|
||||
$nbignored++;
|
||||
$resaction .= '<div class="error">'.$langs->trans('ErrorOnlyProposalNotDraftCanBeSentInMassAction', $objectobj->ref).'</div><br>';
|
||||
continue; // Payment done or started or canceled
|
||||
}
|
||||
if ($objectclass == 'Commande' && $objectobj->statut == Commande::STATUS_DRAFT) {
|
||||
if ($objectclass == 'Commande' && $objectobj->status == Commande::STATUS_DRAFT) {
|
||||
$langs->load("errors");
|
||||
$nbignored++;
|
||||
$resaction .= '<div class="error">'.$langs->trans('ErrorOnlyOrderNotDraftCanBeSentInMassAction', $objectobj->ref).'</div><br>';
|
||||
continue;
|
||||
}
|
||||
if ($objectclass == 'Facture' && $objectobj->statut == Facture::STATUS_DRAFT) {
|
||||
if ($objectclass == 'Facture' && $objectobj->status == Facture::STATUS_DRAFT) {
|
||||
$langs->load("errors");
|
||||
$nbignored++;
|
||||
$resaction .= '<div class="error">'.$langs->trans('ErrorOnlyInvoiceValidatedCanBeSentInMassAction', $objectobj->ref).'</div><br>';
|
||||
|
|
@ -374,10 +385,11 @@ if (!$error && $massaction == 'confirm_presend') {
|
|||
|
||||
if (empty($sendto)) {
|
||||
if ($objectobj->element == 'societe') {
|
||||
/** @var Societe $objectobj */
|
||||
$objectobj->thirdparty = $objectobj; // Hack so following code is compatible when objectobj is a thirdparty
|
||||
}
|
||||
|
||||
//print "No recipient for thirdparty ".$objectobj->thirdparty->name;
|
||||
// print "No recipient for thirdparty ".$objectobj->thirdparty->name;
|
||||
$nbignored++;
|
||||
if (empty($thirdpartywithoutemail[$objectobj->thirdparty->id])) {
|
||||
$resaction .= '<div class="error">'.$langs->trans('NoRecipientEmail', $objectobj->thirdparty->name).'</div><br>';
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@
|
|||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
*
|
||||
* @var string $dolibarr_main_url_root
|
||||
* @var string $action
|
||||
* @var ?string $subject
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -344,7 +344,7 @@ abstract class CommonObject
|
|||
public $newref;
|
||||
|
||||
/**
|
||||
* @var int|array<int, string> The object's status. Use status instead.
|
||||
* @var null|int|array<int, string> The object's status. Use status instead.
|
||||
* @deprecated Use $status instead.
|
||||
* @see $status
|
||||
* @see setStatut(), $status
|
||||
|
|
@ -352,9 +352,10 @@ abstract class CommonObject
|
|||
public $statut;
|
||||
|
||||
/**
|
||||
* @var int|array<int, string> The object's status (an int).
|
||||
* @var null|int|array<int, string> The object's status (an int).
|
||||
* Or an array listing all the potential status of the object:
|
||||
* array: int of the status => translated label of the status
|
||||
* In some classes status must be able to be null.
|
||||
* See for example the Account class.
|
||||
* @see setStatut()
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -107,12 +107,12 @@ abstract class CommonStickerGenerator extends CommonDocGenerator
|
|||
protected $_COUNTY = 1;
|
||||
protected $_First = 1;
|
||||
/**
|
||||
* @var array{name:string,paper-size:string,orientation:string,metric:string,marginLeft:float,marginTop:float,NX:int,NY:int,SpaceX:float,SpaceY:float,width:float,height:float,font-size:float,custom_x:float,custom_y:float}
|
||||
* @var ?array{name:string,paper-size:'custom'|array{0:float,1:float},orientation:string,metric:string,marginLeft:float,marginTop:float,NX:int,NY:int,SpaceX:float,SpaceY:float,width:float,height:float,font-size:float,custom_x:float,custom_y:float}
|
||||
*/
|
||||
public $Tformat;
|
||||
|
||||
/**
|
||||
* @var array<string,array{name:string,paper-size:string,orientation:string,metric:string,marginLeft:float,marginTop:float,NX:int,NY:int,SpaceX:float,SpaceY:float,width:float,height:float,font-size:float,custom_x:float,custom_y:float}>
|
||||
* @var array<string,array{name:string,paper-size:'custom'|array{0:float,1:float},orientation:string,metric:string,marginLeft:float,marginTop:float,NX:int,NY:int,SpaceX:float,SpaceY:float,width:float,height:float,font-size:float,custom_x:float,custom_y:float}>
|
||||
*/
|
||||
public $_Avery_Labels;
|
||||
// phpcs:enable
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/*
|
||||
* FCKeditor - The text editor for Internet - http://www.fckeditor.net
|
||||
* Copyright (C) 2003-2010 Frederico Caldeira Knabben
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* == BEGIN LICENSE ==
|
||||
*
|
||||
|
|
@ -32,6 +33,14 @@ define('NOTOKENRENEWAL', 1); // Disables token renewal
|
|||
// is a security hole if anybody can access without
|
||||
// being an authenticated user.
|
||||
require_once '../../../../main.inc.php';
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
*
|
||||
* @var string $dolibarr_main_data_root
|
||||
* @var string $dolibarr_main_url_root
|
||||
*/
|
||||
|
||||
$uri = preg_replace('/^http(s?):\/\//i', '', $dolibarr_main_url_root);
|
||||
$pos = strstr($uri, '/'); // $pos contient alors url sans nom domaine
|
||||
if ($pos == '/') {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -46,7 +47,10 @@ if (!defined('NOREQUIREAJAX')) {
|
|||
session_cache_limiter('public');
|
||||
|
||||
require_once '../../main.inc.php';
|
||||
|
||||
/**
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
*/
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007 Patrick Raguin <patrick.raguin@gmail.com>
|
||||
* Copyright (C) 2024 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -27,6 +28,9 @@
|
|||
|
||||
|
||||
global $_Avery_Labels;
|
||||
/**
|
||||
* @var DoliDB $db
|
||||
*/
|
||||
|
||||
// Unit of metric are defined into field 'metric' in mm.
|
||||
// To get into inch, just /25.4
|
||||
|
|
|
|||
|
|
@ -104,7 +104,7 @@ class pdf_standard_actions
|
|||
public $marge_basse;
|
||||
|
||||
/**
|
||||
* @var array format
|
||||
* @var array{0:float,1:float} format
|
||||
*/
|
||||
public $format;
|
||||
|
||||
|
|
|
|||
|
|
@ -57,6 +57,9 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||
*/
|
||||
public $line_per_page;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $ref_ext;
|
||||
|
||||
|
||||
|
|
@ -206,7 +209,7 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||
$this->Body($pdf, $pagenb, $pages, $outputlangs);
|
||||
|
||||
// Pied de page
|
||||
$this->_pagefoot($pdf, '', $outputlangs);
|
||||
$this->_pagefoot($pdf, null, $outputlangs);
|
||||
if (method_exists($pdf, 'AliasNbPages')) {
|
||||
$pdf->AliasNbPages(); // @phan-suppress-current-line PhanUndeclaredMethod
|
||||
}
|
||||
|
|
@ -422,10 +425,10 @@ class BordereauChequeBlochet extends ModeleChequeReceipts
|
|||
* Show footer of page. Need this->emetteur object
|
||||
*
|
||||
* @param TCPDF $pdf PDF
|
||||
* @param Object $object Object to show
|
||||
* @param ?CommonObject $object Object to show
|
||||
* @param Translate $outputlangs Object lang for output
|
||||
* @param int $hidefreetext 1=Hide free text
|
||||
* @return mixed
|
||||
* @param int<0,1> $hidefreetext 1=Hide free text
|
||||
* @return int
|
||||
*/
|
||||
protected function _pagefoot(&$pdf, $object, $outputlangs, $hidefreetext = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -1196,7 +1196,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1232,7 +1232,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1261,13 +1261,13 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
$totalvat = $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalVAT", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
if (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'rateonly') {
|
||||
$totalvat .= vatrate($tvaval['vatrate'], 1).$tvacompl;
|
||||
$totalvat .= vatrate($tvaval['vatrate'], true).$tvacompl;
|
||||
} elseif (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'codeonly') {
|
||||
$totalvat .= $tvaval['vatcode'].$tvacompl;
|
||||
} elseif (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate($tvaval['vatrate'], 1).($tvaval['vatcode'] ? ' ('.$tvaval['vatcode'].')' : '').$tvacompl;
|
||||
$totalvat .= vatrate($tvaval['vatrate'], true).($tvaval['vatcode'] ? ' ('.$tvaval['vatcode'].')' : '').$tvacompl;
|
||||
}
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
|
@ -1300,7 +1300,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1338,7 +1338,7 @@ class pdf_eratosthene extends ModelePDFCommandes
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -1472,7 +1472,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1509,7 +1509,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1538,13 +1538,13 @@ class pdf_crabe extends ModelePDFFactures
|
|||
$totalvat = $outputlangs->transcountrynoentities("TotalVAT", $mysoc->country_code).(is_object($outputlangsbis) ? ' / '.$outputlangsbis->transcountrynoentities("TotalVAT", $mysoc->country_code) : '');
|
||||
$totalvat .= ' ';
|
||||
if (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'rateonly') {
|
||||
$totalvat .= vatrate($tvaval['vatrate'], 1).$tvacompl;
|
||||
$totalvat .= vatrate($tvaval['vatrate'], true).$tvacompl;
|
||||
} elseif (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'codeonly') {
|
||||
$totalvat .= $tvaval['vatcode'].$tvacompl;
|
||||
} elseif (getDolGlobalString('PDF_VAT_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate($tvaval['vatrate'], 1).($tvaval['vatcode'] ? ' ('.$tvaval['vatcode'].')' : '').$tvacompl;
|
||||
$totalvat .= vatrate($tvaval['vatrate'], true).($tvaval['vatcode'] ? ' ('.$tvaval['vatcode'].')' : '').$tvacompl;
|
||||
}
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
||||
|
|
@ -1576,7 +1576,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX1_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
@ -1611,7 +1611,7 @@ class pdf_crabe extends ModelePDFFactures
|
|||
if (getDolGlobalString('PDF_LOCALTAX2_LABEL_IS_CODE_OR_RATE') == 'nocodenorate') {
|
||||
$totalvat .= $tvacompl;
|
||||
} else {
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), 1).$tvacompl;
|
||||
$totalvat .= vatrate((string) abs((float) $tvakey), true).$tvacompl;
|
||||
}
|
||||
|
||||
$pdf->MultiCell($col2x - $col1x, $tab2_hl, $totalvat, 0, 'L', 1);
|
||||
|
|
|
|||
|
|
@ -295,6 +295,7 @@ class doc_generic_member_odt extends ModelePDFMember
|
|||
$result = $object->fetch_contact($arrayidcontact[0]);
|
||||
}
|
||||
|
||||
$contactobject = null;
|
||||
// Recipient name
|
||||
if (!empty($usecontact)) {
|
||||
// We can use the company of contact instead of thirdparty company
|
||||
|
|
@ -426,7 +427,7 @@ class doc_generic_member_odt extends ModelePDFMember
|
|||
* @param CommonObject $object member
|
||||
* @param Translate $outputlangs translation object
|
||||
* @param string $array_key key for array
|
||||
* @return array array of substitutions
|
||||
* @return array<string,string> Array of substitutions
|
||||
*/
|
||||
public function get_substitutionarray_object($object, $outputlangs, $array_key = 'object')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ class pdf_standard_member extends CommonStickerGenerator
|
|||
*
|
||||
* @param TCPDF $pdf PDF reference
|
||||
* @param Translate $outputlangs Output langs
|
||||
* @param array $param Associative array containing label content and optional parameters
|
||||
* @param array<string,string> $param Associative array containing label content and optional parameters
|
||||
* @return void
|
||||
*/
|
||||
public function addSticker(&$pdf, $outputlangs, $param)
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -37,6 +37,14 @@ if (!defined('NOLOGIN') && $forlogin) {
|
|||
// Load Dolibarr environment
|
||||
require '../../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_roott
|
||||
*/
|
||||
use OAuth\Common\Storage\DoliStorage;
|
||||
use OAuth\Common\Consumer\Credentials;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -26,6 +26,15 @@
|
|||
// Load Dolibarr environment
|
||||
require '../../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_roott
|
||||
*/
|
||||
|
||||
use OAuth\Common\Storage\DoliStorage;
|
||||
use OAuth\Common\Consumer\Credentials;
|
||||
|
||||
|
|
|
|||
|
|
@ -41,6 +41,15 @@ if (!defined('NOLOGIN') && $forlogin) {
|
|||
// Load Dolibarr environment
|
||||
require '../../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_roott
|
||||
*/
|
||||
|
||||
use OAuth\Common\Storage\DoliStorage;
|
||||
use OAuth\Common\Consumer\Credentials;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -26,6 +26,15 @@
|
|||
// Load Dolibarr environment
|
||||
require '../../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_roott
|
||||
*/
|
||||
|
||||
use OAuth\Common\Storage\DoliStorage;
|
||||
use OAuth\Common\Consumer\Credentials;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -26,6 +26,15 @@
|
|||
// Load Dolibarr environment
|
||||
require '../../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_roott
|
||||
*/
|
||||
|
||||
use OAuth\Common\Storage\DoliStorage;
|
||||
use OAuth\Common\Consumer\Credentials;
|
||||
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2019 Thibault FOUCART <support@ptibogxiv.net>
|
||||
* Copyright (C) 2024 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -26,6 +27,15 @@
|
|||
// Load Dolibarr environment
|
||||
require '../../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_roott
|
||||
*/
|
||||
|
||||
use OAuth\Common\Storage\DoliStorage;
|
||||
use OAuth\Common\Consumer\Credentials;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2022 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
* Copyright (C) 2015-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -26,6 +26,15 @@
|
|||
// Load Dolibarr environment
|
||||
require '../../../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/includes/OAuth/bootstrap.php';
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_roott
|
||||
*/
|
||||
|
||||
use OAuth\Common\Storage\DoliStorage;
|
||||
use OAuth\Common\Consumer\Credentials;
|
||||
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ class pdf_standardlabel extends CommonStickerGenerator
|
|||
*
|
||||
* @param TCPDF $pdf PDF reference
|
||||
* @param Translate $outputlangs Output langs
|
||||
* @param array $param Associative array containing label content and optional parameters
|
||||
* @param array<string,string> $param Associative array containing label content and optional parameters
|
||||
* @return void
|
||||
*/
|
||||
public function addSticker(&$pdf, $outputlangs, $param)
|
||||
|
|
@ -228,7 +228,7 @@ class pdf_standardlabel extends CommonStickerGenerator
|
|||
/**
|
||||
* Function to build PDF on disk, then output on HTTP stream.
|
||||
*
|
||||
* @param array $arrayofrecords Array of record information (array('textleft'=>,'textheader'=>, ..., 'id'=>,'photo'=>)
|
||||
* @param array<array{textleft:string,textheader:string,textfooter:string,textright:string,photo:string}> $arrayofrecords Array of record information (array('textleft'=>,'textheader'=>, ..., 'id'=>,'photo'=>)
|
||||
* @param Translate $outputlangs Lang object for output language
|
||||
* @param string $srctemplatepath Full path of source filename for generator using a template file
|
||||
* @param string $outputdir Output directory for pdf file
|
||||
|
|
|
|||
|
|
@ -94,7 +94,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
|
|||
*
|
||||
* @param TCPDF $pdf PDF reference
|
||||
* @param Translate $outputlangs Output langs
|
||||
* @param array $param Associative array containing label content and optional parameters
|
||||
* @param array{textleft:string,textheader:string,textfooter:string,textright:string,code:string,encoding:string,is2d:int<0,1>|bool} $param Associative array containing label content and optional parameters
|
||||
* @return void
|
||||
*/
|
||||
public function addSticker(&$pdf, $outputlangs, $param)
|
||||
|
|
@ -251,7 +251,7 @@ class pdf_tcpdflabel extends CommonStickerGenerator
|
|||
/**
|
||||
* Function to build PDF on disk, then output on HTTP stream.
|
||||
*
|
||||
* @param array $arrayofrecords Array of record information (array('textleft'=>,'textheader'=>, ..., 'id'=>,'photo'=>)
|
||||
* @param array<array{textleft:string,textheader:string,textfooter:string,textright:string,code:string,encoding:string,is2d:int<0,1>|bool}> $arrayofrecords Array of record information (array('textleft'=>,'textheader'=>, ..., 'id'=>,'photo'=>)
|
||||
* @param Translate $outputlangs Lang object for output language
|
||||
* @param string $srctemplatepath Full path of source filename for generator using a template file
|
||||
* @param string $outputdir Output directory for pdf file
|
||||
|
|
|
|||
|
|
@ -37,22 +37,55 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commondocgenerator.class.php';
|
|||
*/
|
||||
class pdf_paiement extends CommonDocGenerator
|
||||
{
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $tab_top;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $line_height;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $line_per_page;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $tab_height;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $posxdate;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $posxpaymenttype;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $posxinvoice;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $posxbankaccount;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $posxinvoiceamount;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $posxpaymentamount;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $doc_type;
|
||||
|
||||
/**
|
||||
|
|
@ -209,6 +242,8 @@ class pdf_paiement extends CommonDocGenerator
|
|||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$numpaiement = $this->db->num_rows($result);
|
||||
} else {
|
||||
$numpaiement = 0;
|
||||
}
|
||||
|
||||
// number of bill
|
||||
|
|
@ -465,7 +500,7 @@ class pdf_paiement extends CommonDocGenerator
|
|||
*
|
||||
* @param TCPDF $pdf PDF object
|
||||
* @param int $page Page
|
||||
* @param array $lines Array of lines
|
||||
* @param array<int,array<int,string>> $lines Array of lines
|
||||
* @param Translate $outputlangs Object langs
|
||||
* @return void
|
||||
*/
|
||||
|
|
@ -478,13 +513,14 @@ class pdf_paiement extends CommonDocGenerator
|
|||
$pdf->SetFont('', '', $default_font_size - 1);
|
||||
$oldprowid = 0;
|
||||
$total_page = 0;
|
||||
$total_mod = 0;
|
||||
$mod = 0;
|
||||
$total = 0;
|
||||
$pdf->SetFillColor(220, 220, 220);
|
||||
$yp = 0;
|
||||
$numlines = count($lines);
|
||||
if (($this->doc_type == 'client' && getDolGlobalString('PAYMENTS_REPORT_GROUP_BY_MOD')) || ($this->doc_type == 'fourn' && getDolGlobalString('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD'))) {
|
||||
$mod = $lines[0][2];
|
||||
$total_mod = 0;
|
||||
}
|
||||
for ($j = 0; $j < $numlines; $j++) {
|
||||
$i = $j;
|
||||
|
|
@ -529,9 +565,9 @@ class pdf_paiement extends CommonDocGenerator
|
|||
$pdf->SetXY($this->posxpaymentamount, $this->tab_top + 10 + $yp);
|
||||
$pdf->MultiCell($this->page_largeur - $this->marge_droite - $this->posxpaymentamount, $this->line_height, $lines[$j][4], 0, 'R', 1);
|
||||
$yp += 5;
|
||||
$total_page += $lines[$j][9];
|
||||
$total_page += (float) $lines[$j][9];
|
||||
if (($this->doc_type == 'client' && getDolGlobalString('PAYMENTS_REPORT_GROUP_BY_MOD')) || ($this->doc_type == 'fourn' && getDolGlobalString('PAYMENTS_FOURN_REPORT_GROUP_BY_MOD'))) {
|
||||
$total_mod += $lines[$j][9];
|
||||
$total_mod += (float) $lines[$j][9];
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -17,7 +17,11 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var CommonObject $object
|
||||
*
|
||||
* @var string $blocname
|
||||
*/
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($blocname)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2017 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2022 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -16,7 +17,10 @@
|
|||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var CommonObject $this
|
||||
* @var Conf $conf
|
||||
*/
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || !is_object($conf)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
|
|
|
|||
|
|
@ -33,6 +33,9 @@ include_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
|
|||
*/
|
||||
class InterfaceNotification extends DolibarrTriggers
|
||||
{
|
||||
/**
|
||||
* @var string[]
|
||||
*/
|
||||
public $listofmanagedevents = array();
|
||||
|
||||
/**
|
||||
|
|
@ -102,7 +105,7 @@ class InterfaceNotification extends DolibarrTriggers
|
|||
/**
|
||||
* Return list of events managed by notification module
|
||||
*
|
||||
* @return array Array of events managed by notification module
|
||||
* @return array<array{rowid:int,code:string,contexts:string,label:string,description:string,elementtype:string}> Array of events managed by notification module
|
||||
*/
|
||||
public function getListOfManagedEvents()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -198,14 +198,15 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||
|
||||
$contactid = empty($object->context['contactid']) ? 0 : $object->context['contactid'];
|
||||
$res = 0;
|
||||
$contactObj = null;
|
||||
|
||||
if (!empty($contactid)) {
|
||||
$contact = new Contact($this->db);
|
||||
$res = $contact->fetch($contactid);
|
||||
$contactObj = new Contact($this->db);
|
||||
$res = $contactObj->fetch($contactid);
|
||||
}
|
||||
|
||||
if ($res > 0 && !empty($contact->email) && !empty($contact->statut)) {
|
||||
$sendto = $contact->email;
|
||||
if ($contactObj !== null && !empty($contactObj->email) && !empty($contactObj->statut)) {
|
||||
$sendto = $contactObj->email;
|
||||
} elseif (!empty($object->fk_soc)) {
|
||||
$object->fetch_thirdparty();
|
||||
$sendto = $object->thirdparty->email;
|
||||
|
|
@ -256,13 +257,14 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||
|
||||
$contactid = empty($object->context['contactid']) ? 0 : $object->context['contactid'];
|
||||
$res = 0;
|
||||
$contactObj = null;
|
||||
|
||||
if ($contactid > 0) {
|
||||
// TODO This security test has no sens. We must check that $contactid is inside $linked_contacts[]['id'] when $linked_contacts[]['source'] = 'external' or 'thirdparty'
|
||||
// Refuse email if not
|
||||
$contact = new Contact($this->db);
|
||||
$res = $contact->fetch($contactid);
|
||||
if (! in_array($contact, $linked_contacts)) {
|
||||
$contactObj = new Contact($this->db);
|
||||
$res = $contactObj->fetch($contactid);
|
||||
if (! in_array($contactObj, $linked_contacts)) {
|
||||
$error_msg = $langs->trans('Error'). ': ';
|
||||
$error_msg .= $langs->transnoentities('TicketWrongContact');
|
||||
setEventMessages($error_msg, [], 'errors');
|
||||
|
|
@ -272,8 +274,8 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||
}
|
||||
|
||||
$sendto = '';
|
||||
if ($res > 0 && !empty($contact->email) && !empty($contact->statut)) {
|
||||
$sendto = $contact->email;
|
||||
if ($contactObj !== null && $res > 0 && !empty($contactObj->email) && !empty($contactObj->statut)) {
|
||||
$sendto = $contactObj->email;
|
||||
} elseif (!empty($linked_contacts) && ($contactid == -2 || (GETPOST('massaction', 'alpha') == 'close' && GETPOST('confirm', 'alpha') == 'yes'))) {
|
||||
// if sending to all contacts or sending to contacts while mass closing
|
||||
$temp_emails = [];
|
||||
|
|
@ -350,6 +352,7 @@ class InterfaceTicketEmail extends DolibarrTriggers
|
|||
|
||||
$trackid = 'tic'.$object->id;
|
||||
|
||||
$old_MAIN_MAIL_AUTOCOPY_TO = null;
|
||||
if (getDolGlobalString('TICKET_DISABLE_MAIL_AUTOCOPY_TO')) {
|
||||
$old_MAIN_MAIL_AUTOCOPY_TO = getDolGlobalString('MAIN_MAIL_AUTOCOPY_TO');
|
||||
$conf->global->MAIN_MAIL_AUTOCOPY_TO = '';
|
||||
|
|
|
|||
|
|
@ -206,10 +206,10 @@ class InterfaceStripe extends DolibarrTriggers
|
|||
}
|
||||
|
||||
// If payment mode is linked to Stripe, we update/delete Stripe too
|
||||
if ($action == 'COMPANYPAYMENTMODE_CREATE' && $object->type == 'card') {
|
||||
// For creation of credit card, we do not create in Stripe automatically
|
||||
}
|
||||
if ($action == 'COMPANYPAYMENTMODE_MODIFY' && $object->type == 'card' && $object instanceof CompanyPaymentMode) {
|
||||
//if ($action == 'COMPANYPAYMENTMODE_CREATE' && $object instanceof CompanyPaymentMode && $object->type == 'card') {
|
||||
// For creation of credit card, we do not create in Stripe automatically
|
||||
//}
|
||||
if ($action == 'COMPANYPAYMENTMODE_MODIFY' && $object instanceof CompanyPaymentMode && $object->type == 'card') {
|
||||
dol_syslog("Trigger '".$this->name."' for action '$action' launched by ".__FILE__.". id=".$object->id);
|
||||
|
||||
if (!empty($object->stripe_card_ref)) {
|
||||
|
|
|
|||
|
|
@ -73,12 +73,33 @@ class Cronjob extends CommonObject
|
|||
* @var string Job command
|
||||
*/
|
||||
public $command;
|
||||
/**
|
||||
* @var null|string
|
||||
*/
|
||||
public $classesname;
|
||||
/**
|
||||
* @var null|string
|
||||
*/
|
||||
public $objectname;
|
||||
/**
|
||||
* @var null|string
|
||||
*/
|
||||
public $methodename;
|
||||
/**
|
||||
* @var null|string
|
||||
*/
|
||||
public $params;
|
||||
/**
|
||||
* @var null|string
|
||||
*/
|
||||
public $md5params;
|
||||
/**
|
||||
* @var null|string
|
||||
*/
|
||||
public $module_name;
|
||||
/**
|
||||
* @var null|int|string
|
||||
*/
|
||||
public $priority;
|
||||
|
||||
/**
|
||||
|
|
@ -515,9 +536,9 @@ class Cronjob extends CommonObject
|
|||
* @param string $sortfield Sort field
|
||||
* @param int $limit Limit page
|
||||
* @param int $offset Offset ppage
|
||||
* @param int $status Display active or not (-1=no filter, 0=not active, 1=active, 2=archived)
|
||||
* @param string|array $filter Filter USF.
|
||||
* @param int $processing Processing or not (-1=all, 0=not in progress, 1=in progress)
|
||||
* @param int<-1,2> $status Display active or not (-1=no filter, 0=not active, 1=active, 2=archived)
|
||||
* @param string|array<string,string> $filter Filter USF.
|
||||
* @param int<-1,1> $processing Processing or not (-1=all, 0=not in progress, 1=in progress)
|
||||
* @return int if KO: <0 || if OK: >0
|
||||
*/
|
||||
public function fetchAll(string $sortorder = 'DESC', string $sortfield = 't.rowid', int $limit = 0, int $offset = 0, int $status = 1, $filter = '', int $processing = -1)
|
||||
|
|
|
|||
|
|
@ -34,8 +34,14 @@ class DataPolicyCron
|
|||
*/
|
||||
public $db;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $error;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $output;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/doleditor.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -477,10 +477,10 @@ class Don extends CommonObject
|
|||
}
|
||||
}
|
||||
|
||||
if (!$error && (getDolGlobalString('MAIN_DISABLEDRAFTSTATUS') || getDolGlobalString('MAIN_DISABLEDRAFTSTATUS_DONATION'))) {
|
||||
//$res = $this->setValid($user);
|
||||
//if ($res < 0) $error++;
|
||||
}
|
||||
//if (!$error && (getDolGlobalString('MAIN_DISABLEDRAFTSTATUS') || getDolGlobalString('MAIN_DISABLEDRAFTSTATUS_DONATION'))) {
|
||||
//$res = $this->setValid($user);
|
||||
//if ($res < 0) $error++;
|
||||
//}
|
||||
|
||||
if (!$error) {
|
||||
$this->db->commit();
|
||||
|
|
|
|||
|
|
@ -1179,6 +1179,8 @@ class EmailCollector extends CommonObject
|
|||
return -1;
|
||||
}
|
||||
|
||||
$client = null;
|
||||
|
||||
$sourcedir = $this->source_directory;
|
||||
$targetdir = ($this->target_directory ? $this->target_directory : ''); // Can be '[Gmail]/Trash' or 'mytag'
|
||||
|
||||
|
|
|
|||
|
|
@ -84,15 +84,42 @@ class EmailCollectorAction extends CommonObject
|
|||
'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 1000, 'notnull' => -1,),
|
||||
'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => 1, 'visible' => 1, 'position' => 1000, 'notnull' => 1, 'default' => 1, 'arrayofkeyval' => array('0' => 'Disabled', '1' => 'Enabled')),
|
||||
);
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $rowid;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_emailcollector;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $actionparam;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_user_creat;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_user_modif;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $position;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $import_key;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $status;
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
|
|
|
|||
|
|
@ -85,14 +85,38 @@ class EmailCollectorFilter extends CommonObject
|
|||
'import_key' => array('type' => 'varchar(14)', 'label' => 'ImportId', 'enabled' => 1, 'visible' => -2, 'position' => 1000, 'notnull' => -1,),
|
||||
'status' => array('type' => 'integer', 'label' => 'Status', 'enabled' => 1, 'visible' => 1, 'position' => 1000, 'notnull' => 1, 'default' => '1', 'arrayofkeyval' => array('0' => 'Disabled', '1' => 'Enabled')),
|
||||
);
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $rowid;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_emailcollector;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $rulevalue;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_user_creat;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_user_modif;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $import_key;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $status;
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
|
|
|
|||
|
|
@ -1,10 +1,10 @@
|
|||
<?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-2021 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
/* 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>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/actions_massactions.inc.php
|
||||
* \file htdocs/core/actions_massactions.inc.php
|
||||
* \brief Code for actions done with massaction button (send by email, merge pdf, delete, ...)
|
||||
*/
|
||||
|
||||
|
|
@ -35,8 +35,18 @@
|
|||
// $uploaddir may be defined (example to $conf->project->dir_output."/";)
|
||||
// $toselect may be defined
|
||||
// $diroutputmassaction may be defined
|
||||
|
||||
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var Translate $langs
|
||||
*
|
||||
* @var string $massaction
|
||||
* @var string $objectclass
|
||||
* @var ?string $diroutputmassaction
|
||||
* @var ?string $uploaddir
|
||||
* @var string[] $toselect
|
||||
* @var array<string,mixed> $parameters
|
||||
*/
|
||||
// Protection
|
||||
if (empty($objectclass) || empty($uploaddir)) {
|
||||
dol_print_error(null, 'include of actions_massactions.inc.php is done but var $objectclass or $uploaddir was not defined');
|
||||
|
|
|
|||
|
|
@ -511,8 +511,8 @@ class ExpeditionLigne extends CommonObjectLine
|
|||
$qty = price2num($this->qty);
|
||||
$remainingQty = 0;
|
||||
$batch = null;
|
||||
$batch_id = null;
|
||||
$expedition_batch_id = null;
|
||||
$batch_id = 0;
|
||||
$expedition_batch_id = 0;
|
||||
if (is_array($this->detail_batch)) { // array of ExpeditionLineBatch
|
||||
if (count($this->detail_batch) > 1) {
|
||||
dol_syslog(get_class($this).'::update only possible for one batch', LOG_ERR);
|
||||
|
|
@ -605,7 +605,7 @@ class ExpeditionLigne extends CommonObjectLine
|
|||
$shipmentLot->sellby = $lot->sellby;
|
||||
$shipmentLot->entrepot_id = $this->detail_batch->entrepot_id;
|
||||
$shipmentLot->qty = $this->detail_batch->qty;
|
||||
$shipmentLot->fk_origin_stock = $batch_id;
|
||||
$shipmentLot->fk_origin_stock = (int) $batch_id;
|
||||
if ($shipmentLot->create($this->id) < 0) {
|
||||
$this->errors = $shipmentLot->errors;
|
||||
$error++;
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
<?php
|
||||
/* Copyright (C) 2007-2015 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2013-2014 Cedric GROSS <c.gross@kreiz-it.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -38,18 +39,43 @@ class ExpeditionLineBatch extends CommonObject
|
|||
*/
|
||||
public $table_element = 'expeditiondet_batch';
|
||||
|
||||
/**
|
||||
* @var null|int|string
|
||||
*/
|
||||
public $sellby;
|
||||
/**
|
||||
* @var null|int|string
|
||||
*/
|
||||
public $eatby;
|
||||
/**
|
||||
* @var ?string
|
||||
*/
|
||||
public $batch;
|
||||
|
||||
/**
|
||||
* @var float Quantity
|
||||
*/
|
||||
public $qty;
|
||||
public $dluo_qty; // deprecated, use qty
|
||||
/**
|
||||
* @var null|float
|
||||
* @deprecated Use $qty
|
||||
*/
|
||||
public $dluo_qty;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $entrepot_id;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_origin_stock; // rowid in llx_product_batch table (not useful)
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_warehouse; // warehouse ID
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $fk_expeditiondet;
|
||||
|
||||
|
||||
|
|
@ -134,10 +160,10 @@ class ExpeditionLineBatch extends CommonObject
|
|||
$sql .= $id_line_expdet;
|
||||
$sql .= ", ".(!isset($this->sellby) || dol_strlen($this->sellby) == 0 ? 'NULL' : ("'".$this->db->idate($this->sellby))."'");
|
||||
$sql .= ", ".(!isset($this->eatby) || dol_strlen($this->eatby) == 0 ? 'NULL' : ("'".$this->db->idate($this->eatby))."'");
|
||||
$sql .= ", ".(!isset($this->batch) ? 'NULL' : ("'".$this->db->escape($this->batch)."'"));
|
||||
$sql .= ", ".(!empty($this->batch) ? 'NULL' : ("'".$this->db->escape($this->batch)."'"));
|
||||
$sql .= ", ".(!isset($this->qty) ? ((!isset($this->dluo_qty)) ? 'NULL' : $this->dluo_qty) : $this->qty); // dluo_qty deprecated, use qty
|
||||
$sql .= ", ".(!isset($this->fk_origin_stock) ? 'NULL' : $this->fk_origin_stock);
|
||||
$sql .= ", ".(!isset($this->fk_warehouse) ? 'NULL' : $this->fk_warehouse);
|
||||
$sql .= ", ".((int) $this->fk_origin_stock);
|
||||
$sql .= ", ".(empty($this->fk_warehouse) ? 'NULL' : $this->fk_warehouse);
|
||||
$sql .= ")";
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
|
@ -195,9 +221,9 @@ class ExpeditionLineBatch extends CommonObject
|
|||
/**
|
||||
* Retrieve all batch number detailed information of a shipment line
|
||||
*
|
||||
* @param int $id_line_expdet id of shipment line
|
||||
* @param int $fk_product If provided, load also detailed information of lot
|
||||
* @return int|array -1 if KO, array of ExpeditionLineBatch if OK
|
||||
* @param int $id_line_expdet id of shipment line
|
||||
* @param int $fk_product If provided, load also detailed information of lot
|
||||
* @return int<-1,-1>|ExpeditionLineBatch[] -1 if KO, array of ExpeditionLineBatch if OK
|
||||
*/
|
||||
public function fetchAll($id_line_expdet, $fk_product = 0)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -53,6 +53,7 @@ if (isModEnabled("product") || isModEnabled("service")) {
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -54,8 +54,11 @@ if (isModEnabled('accounting')) {
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*
|
||||
* @var string $dolibarr_main_url_root
|
||||
*/
|
||||
|
||||
// Load translation files required by the page
|
||||
|
|
|
|||
|
|
@ -557,6 +557,7 @@ class PaymentExpenseReport extends CommonObject
|
|||
|
||||
//Fix me field
|
||||
$total = $this->amount;
|
||||
$amount = 0;
|
||||
|
||||
if ($mode == 'payment_expensereport') {
|
||||
$amount = $total;
|
||||
|
|
@ -569,7 +570,7 @@ class PaymentExpenseReport extends CommonObject
|
|||
$label,
|
||||
-$amount,
|
||||
$this->num_payment,
|
||||
'',
|
||||
0,
|
||||
$user,
|
||||
$emetteur_nom,
|
||||
$emetteur_banque
|
||||
|
|
|
|||
|
|
@ -39,11 +39,26 @@ class FichinterStats extends Stats
|
|||
*/
|
||||
public $table_element;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $socid;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $userid;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $from;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $field;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $where;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ if (isModEnabled('accounting')) {
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ class SupplierInvoices extends DolibarrApi
|
|||
{
|
||||
/**
|
||||
*
|
||||
* @var array $FIELDS Mandatory fields, checked when create and update object
|
||||
* @var string[] $FIELDS Mandatory fields, checked when create and update object
|
||||
*/
|
||||
public static $FIELDS = array(
|
||||
'socid',
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
* Copyright (C) 2006 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -190,7 +191,7 @@ class Fournisseur extends Societe
|
|||
/**
|
||||
* Return the suppliers list
|
||||
*
|
||||
* @return array Array of suppliers
|
||||
* @return array<int,string> Array of suppliers
|
||||
*/
|
||||
public function ListArray()
|
||||
{
|
||||
|
|
|
|||
|
|
@ -83,7 +83,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
|
||||
/**
|
||||
* 0=Default, 1=View may be restricted to sales representative only if no permission to see all or to company of external user if external user
|
||||
* @var integer
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $restrictiononfksoc = 1;
|
||||
|
||||
|
|
@ -115,7 +115,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
public $ref_fourn;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
* @var ?int<0,9>
|
||||
*/
|
||||
public $statut; // 0=Draft -> 1=Validated -> 2=Approved -> 3=Ordered/Process running -> 4=Received partially -> 5=Received totally -> (reopen) 4=Received partially
|
||||
// -> 7=Canceled/Never received -> (reopen) 3=Process running
|
||||
|
|
@ -123,6 +123,9 @@ class CommandeFournisseur extends CommonOrder
|
|||
// -> 9=Refused -> (reopen) 1=Validated
|
||||
// Note: billed or not is on another field "billed"
|
||||
|
||||
/**
|
||||
* @var int<0,1>
|
||||
*/
|
||||
public $billed;
|
||||
|
||||
/**
|
||||
|
|
@ -161,9 +164,18 @@ class CommandeFournisseur extends CommonOrder
|
|||
*/
|
||||
public $date_commande;
|
||||
|
||||
//For backward compatibility
|
||||
/**
|
||||
* @deprecated Provided or backward compatibility
|
||||
* @var float
|
||||
*/
|
||||
public $remise_percent;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $methode_commande_id;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $methode_commande;
|
||||
|
||||
/**
|
||||
|
|
@ -196,6 +208,9 @@ class CommandeFournisseur extends CommonOrder
|
|||
*/
|
||||
public $total_ttc;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $source;
|
||||
|
||||
/**
|
||||
|
|
@ -259,6 +274,9 @@ class CommandeFournisseur extends CommonOrder
|
|||
*/
|
||||
public $user_approve_id2;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $refuse_note;
|
||||
|
||||
/**
|
||||
|
|
@ -276,8 +294,13 @@ class CommandeFournisseur extends CommonOrder
|
|||
*/
|
||||
public $line;
|
||||
|
||||
// Add for supplier_proposal
|
||||
/**
|
||||
* @var CommonObject Add for supplier_proposal
|
||||
*/
|
||||
public $origin;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $origin_id;
|
||||
public $linked_objects = array();
|
||||
|
||||
|
|
@ -969,7 +992,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
|
||||
if ($user->hasRight("fournisseur", "commande", "read")) {
|
||||
$datas['picto'] = '<u class="paddingrightonly">'.$langs->trans("SupplierOrder").'</u>';
|
||||
if (isset($this->statut)) {
|
||||
if ($this->statut) {
|
||||
$datas['picto'] .= ' '.$this->getLibStatut(5);
|
||||
}
|
||||
if (!empty($this->ref)) {
|
||||
|
|
@ -2523,7 +2546,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
* @since 8.0 Return dispatched quantity (qty).
|
||||
*
|
||||
* @param int $status Filter on stats (-1 = no filter, 0 = lines draft to be approved, 1 = approved lines)
|
||||
* @return array Array of lines
|
||||
* @return array<array{id:int,productid:int,warehouseid:int,qty:float,orderlineid:int}> Array of lines
|
||||
*/
|
||||
public function getDispachedLines($status = -1)
|
||||
{
|
||||
|
|
@ -2574,8 +2597,8 @@ class CommandeFournisseur extends CommonOrder
|
|||
* Set a delivery in database for this supplier order
|
||||
*
|
||||
* @param User $user User that input data
|
||||
* @param integer $date Date of reception
|
||||
* @param string $type Type of receipt ('tot' = total/done, 'par' = partial, 'nev' = never, 'can' = cancel)
|
||||
* @param int $date Date of reception
|
||||
* @param 'tot'|'par'|'nev'|'can' $type Type of receipt ('tot' = total/done, 'par' = partial, 'nev' = never, 'can' = cancel)
|
||||
* @param string $comment Comment
|
||||
* @return int Return integer <0 if KO, >0 if OK
|
||||
*/
|
||||
|
|
@ -2586,6 +2609,7 @@ class CommandeFournisseur extends CommonOrder
|
|||
|
||||
$result = 0;
|
||||
$error = 0;
|
||||
$dispatchedlinearray = array();
|
||||
|
||||
dol_syslog(get_class($this)."::Livraison");
|
||||
|
||||
|
|
@ -2925,9 +2949,9 @@ class CommandeFournisseur extends CommonOrder
|
|||
* @param int $info_bits Miscellaneous information
|
||||
* @param int $type Type of line (0=product, 1=service)
|
||||
* @param int $notrigger Disable triggers
|
||||
* @param integer $date_start Date start of service
|
||||
* @param integer $date_end Date end of service
|
||||
* @param array $array_options Extrafields array
|
||||
* @param int $date_start Date start of service
|
||||
* @param int $date_end Date end of service
|
||||
* @param array<string,mixed|mixed[]> $array_options Extrafields array
|
||||
* @param int|null $fk_unit Code of the unit to use. Null to use the default one
|
||||
* @param int|float $pu_ht_devise Unit price in currency
|
||||
* @param string $ref_supplier Supplier ref
|
||||
|
|
@ -3379,10 +3403,10 @@ class CommandeFournisseur extends CommonOrder
|
|||
*
|
||||
* @param string $modele Force template to use ('' to not force)
|
||||
* @param Translate $outputlangs Object lang to use for traduction
|
||||
* @param int $hidedetails Hide details of lines
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hideref Hide ref
|
||||
* @param null|array $moreparams Array to provide more information
|
||||
* @param int<0,1> $hidedetails Hide details of lines
|
||||
* @param int<0,1> $hidedesc Hide description
|
||||
* @param int<0,1> $hideref Hide ref
|
||||
* @param ?array<string,mixed> $moreparams Array to provide more information
|
||||
* @return int Return integer < 0 if KO, 0 = no doc generated, > 0 if OK
|
||||
*/
|
||||
public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
|
||||
|
|
|
|||
|
|
@ -2595,8 +2595,8 @@ class FactureFournisseur extends CommonInvoice
|
|||
* Return list of replaceable invoices
|
||||
* Status valid or abandoned for other reason + not paid + no payment + not already replaced
|
||||
*
|
||||
* @param int $socid Thirdparty id
|
||||
* @return array|int Table of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
|
||||
* @param int $socid Thirdparty id
|
||||
* @return array<int,array{id:int,ref:string,status:int}>|int<-1,-1> Table of invoices ('id'=>id, 'ref'=>ref, 'status'=>status, 'paymentornot'=>0/1)
|
||||
* <0 if error
|
||||
*/
|
||||
public function list_replacable_supplier_invoices($socid = 0)
|
||||
|
|
@ -2646,7 +2646,7 @@ class FactureFournisseur extends CommonInvoice
|
|||
* (validated + payment in progress) or classified (paid in full or paid in part) + not already replaced + not already having
|
||||
*
|
||||
* @param int $socid Thirdparty id
|
||||
* @return array|int Table of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
|
||||
* @return array<int,array{ref:string,status:int,type:int,paye:int<0,1>,paymentornot:int<0,1>}>|int<-1,-1> Table of invoices ($id => array('ref'=>,'paymentornot'=>,'status'=>,'paye'=>)
|
||||
* <0 if error
|
||||
*/
|
||||
public function list_qualified_avoir_supplier_invoices($socid = 0)
|
||||
|
|
@ -2682,7 +2682,7 @@ class FactureFournisseur extends CommonInvoice
|
|||
}
|
||||
if ($qualified) {
|
||||
$paymentornot = ($obj->fk_paiementfourn ? 1 : 0);
|
||||
$return[$obj->rowid] = array('ref' => $obj->ref, 'status' => $obj->fk_statut, 'type' => $obj->type, 'paye' => $obj->paye, 'paymentornot' => $paymentornot);
|
||||
$return[$obj->rowid] = array('ref' => (string) $obj->ref, 'status' => (int) $obj->fk_statut, 'type' => (int) $obj->type, 'paye' => (int) $obj->paye, 'paymentornot' => (int) $paymentornot);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,7 +54,10 @@ class PaiementFourn extends Paiement
|
|||
*/
|
||||
public $picto = 'payment';
|
||||
|
||||
public $statut; //Status of payment. 0 = unvalidated; 1 = validated
|
||||
/**
|
||||
* @var int Status of payment. 0 = unvalidated; 1 = validated
|
||||
*/
|
||||
public $statut;
|
||||
// fk_paiement dans llx_paiement est l'id du type de paiement (7 pour CHQ, ...)
|
||||
// fk_paiement dans llx_paiement_facture est le rowid du paiement
|
||||
|
||||
|
|
@ -239,6 +242,8 @@ class PaiementFourn extends Paiement
|
|||
|
||||
$totalamount = (float) price2num($totalamount);
|
||||
$totalamount_converted = (float) price2num($totalamount_converted);
|
||||
$mtotal = 0;
|
||||
$total = 0;
|
||||
|
||||
dol_syslog(get_class($this)."::create", LOG_DEBUG);
|
||||
|
||||
|
|
@ -302,7 +307,7 @@ class PaiementFourn extends Paiement
|
|||
// Insert one discount by VAT rate category
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/class/discount.class.php';
|
||||
$discount = new DiscountAbsolute($this->db);
|
||||
$discount->fetch('', 0, $invoice->id);
|
||||
$discount->fetch(0, 0, $invoice->id);
|
||||
if (empty($discount->id)) { // If the invoice was not yet converted into a discount (this may have been done manually before we come here)
|
||||
$discount->discount_type = 1; // Supplier discount
|
||||
$discount->description = '(DEPOSIT)';
|
||||
|
|
@ -565,7 +570,7 @@ class PaiementFourn extends Paiement
|
|||
* Return list of supplier invoices the payment point to
|
||||
*
|
||||
* @param string $filter SQL filter. Warning: This value must not come from a user input.
|
||||
* @return array|int Array of supplier invoice id | <0 si ko
|
||||
* @return array<int,int>|int<-1,-1> Array of supplier invoice id | <0 si ko
|
||||
*/
|
||||
public function getBillsArray($filter = '')
|
||||
{
|
||||
|
|
@ -848,13 +853,13 @@ class PaiementFourn extends Paiement
|
|||
/**
|
||||
* Create a document onto disk according to template model.
|
||||
*
|
||||
* @param string $modele Force template to use ('' to not force)
|
||||
* @param Translate $outputlangs Object lang a utiliser pour traduction
|
||||
* @param int $hidedetails Hide details of lines
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hideref Hide ref
|
||||
* @param null|array $moreparams Array to provide more information
|
||||
* @return int Return integer <0 if KO, 0 if nothing done, >0 if OK
|
||||
* @param string $modele Force template to use ('' to not force)
|
||||
* @param Translate $outputlangs Object lang a utiliser pour traduction
|
||||
* @param int<0,1> $hidedetails Hide details of lines
|
||||
* @param int<0,1> $hidedesc Hide description
|
||||
* @param int<0,1> $hideref Hide ref
|
||||
* @param ?array<string,mixed> $moreparams Array to provide more information
|
||||
* @return int Return integer <0 if KO, 0 if nothing done, >0 if OK
|
||||
*/
|
||||
public function generateDocument($modele, $outputlangs, $hidedetails = 0, $hidedesc = 0, $hideref = 0, $moreparams = null)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -70,6 +70,7 @@ if (isModEnabled('variants')) {
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
@ -84,8 +85,8 @@ if (isModEnabled('incoterm')) {
|
|||
// Get Parameters
|
||||
$id = GETPOSTINT('id');
|
||||
$ref = GETPOST('ref', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$action = GETPOST('action', 'alpha');
|
||||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'purchaseordercard'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||
|
|
@ -1305,7 +1306,7 @@ if (empty($reshook)) {
|
|||
$object->origin_id = $originid;
|
||||
|
||||
// Possibility to add external linked objects with hooks
|
||||
$object->linked_objects [$object->origin] = $object->origin_id;
|
||||
$object->linked_objects[$object->origin] = $object->origin_id;
|
||||
$other_linked_objects = GETPOST('other_linked_objects', 'array');
|
||||
if (!empty($other_linked_objects)) {
|
||||
$object->linked_objects = array_merge($object->linked_objects, $other_linked_objects);
|
||||
|
|
@ -1520,7 +1521,7 @@ if (empty($reshook)) {
|
|||
* View
|
||||
*/
|
||||
|
||||
$form = new Form($db);
|
||||
$form = new Form($db);
|
||||
$formfile = new FormFile($db);
|
||||
$formorder = new FormOrder($db);
|
||||
$productstatic = new Product($db);
|
||||
|
|
@ -1933,7 +1934,7 @@ if ($action == 'create') {
|
|||
$text = $langs->trans('ConfirmValidateOrder', $newref);
|
||||
if (isModEnabled('notification')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
|
||||
$notify = new Notify($db);
|
||||
$notify = new Notify($db);
|
||||
$text .= '<br>';
|
||||
$text .= $notify->confirmMessage('ORDER_SUPPLIER_VALIDATE', $object->socid, $object);
|
||||
}
|
||||
|
|
@ -1970,7 +1971,7 @@ if ($action == 'create') {
|
|||
$text = $langs->trans("ConfirmApproveThisOrder", $object->ref);
|
||||
if (isModEnabled('notification')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
|
||||
$notify = new Notify($db);
|
||||
$notify = new Notify($db);
|
||||
$text .= '<br>';
|
||||
$text .= $notify->confirmMessage('ORDER_SUPPLIER_APPROVE', $object->socid, $object);
|
||||
}
|
||||
|
|
@ -2005,7 +2006,7 @@ if ($action == 'create') {
|
|||
);
|
||||
if (isModEnabled('notification')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
|
||||
$notify = new Notify($db);
|
||||
$notify = new Notify($db);
|
||||
$text .= '<br>';
|
||||
$text .= $notify->confirmMessage('ORDER_SUPPLIER_CANCEL', $object->socid, $object);
|
||||
}
|
||||
|
|
@ -2017,7 +2018,7 @@ if ($action == 'create') {
|
|||
$date_com = dol_mktime(GETPOST('rehour'), GETPOST('remin'), GETPOST('resec'), GETPOST("remonth"), GETPOST("reday"), GETPOST("reyear"));
|
||||
if (isModEnabled('notification')) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/notify.class.php';
|
||||
$notify = new Notify($db);
|
||||
$notify = new Notify($db);
|
||||
$text .= '<br>';
|
||||
$text .= $notify->confirmMessage('ORDER_SUPPLIER_SUBMIT', $object->socid, $object);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ require_once DOL_DOCUMENT_ROOT.'/projet/class/project.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ require_once DOL_DOCUMENT_ROOT . '/core/class/extrafields.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -68,6 +68,7 @@ if (isModEnabled('accounting')) {
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ if (isModEnabled('project')) {
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -54,6 +54,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/discount.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ if (isModEnabled('project')) {
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ require_once DOL_DOCUMENT_ROOT.'/hrm/lib/hrm_skillrank.lib.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
@ -61,7 +62,7 @@ $cancel = GETPOST('cancel', 'aZ09');
|
|||
$contextpage = GETPOST('contextpage', 'aZ') ? GETPOST('contextpage', 'aZ') : 'evaluationcard'; // To manage different context of search
|
||||
$backtopage = GETPOST('backtopage', 'alpha');
|
||||
$backtopageforcancel = GETPOST('backtopageforcancel', 'alpha');
|
||||
$lineid = GETPOSTINT('lineid');
|
||||
$lineid = GETPOSTINT('lineid');
|
||||
|
||||
// Initialize a technical objects
|
||||
$object = new Evaluation($db);
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ require_once DOL_DOCUMENT_ROOT . '/hrm/class/skillrank.class.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -453,16 +453,15 @@ class Import
|
|||
$this->errors[] = "Error ".$this->db->lasterror();
|
||||
}
|
||||
|
||||
/* Not used. This is not a business object. To convert it we must herit from CommonObject
|
||||
if (!$error) {
|
||||
if (!$notrigger) {
|
||||
/* Not used. This is not a business object. To convert it we must herit from CommonObject
|
||||
// Call trigger
|
||||
$result=$this->call_trigger('IMPORT_DELETE',$user);
|
||||
if ($result < 0) $error++;
|
||||
// End call triggers
|
||||
*/
|
||||
}
|
||||
}
|
||||
*/
|
||||
|
||||
// Commit or rollback
|
||||
if ($error) {
|
||||
|
|
|
|||
|
|
@ -148,15 +148,16 @@ $action = GETPOST('action', 'alpha');
|
|||
$confirm = GETPOST('confirm', 'alpha');
|
||||
$step = (GETPOST('step') ? GETPOST('step') : 1);
|
||||
$import_name = GETPOST('import_name');
|
||||
$hexa = GETPOST('hexa');
|
||||
$hexa = GETPOST('hexa');
|
||||
$importmodelid = GETPOSTINT('importmodelid');
|
||||
$excludefirstline = (GETPOST('excludefirstline') ? GETPOST('excludefirstline') : 2);
|
||||
$endatlinenb = (GETPOST('endatlinenb') ? GETPOST('endatlinenb') : '');
|
||||
$endatlinenb = (GETPOST('endatlinenb') ? GETPOST('endatlinenb') : '');
|
||||
$updatekeys = (GETPOST('updatekeys', 'array') ? GETPOST('updatekeys', 'array') : array());
|
||||
$separator = (GETPOST('separator', 'nohtml') ? GETPOST('separator', 'nohtml', 3) : '');
|
||||
$enclosure = (GETPOST('enclosure', 'nohtml') ? GETPOST('enclosure', 'nohtml') : '"'); // We must use 'nohtml' and not 'alphanohtml' because we must accept "
|
||||
$charset = GETPOST('charset', 'aZ09');
|
||||
$separator_used = str_replace('\t', "\t", $separator);
|
||||
$relativepath = '';
|
||||
|
||||
$objimport = new Import($db);
|
||||
$objimport->load_arrays($user, ($step == 1 ? '' : $datatoimport));
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
|
||||
* Copyright (C) 2015-2016 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2024 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -30,8 +31,15 @@
|
|||
|
||||
define('ALLOWED_IF_UPGRADE_UNLOCK_FOUND', 1);
|
||||
include_once 'inc.php';
|
||||
|
||||
global $langs;
|
||||
/**
|
||||
* @var Translate $langs
|
||||
*
|
||||
* @var string $dolibarr_main_db_host
|
||||
* @var string $dolibarr_main_db_port
|
||||
* @var string $dolibarr_main_db_name
|
||||
* @var string $dolibarr_main_db_user
|
||||
* @var string $dolibarr_main_db_pass
|
||||
*/
|
||||
|
||||
$err = 0;
|
||||
$allowinstall = 0;
|
||||
|
|
|
|||
|
|
@ -1,12 +1,12 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
/* Copyright (C) 2004 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
|
||||
* Copyright (C) 2021-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) 2023 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
* Copyright (C) 2024 Vincent de Grandpré <vincent@de-grandpre.quebec>
|
||||
*
|
||||
* 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 +31,18 @@ include_once 'inc.php';
|
|||
if (file_exists($conffile)) {
|
||||
include_once $conffile;
|
||||
}
|
||||
/**
|
||||
* @var Conf $conf
|
||||
* @var Translate $langs
|
||||
*
|
||||
* @var string $dolibarr_main_document_root
|
||||
* @var string $dolibarr_main_db_host
|
||||
* @var string $dolibarr_main_db_port
|
||||
* @var string $dolibarr_main_db_name
|
||||
* @var string $dolibarr_main_db_user
|
||||
* @var string $dolibarr_main_db_pass
|
||||
*/
|
||||
|
||||
require_once $dolibarr_main_document_root.'/core/lib/admin.lib.php';
|
||||
include_once $dolibarr_main_document_root.'/core/lib/images.lib.php';
|
||||
require_once $dolibarr_main_document_root.'/core/class/extrafields.class.php';
|
||||
|
|
@ -40,8 +52,8 @@ $step = 2;
|
|||
$ok = 0;
|
||||
|
||||
|
||||
// Cette page peut etre longue. On augmente le delai autorise.
|
||||
// Ne fonctionne que si on est pas en safe_mode.
|
||||
// This page may be long. We are increasing the time allowed.
|
||||
// Only works if not in safe_mode.
|
||||
$err = error_reporting();
|
||||
error_reporting(0);
|
||||
@set_time_limit(120);
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ require_once DOL_DOCUMENT_ROOT.'/intracommreport/lib/intracommreport.lib.php';
|
|||
* @var Conf $conf
|
||||
* @var DoliDB $db
|
||||
* @var HookManager $hookmanager
|
||||
* @var Societe $mysoc
|
||||
* @var Translate $langs
|
||||
* @var User $user
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -142,7 +142,13 @@ class IntracommReport extends CommonObject
|
|||
* @var string
|
||||
*/
|
||||
public $type_export;
|
||||
/**
|
||||
* @var int|string
|
||||
*/
|
||||
public $datec;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $tms;
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
|
|
@ -152,8 +158,14 @@ class IntracommReport extends CommonObject
|
|||
*/
|
||||
public $label;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $period;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $declaration;
|
||||
|
||||
/**
|
||||
|
|
@ -391,6 +403,7 @@ class IntracommReport extends CommonObject
|
|||
return 0;
|
||||
}
|
||||
|
||||
$categ_fraisdeport = null;
|
||||
if ($exporttype == 'deb' && getDolGlobalInt('INTRACOMMREPORT_CATEG_FRAISDEPORT') > 0) {
|
||||
$categ_fraisdeport = new Categorie($this->db);
|
||||
$categ_fraisdeport->fetch(getDolGlobalString('INTRACOMMREPORT_CATEG_FRAISDEPORT'));
|
||||
|
|
@ -530,7 +543,7 @@ class IntracommReport extends CommonObject
|
|||
* This function adds an item by retrieving the customs code of the product with the highest amount in the invoice
|
||||
*
|
||||
* @param SimpleXMLElement $declaration Reference declaration
|
||||
* @param array $TLinesFraisDePort Data of shipping costs line
|
||||
* @param Object[] $TLinesFraisDePort Data of shipping costs line
|
||||
* @param string $type Declaration type by default - introduction or expedition (always 'expedition' for Des)
|
||||
* @param Categorie $categ_fraisdeport category of shipping costs
|
||||
* @param int $i Line Id
|
||||
|
|
@ -595,11 +608,12 @@ class IntracommReport extends CommonObject
|
|||
$sql .= " FROM ".MAIN_DB_PREFIX.$this->table_element;
|
||||
$sql .= " WHERE exporttype = '".$this->db->escape($this->type_export)."'";
|
||||
$resql = $this->db->query($sql);
|
||||
$res = null;
|
||||
if ($resql) {
|
||||
$res = $this->db->fetch_object($resql);
|
||||
}
|
||||
|
||||
return (string) ($res->max_declaration_number + 1);
|
||||
return (string) ($res !== null ? ($res->max_declaration_number + 1) : '');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
/* TVI
|
||||
* Copyright (C) 2015 Florian HENRY <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
* Copyright (C) 2015 Florian HENRY <florian.henry@open-concept.pro>
|
||||
* Copyright (C) 2020 Maxime DEMAREST <maxime@indelog.fr>
|
||||
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -45,9 +45,9 @@ require DOL_DOCUMENT_ROOT.'/core/lib/loan.lib.php';
|
|||
* @var User $user
|
||||
*/
|
||||
|
||||
$mens = price2num(GETPOST('mens'));
|
||||
$capital = price2num(GETPOST('capital'));
|
||||
$rate = price2num(GETPOST('rate'));
|
||||
$mens = (float) price2num(GETPOST('mens'));
|
||||
$capital = (float) price2num(GETPOST('capital'));
|
||||
$rate = (float) price2num(GETPOST('rate'));
|
||||
$echance = GETPOSTINT('echeance');
|
||||
$nbterm = GETPOSTINT('nbterm');
|
||||
|
||||
|
|
|
|||
|
|
@ -350,7 +350,7 @@ class Loan extends CommonObject
|
|||
// Get bank transaction lines for this loan
|
||||
include_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
|
||||
$account = new Account($this->db);
|
||||
$lines_url = $account->get_url('', $this->id, 'loan');
|
||||
$lines_url = $account->get_url(0, $this->id, 'loan');
|
||||
|
||||
// Delete bank urls
|
||||
foreach ($lines_url as $line_url) {
|
||||
|
|
|
|||
|
|
@ -46,7 +46,13 @@ class LoanSchedule extends CommonObject
|
|||
*/
|
||||
public $fk_loan;
|
||||
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $bank_account;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $bank_line;
|
||||
|
||||
/**
|
||||
|
|
@ -59,9 +65,21 @@ class LoanSchedule extends CommonObject
|
|||
*/
|
||||
public $datep;
|
||||
|
||||
/**
|
||||
* @var float[]
|
||||
*/
|
||||
public $amounts = array(); // Array of amounts
|
||||
public $amount_capital; // Total amount of payment
|
||||
/**
|
||||
* @var null|float|string Total amount of payment
|
||||
*/
|
||||
public $amount_capital;
|
||||
/**
|
||||
* @var null|float|string
|
||||
*/
|
||||
public $amount_insurance;
|
||||
/**
|
||||
* @var null|float|string
|
||||
*/
|
||||
public $amount_interest;
|
||||
|
||||
/**
|
||||
|
|
@ -102,12 +120,19 @@ class LoanSchedule extends CommonObject
|
|||
public $lines = array();
|
||||
|
||||
/**
|
||||
* @deprecated
|
||||
* @deprecated Use $amount, $amounts
|
||||
* @see $amount, $amounts
|
||||
* @var float
|
||||
*/
|
||||
public $total;
|
||||
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_code;
|
||||
/**
|
||||
* @var string
|
||||
*/
|
||||
public $type_label;
|
||||
|
||||
|
||||
|
|
@ -565,9 +590,9 @@ class LoanSchedule extends CommonObject
|
|||
/**
|
||||
* paimenttorecord
|
||||
*
|
||||
* @param int $loanid Loan id
|
||||
* @param int $datemax Date max
|
||||
* @return array Array of id
|
||||
* @param int $loanid Loan id
|
||||
* @param int $datemax Date max
|
||||
* @return int[] Array of id
|
||||
*/
|
||||
public function paimenttorecord($loanid, $datemax)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class PaymentLoan extends CommonObject
|
|||
public $amount_insurance;
|
||||
|
||||
/**
|
||||
* @var float|int
|
||||
* @var null|float|int
|
||||
*/
|
||||
public $amount_interest;
|
||||
|
||||
|
|
@ -116,6 +116,9 @@ class PaymentLoan extends CommonObject
|
|||
* @var string
|
||||
*/
|
||||
public $type_label;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $chid;
|
||||
/**
|
||||
* @var string
|
||||
|
|
@ -131,6 +134,9 @@ class PaymentLoan extends CommonObject
|
|||
* @var int
|
||||
*/
|
||||
public $bank_account;
|
||||
/**
|
||||
* @var int
|
||||
*/
|
||||
public $bank_line;
|
||||
|
||||
|
||||
|
|
@ -552,7 +558,7 @@ class PaymentLoan extends CommonObject
|
|||
$label,
|
||||
$total,
|
||||
$this->num_payment,
|
||||
'',
|
||||
0,
|
||||
$user,
|
||||
$emetteur_nom,
|
||||
$emetteur_banque
|
||||
|
|
|
|||
|
|
@ -56,22 +56,22 @@ class MailmanSpip
|
|||
public $errors = array();
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array<string,string>
|
||||
*/
|
||||
public $mladded_ok;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array<string,string>
|
||||
*/
|
||||
public $mladded_ko;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array<string,string>
|
||||
*/
|
||||
public $mlremoved_ok;
|
||||
|
||||
/**
|
||||
* @var array
|
||||
* @var array<string,string>
|
||||
*/
|
||||
public $mlremoved_ko;
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2018-2023 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2018-2024 Frédéric France <frederic.france@free.fr>
|
||||
* Copyright (C) ---Replace with your own copyright and developer email---
|
||||
*
|
||||
* This program is free software: you can redistribute it and/or modify
|
||||
|
|
|
|||
|
|
@ -2,6 +2,7 @@
|
|||
/* Copyright (C) 2010-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2017 Charlie Benke <charlie@patas-monkey.com>
|
||||
* Copyright (C) 2024 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
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -17,6 +18,14 @@
|
|||
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* @var CommonObject $this
|
||||
* @var Conf $conf
|
||||
* @var Form $form
|
||||
* @var MoLine $line
|
||||
* @var Translate $langs
|
||||
*/
|
||||
|
||||
// Protection to avoid direct call of template
|
||||
if (empty($conf) || !is_object($conf)) {
|
||||
print "Error, template page can't be called as URL";
|
||||
|
|
@ -27,6 +36,8 @@ if (empty($conf) || !is_object($conf)) {
|
|||
|
||||
global $db, $langs;
|
||||
|
||||
/** @var DoliDB $db */
|
||||
|
||||
if (empty($form) || !is_object($form)) {
|
||||
$form = new Form($db);
|
||||
}
|
||||
|
|
@ -42,6 +53,7 @@ if ($line->fk_product > 0) {
|
|||
$tmpproduct->fetch($line->fk_product);
|
||||
}
|
||||
$tmpbom = new BOM($db);
|
||||
$res = 0;
|
||||
if ($line->fk_bom_child > 0) {
|
||||
$res = $tmpbom->fetch($line->fk_bom_child);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
/* Copyright (C) 2022 J-F Bouculat <jfbouculat@gmail.com>
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -144,7 +145,7 @@ class MultiCurrencies extends DolibarrApi
|
|||
public function getByCode($code)
|
||||
{
|
||||
$multicurrency = new MultiCurrency($this->db);
|
||||
if (!$multicurrency->fetch('', $code)) {
|
||||
if (!$multicurrency->fetch(0, $code)) {
|
||||
throw new RestException(404, 'Currency not found');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -713,13 +713,13 @@ class MultiCurrency extends CommonObject
|
|||
/**
|
||||
* Check in database if the current code already exists
|
||||
*
|
||||
* @param string $code current code to search
|
||||
* @return boolean True if exists, false if not exists
|
||||
* @param string $code current code to search
|
||||
* @return bool True if exists, false if not exists
|
||||
*/
|
||||
public function checkCodeAlreadyExists($code)
|
||||
{
|
||||
$currencytmp = new MultiCurrency($this->db);
|
||||
if ($currencytmp->fetch('', $code) > 0) {
|
||||
if ($currencytmp->fetch(0, $code) > 0) {
|
||||
return true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ if (empty($reshook)) {
|
|||
accessforbidden();
|
||||
}
|
||||
|
||||
$result = $object->delete($user, '', $numsondage);
|
||||
$result = $object->delete($user, 0, $numsondage);
|
||||
|
||||
header('Location: '.dol_buildpath('/opensurvey/list.php', 1));
|
||||
exit();
|
||||
|
|
@ -217,7 +217,7 @@ $toutsujet = explode(",", $object->sujet);
|
|||
$listofanswers = array();
|
||||
foreach ($toutsujet as $value) {
|
||||
$tmp = explode('@', $value);
|
||||
$listofanswers[] = array('label'=>$tmp[0], 'format'=>(!empty($tmp[1]) ? $tmp[1] : 'checkbox'));
|
||||
$listofanswers[] = array('label' => $tmp[0], 'format' => (!empty($tmp[1]) ? $tmp[1] : 'checkbox'));
|
||||
}
|
||||
$toutsujet = str_replace("@", "<br>", $toutsujet);
|
||||
$toutsujet = str_replace("°", "'", $toutsujet);
|
||||
|
|
@ -350,7 +350,7 @@ $urlwithroot = $urlwithouturlroot.DOL_URL_ROOT; // This is to use external domai
|
|||
$url = $urlwithroot.'/public/opensurvey/studs.php?sondage='.$object->id_sondage;
|
||||
print '<input type="text" class="quatrevingtpercent" '.($action == 'edit' ? 'disabled' : '').' id="opensurveyurl" name="opensurveyurl" value="'.$url.'">';
|
||||
//if ($action != 'edit') {
|
||||
print ajax_autoselect("opensurveyurl", $url, 'image');
|
||||
print ajax_autoselect("opensurveyurl", $url, 'image');
|
||||
//}
|
||||
|
||||
print '</td></tr>';
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue