Attributs sup et champs calculés dans Produit

Bonjour,

je vous écrit car je suis dans le néant complet!!!
J’ai cherché sur le wiki, forum, net, j’ai lu de posts à foison concernant les champ calculé mais je n’arrive pas à comprendre !!!

Je deviens fou!

J’ai pensé commencé par un exemple simple pour me faire la main, j’ai ajouté 3 attributs dans produits:

Libellé:Quantité avant
Code de l’attribut: quantiteavant

Libellé:Quantité après
Code de l’attribut: quantiteapres

Libellé:% Perte
Code de l’attribut: pourcentageperte

Capture-1

Je souhaite juste que ‹ % Perte › = (1500-1000)/1500

DONC: pourcentageperte = (quantiteavantquantiteapres) / quantiteavant

Vous me sauvez la vie! Merci par avance

ce qui est fou c’est que j’ai déjà fait cette opération dans d’autres langages mais je ne comprends pas la logique sur une ligne!!!

J’ai bien trouvé ‹ $reloadedobj › à utiliser mais j’ai du mal à comprendre la logique, où bien faut il passer par un module pour si peu!

Salut @tom67000

Vous avez essayer un truc du genre

($object->array_options['quantiteavant'] - $object->array_options['quantiteapres'])  / $object->array_options['quantiteavant']
1 « J'aime »

bonjour @ksar

merci pour cette réponse. Ca ne fonctionne pas.
J’ai aussi testé en enlevant les espaces dans le code, on sait jamais…

Je me demande si j’ai créé les attributs correctement!

A noter que je n’ai pas toucher manuellement au code php ni à la base de donnée

Si vous faites un simple, ça marche ?

($object->array_options['quantiteavant'])
1 « J'aime »

non!!

Ni ce code même ce code
$object->line->array_options[‹ quantiteavant ›]

Par contre quand je fait 10+10 il y a bien 20 dans la case. JE sais c’est idiot mais je devais vérifier!!!

J’ai la version 11.0.4 pour info

Ce code renvoi NULL

var_dump($object->array_options['quantiteavant'])

j’ai vu ce post mais je ne trouve toujours pas :thinking:
lien

Et un
var_dump($object)
Pour voir si les extrafields sont bien chargés dans l’object ?

Si ils ne sont pas chargés, il va falloir les charger :

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);

1 « J'aime »

Merci pour ce retour

J’ai une erreur voici la capture dans la liste des produits

J’ai testé:

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

il renvoi -1

Est ce que je dois faire des tests en me basant sur la base de données?

$object->fetch($rowid); $object->fetch_optionals($rowid,$extralabels);($object->array_options['quantiteavant'])

me renvoi -1!!!

C’est pas une erreure, c’est le résultat du var_dump
Cherchez dans tout cela si il y a le array_option ou une trace des extrafield

ça ne peut pas marcher ainsi il faut pas de ;, tout sur une seule ligne

1 « J'aime »

Il me semble qu’il faille ajouter le préfixe options_ dans la clé du tableau :
($object->array_options[‹ options_quantiteavant ›] - $object->array_options[‹ options_quantiteapres ›]) / $object->array_options[‹ options_quantiteavant ›]

Sur le wiki : Champs personnalises - Dolibarr ERP CRM Wiki paragraphe

Afficher la valeur extrafield

EDIT : comment avoir automatiquement la mise en page de code sur le forum ?

1 « J'aime »

@ksar

merci pour ce retour, voici mon dump. Sous word j’ai mis des coulerus et je vais faire des tests

