Dbut ajout bon de livraison
This commit is contained in:
parent
2dabec766e
commit
48e1e4bf22
@ -510,7 +510,7 @@ else
|
||||
|
||||
if ($conf->livraison->enabled && $expedition->statut == 1 && $user->rights->expedition->livraison->creer)
|
||||
{
|
||||
print '<a class="butAction" href="fiche.php?id='.$expedition->id.'&action=create_delivery">'.$langs->trans("DeliveryOrder").'</a>';
|
||||
print '<a class="butAction" href="'.DOL_URL_ROOT.'"/livraison/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>';
|
||||
|
||||
@ -33,6 +33,7 @@
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/product.class.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/livraison/mods/modules_livraison.php");
|
||||
require_once(DOL_DOCUMENT_ROOT."/expedition/expedition.class.php");
|
||||
|
||||
if (!$conf->expedition->enabled && $conf->stock->enabled)
|
||||
{
|
||||
@ -140,6 +141,16 @@ 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["id"]);
|
||||
$expedition->create_delivery($user);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*
|
||||
|
||||
Loading…
Reference in New Issue
Block a user