ajout lien vers bon de livraison + traduction
This commit is contained in:
parent
b5c4e5cf4a
commit
4a156da6aa
@ -1493,7 +1493,9 @@ else
|
||||
* Liste des expéditions
|
||||
*/
|
||||
$sql = 'SELECT e.rowid,e.ref,'.$db->pdate('e.date_expedition').' as de';
|
||||
if ($conf->livraison->enabled) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref";
|
||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'expedition as e';
|
||||
if ($conf->livraison->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."livraison as l ON l.fk_expedition = e.rowid";
|
||||
$sql .= ' WHERE e.fk_commande = '. $commande->id;
|
||||
|
||||
$result = $db->query($sql);
|
||||
@ -1505,7 +1507,12 @@ else
|
||||
print_titre($langs->trans('Sendings'));
|
||||
$i = 0; $total = 0;
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans('Sendings').'</td><td>'.$langs->trans('Date').'</td></tr>';
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans('Sendings').'</td>';
|
||||
if ($conf->livraison->enabled)
|
||||
{
|
||||
print '<td>'.$langs->trans("DeliveryOrder").'</td>';
|
||||
}
|
||||
print '<td>'.$langs->trans('Date').'</td></tr>';
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
@ -1514,6 +1521,18 @@ else
|
||||
$var=!$var;
|
||||
print '<tr '.$bc[$var].'>';
|
||||
print '<td><a href="../expedition/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans('ShowSending'),'sending').' '.$objp->ref.'</a></td>';
|
||||
if ($conf->livraison->enabled)
|
||||
{
|
||||
$langs->load('deliveries');
|
||||
if ($objp->livraison_id)
|
||||
{
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/livraison/fiche.php?id='.$objp->livraison_id.'">'.img_object($langs->trans("ShowSending"),'generic').' '.$objp->livraison_ref.'<a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/expedition/fiche.php?id='.$objp->expedition_id.'&action=create_delivery">'.$langs->trans("CreateDeliveryOrder").'<a></td>';
|
||||
}
|
||||
}
|
||||
print '<td>'.dolibarr_print_date($objp->de).'</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -585,7 +585,9 @@ if ($_GET["id"] > 0)
|
||||
* Liste des expéditions
|
||||
*/
|
||||
$sql = "SELECT e.rowid,e.ref,".$db->pdate("e.date_expedition")." as de";
|
||||
if ($conf->livraison->enabled) $sql .= ", l.rowid as livraison_id, l.ref as livraison_ref";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expedition as e";
|
||||
if ($conf->livraison->enabled) $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."livraison as l ON l.fk_expedition = e.rowid";
|
||||
$sql .= " WHERE e.fk_commande = ". $commande->id;
|
||||
|
||||
$result = $db->query($sql);
|
||||
@ -597,7 +599,12 @@ if ($_GET["id"] > 0)
|
||||
print_titre($langs->trans("Sendings"));
|
||||
$i = 0; $total = 0;
|
||||
print '<table class="border" width="100%">';
|
||||
print "<tr $bc[$var]><td>".$langs->trans("Sendings")."</td><td>".$langs->trans("Date")."</td></tr>\n";
|
||||
print "<tr $bc[$var]><td>".$langs->trans("Sendings")."</td>";
|
||||
if ($conf->livraison->enabled)
|
||||
{
|
||||
print '<td>'.$langs->trans("DeliveryOrder").'</td>';
|
||||
}
|
||||
print "<td>".$langs->trans("Date")."</td></tr>\n";
|
||||
|
||||
$var=True;
|
||||
while ($i < $num)
|
||||
@ -606,6 +613,18 @@ if ($_GET["id"] > 0)
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td><a href="../../expedition/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowSending"),"sending").' '.$objp->ref.'</a></td>';
|
||||
if ($conf->livraison->enabled)
|
||||
{
|
||||
$langs->load('deliveries');
|
||||
if ($objp->livraison_id)
|
||||
{
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/livraison/fiche.php?id='.$objp->livraison_id.'">'.img_object($langs->trans("ShowSending"),'generic').' '.$objp->livraison_ref.'<a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/expedition/fiche.php?id='.$objp->expedition_id.'&action=create_delivery">'.$langs->trans("CreateDeliveryOrder").'<a></td>';
|
||||
}
|
||||
}
|
||||
print "<td>".dolibarr_print_date($objp->de)."</td></tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -539,6 +539,7 @@ if ($_GET["id"] > 0)
|
||||
|
||||
if ($conf->livraison->enabled)
|
||||
{
|
||||
$langs->load('deliveries');
|
||||
if ($objp->livraison_id)
|
||||
{
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/livraison/fiche.php?id='.$objp->livraison_id.'">'.img_object($langs->trans("ShowSending"),'generic').' '.$objp->livraison_ref.'<a></td>';
|
||||
|
||||
@ -37,6 +37,7 @@ require_once(DOL_DOCUMENT_ROOT."/propal.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product/stock/entrepot.class.php");
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load('deliveries');
|
||||
|
||||
$user->getrights('expedition');
|
||||
if (!$user->rights->expedition->lire)
|
||||
|
||||
@ -42,6 +42,7 @@ if (!$conf->expedition->enabled && $conf->stock->enabled)
|
||||
|
||||
|
||||
$langs->load("bills");
|
||||
$langs->load('deliveries');
|
||||
|
||||
$user->getrights('expedition');
|
||||
if (!$user->rights->expedition->livraison->lire)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user