object(Product)#96 (161) { ["element"]=> string(7) "product" ["table_element"]=> string(7) "product" ["fk_element"]=> string(10) "fk_product" ["childtables":protected]=> array(7) { [0]=> string(20) "supplier_proposaldet" [1]=> string(9) "propaldet" [2]=> string(11) "commandedet" [3]=> string(10) "facturedet" [4]=> string(10) "contratdet" [5]=> string(17) "facture_fourn_det" [6]=> string(23) "commande_fournisseurdet" } ["ismultientitymanaged"]=> int(1) ["table_ref_field":protected]=> string(3) "ref" ["regeximgext"]=> string(42) "\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.xpm|\.xbm" ["libelle"]=> NULL ["label"]=> NULL ["description"]=> NULL ["other"]=> NULL ["type"]=> int(0) ["price"]=> NULL ["price_ttc"]=> NULL ["price_min"]=> NULL ["price_min_ttc"]=> NULL ["price_base_type"]=> NULL ["multiprices"]=> array(0) { } ["multiprices_ttc"]=> array(0) { } ["multiprices_base_type"]=> array(0) { } ["multiprices_min"]=> array(0) { } ["multiprices_min_ttc"]=> array(0) { } ["multiprices_tva_tx"]=> array(0) { } ["multiprices_recuperableonly"]=> array(0) { } ["price_by_qty"]=> NULL ["prices_by_qty"]=> array(0) { } ["prices_by_qty_id"]=> array(0) { } ["prices_by_qty_list"]=> array(0) { } ["default_vat_code"]=> NULL ["tva_tx"]=> NULL ["tva_npr"]=> int(0) ["localtax1_tx"]=> NULL ["localtax2_tx"]=> NULL ["localtax1_type"]=> NULL ["localtax2_type"]=> NULL ["stock_reel"]=> int(0) ["stock_theorique"]=> NULL ["cost_price"]=> NULL ["pmp"]=> NULL ["seuil_stock_alerte"]=> int(0) ["desiredstock"]=> int(0) ["duration_value"]=> NULL ["duration_unit"]=> NULL ["status"]=> int(0) ["status_buy"]=> int(0) ["finished"]=> NULL ["status_batch"]=> int(0) ["customcode"]=> NULL ["url"]=> NULL ["weight"]=> NULL ["weight_units"]=> NULL ["length"]=> NULL ["length_units"]=> NULL ["width"]=> NULL ["width_units"]=> NULL ["height"]=> NULL ["height_units"]=> NULL ["surface"]=> NULL ["surface_units"]=> NULL ["volume"]=> NULL ["volume_units"]=> NULL ["net_measure"]=> NULL ["net_measure_units"]=> NULL ["accountancy_code_sell"]=> NULL ["accountancy_code_sell_intra"]=> NULL ["accountancy_code_sell_export"]=> NULL ["accountancy_code_buy"]=> NULL ["barcode"]=> NULL ["barcode_type"]=> NULL ["barcode_type_code"]=> NULL ["barcodes_extra"]=> array(0) { } ["stats_propale"]=> array(0) { } ["stats_commande"]=> array(0) { } ["stats_contrat"]=> array(0) { } ["stats_facture"]=> array(0) { } ["stats_commande_fournisseur"]=> array(0) { } ["stats_reception"]=> array(0) { } ["stats_mrptoconsume"]=> array(0) { } ["stats_mrptoproduce"]=> array(0) { } ["multilangs"]=> array(0) { } ["imgWidth"]=> NULL ["imgHeight"]=> NULL ["date_creation"]=> NULL ["date_modification"]=> NULL ["product_fourn_id"]=> NULL ["product_id_already_linked"]=> NULL ["nbphoto"]=> int(0) ["stock_warehouse"]=> array(0) { } ["oldcopy"]=> NULL ["fk_default_warehouse"]=> NULL ["fk_price_expression"]=> NULL ["fourn_pu"]=> NULL ["fourn_price_base_type"]=> NULL ["fourn_socid"]=> NULL ["ref_fourn"]=> NULL ["ref_supplier"]=> NULL ["fk_unit"]=> NULL ["price_autogen"]=> int(0) ["fields"]=> array(11) { ["label"]=> array(6) { ["type"]=> string(12) "varchar(255)" ["label"]=> string(5) "Label" ["enabled"]=> int(1) ["visible"]=> int(1) ["notnull"]=> int(1) ["showoncombobox"]=> int(1) } ["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" } ["ref"]=> array(10) { ["type"]=> string(12) "varchar(128)" ["label"]=> string(3) "Ref" ["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) "html" ["label"]=> string(10) "NotePublic" ["enabled"]=> int(1) ["visible"]=> int(0) ["position"]=> int(61) } ["note"]=> array(5) { ["type"]=> string(4) "html" ["label"]=> string(11) "NotePrivate" ["enabled"]=> int(1) ["visible"]=> int(0) ["position"]=> int(62) } ["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_author"]=> array(7) { ["type"]=> string(7) "integer" ["label"]=> string(10) "UserAuthor" ["enabled"]=> int(1) ["visible"]=> int(-2) ["notnull"]=> int(1) ["position"]=> int(510) ["foreignkey"]=> string(14) "llx_user.rowid" } ["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(0) ["position"]=> int(1000) } } ["db"]=> object(TraceableDB)#89 (21) { ["db"]=> object(DoliDBMysqli)#31 (19) { ["db"]=> object(mysqli)#32 (19) { ["affected_rows"]=> int(0) ["client_info"]=> string(79) "mysqlnd 5.0.12-dev - 20150407 - $Id: 3591daad22de08524295e1bd073aceeff11e6579 $" ["client_version"]=> int(50012) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { } ["field_count"]=> int(20) ["host_info"]=> string(25) "Localhost via UNIX socket" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(21) "5.5.5-10.2.31-MariaDB" ["server_version"]=> int(100231) ["stat"]=> string(156) "Uptime: 1839120 Threads: 145 Questions: 813012789 Slow queries: 598 Opens: 7542844 Flush tables: 41 Open tables: 2000 Queries per second avg: 442.066" ["sqlstate"]=> string(5) "00000" ["protocol_version"]=> int(10) ["thread_id"]=> int(9064190) ["warning_count"]=> int(0) } ["type"]=> string(6) "mysqli" ["_results":"DoliDBMysqli":private]=> object(mysqli_result)#148 (5) { ["current_field"]=> int(0) ["field_count"]=> int(20) ["lengths"]=> NULL ["num_rows"]=> int(0) ["type"]=> int(0) } ["forcecharset"]=> string(6) "latin1" ["forcecollate"]=> string(17) "latin1_swedish_ci" ["connected"]=> bool(true) ["database_selected"]=> bool(true) ["database_name"]=> string(17) "jeanmmke_dolibarr" ["database_user"]=> string(14) "jeanmmke_admin" ["database_host"]=> string(9) "localhost" ["database_port"]=> string(4) "3306" ["transaction_opened"]=> int(0) ["lastquery"]=> string(236) "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,langs,list,totalizable,fielddefault,fieldcomputed,entity,enabled,help FROM llx_extrafields WHERE elementtype = 'societe' ORDER BY pos" ["lastqueryerror"]=> NULL ["lasterror"]=> NULL ["lasterrno"]=> NULL ["ok"]=> bool(true) ["error"]=> NULL ["_results":"DoliDB":private]=> NULL } ["queries"]=> array(18) { [0]=> array(6) { ["sql"]=> string(127) "SELECT transkey, transvalue FROM llx_overwrite_trans where lang='fr_FR' OR lang IS NULL AND entity IN (0, 1) ORDER BY lang DESC" ["duration"]=> float(0.0059809684753418) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [1]=> array(6) { ["sql"]=> string(297) "SELECT m.rowid, m.type, m.module, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.url, m.titre, m.langs, m.perms, m.enabled, m.target, m.mainmenu, m.leftmenu, m.position FROM llx_menu as m WHERE m.entity IN (0,1) AND m.menu_handler IN ('eldy','all') AND m.usertype IN (0,2) ORDER BY m.position, m.rowid" ["duration"]=> float(0.00026583671569824) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [2]=> array(6) { ["sql"]=> string(236) "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,langs,list,totalizable,fielddefault,fieldcomputed,entity,enabled,help FROM llx_extrafields WHERE elementtype = 'product' ORDER BY pos" ["duration"]=> float(0.0028860569000244) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [3]=> array(6) { ["sql"]=> string(1526) "SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.entity, p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.datec as date_creation, p.tms as date_update, p.pmp, p.stock, p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units, MIN(pfp.unitprice) as minsellprice, ef.quantiteavant as options_quantiteavant, ef.quantiteapres as options_quantiteapres, ef.pourcentageperte as options_pourcentageperte FROM llx_product as p LEFT JOIN llx_product_extrafields as ef on (p.rowid = ef.fk_object) LEFT JOIN llx_product_fournisseur_price as pfp ON p.rowid = pfp.fk_product WHERE p.entity IN (1) AND p.fk_product_type <> 1 GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock, p.datec, p.tms, p.entity, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.pmp, p.stock, p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units, ef.quantiteavant, ef.quantiteapres, ef.pourcentageperte ORDER BY p.ref ASC" ["duration"]=> float(0.0043330192565918) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [4]=> array(6) { ["sql"]=> string(1536) "SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.entity, p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.datec as date_creation, p.tms as date_update, p.pmp, p.stock, p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units, MIN(pfp.unitprice) as minsellprice, ef.quantiteavant as options_quantiteavant, ef.quantiteapres as options_quantiteapres, ef.pourcentageperte as options_pourcentageperte FROM llx_product as p LEFT JOIN llx_product_extrafields as ef on (p.rowid = ef.fk_object) LEFT JOIN llx_product_fournisseur_price as pfp ON p.rowid = pfp.fk_product WHERE p.entity IN (1) AND p.fk_product_type <> 1 GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock, p.datec, p.tms, p.entity, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.pmp, p.stock, p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units, ef.quantiteavant, ef.quantiteapres, ef.pourcentageperte ORDER BY p.ref ASC LIMIT 26 " ["duration"]=> float(0.0022969245910645) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [5]=> array(6) { ["sql"]=> string(140) "SELECT rowid, title, url, target FROM llx_bookmark WHERE (fk_user = 1 OR fk_user is NULL OR fk_user = 0) AND entity IN (1) ORDER BY position" ["duration"]=> float(0.00027108192443848) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [6]=> array(6) { ["sql"]=> string(104) "SELECT fk_parent as id_parent, rowid as id_son FROM llx_categorie WHERE fk_parent != 0 AND entity IN (1)" ["duration"]=> float(0.00088000297546387) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [7]=> array(6) { ["sql"]=> string(141) "SELECT DISTINCT c.rowid, c.label, c.description, c.color, c.fk_parent, c.visible FROM llx_categorie as c WHERE c.entity IN (1) AND c.type = 0" ["duration"]=> float(0.00078511238098145) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [8]=> array(6) { ["sql"]=> string(161) "SELECT ps.rowid, ps.reel, ps.fk_entrepot FROM llx_product_stock as ps, llx_entrepot as w WHERE w.entity IN (1) AND w.rowid = ps.fk_entrepot AND ps.fk_product = 1" ["duration"]=> float(0.0011560916900635) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [9]=> array(6) { ["sql"]=> string(311) "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb, COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty FROM llx_commandedet as cd, llx_commande as c, llx_societe as s WHERE c.rowid = cd.fk_commande AND c.fk_soc = s.rowid AND c.entity IN (1) AND cd.fk_product = 1 AND c.fk_statut in (1,2)" ["duration"]=> float(0.001317024230957) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [10]=> array(6) { ["sql"]=> string(446) "SELECT COUNT(DISTINCT e.fk_soc) as nb_customers, COUNT(DISTINCT e.rowid) as nb, COUNT(ed.rowid) as nb_rows, SUM(ed.qty) as qty FROM llx_expeditiondet as ed, llx_commandedet as cd, llx_commande as c, llx_expedition as e, llx_societe as s WHERE e.rowid = ed.fk_expedition AND c.rowid = cd.fk_commande AND e.fk_soc = s.rowid AND e.entity IN (1) AND ed.fk_origin_line = cd.rowid AND cd.fk_product = 1 AND c.fk_statut in (1,2) AND e.fk_statut IN (1,2)" ["duration"]=> float(0.0011501312255859) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [11]=> array(6) { ["sql"]=> string(339) "SELECT COUNT(DISTINCT c.fk_soc) as nb_suppliers, COUNT(DISTINCT c.rowid) as nb, COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty FROM llx_commande_fournisseurdet as cd, llx_commande_fournisseur as c, llx_societe as s WHERE c.rowid = cd.fk_commande AND c.fk_soc = s.rowid AND c.entity IN (1) AND cd.fk_product = 1 AND c.fk_statut in (1,2,3,4)" ["duration"]=> float(0.0015871524810791) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [12]=> array(6) { ["sql"]=> string(346) "SELECT COUNT(DISTINCT cf.fk_soc) as nb_suppliers, COUNT(DISTINCT cf.rowid) as nb, COUNT(fd.rowid) as nb_rows, SUM(fd.qty) as qty FROM llx_commande_fournisseur_dispatch as fd, llx_commande_fournisseur as cf, llx_societe as s WHERE cf.rowid = fd.fk_commande AND cf.fk_soc = s.rowid AND cf.entity IN (1) AND fd.fk_product = 1 AND cf.fk_statut in (4)" ["duration"]=> float(0.00087714195251465) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [13]=> array(6) { ["sql"]=> string(160) "SELECT t.rowid, t.code, t.label, t.short_label, t.unit_type, t.scale, t.active FROM llx_c_units as t WHERE (t.scale=0 AND t.unit_type = 'weight' AND t.active=1)" ["duration"]=> float(0.00088405609130859) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [14]=> array(6) { ["sql"]=> string(242) " SELECT rowid, label, entity, filename, filepath, fullpath_orig, keywords, cover, gen_or_uploaded, extraparams, date_c, date_m, fk_user_c, fk_user_m, acl, position, share FROM llx_ecm_files WHERE filepath = 'produit/Farine_T55' AND entity = 1" ["duration"]=> float(0.0020449161529541) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [15]=> array(6) { ["sql"]=> string(545) "SELECT s.nom as supplier_name, s.rowid as fourn_id, pfp.rowid as product_fourn_price_id, pfp.ref_fourn, pfp.price, pfp.quantity, pfp.unitprice, pfp.tva_tx, pfp.charges, pfp.remise, pfp.remise_percent, pfp.fk_supplier_price_expression, pfp.delivery_time_days ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code FROM llx_societe as s, llx_product_fournisseur_price as pfp WHERE s.entity IN (1) AND pfp.entity = 1 AND pfp.fk_product = 1 AND pfp.fk_soc = s.rowid AND s.status = 1" ["duration"]=> float(0.00092220306396484) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [16]=> array(6) { ["sql"]=> string(2079) "SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as date_creation, s.prefix_comm, s.status, s.price_level, s.tms as date_modification, s.fk_user_creat, s.fk_user_modif, s.phone, s.fax, s.email, s.socialnetworks, s.url, s.zip, s.town, s.note_private, s.note_public, s.model_pdf, s.client, s.fournisseur, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6, s.capital, s.tva_intra, s.fk_typent as typent_id, s.fk_effectif as effectif_id, s.fk_forme_juridique as forme_juridique_code, s.webservices_url, s.webservices_key, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode, s.fk_departement as state_id, s.fk_pays as country_id, s.fk_stcomm, s.remise_supplier, s.mode_reglement, s.cond_reglement, s.fk_account, s.tva_assuj, s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo, s.logo_squarred, s.fk_shipping_method, s.outstanding_limit, s.import_key, s.canvas, s.fk_incoterms, s.location_incoterms, s.order_min_amount, s.supplier_order_min_amount, s.fk_multicurrency, s.multicurrency_code, fj.libelle as forme_juridique, e.libelle as effectif, c.code as country_code, c.label as country, d.code_departement as state_code, d.nom as state, st.libelle as stcomm, te.code as typent_code, i.libelle as label_incoterms, sr.remise_client FROM llx_societe as s LEFT JOIN llx_c_effectif as e ON s.fk_effectif = e.id LEFT JOIN llx_c_country as c ON s.fk_pays = c.rowid LEFT JOIN llx_c_stcomm as st ON s.fk_stcomm = st.id LEFT JOIN llx_c_forme_juridique as fj ON s.fk_forme_juridique = fj.code LEFT JOIN llx_c_departements as d ON s.fk_departement = d.rowid LEFT JOIN llx_c_typent as te ON s.fk_typent = te.id LEFT JOIN llx_c_incoterms as i ON s.fk_incoterms = i.rowid LEFT JOIN llx_societe_remise as sr ON sr.rowid = (SELECT MAX(rowid) FROM llx_societe_remise WHERE fk_soc = s.rowid AND entity IN (1)) WHERE s.entity IN (1) AND s.rowid = 1" ["duration"]=> float(0.0045170783996582) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [17]=> array(6) { ["sql"]=> string(236) "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,langs,list,totalizable,fielddefault,fieldcomputed,entity,enabled,help FROM llx_extrafields WHERE elementtype = 'societe' ORDER BY pos" ["duration"]=> float(0.00057816505432129) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } } ["startTime":protected]=> float(1589543002.6129) ["startMemory":protected]=> int(6291456) ["type"]=> string(6) "mysqli" ["forcecharset"]=> string(4) "utf8" ["forcecollate"]=> string(15) "utf8_unicode_ci" ["_results":"DoliDB":private]=> NULL ["connected"]=> NULL ["database_selected"]=> NULL ["database_name"]=> NULL ["database_user"]=> NULL ["database_host"]=> NULL ["database_port"]=> NULL ["transaction_opened"]=> NULL ["lastquery"]=> NULL ["lastqueryerror"]=> NULL ["lasterror"]=> NULL ["lasterrno"]=> NULL ["ok"]=> NULL ["error"]=> NULL } ["id"]=> NULL ["error"]=> NULL ["errors"]=> array(0) { } ["table_element_line"]=> string(0) "" ["import_key"]=> NULL ["array_options"]=> array(0) { } ["linkedObjectsIds"]=> NULL ["linkedObjects"]=> NULL ["context"]=> array(0) { } ["canvas"]=> string(0) "" ["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_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 ["label_incoterms"]=> NULL ["location_incoterms"]=> NULL ["name"]=> NULL ["lastname"]=> NULL ["firstname"]=> NULL ["civility_id"]=> NULL ["date_validation"]=> NULL ["next_prev_filter"]=> NULL }

