Extrafield sur fiche intervention

Bonjour,
je souhaite rajouter des champs supplémentaires dans la fiche d’intervention, pour ce faire je fait un var_dump($Objet),
mais je n’ai aucun elements relatives à la fiche en cours qui s’affichent.
J’ai fais la même chose avec la fiche propal et ça marche, mais la fiche intervention il n’y a rien,
du coup lorsque j’utilise par exemple : $object->array_options[‹ options_XXX ›] dans la fiche d’intervention ça ne marche pas.

Bonjour :slightly_smiling_face:
Pouvez-vous préciser ou vous voulez afficher ces infos?
pdf odt Dolibarr…?

974? Koman i lé ?

Bonjour,
je souhaiterai l’afficher sur le formulaire de dolibarr,
que le calcule se fasse automatiquement lorsque je valide le formulaire.

Désolé j’avais pas vu le « Koman i lé » !!
Lé la !!!

1 « J'aime »

Il faut dans un premier temps ajouter les champs via l’admin :
/dolibarr/admin/fichinter.php

Je ne comprends pas ,
pour ajouter les champs
je vais dans le menu=>[Configuration Modules/Application]=>[Interventions]
puis onglet [Attributs supplémentaires(lignes)].

J’ai fais pareil pour les propals et ça a marcher, je n’ai pas eu à toucher au fichier propal.php.

C’est la bonne méthode (inutile de modifier le fichier php).
Et la constante FICHINTER_DISABLE_DETAILS est-elle activée ?

je n’ai pas surcharger la variable,
si je le fait (c’est a dire le mettre à 1) je n’ai plus de détail de mes interventions !

le var_dump($Objet) me donne :

