diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index 8f112b9aa98..072383f7ae9 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -8414,7 +8414,7 @@ class Form if (empty($conf->supplier_proposal->enabled)) { continue; // Do not show if module disabled } - } elseif ($objecttype == 'shipping' || $objecttype == 'shipment') { + } elseif ($objecttype == 'shipping' || $objecttype == 'shipment' || $objecttype == 'expedition') { $tplpath = 'expedition'; if (empty($conf->expedition->enabled)) { continue; // Do not show if module disabled @@ -8533,6 +8533,7 @@ class Form $possiblelinks = array( 'propal'=>array('enabled'=>$conf->propal->enabled, 'perms'=>1, 'label'=>'LinkToProposal', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."propal as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('propal').')'), + 'shipping'=>array('enabled'=>$conf->expedition->enabled, 'perms'=>1, 'label'=>'LinkToExpedition', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."expedition as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('shipping').')'), 'order'=>array('enabled'=>$conf->commande->enabled, 'perms'=>1, 'label'=>'LinkToOrder', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."commande as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('commande').')'), 'invoice'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.ref, t.ref_client, t.total_ht FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."facture as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('invoice').')'), 'invoice_template'=>array('enabled'=>$conf->facture->enabled, 'perms'=>1, 'label'=>'LinkToTemplateInvoice', 'sql'=>"SELECT s.rowid as socid, s.nom as name, s.client, t.rowid, t.titre as ref, t.total_ht FROM ".$this->db->prefix()."societe as s, ".$this->db->prefix()."facture_rec as t WHERE t.fk_soc = s.rowid AND t.fk_soc IN (".$this->db->sanitize($listofidcompanytoscan).') AND t.entity IN ('.getEntity('invoice').')'), diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index f835e293f5f..09f28d456e6 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -2551,8 +2551,8 @@ if ($action == 'create') { // Show links to link elements - //$linktoelem = $form->showLinkToObjectBlock($object, null, array('order')); - $somethingshown = $form->showLinkedObjectBlock($object, ''); + $linktoelem = $form->showLinkToObjectBlock($object, null, array('shipping')); + $somethingshown = $form->showLinkedObjectBlock($object, $linktoelem); print '