Fix: Bad link to delivery address

This commit is contained in:
Laurent Destailleur 2009-07-21 11:37:40 +00:00
parent 8268b840ec
commit 1af71edc1d
2 changed files with 3 additions and 5 deletions

View File

@ -288,8 +288,7 @@ if ($_GET["action"] == 'create')
print '<td colspan="3">';
if (!empty($object->fk_delivery_address))
{
$object->fetch_adresse_livraison($object->fk_delivery_address);
print '<a href='.DOL_URL_ROOT.'/comm/adresse_livraison.php?socid='.$expedition->deliveryaddress->socid.'&id='.$expedition->deliveryaddress->id.'&action=edit&origin='.$origin.'&originid='.$origin_id.'>'.$expedition->deliveryaddress->label.'</a>';
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$object->id,$object->fk_delivery_address,$_GET['socid'],'none','commande',$object->id);
}
print '</td></tr>'."\n";
@ -653,8 +652,7 @@ else
print '<td colspan="3">';
if (!empty($expedition->fk_delivery_address))
{
$expedition->fetch_adresse_livraison($expedition->fk_delivery_address);
print '<a href='.DOL_URL_ROOT.'/comm/adresse_livraison.php?socid='.$expedition->deliveryaddress->socid.'&id='.$expedition->deliveryaddress->id.'&action=edit&origin=shipment&originid='.$expedition->id.'>'.$expedition->deliveryaddress->label.'</a>';
$html->form_adresse_livraison($_SERVER['PHP_SELF'].'?id='.$expedition->id,$expedition->fk_delivery_address,$expedition->deliveryaddress->socid,'none','shipment',$expedition->id);
}
print '</td></tr>'."\n";

View File

@ -1986,7 +1986,7 @@ class Form
{
require_once(DOL_DOCUMENT_ROOT ."/comm/adresse_livraison.class.php");
$livraison=new AdresseLivraison($this->db);
$livraison->fetch_adresse($selected);
$result=$livraison->fetch_adresse($selected);
print '<a href='.DOL_URL_ROOT.'/comm/adresse_livraison.php?socid='.$livraison->socid.'&id='.$livraison->id.'&action=edit&origin='.$origin.'&originid='.$originid.'>'.$livraison->label.'</a>';
}
else