var_dump($Objet)
object(Fichinter)#81 (89) { ["element"]=> string(9) "fichinter" ["table_element"]=> string(9) "fichinter" ["fk_element"]=> string(12) "fk_fichinter" ["table_element_line"]=> string(12) "fichinterdet" ["picto"]=> string(12) "intervention" ["table_ref_field":protected]=> string(3) "ref" ["socid"]=> string(1) "1" ["author"]=> NULL ["datec"]=> int(1575387201) ["datev"]=> int(1575434768) ["dateo"]=> int(1575327600) ["datee"]=> int(1575327600) ["datet"]=> string(0) "" ["datem"]=> int(1575445603) ["duration"]=> string(4) "3600" ["statut"]=> string(1) "3" ["description"]=> NULL ["fk_contrat"]=> string(1) "0" ["fk_project"]=> string(1) "0" ["extraparams"]=> array(0) { } ["lines"]=> array(1) { [0]=> object(FichinterLigne)#143 (80) { ["db"]=> object(DoliDBMysqli)#30 (19) { ["db"]=> object(mysqli)#31 (19) { ["affected_rows"]=> int(1) ["client_info"]=> string(79) "mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $" ["client_version"]=> int(50012) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { } ["field_count"]=> int(4) ["host_info"]=> string(20) "localhost via TCP/IP" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(21) "5.5.5-10.3.12-MariaDB" ["server_version"]=> int(100312) ["stat"]=> string(141) "Uptime: 267345 Threads: 8 Questions: 124729 Slow queries: 0 Opens: 3641 Flush tables: 1 Open tables: 607 Queries per second avg: 0.466" ["sqlstate"]=> string(5) "00000" ["protocol_version"]=> int(10) ["thread_id"]=> int(3778) ["warning_count"]=> int(0) } ["type"]=> string(6) "mysqli" ["_results":"DoliDBMysqli":private]=> object(mysqli_result)#139 (5) { ["current_field"]=> int(0) ["field_count"]=> int(4) ["lengths"]=> array(4) { [0]=> int(1) [1]=> int(12) [2]=> int(5) [3]=> int(0) } ["num_rows"]=> int(1) ["type"]=> int(0) } ["forcecharset"]=> string(4) "utf8" ["forcecollate"]=> string(15) "utf8_unicode_ci" ["connected"]=> bool(true) ["database_selected"]=> bool(true) ["database_name"]=> string(10) "gestionsap" ["database_user"]=> string(10) "gestionsap" ["database_host"]=> string(9) "localhost" ["database_port"]=> string(4) "3307" ["transaction_opened"]=> int(0) ["lastquery"]=> string(87) "SELECT rowid, ph, quantite, total FROM llx_fichinterdet_extrafields WHERE fk_object = 1" ["lastqueryerror"]=> NULL ["lasterror"]=> NULL ["lasterrno"]=> NULL ["ok"]=> bool(true) ["error"]=> NULL ["_results":"DoliDB":private]=> NULL } ["error"]=> string(0) "" ["fk_fichinter"]=> NULL ["desc"]=> string(37) "Repassage
(Quantité: 8)" ["datei"]=> int(1575327600) ["duration"]=> string(4) "3600" ["rang"]=> string(1) "0" ["element"]=> string(12) "fichinterdet" ["table_element"]=> string(12) "fichinterdet" ["fk_element"]=> string(12) "fk_fichinter" ["id"]=> string(1) "1" ["rowid"]=> NULL ["fk_unit"]=> NULL ["errors"]=> array(0) { } ["table_element_line"]=> string(0) "" ["import_key"]=> NULL ["array_options"]=> array(0) { } ["linkedObjectsIds"]=> NULL ["linkedObjects"]=> NULL ["oldcopy"]=> NULL ["table_ref_field":protected]=> string(0) "" ["context"]=> array(0) { } ["canvas"]=> NULL ["project"]=> NULL ["fk_project"]=> NULL ["projet"]=> NULL ["contact"]=> NULL ["contact_id"]=> NULL ["thirdparty"]=> NULL ["user"]=> NULL ["origin"]=> NULL ["origin_id"]=> NULL ["ref"]=> NULL ["ref_previous"]=> NULL ["ref_next"]=> NULL ["ref_ext"]=> NULL ["statut"]=> NULL ["country"]=> NULL ["country_id"]=> NULL ["country_code"]=> NULL ["state"]=> NULL ["state_id"]=> NULL ["state_code"]=> NULL ["region"]=> NULL ["region_code"]=> NULL ["barcode_type"]=> NULL ["barcode_type_code"]=> NULL ["barcode_type_label"]=> NULL ["barcode_type_coder"]=> NULL ["mode_reglement_id"]=> NULL ["cond_reglement_id"]=> NULL ["cond_reglement"]=> NULL ["fk_delivery_address"]=> NULL ["shipping_method_id"]=> NULL ["modelpdf"]=> NULL ["last_main_doc"]=> NULL ["fk_account"]=> NULL ["note_public"]=> NULL ["note_private"]=> NULL ["note"]=> NULL ["total_ht"]=> NULL ["total_tva"]=> NULL ["total_localtax1"]=> NULL ["total_localtax2"]=> NULL ["total_ttc"]=> NULL ["lines"]=> NULL ["comments"]=> array(0) { } ["fk_incoterms"]=> NULL ["libelle_incoterms"]=> NULL ["location_incoterms"]=> NULL ["name"]=> NULL ["lastname"]=> NULL ["firstname"]=> NULL ["civility_id"]=> NULL ["date_creation"]=> NULL ["date_validation"]=> NULL ["date_modification"]=> NULL ["qty"]=> float(1) ["date"]=> int(1575327600) ["product_type"]=> int(1) } } ["db"]=> object(DoliDBMysqli)#30 (19) { ["db"]=> object(mysqli)#31 (19) { ["affected_rows"]=> int(-1) ["client_info"]=> string(79) "mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $" ["client_version"]=> int(50012) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { } ["field_count"]=> int(4) ["host_info"]=> string(20) "localhost via TCP/IP" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(21) "5.5.5-10.3.12-MariaDB" ["server_version"]=> int(100312) ["stat"]=> string(141) "Uptime: 267345 Threads: 8 Questions: 124729 Slow queries: 0 Opens: 3641 Flush tables: 1 Open tables: 607 Queries per second avg: 0.466" ["sqlstate"]=> string(5) "00000" ["protocol_version"]=> int(10) ["thread_id"]=> int(3778) ["warning_count"]=> int(0) } ["type"]=> string(6) "mysqli" ["_results":"DoliDBMysqli":private]=> object(mysqli_result)#139 (5) { ["current_field"]=> int(0) ["field_count"]=> int(4) ["lengths"]=> array(4) { [0]=> int(1) [1]=> int(12) [2]=> int(5) [3]=> int(0) } ["num_rows"]=> int(1) ["type"]=> int(0) } ["forcecharset"]=> string(4) "utf8" ["forcecollate"]=> string(15) "utf8_unicode_ci" ["connected"]=> bool(true) ["database_selected"]=> bool(true) ["database_name"]=> string(10) "gestionsap" ["database_user"]=> string(10) "gestionsap" ["database_host"]=> string(9) "localhost" ["database_port"]=> string(4) "3307" ["transaction_opened"]=> int(0) ["lastquery"]=> string(87) "SELECT rowid, ph, quantite, total FROM llx_fichinterdet_extrafields WHERE fk_object = 1" ["lastqueryerror"]=> NULL ["lasterror"]=> NULL ["lasterrno"]=> NULL ["ok"]=> bool(true) ["error"]=> NULL ["_results":"DoliDB":private]=> NULL } ["id"]=> string(1) "1" ["error"]=> NULL ["errors"]=> array(0) { } ["import_key"]=> NULL ["array_options"]=> array(0) { } ["linkedObjectsIds"]=> NULL ["linkedObjects"]=> NULL ["oldcopy"]=> NULL ["context"]=> array(0) { } ["canvas"]=> NULL ["project"]=> NULL ["projet"]=> NULL ["contact"]=> NULL ["contact_id"]=> NULL ["thirdparty"]=> object(Societe)#133 (152) { ["element"]=> string(7) "societe" ["table_element"]=> string(7) "societe" ["fk_element"]=> string(6) "fk_soc" ["fieldsforcombobox"]=> string(14) "nom,name_alias" ["childtables":protected]=> array(12) { ["supplier_proposal"]=> string(16) "SupplierProposal" ["propal"]=> string(8) "Proposal" ["commande"]=> string(5) "Order" ["facture"]=> string(7) "Invoice" ["facture_rec"]=> string(24) "RecurringInvoiceTemplate" ["contrat"]=> string(8) "Contract" ["fichinter"]=> string(9) "Fichinter" ["facture_fourn"]=> string(15) "SupplierInvoice" ["commande_fournisseur"]=> string(13) "SupplierOrder" ["projet"]=> string(7) "Project" ["expedition"]=> string(8) "Shipment" ["prelevement_lignes"]=> string(17) "DirectDebitRecord" } ["childtablesoncascade":protected]=> array(17) { [0]=> string(14) "societe_prices" [1]=> string(11) "societe_log" [2]=> string(15) "societe_address" [3]=> string(25) "product_fournisseur_price" [4]=> string(26) "product_customer_price_log" [5]=> string(22) "product_customer_price" [6]=> string(9) "socpeople" [7]=> string(8) "adherent" [8]=> string(15) "societe_account" [9]=> string(11) "societe_rib" [10]=> string(14) "societe_remise" [11]=> string(21) "societe_remise_except" [12]=> string(19) "societe_commerciaux" [13]=> string(9) "categorie" [14]=> string(6) "notify" [15]=> string(10) "notify_def" [16]=> string(10) "actioncomm" } ["picto"]=> string(7) "company" ["ismultientitymanaged"]=> int(1) ["restrictiononfksoc"]=> int(1) ["fields"]=> array(11) { ["rowid"]=> array(8) { ["type"]=> string(7) "integer" ["label"]=> string(11) "TechnicalID" ["enabled"]=> int(1) ["visible"]=> int(-2) ["notnull"]=> int(1) ["index"]=> int(1) ["position"]=> int(1) ["comment"]=> string(2) "Id" } ["nom"]=> array(10) { ["type"]=> string(12) "varchar(128)" ["label"]=> string(4) "Name" ["enabled"]=> int(1) ["visible"]=> int(1) ["notnull"]=> int(1) ["showoncombobox"]=> int(1) ["index"]=> int(1) ["position"]=> int(10) ["searchall"]=> int(1) ["comment"]=> string(19) "Reference of object" } ["name_alias"]=> array(10) { ["type"]=> string(12) "varchar(128)" ["label"]=> string(4) "Name" ["enabled"]=> int(1) ["visible"]=> int(1) ["notnull"]=> int(1) ["showoncombobox"]=> int(1) ["index"]=> int(1) ["position"]=> int(10) ["searchall"]=> int(1) ["comment"]=> string(19) "Reference of object" } ["entity"]=> array(8) { ["type"]=> string(7) "integer" ["label"]=> string(6) "Entity" ["enabled"]=> int(1) ["visible"]=> int(0) ["default"]=> int(1) ["notnull"]=> int(1) ["index"]=> int(1) ["position"]=> int(20) } ["note_public"]=> array(5) { ["type"]=> string(4) "text" ["label"]=> string(10) "NotePublic" ["enabled"]=> int(1) ["visible"]=> int(0) ["position"]=> int(60) } ["note_private"]=> array(5) { ["type"]=> string(4) "text" ["label"]=> string(11) "NotePrivate" ["enabled"]=> int(1) ["visible"]=> int(0) ["position"]=> int(61) } ["datec"]=> array(6) { ["type"]=> string(8) "datetime" ["label"]=> string(12) "DateCreation" ["enabled"]=> int(1) ["visible"]=> int(-2) ["notnull"]=> int(1) ["position"]=> int(500) } ["tms"]=> array(6) { ["type"]=> string(9) "timestamp" ["label"]=> string(16) "DateModification" ["enabled"]=> int(1) ["visible"]=> int(-2) ["notnull"]=> int(1) ["position"]=> int(501) } ["fk_user_creat"]=> array(6) { ["type"]=> string(7) "integer" ["label"]=> string(10) "UserAuthor" ["enabled"]=> int(1) ["visible"]=> int(-2) ["notnull"]=> int(1) ["position"]=> int(510) } ["fk_user_modif"]=> array(6) { ["type"]=> string(7) "integer" ["label"]=> string(9) "UserModif" ["enabled"]=> int(1) ["visible"]=> int(-2) ["notnull"]=> int(-1) ["position"]=> int(511) } ["import_key"]=> array(7) { ["type"]=> string(11) "varchar(14)" ["label"]=> string(8) "ImportId" ["enabled"]=> int(1) ["visible"]=> int(-2) ["notnull"]=> int(-1) ["index"]=> int(1) ["position"]=> int(1000) } } ["entity"]=> string(1) "1" ["nom"]=> string(7) "HOAREAU" ["name"]=> string(7) "HOAREAU" ["name_alias"]=> string(0) "" ["particulier"]=> NULL ["address"]=> string(0) "" ["zip"]=> NULL ["town"]=> NULL ["status"]=> string(1) "1" ["state_id"]=> string(1) "0" ["state_code"]=> NULL ["state"]=> NULL ["region_code"]=> NULL ["region"]=> NULL ["departement_code"]=> NULL ["departement"]=> NULL ["pays"]=> NULL ["phone"]=> NULL ["fax"]=> NULL ["email"]=> NULL ["skype"]=> NULL ["twitter"]=> NULL ["facebook"]=> NULL ["linkedin"]=> NULL ["url"]=> NULL ["barcode"]=> NULL ["idprof1"]=> string(0) "" ["idprof2"]=> string(0) "" ["idprof3"]=> string(0) "" ["idprof4"]=> string(0) "" ["idprof5"]=> string(0) "" ["idprof6"]=> string(0) "" ["prefix_comm"]=> NULL ["tva_assuj"]=> string(1) "1" ["tva_intra"]=> string(0) "" ["localtax1_assuj"]=> NULL ["localtax1_value"]=> string(5) "0.000" ["localtax2_assuj"]=> NULL ["localtax2_value"]=> string(5) "0.000" ["managers"]=> NULL ["capital"]=> NULL ["typent_id"]=> string(1) "0" ["typent_code"]=> string(10) "TE_UNKNOWN" ["effectif"]=> string(0) "" ["effectif_id"]=> NULL ["forme_juridique_code"]=> NULL ["forme_juridique"]=> string(0) "" ["remise_percent"]=> string(0) "" ["remise_supplier_percent"]=> string(1) "0" ["mode_reglement_supplier_id"]=> NULL ["cond_reglement_supplier_id"]=> NULL ["fk_prospectlevel"]=> string(0) "" ["name_bis"]=> NULL ["date_modification"]=> int(1575397936) ["user_modification"]=> string(1) "1" ["date_creation"]=> int(1575387136) ["user_creation"]=> string(1) "1" ["specimen"]=> NULL ["client"]=> string(1) "1" ["prospect"]=> int(0) ["fournisseur"]=> string(1) "0" ["code_client"]=> string(12) "CU1912-00001" ["code_fournisseur"]=> NULL ["code_compta"]=> NULL ["code_compta_client"]=> NULL ["code_compta_fournisseur"]=> NULL ["note"]=> NULL ["note_private"]=> NULL ["note_public"]=> NULL ["stcomm_id"]=> string(1) "0" ["statut_commercial"]=> string(22) "Jamais contacté" ["price_level"]=> NULL ["outstanding_limit"]=> NULL ["order_min_amount"]=> NULL ["supplier_order_min_amount"]=> NULL ["commercial_id"]=> NULL ["parent"]=> NULL ["default_lang"]=> NULL ["ref"]=> string(1) "1" ["ref_int"]=> NULL ["ref_ext"]=> NULL ["import_key"]=> NULL ["webservices_url"]=> NULL ["webservices_key"]=> NULL ["logo"]=> NULL ["logo_small"]=> NULL ["logo_mini"]=> NULL ["array_options"]=> array(0) { } ["fk_incoterms"]=> string(1) "0" ["location_incoterms"]=> NULL ["libelle_incoterms"]=> NULL ["fk_multicurrency"]=> string(1) "0" ["multicurrency_code"]=> string(0) "" ["db"]=> object(DoliDBMysqli)#30 (19) { ["db"]=> object(mysqli)#31 (19) { ["affected_rows"]=> int(-1) ["client_info"]=> string(79) "mysqlnd 5.0.12-dev - 20150407 - $Id: 7cc7cc96e675f6d72e5cf0f267f48e167c2abb23 $" ["client_version"]=> int(50012) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { } ["field_count"]=> int(4) ["host_info"]=> string(20) "localhost via TCP/IP" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(21) "5.5.5-10.3.12-MariaDB" ["server_version"]=> int(100312) ["stat"]=> string(141) "Uptime: 267345 Threads: 8 Questions: 124729 Slow queries: 0 Opens: 3641 Flush tables: 1 Open tables: 607 Queries per second avg: 0.466" ["sqlstate"]=> string(5) "00000" ["protocol_version"]=> int(10) ["thread_id"]=> int(3778) ["warning_count"]=> int(0) } ["type"]=> string(6) "mysqli" ["_results":"DoliDBMysqli":private]=> object(mysqli_result)#139 (5) { ["current_field"]=> int(0) ["field_count"]=> int(4) ["lengths"]=> array(4) { [0]=> int(1) [1]=> int(12) [2]=> int(5) [3]=> int(0) } ["num_rows"]=> int(1) ["type"]=> int(0) } ["forcecharset"]=> string(4) "utf8" ["forcecollate"]=> string(15) "utf8_unicode_ci" ["connected"]=> bool(true) ["database_selected"]=> bool(true) ["database_name"]=> string(10) "gestionsap" ["database_user"]=> string(10) "gestionsap" ["database_host"]=> string(9) "localhost" ["database_port"]=> string(4) "3307" ["transaction_opened"]=> int(0) ["lastquery"]=> string(87) "SELECT rowid, ph, quantite, total FROM llx_fichinterdet_extrafields WHERE fk_object = 1" ["lastqueryerror"]=> NULL ["lasterror"]=> NULL ["lasterrno"]=> NULL ["ok"]=> bool(true) ["error"]=> NULL ["_results":"DoliDB":private]=> NULL } ["id"]=> string(1) "1" ["error"]=> NULL ["errors"]=> array(0) { } ["table_element_line"]=> string(0) "" ["linkedObjectsIds"]=> NULL ["linkedObjects"]=> NULL ["oldcopy"]=> NULL ["table_ref_field":protected]=> string(0) "" ["context"]=> array(0) { } ["canvas"]=> NULL ["project"]=> NULL ["fk_project"]=> NULL ["projet"]=> NULL ["contact"]=> NULL ["contact_id"]=> NULL ["thirdparty"]=> NULL ["user"]=> NULL ["origin"]=> NULL ["origin_id"]=> NULL ["ref_previous"]=> NULL ["ref_next"]=> NULL ["statut"]=> NULL ["country"]=> string(6) "France" ["country_id"]=> string(1) "1" ["country_code"]=> string(2) "FR" ["barcode_type"]=> NULL ["barcode_type_code"]=> NULL ["barcode_type_label"]=> NULL ["barcode_type_coder"]=> NULL ["mode_reglement_id"]=> NULL ["cond_reglement_id"]=> NULL ["cond_reglement"]=> NULL ["fk_delivery_address"]=> NULL ["shipping_method_id"]=> NULL ["modelpdf"]=> NULL ["last_main_doc"]=> NULL ["fk_account"]=> string(1) "0" ["total_ht"]=> NULL ["total_tva"]=> NULL ["total_localtax1"]=> NULL ["total_localtax2"]=> NULL ["total_ttc"]=> NULL ["lines"]=> NULL ["comments"]=> array(0) { } ["lastname"]=> NULL ["firstname"]=> NULL ["civility_id"]=> NULL ["date_validation"]=> NULL } ["user"]=> NULL ["origin"]=> NULL ["origin_id"]=> NULL ["ref"]=> string(11) "FI1912-0002" ["ref_previous"]=> string(11) "FI1912-0001" ["ref_next"]=> NULL ["ref_ext"]=> NULL ["country"]=> NULL ["country_id"]=> NULL ["country_code"]=> NULL ["state"]=> NULL ["state_id"]=> NULL ["state_code"]=> NULL ["region"]=> NULL ["region_code"]=> NULL ["barcode_type"]=> NULL ["barcode_type_code"]=> NULL ["barcode_type_label"]=> NULL ["barcode_type_coder"]=> NULL ["mode_reglement_id"]=> NULL ["cond_reglement_id"]=> NULL ["cond_reglement"]=> NULL ["fk_delivery_address"]=> NULL ["shipping_method_id"]=> NULL ["modelpdf"]=> string(6) "soleil" ["last_main_doc"]=> NULL ["fk_account"]=> NULL ["note_public"]=> NULL ["note_private"]=> NULL ["note"]=> NULL ["total_ht"]=> NULL ["total_tva"]=> NULL ["total_localtax1"]=> NULL ["total_localtax2"]=> NULL ["total_ttc"]=> NULL ["comments"]=> array(0) { } ["fk_incoterms"]=> NULL ["libelle_incoterms"]=> NULL ["location_incoterms"]=> NULL ["name"]=> NULL ["lastname"]=> NULL ["firstname"]=> NULL ["civility_id"]=> NULL ["date_creation"]=> NULL ["date_validation"]=> NULL ["date_modification"]=> NULL ["products"]=> array(0) { } ["user_creation"]=> string(1) "1" ["statuts"]=> array(4) { [0]=> string(9) "Brouillon" [1]=> string(13) "Validé" [2]=> string(14) "Facturé" [3]=> string(4) "Done" } ["statuts_short"]=> array(4) { [0]=> string(9) "Brouillon" [1]=> string(13) "Validé" [2]=> string(14) "Facturé" [3]=> string(4) "Done" } ["statuts_logo"]=> array(4) { [0]=> string(7) "statut0" [1]=> string(7) "statut1" [2]=> string(7) "statut6" [3]=> string(7) "statut6" } ["next_prev_filter"]=> string(0) "" }