Bonjour moi aussi je cherche.

il faut taper manuellement (sans les espaces):

[ CODE ]

[ / CODE ]

c’est le dump brut:

object(Product)#96 (161) { ["element"]=> string(7) "product" ["table_element"]=> string(7) "product" ["fk_element"]=> string(10) "fk_product" ["childtables":protected]=> array(7) { [0]=> string(20) "supplier_proposaldet" [1]=> string(9) "propaldet" [2]=> string(11) "commandedet" [3]=> string(10) "facturedet" [4]=> string(10) "contratdet" [5]=> string(17) "facture_fourn_det" [6]=> string(23) "commande_fournisseurdet" } ["ismultientitymanaged"]=> int(1) ["table_ref_field":protected]=> string(3) "ref" ["regeximgext"]=> string(42) "\.gif|\.jpg|\.jpeg|\.png|\.bmp|\.xpm|\.xbm" ["libelle"]=> NULL ["label"]=> NULL ["description"]=> NULL ["other"]=> NULL ["type"]=> int(0) ["price"]=> NULL ["price_ttc"]=> NULL ["price_min"]=> NULL ["price_min_ttc"]=> NULL ["price_base_type"]=> NULL ["multiprices"]=> array(0) { } ["multiprices_ttc"]=> array(0) { } ["multiprices_base_type"]=> array(0) { } ["multiprices_min"]=> array(0) { } ["multiprices_min_ttc"]=> array(0) { } ["multiprices_tva_tx"]=> array(0) { } ["multiprices_recuperableonly"]=> array(0) { } ["price_by_qty"]=> NULL ["prices_by_qty"]=> array(0) { } ["prices_by_qty_id"]=> array(0) { } ["prices_by_qty_list"]=> array(0) { } ["default_vat_code"]=> NULL ["tva_tx"]=> NULL ["tva_npr"]=> int(0) ["localtax1_tx"]=> NULL ["localtax2_tx"]=> NULL ["localtax1_type"]=> NULL ["localtax2_type"]=> NULL ["stock_reel"]=> int(0) ["stock_theorique"]=> NULL ["cost_price"]=> NULL ["pmp"]=> NULL ["seuil_stock_alerte"]=> int(0) ["desiredstock"]=> int(0) ["duration_value"]=> NULL ["duration_unit"]=> NULL ["status"]=> int(0) ["status_buy"]=> int(0) ["finished"]=> NULL ["status_batch"]=> int(0) ["customcode"]=> NULL ["url"]=> NULL ["weight"]=> NULL ["weight_units"]=> NULL ["length"]=> NULL ["length_units"]=> NULL ["width"]=> NULL ["width_units"]=> NULL ["height"]=> NULL ["height_units"]=> NULL ["surface"]=> NULL ["surface_units"]=> NULL ["volume"]=> NULL ["volume_units"]=> NULL ["net_measure"]=> NULL ["net_measure_units"]=> NULL ["accountancy_code_sell"]=> NULL ["accountancy_code_sell_intra"]=> NULL ["accountancy_code_sell_export"]=> NULL ["accountancy_code_buy"]=> NULL ["barcode"]=> NULL ["barcode_type"]=> NULL ["barcode_type_code"]=> NULL ["barcodes_extra"]=> array(0) { } ["stats_propale"]=> array(0) { } ["stats_commande"]=> array(0) { } ["stats_contrat"]=> array(0) { } ["stats_facture"]=> array(0) { } ["stats_commande_fournisseur"]=> array(0) { } ["stats_reception"]=> array(0) { } ["stats_mrptoconsume"]=> array(0) { } ["stats_mrptoproduce"]=> array(0) { } ["multilangs"]=> array(0) { } ["imgWidth"]=> NULL ["imgHeight"]=> NULL ["date_creation"]=> NULL ["date_modification"]=> NULL ["product_fourn_id"]=> NULL ["product_id_already_linked"]=> NULL ["nbphoto"]=> int(0) ["stock_warehouse"]=> array(0) { } ["oldcopy"]=> NULL ["fk_default_warehouse"]=> NULL ["fk_price_expression"]=> NULL ["fourn_pu"]=> NULL ["fourn_price_base_type"]=> NULL ["fourn_socid"]=> NULL ["ref_fourn"]=> NULL ["ref_supplier"]=> NULL ["fk_unit"]=> NULL ["price_autogen"]=> int(0) ["fields"]=> array(11) { ["label"]=> array(6) { ["type"]=> string(12) "varchar(255)" ["label"]=> string(5) "Label" ["enabled"]=> int(1) ["visible"]=> int(1) ["notnull"]=> int(1) ["showoncombobox"]=> int(1) } ["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" } ["ref"]=> array(10) { ["type"]=> string(12) "varchar(128)" ["label"]=> string(3) "Ref" ["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) "html" ["label"]=> string(10) "NotePublic" ["enabled"]=> int(1) ["visible"]=> int(0) ["position"]=> int(61) } ["note"]=> array(5) { ["type"]=> string(4) "html" ["label"]=> string(11) "NotePrivate" ["enabled"]=> int(1) ["visible"]=> int(0) ["position"]=> int(62) } ["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_author"]=> array(7) { ["type"]=> string(7) "integer" ["label"]=> string(10) "UserAuthor" ["enabled"]=> int(1) ["visible"]=> int(-2) ["notnull"]=> int(1) ["position"]=> int(510) ["foreignkey"]=> string(14) "llx_user.rowid" } ["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(0) ["position"]=> int(1000) } } ["db"]=> object(TraceableDB)#89 (21) { ["db"]=> object(DoliDBMysqli)#31 (19) { ["db"]=> object(mysqli)#32 (19) { ["affected_rows"]=> int(0) ["client_info"]=> string(79) "mysqlnd 5.0.12-dev - 20150407 - $Id: 3591daad22de08524295e1bd073aceeff11e6579 $" ["client_version"]=> int(50012) ["connect_errno"]=> int(0) ["connect_error"]=> NULL ["errno"]=> int(0) ["error"]=> string(0) "" ["error_list"]=> array(0) { } ["field_count"]=> int(20) ["host_info"]=> string(25) "Localhost via UNIX socket" ["info"]=> NULL ["insert_id"]=> int(0) ["server_info"]=> string(21) "5.5.5-10.2.31-MariaDB" ["server_version"]=> int(100231) ["stat"]=> string(156) "Uptime: 1839120 Threads: 145 Questions: 813012789 Slow queries: 598 Opens: 7542844 Flush tables: 41 Open tables: 2000 Queries per second avg: 442.066" ["sqlstate"]=> string(5) "00000" ["protocol_version"]=> int(10) ["thread_id"]=> int(9064190) ["warning_count"]=> int(0) } ["type"]=> string(6) "mysqli" ["_results":"DoliDBMysqli":private]=> object(mysqli_result)#148 (5) { ["current_field"]=> int(0) ["field_count"]=> int(20) ["lengths"]=> NULL ["num_rows"]=> int(0) ["type"]=> int(0) } ["forcecharset"]=> string(6) "latin1" ["forcecollate"]=> string(17) "latin1_swedish_ci" ["connected"]=> bool(true) ["database_selected"]=> bool(true) ["database_name"]=> string(17) "jeanmmke_dolibarr" ["database_user"]=> string(14) "jeanmmke_admin" ["database_host"]=> string(9) "localhost" ["database_port"]=> string(4) "3306" ["transaction_opened"]=> int(0) ["lastquery"]=> string(236) "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,langs,list,totalizable,fielddefault,fieldcomputed,entity,enabled,help FROM llx_extrafields WHERE elementtype = 'societe' ORDER BY pos" ["lastqueryerror"]=> NULL ["lasterror"]=> NULL ["lasterrno"]=> NULL ["ok"]=> bool(true) ["error"]=> NULL ["_results":"DoliDB":private]=> NULL } ["queries"]=> array(18) { [0]=> array(6) { ["sql"]=> string(127) "SELECT transkey, transvalue FROM llx_overwrite_trans where lang='fr_FR' OR lang IS NULL AND entity IN (0, 1) ORDER BY lang DESC" ["duration"]=> float(0.0059809684753418) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [1]=> array(6) { ["sql"]=> string(297) "SELECT m.rowid, m.type, m.module, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.url, m.titre, m.langs, m.perms, m.enabled, m.target, m.mainmenu, m.leftmenu, m.position FROM llx_menu as m WHERE m.entity IN (0,1) AND m.menu_handler IN ('eldy','all') AND m.usertype IN (0,2) ORDER BY m.position, m.rowid" ["duration"]=> float(0.00026583671569824) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [2]=> array(6) { ["sql"]=> string(236) "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,langs,list,totalizable,fielddefault,fieldcomputed,entity,enabled,help FROM llx_extrafields WHERE elementtype = 'product' ORDER BY pos" ["duration"]=> float(0.0028860569000244) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [3]=> array(6) { ["sql"]=> string(1526) "SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.entity, p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.datec as date_creation, p.tms as date_update, p.pmp, p.stock, p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units, MIN(pfp.unitprice) as minsellprice, ef.quantiteavant as options_quantiteavant, ef.quantiteapres as options_quantiteapres, ef.pourcentageperte as options_pourcentageperte FROM llx_product as p LEFT JOIN llx_product_extrafields as ef on (p.rowid = ef.fk_object) LEFT JOIN llx_product_fournisseur_price as pfp ON p.rowid = pfp.fk_product WHERE p.entity IN (1) AND p.fk_product_type <> 1 GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock, p.datec, p.tms, p.entity, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.pmp, p.stock, p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units, ef.quantiteavant, ef.quantiteapres, ef.pourcentageperte ORDER BY p.ref ASC" ["duration"]=> float(0.0043330192565918) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [4]=> array(6) { ["sql"]=> string(1536) "SELECT DISTINCT p.rowid, p.ref, p.label, p.fk_product_type, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.entity, p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.datec as date_creation, p.tms as date_update, p.pmp, p.stock, p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units, MIN(pfp.unitprice) as minsellprice, ef.quantiteavant as options_quantiteavant, ef.quantiteapres as options_quantiteapres, ef.pourcentageperte as options_pourcentageperte FROM llx_product as p LEFT JOIN llx_product_extrafields as ef on (p.rowid = ef.fk_object) LEFT JOIN llx_product_fournisseur_price as pfp ON p.rowid = pfp.fk_product WHERE p.entity IN (1) AND p.fk_product_type <> 1 GROUP BY p.rowid, p.ref, p.label, p.barcode, p.price, p.tva_tx, p.price_ttc, p.price_base_type, p.fk_product_type, p.duration, p.tosell, p.tobuy, p.seuil_stock_alerte, p.desiredstock, p.datec, p.tms, p.entity, p.tobatch, p.accountancy_code_sell, p.accountancy_code_sell_intra, p.accountancy_code_sell_export, p.accountancy_code_buy, p.pmp, p.stock, p.weight, p.weight_units, p.length, p.length_units, p.surface, p.surface_units, p.volume, p.volume_units, p.width, p.width_units, p.height, p.height_units, ef.quantiteavant, ef.quantiteapres, ef.pourcentageperte ORDER BY p.ref ASC LIMIT 26 " ["duration"]=> float(0.0022969245910645) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [5]=> array(6) { ["sql"]=> string(140) "SELECT rowid, title, url, target FROM llx_bookmark WHERE (fk_user = 1 OR fk_user is NULL OR fk_user = 0) AND entity IN (1) ORDER BY position" ["duration"]=> float(0.00027108192443848) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [6]=> array(6) { ["sql"]=> string(104) "SELECT fk_parent as id_parent, rowid as id_son FROM llx_categorie WHERE fk_parent != 0 AND entity IN (1)" ["duration"]=> float(0.00088000297546387) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [7]=> array(6) { ["sql"]=> string(141) "SELECT DISTINCT c.rowid, c.label, c.description, c.color, c.fk_parent, c.visible FROM llx_categorie as c WHERE c.entity IN (1) AND c.type = 0" ["duration"]=> float(0.00078511238098145) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [8]=> array(6) { ["sql"]=> string(161) "SELECT ps.rowid, ps.reel, ps.fk_entrepot FROM llx_product_stock as ps, llx_entrepot as w WHERE w.entity IN (1) AND w.rowid = ps.fk_entrepot AND ps.fk_product = 1" ["duration"]=> float(0.0011560916900635) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [9]=> array(6) { ["sql"]=> string(311) "SELECT COUNT(DISTINCT c.fk_soc) as nb_customers, COUNT(DISTINCT c.rowid) as nb, COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty FROM llx_commandedet as cd, llx_commande as c, llx_societe as s WHERE c.rowid = cd.fk_commande AND c.fk_soc = s.rowid AND c.entity IN (1) AND cd.fk_product = 1 AND c.fk_statut in (1,2)" ["duration"]=> float(0.001317024230957) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [10]=> array(6) { ["sql"]=> string(446) "SELECT COUNT(DISTINCT e.fk_soc) as nb_customers, COUNT(DISTINCT e.rowid) as nb, COUNT(ed.rowid) as nb_rows, SUM(ed.qty) as qty FROM llx_expeditiondet as ed, llx_commandedet as cd, llx_commande as c, llx_expedition as e, llx_societe as s WHERE e.rowid = ed.fk_expedition AND c.rowid = cd.fk_commande AND e.fk_soc = s.rowid AND e.entity IN (1) AND ed.fk_origin_line = cd.rowid AND cd.fk_product = 1 AND c.fk_statut in (1,2) AND e.fk_statut IN (1,2)" ["duration"]=> float(0.0011501312255859) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [11]=> array(6) { ["sql"]=> string(339) "SELECT COUNT(DISTINCT c.fk_soc) as nb_suppliers, COUNT(DISTINCT c.rowid) as nb, COUNT(cd.rowid) as nb_rows, SUM(cd.qty) as qty FROM llx_commande_fournisseurdet as cd, llx_commande_fournisseur as c, llx_societe as s WHERE c.rowid = cd.fk_commande AND c.fk_soc = s.rowid AND c.entity IN (1) AND cd.fk_product = 1 AND c.fk_statut in (1,2,3,4)" ["duration"]=> float(0.0015871524810791) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [12]=> array(6) { ["sql"]=> string(346) "SELECT COUNT(DISTINCT cf.fk_soc) as nb_suppliers, COUNT(DISTINCT cf.rowid) as nb, COUNT(fd.rowid) as nb_rows, SUM(fd.qty) as qty FROM llx_commande_fournisseur_dispatch as fd, llx_commande_fournisseur as cf, llx_societe as s WHERE cf.rowid = fd.fk_commande AND cf.fk_soc = s.rowid AND cf.entity IN (1) AND fd.fk_product = 1 AND cf.fk_statut in (4)" ["duration"]=> float(0.00087714195251465) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [13]=> array(6) { ["sql"]=> string(160) "SELECT t.rowid, t.code, t.label, t.short_label, t.unit_type, t.scale, t.active FROM llx_c_units as t WHERE (t.scale=0 AND t.unit_type = 'weight' AND t.active=1)" ["duration"]=> float(0.00088405609130859) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [14]=> array(6) { ["sql"]=> string(242) " SELECT rowid, label, entity, filename, filepath, fullpath_orig, keywords, cover, gen_or_uploaded, extraparams, date_c, date_m, fk_user_c, fk_user_m, acl, position, share FROM llx_ecm_files WHERE filepath = 'produit/Farine_T55' AND entity = 1" ["duration"]=> float(0.0020449161529541) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [15]=> array(6) { ["sql"]=> string(545) "SELECT s.nom as supplier_name, s.rowid as fourn_id, pfp.rowid as product_fourn_price_id, pfp.ref_fourn, pfp.price, pfp.quantity, pfp.unitprice, pfp.tva_tx, pfp.charges, pfp.remise, pfp.remise_percent, pfp.fk_supplier_price_expression, pfp.delivery_time_days ,pfp.multicurrency_price, pfp.multicurrency_unitprice, pfp.multicurrency_tx, pfp.fk_multicurrency, pfp.multicurrency_code FROM llx_societe as s, llx_product_fournisseur_price as pfp WHERE s.entity IN (1) AND pfp.entity = 1 AND pfp.fk_product = 1 AND pfp.fk_soc = s.rowid AND s.status = 1" ["duration"]=> float(0.00092220306396484) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [16]=> array(6) { ["sql"]=> string(2079) "SELECT s.rowid, s.nom as name, s.name_alias, s.entity, s.ref_ext, s.ref_int, s.address, s.datec as date_creation, s.prefix_comm, s.status, s.price_level, s.tms as date_modification, s.fk_user_creat, s.fk_user_modif, s.phone, s.fax, s.email, s.socialnetworks, s.url, s.zip, s.town, s.note_private, s.note_public, s.model_pdf, s.client, s.fournisseur, s.siren as idprof1, s.siret as idprof2, s.ape as idprof3, s.idprof4, s.idprof5, s.idprof6, s.capital, s.tva_intra, s.fk_typent as typent_id, s.fk_effectif as effectif_id, s.fk_forme_juridique as forme_juridique_code, s.webservices_url, s.webservices_key, s.code_client, s.code_fournisseur, s.code_compta, s.code_compta_fournisseur, s.parent, s.barcode, s.fk_departement as state_id, s.fk_pays as country_id, s.fk_stcomm, s.remise_supplier, s.mode_reglement, s.cond_reglement, s.fk_account, s.tva_assuj, s.mode_reglement_supplier, s.cond_reglement_supplier, s.localtax1_assuj, s.localtax1_value, s.localtax2_assuj, s.localtax2_value, s.fk_prospectlevel, s.default_lang, s.logo, s.logo_squarred, s.fk_shipping_method, s.outstanding_limit, s.import_key, s.canvas, s.fk_incoterms, s.location_incoterms, s.order_min_amount, s.supplier_order_min_amount, s.fk_multicurrency, s.multicurrency_code, fj.libelle as forme_juridique, e.libelle as effectif, c.code as country_code, c.label as country, d.code_departement as state_code, d.nom as state, st.libelle as stcomm, te.code as typent_code, i.libelle as label_incoterms, sr.remise_client FROM llx_societe as s LEFT JOIN llx_c_effectif as e ON s.fk_effectif = e.id LEFT JOIN llx_c_country as c ON s.fk_pays = c.rowid LEFT JOIN llx_c_stcomm as st ON s.fk_stcomm = st.id LEFT JOIN llx_c_forme_juridique as fj ON s.fk_forme_juridique = fj.code LEFT JOIN llx_c_departements as d ON s.fk_departement = d.rowid LEFT JOIN llx_c_typent as te ON s.fk_typent = te.id LEFT JOIN llx_c_incoterms as i ON s.fk_incoterms = i.rowid LEFT JOIN llx_societe_remise as sr ON sr.rowid = (SELECT MAX(rowid) FROM llx_societe_remise WHERE fk_soc = s.rowid AND entity IN (1)) WHERE s.entity IN (1) AND s.rowid = 1" ["duration"]=> float(0.0045170783996582) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } [17]=> array(6) { ["sql"]=> string(236) "SELECT rowid,name,label,type,size,elementtype,fieldunique,fieldrequired,param,pos,alwayseditable,perms,langs,list,totalizable,fielddefault,fieldcomputed,entity,enabled,help FROM llx_extrafields WHERE elementtype = 'societe' ORDER BY pos" ["duration"]=> float(0.00057816505432129) ["memory_usage"]=> int(0) ["is_success"]=> bool(true) ["error_code"]=> NULL ["error_message"]=> NULL } } ["startTime":protected]=> float(1589543002.6129) ["startMemory":protected]=> int(6291456) ["type"]=> string(6) "mysqli" ["forcecharset"]=> string(4) "utf8" ["forcecollate"]=> string(15) "utf8_unicode_ci" ["_results":"DoliDB":private]=> NULL ["connected"]=> NULL ["database_selected"]=> NULL ["database_name"]=> NULL ["database_user"]=> NULL ["database_host"]=> NULL ["database_port"]=> NULL ["transaction_opened"]=> NULL ["lastquery"]=> NULL ["lastqueryerror"]=> NULL ["lasterror"]=> NULL ["lasterrno"]=> NULL ["ok"]=> NULL ["error"]=> NULL } ["id"]=> NULL ["error"]=> NULL ["errors"]=> array(0) { } ["table_element_line"]=> string(0) "" ["import_key"]=> NULL ["array_options"]=> array(0) { } ["linkedObjectsIds"]=> NULL ["linkedObjects"]=> NULL ["context"]=> array(0) { } ["canvas"]=> string(0) "" ["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_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 ["label_incoterms"]=> NULL ["location_incoterms"]=> NULL ["name"]=> NULL ["lastname"]=> NULL ["firstname"]=> NULL ["civility_id"]=> NULL ["date_validation"]=> NULL ["next_prev_filter"]=> NULL }

($object->array_options['ef.quantiteavant'])

 et

($object->array_options['option_quantiteavant'])

ne donne rien, je continue mes tests.
Celui qui trouve, gagne une bière!!! :slight_smile:

```php
CODE
```

Le ["array_options"]=> array(0) es malheureusement vide…
Du coup il faudrait le charger…

1 « J'aime »

options_ avec un S contrairement à ce qui est écrit dans le dernier post (c’est peut être une coquille dans le forum uniquement)

1 « J'aime »

Ton array_options est vide dans ton dump donc il va falloir régler ça d’abord!
Tu vois tes champs supplémentaires sur ta fiche produit?

1 « J'aime »