Code cleaner
This commit is contained in:
parent
759b0395be
commit
701e92bae3
@ -1891,7 +1891,7 @@ class Commande extends CommonObject
|
|||||||
/**
|
/**
|
||||||
\brief Renvoie nom clicable (avec eventuellement le picto)
|
\brief Renvoie nom clicable (avec eventuellement le picto)
|
||||||
\param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
\param withpicto 0=Pas de picto, 1=Inclut le picto dans le lien, 2=Picto seul
|
||||||
\param option Sur quoi pointe le lien: 0,1,2,4,-1 fiche commande, 3 fiche compta commande
|
\param option Sur quoi pointe le lien: 0=fiche commande,3=fiche compta commande,4=fiche expedition commande
|
||||||
\return string Chaine avec URL
|
\return string Chaine avec URL
|
||||||
*/
|
*/
|
||||||
function getNomUrl($withpicto=0,$option=0)
|
function getNomUrl($withpicto=0,$option=0)
|
||||||
@ -1902,6 +1902,7 @@ class Commande extends CommonObject
|
|||||||
$urlOption='';
|
$urlOption='';
|
||||||
|
|
||||||
if ($option == 3) $urlOption = '/compta';
|
if ($option == 3) $urlOption = '/compta';
|
||||||
|
if ($option == 4) $urlOption = '/expedition';
|
||||||
|
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.$urlOption.'/commande/fiche.php?id='.$this->id.'">';
|
$lien = '<a href="'.DOL_URL_ROOT.$urlOption.'/commande/fiche.php?id='.$this->id.'">';
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
|||||||
@ -533,15 +533,22 @@ else
|
|||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
if ($conf->commande->enabled)
|
if ($conf->commande->enabled)
|
||||||
{
|
{
|
||||||
|
$order=new Commande($db);
|
||||||
|
$order->fetch($expedition->$object->id);
|
||||||
print $langs->trans("RefOrder").'</td>';
|
print $langs->trans("RefOrder").'</td>';
|
||||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$expedition->$object->id.'">'.img_object($langs->trans("ShowOrder"),'order').' '.$expedition->$object->ref;
|
print '<td colspan="3">';
|
||||||
|
print $order->getNomUrl(1,4);
|
||||||
|
print "</td>\n";
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$propal=new Propal($db);
|
||||||
|
$propal->fetch($livraison->origin_id);
|
||||||
print $langs->trans("RefProposal").'</td>';
|
print $langs->trans("RefProposal").'</td>';
|
||||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/expedition/propal.php?propalid='.$expedition->$object->id.'">'.img_object($langs->trans("ShowProposal"),'propal').' '.$expedition->$object->ref;
|
print '<td colspan="3">';
|
||||||
|
print $propal->getNomUrl(1,'expedition');
|
||||||
|
print "</td>\n";
|
||||||
}
|
}
|
||||||
print "</a></td>\n";
|
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
|
||||||
// Ref client
|
// Ref client
|
||||||
|
|||||||
@ -129,7 +129,7 @@ if ($_POST["action"] == 'confirm_delete' && $_POST["confirm"] == 'yes')
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* G<EFBFBD>n<EFBFBD>rer ou reg<EFBFBD>n<EFBFBD>rer le PDF
|
* Build document
|
||||||
*/
|
*/
|
||||||
if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
||||||
{
|
{
|
||||||
@ -156,7 +156,7 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
*
|
* View
|
||||||
*/
|
*/
|
||||||
|
|
||||||
llxHeader('',$langs->trans('Delivery'),'Livraison');
|
llxHeader('',$langs->trans('Delivery'),'Livraison');
|
||||||
@ -358,6 +358,7 @@ else
|
|||||||
{
|
{
|
||||||
$livraison = new Livraison($db);
|
$livraison = new Livraison($db);
|
||||||
$result = $livraison->fetch($_GET["id"]);
|
$result = $livraison->fetch($_GET["id"]);
|
||||||
|
$livraison->fetch_client();
|
||||||
|
|
||||||
if ($livraison->origin_id)
|
if ($livraison->origin_id)
|
||||||
{
|
{
|
||||||
@ -425,13 +426,21 @@ else
|
|||||||
if ($conf->commande->enabled)
|
if ($conf->commande->enabled)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("RefOrder").'</td>';
|
print '<tr><td>'.$langs->trans("RefOrder").'</td>';
|
||||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/expedition/commande.php?id='.$livraison->commande->id.'">'.img_object($langs->trans("ShowOrder"),'order').' '.$livraison->commande->ref."</a></td>\n";
|
$order=new Commande($db);
|
||||||
|
$order->fetch($livraison->origin_id);
|
||||||
|
print '<td colspan="3">';
|
||||||
|
print $order->getNomUrl(1,4);
|
||||||
|
print "</td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
$propal=new Propal($db);
|
||||||
|
$propal->fetch($livraison->origin_id);
|
||||||
print '<tr><td>'.$langs->trans("RefProposal").'</td>';
|
print '<tr><td>'.$langs->trans("RefProposal").'</td>';
|
||||||
print '<td colspan="3"><a href="'.DOL_URL_ROOT.'/expedition/propal.php?propalid='.$livraison->propal->id.'">'.img_object($langs->trans("ShowProposal"),'propal').' '.$livraison->propal->ref."</a></td>\n";
|
print '<td colspan="3">';
|
||||||
|
print $propal->getNomUrl(1,'expedition');
|
||||||
|
print "</td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -1890,6 +1890,10 @@ class Propal extends CommonObject
|
|||||||
{
|
{
|
||||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/propal.php?propalid='.$this->id. $get_params .'">';
|
$lien = '<a href="'.DOL_URL_ROOT.'/compta/propal.php?propalid='.$this->id. $get_params .'">';
|
||||||
}
|
}
|
||||||
|
if($option == 'expedition')
|
||||||
|
{
|
||||||
|
$lien = '<a href="'.DOL_URL_ROOT.'/expedition/propal.php?propalid='.$this->id. $get_params .'">';
|
||||||
|
}
|
||||||
$lienfin='</a>';
|
$lienfin='</a>';
|
||||||
|
|
||||||
$picto='order';
|
$picto='order';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user