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 = "議價後金額";