From 58322e733ce01c5d8fc892b4938e299b1f132855 Mon Sep 17 00:00:00 2001 From: jrbin Date: Fri, 17 Nov 2023 17:44:19 +0800 Subject: [PATCH] =?UTF-8?q?=E5=83=B9=E5=AF=A9bug=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- wms/mkt/pricereview-create.php | 6 ++++-- wms/mkt/pricereview_renovate-create.php | 4 +++- wms/mkt/pricereview_repair-index.php | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/wms/mkt/pricereview-create.php b/wms/mkt/pricereview-create.php index 3198464a..79f28ac0 100644 --- a/wms/mkt/pricereview-create.php +++ b/wms/mkt/pricereview-create.php @@ -43,7 +43,9 @@ if (count($last_pr_arr) > 0) { $res = mysqli_query($link, $sql); while ($row = mysqli_fetch_assoc($res)) { $last_pritem_arr[$row["item_group"]][$row["item_no"]] = $row; - $last_pr_arr["qty_total"] += $last_pritem_arr["A"][$row["item_no"]]["item_qty"]; + if (isset($last_pritem_arr["A"][$row["item_no"]])) { + $last_pr_arr["qty_total"] += $last_pritem_arr["A"][$row["item_no"]]["item_qty"]; + } } mysqli_free_result($res); @@ -1673,7 +1675,7 @@ if (count($last_pritem_arr) > 0 && isset($last_pritem_arr["B"])) { " readonly > "> " readonly> - + "> "> diff --git a/wms/mkt/pricereview_renovate-create.php b/wms/mkt/pricereview_renovate-create.php index cce6d88e..379685c5 100644 --- a/wms/mkt/pricereview_renovate-create.php +++ b/wms/mkt/pricereview_renovate-create.php @@ -44,7 +44,9 @@ if (count($last_pr_arr) > 0) { $res = mysqli_query($link, $sql); while ($row = mysqli_fetch_assoc($res)) { $last_pritem_arr[$row["item_group"]][$row["item_no"]] = $row; - $last_pr_arr["qty_total"] += $last_pritem_arr["A"][$row["item_no"]]["item_qty"]; + if (isset($last_pritem_arr["A"][$row["item_no"]])) { + $last_pr_arr["qty_total"] += $last_pritem_arr["A"][$row["item_no"]]["item_qty"]; + } } mysqli_free_result($res); diff --git a/wms/mkt/pricereview_repair-index.php b/wms/mkt/pricereview_repair-index.php index e9908255..a910c023 100644 --- a/wms/mkt/pricereview_repair-index.php +++ b/wms/mkt/pricereview_repair-index.php @@ -119,7 +119,7 @@ $(function () { objInput1.setAttribute("type", "text"); objInput1.setAttribute("name", "total_price"); objInput1.setAttribute("readonly", true); - objInput1.setAttribute("value", pobj.find('td').eq(6).html().trim()); + objInput1.setAttribute("value", pobj.find('td').eq(5).html().trim()); var objLabel2 = document.createElement("label"); objLabel2.setAttribute("for", "final_price"); objLabel2.textContent = "議價後金額";