From 2fb91af1616bce545fdd6a3cd19665eb72febaef Mon Sep 17 00:00:00 2001 From: 10994015 Date: Thu, 28 Dec 2023 09:27:20 +0800 Subject: [PATCH] =?UTF-8?q?=E6=96=B0=E6=A2=AF=E5=83=B9=E5=AF=A9option?= =?UTF-8?q?=E4=BF=AE=E6=AD=A31227?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wms/fun_global.php | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/wms/fun_global.php b/wms/fun_global.php index 5e735cd9..da5de2b3 100644 --- a/wms/fun_global.php +++ b/wms/fun_global.php @@ -83,28 +83,29 @@ function manage_class($user_id, &$ret = []) * @return array * */ -function pricereview_class($rate, $user_id, &$ret = []) +function pricereview_class($rate, $user_id, &$ret = [], $special_fee) { global $link; - + $sql = "select manager from account where accountid = '$user_id'"; $res = mysqli_query($link, $sql); while ($row = mysqli_fetch_assoc($res)) { if ($row["manager"] == "M0001") return; // 董事長略過 if ($row["manager"] != "M0060" && $row["manager"] != "M0006" && $row["manager"] != "M0008") { $ret[1] = $row["manager"] . ",,"; - pricereview_class($rate, $row["manager"], $ret); + pricereview_class($rate, $row["manager"], $ret, $special_fee); } else { $ret[2] = "M0024,,<##>M0107,,"; // 業務部專員:M0024許伃廷、M0107許紓晴(第2關有多位審核人) $ret[3] = "M0060,,"; // 業務協理 - if ($rate < 75) $ret[4] = "M0006,,"; // 總經理 + if ($rate < 80 || $special_fee > 0){ + $ret[4] = "M0006,,"; // 總經理 + } } } mysqli_free_result($res); return $ret; } - /** * 汰改(契約)價審簽核順位 * @param string $rate:破價比