diff --git a/htdocs/expedition/card.php b/htdocs/expedition/card.php index 9fa609d9d76..bc647c31999 100644 --- a/htdocs/expedition/card.php +++ b/htdocs/expedition/card.php @@ -69,6 +69,7 @@ $id = $origin_id; if (empty($origin_id)) $origin_id = GETPOST('origin_id','int'); // Id of order or propal if (empty($origin_id)) $origin_id = GETPOST('object_id','int'); // Id of order or propal $ref=GETPOST('ref','alpha'); +$line_id = GETPOST('lineid','int')?GETPOST('lineid','int'):''; // Security check $socid=''; @@ -596,6 +597,18 @@ if (empty($reshook)) } } + elseif ($action == 'deleteline' && ! empty($line_id)) + { + $object->fetch($id); + $line = new ExpeditionLigne($db); + $line->id = $line_id; + $result = $line->delete($user); + if($result >= 0) { + header('Location: ' . $_SERVER["PHP_SELF"] . '?id=' . $object->id); + exit(); + } + } + include DOL_DOCUMENT_ROOT.'/core/actions_printing.inc.php'; // Actions to send emails @@ -1769,6 +1782,8 @@ else if ($id || $ref) print '