Added dates to Order/Index orders
This commit is contained in:
@@ -651,7 +651,36 @@ class OrderController extends mfBaseController {
|
||||
|
||||
}
|
||||
|
||||
public function deleteAction() {
|
||||
protected function saveVorortterminAction() {
|
||||
$r = $this->request;
|
||||
|
||||
$order_id = $r->id;
|
||||
if(!is_numeric($order_id) || $order_id < 1) {
|
||||
$this->returnJson(["status" => "error", "order" => ['id' => $order_id]]);
|
||||
}
|
||||
|
||||
$order = new Order($order_id);
|
||||
if(!$order->id) {
|
||||
$this->returnJson(["status" => "error", "order" => ['id' => $order_id]]);
|
||||
}
|
||||
|
||||
$date = $r->install_date;
|
||||
if(!$date) {
|
||||
$this->returnJson(["status" => "error", "order" => ['id' => $order_id]]);
|
||||
}
|
||||
|
||||
$date = Layout::dateToInt($date);
|
||||
if(!$date) {
|
||||
$this->returnJson(["status" => "error", "order" => ['id' => $order_id]]);
|
||||
}
|
||||
|
||||
$order->install_date = $date;
|
||||
$order->save();
|
||||
|
||||
$this->returnJson(["status" => "OK", "order" => ['id' => $order_id]]);
|
||||
}
|
||||
|
||||
protected function deleteAction() {
|
||||
if(!$this->me->is(["Admin","salespartner"])) {
|
||||
$this->layout()->setFlash("Keine Berechtigung", "error");
|
||||
$this->redirect("Order");
|
||||
|
||||
Reference in New Issue
Block a user