From be066ec03f572c5e0519d698d52a8a885ccdeae5 Mon Sep 17 00:00:00 2001 From: caoyanyi Date: Tue, 13 Jun 2023 09:28:31 +0800 Subject: [PATCH] * Change return value for branch create. --- module/branch/control.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/branch/control.php b/module/branch/control.php index 4a505c7f62..aa27b80428 100644 --- a/module/branch/control.php +++ b/module/branch/control.php @@ -65,10 +65,10 @@ class branch extends control if($_POST) { $branchID = $this->branch->create($productID); - if(dao::isError()) return print(js::error(dao::getError())); + if(dao::isError()) return $this->sendError(dao::getError()); $this->loadModel('action')->create('branch', $branchID, 'Opened'); - return print(js::reload('parent.parent')); + return $this->sendSuccess(array('load' => true, 'closeModal' => true)); } $this->view->product = $this->loadModel('product')->getById($productID);