public function traloiRevenueAction() { $month = $this->request->get("month", null, date("m")); $year = $this->request->get("year", null, date("Y")); $user_obj = new \HaiQuan\Backend\Models\CtgTuVanTraLoi(); $user = $user_obj->getStatistic($month, $year)->toArray(); $user_chart = \library\Util::mergeStatistic($user, $month, $year); $this->view->data = \library\Util::createStatisticData($user_chart); }
public function editTraloiAction() { $data_edit = $this->request->getPost("data", null, false); $response = array("status" => 0, "message" => "Không Thành Công"); $user_obj = new \HaiQuan\Backend\Models\CtgTuVanTraLoi(); if (!empty($data_edit)) { if (isset($data_edit["tl_id"]) && !empty($data_edit["tl_id"])) { $user_obj->updateByID($data_edit, $data_edit["tl_id"]); $response = array("status" => 1, "message" => "Thành Công"); // } } } echo json_encode($response); exit; }