Dbut ajout bon de livraison
This commit is contained in:
parent
c07eb9cd2a
commit
8b4cddef5a
@ -105,7 +105,8 @@ if ($_POST["action"] == 'create_delivery' && $conf->livraison->enabled && $user-
|
||||
{
|
||||
$expedition = new Expedition($db);
|
||||
$expedition->fetch($_GET["id"]);
|
||||
$expedition->create_delivery($user);
|
||||
$result = $expedition->create_delivery($user);
|
||||
Header("Location: ".DOL_URL_ROOT.'/livraison/fiche.php?id='.$result->id);
|
||||
}
|
||||
|
||||
if ($_POST["action"] == 'confirm_valid' && $_POST["confirm"] == 'yes' && $user->rights->expedition->valider)
|
||||
@ -510,7 +511,7 @@ else
|
||||
|
||||
if ($conf->livraison->enabled && $expedition->statut == 1 && $user->rights->expedition->livraison->creer)
|
||||
{
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'/livraison/fiche.php?expid='.$expedition->id.'&action=create_delivery">'.$langs->trans("DeliveryOrder").'</a>';
|
||||
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&action=create_delivery">'.$langs->trans("DeliveryOrder").'</a>';
|
||||
}
|
||||
|
||||
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&action=builddoc">'.$langs->trans('BuildPDF').'</a>';
|
||||
|
||||
@ -141,16 +141,6 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Génère un bon de livraison
|
||||
*/
|
||||
if ($_POST["action"] == 'create_delivery' && $user->rights->expedition->livraison->creer)
|
||||
{
|
||||
$expedition = new Expedition($db);
|
||||
$expedition->fetch($_GET["expid"]);
|
||||
$expedition->create_delivery($user);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user