Some fixes
This commit is contained in:
parent
1d7af72c8e
commit
893ffa74c8
@ -621,25 +621,28 @@ else
|
|||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
// Linked documents
|
// Linked documents
|
||||||
print '<tr><td>';
|
if ($typeobject == 'commande' && $expedition->$typeobject->id && $conf->commande->enabled)
|
||||||
if ($origin == 'commande')
|
|
||||||
{
|
{
|
||||||
|
print '<tr><td>';
|
||||||
$order=new Commande($db);
|
$order=new Commande($db);
|
||||||
$order->fetch($expedition->$origin->id);
|
$order->fetch($expedition->$typeobject->id);
|
||||||
print $langs->trans("RefOrder").'</td>';
|
print $langs->trans("RefOrder").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $order->getNomUrl(1,'commande');
|
print $order->getNomUrl(1,'commande');
|
||||||
|
print "</td>\n";
|
||||||
|
print '</tr>';
|
||||||
}
|
}
|
||||||
if ($origin == 'propal')
|
if ($typeobject == 'propal' && $expedition->$typeobject->id && $conf->propal->enabled)
|
||||||
{
|
{
|
||||||
|
print '<tr><td>';
|
||||||
$propal=new Propal($db);
|
$propal=new Propal($db);
|
||||||
$propal->fetch($expedition->$origin->id);
|
$propal->fetch($expedition->$typeobject->id);
|
||||||
print $langs->trans("RefProposal").'</td>';
|
print $langs->trans("RefProposal").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $propal->getNomUrl(1,'expedition');
|
print $propal->getNomUrl(1,'expedition');
|
||||||
}
|
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
|
}
|
||||||
|
|
||||||
// Ref customer
|
// Ref customer
|
||||||
print '<tr><td>'.$langs->trans("RefCustomer").'</td>';
|
print '<tr><td>'.$langs->trans("RefCustomer").'</td>';
|
||||||
@ -894,9 +897,12 @@ else
|
|||||||
|
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
|
if ($expedition->$origin->id)
|
||||||
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
//show_list_sending_receive($expedition->origin,$expedition->origin_id," AND e.rowid <> ".$expedition->id);
|
//show_list_sending_receive($expedition->origin,$expedition->origin_id," AND e.rowid <> ".$expedition->id);
|
||||||
show_list_sending_receive($expedition->origin,$expedition->origin_id);
|
show_list_sending_receive($expedition->origin,$expedition->origin_id);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@ -370,6 +370,7 @@ else
|
|||||||
|
|
||||||
$expedition=new Expedition($db);
|
$expedition=new Expedition($db);
|
||||||
$result = $expedition->fetch($livraison->expedition_id);
|
$result = $expedition->fetch($livraison->expedition_id);
|
||||||
|
$typeobject = $expedition->origin;
|
||||||
|
|
||||||
if ($livraison->origin_id)
|
if ($livraison->origin_id)
|
||||||
{
|
{
|
||||||
@ -434,7 +435,7 @@ else
|
|||||||
print "</tr>";
|
print "</tr>";
|
||||||
|
|
||||||
// Document origine
|
// Document origine
|
||||||
if ($conf->commande->enabled)
|
if ($typeobject == 'commande' && $expedition->origin_id && $conf->commande->enabled)
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans("RefOrder").'</td>';
|
print '<tr><td>'.$langs->trans("RefOrder").'</td>';
|
||||||
$order=new Commande($db);
|
$order=new Commande($db);
|
||||||
@ -444,10 +445,10 @@ else
|
|||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
else
|
if ($typeobject == 'propal' && $expedition->origin_id && $conf->propal->enabled)
|
||||||
{
|
{
|
||||||
$propal=new Propal($db);
|
$propal=new Propal($db);
|
||||||
$propal->fetch($livraison->origin_id);
|
$propal->fetch($expedition->origin_id);
|
||||||
print '<tr><td>'.$langs->trans("RefProposal").'</td>';
|
print '<tr><td>'.$langs->trans("RefProposal").'</td>';
|
||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $propal->getNomUrl(1,'expedition');
|
print $propal->getNomUrl(1,'expedition');
|
||||||
@ -606,10 +607,13 @@ else
|
|||||||
|
|
||||||
print '</td></tr></table>';
|
print '</td></tr></table>';
|
||||||
|
|
||||||
|
if ($expedition->origin_id)
|
||||||
|
{
|
||||||
print '<br>';
|
print '<br>';
|
||||||
//show_list_sending_receive($expedition->origin,$expedition->origin_id," AND e.rowid <> ".$expedition->id);
|
//show_list_sending_receive($expedition->origin,$expedition->origin_id," AND e.rowid <> ".$expedition->id);
|
||||||
show_list_sending_receive($expedition->origin,$expedition->origin_id);
|
show_list_sending_receive($expedition->origin,$expedition->origin_id);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Expedition non trouvee */
|
/* Expedition non trouvee */
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user