si je fais champs calculé : $object->array_options[‹ options_quantite ›]
de façon à ce qu’il reprenne un champ saisi, pour un test,
je n’ai rien , et c’est normal parceque j’ai rien dans ma variable $Objet avec le var_dump

Bonjour,

On est bien d’accord que tu as ajouter le code qui charge les extrafields dans l’object avant le var_dump ?
https://wiki.dolibarr.org/index.php/Extrafields#Load_class_for_extrafields

Load class for extrafields

To use extrafields all pages need include

require_once DOL_DOCUMENT_ROOT.’/core/class/extrafields.class.php’;

Load extrafield array in object

$extrafields = new ExtraFields($db); $extralabels=$extrafields->fetch_name_optionals_label($object->table_element);

$extralabels will be an array with code and label of extrafields. This code must be placed into the class for example into the function « write_file ».

Load extrafield into object

Extrafields are loaded in $object->array_options array.

$object->fetch($rowid); $object->fetch_optionals($rowid,$extralabels);

This code must be placed just after the above.

Bonjour,
lorsque je suis sur mon formulaire je suis sur le fichier : card.php
et dans le fichier card.php il existe bien les codes qui chargent les extrafields, je n’ai pas à les rajouter il y sont déjà :
card.zip (12,9 Ko)

tu verras les codes y sont !

pour tester, je fais un var_dump($Objet) dans :
…/com/propal/card.php
…/fichinter/card.php

je rajoute cela juste après test if de la ligne //Load Object
Bien évidement j’ai créé les mêmes champs et le champs calculé pour propal et fichinter

je retrouve bien des informations saisies dans la propal,
Array ( [options_quant] => 2 [options_ph] => 14.50000000 [options_total] => 0 )

et rien dans fichinter,
comme si la variable $Objet ne chargeait pas les valeurs des champs supplémentaires.