From 6963616654267305c311b501d1a40f7566f41596 Mon Sep 17 00:00:00 2001 From: Hyojin Ahn Date: Mon, 6 Apr 2026 09:44:38 -0400 Subject: [PATCH] =?UTF-8?q?v1.1.8=20-=20[ORDER]=20=EA=B8=B0=EB=A6=84=20?= =?UTF-8?q?=EC=96=91=20=EC=9E=85=EB=A0=A5=20=ED=9B=84=20=EC=98=88=EC=83=81?= =?UTF-8?q?=EB=9F=89=20=EB=A6=AC=EC=85=8B=20+=20=ED=94=BD=EC=97=85?= =?UTF-8?q?=EB=82=A0=EC=A7=9C=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=20-?= =?UTF-8?q?=20fixed=20(order=EC=9D=98=20=EC=98=88=EC=83=81=EB=9F=89?= =?UTF-8?q?=EC=9D=80=20=EC=97=85=EB=8D=B0=EC=9D=B4=ED=8A=B8=EC=97=90?= =?UTF-8?q?=EC=84=9C=20=EC=A0=9C=EC=99=B8,=20=EB=A1=9C=EA=B7=B8=20?= =?UTF-8?q?=EC=B6=97=EC=86=8C)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public_html/assets/api/daily.php | 13 ++++++++----- public_html/assets/internal_api.php | 3 +-- public_html/login_intranet.php | 2 +- 3 files changed, 10 insertions(+), 8 deletions(-) diff --git a/public_html/assets/api/daily.php b/public_html/assets/api/daily.php index f1db470..5ace0ac 100644 --- a/public_html/assets/api/daily.php +++ b/public_html/assets/api/daily.php @@ -119,8 +119,8 @@ class DailyService extends CONF { $data = $this->normalizeDailyPayload($data, $existing ?: null); $data = $this->hydrateDailySnapshot($data, $existing ?: null); - // estquantity 자동 계산 - if (empty($data['d_estquantity'])) { + // estquantity 자동 계산 (입력때만 안그러면 d_estquantity 값이 0으로 덮어 씌워짐) + if (!$existing && empty($data['d_estquantity'])) { $data['d_estquantity'] = $this->calculateEstQuantity($data, $existing); } @@ -857,6 +857,7 @@ class DailyService extends CONF { if ($status !== 'F' || $visit !== 'Y') return; $customerUid = mysqli_real_escape_string($connect, $after['d_customeruid']); + $accountno = mysqli_real_escape_string($connect, $after['d_accountno']); $today = date('Ymd'); $jobtype = mysqli_real_escape_string($connect, $after['d_jobtype'] ?? 'UCO'); @@ -895,7 +896,7 @@ class DailyService extends CONF { } } - error_log("[PickupCleanup] ERP-safe delete completed for customer={$customerUid}"); + error_log("[PickupCleanup] ERP-safe delete completed for customer={$accountno}"); } private function handlePickupReset(?array $before, array $after): void @@ -914,19 +915,21 @@ class DailyService extends CONF { if ($status !== 'F' || $visit !== 'Y') return; $customerUid = mysqli_real_escape_string($connect, $after['d_customeruid']); + $accountno = mysqli_real_escape_string($connect, $after['d_accountno']); $orderdate = mysqli_real_escape_string($connect, $after['d_orderdate']); $sql = " UPDATE tbl_customer SET c_fullquantity = 0, - c_lastpickupdate = '{$orderdate}' + c_lastpickupdate = '{$orderdate}', + c_lastpickupquantity = '{$afterQty}' WHERE c_uid = '{$customerUid}' "; mysqli_query($connect, $sql); - error_log("[PickupReset] customer={$customerUid} reset fullquantity + lastpickupdate={$orderdate}"); + error_log("[PickupReset] customer={$accountno} reset fullquantity + lastpickupdate={$orderdate}"); } public function deleteDaily(string $orderdate, string $accountno, string $jobtype, array $opt = []) diff --git a/public_html/assets/internal_api.php b/public_html/assets/internal_api.php index 048bd76..87468f3 100644 --- a/public_html/assets/internal_api.php +++ b/public_html/assets/internal_api.php @@ -1642,8 +1642,7 @@ class API extends CONF { 'd_is_transfer' => 'N', 'd_level' => $_SESSION['ss_LEVEL'], ]; -error_log("=== saveInput DEBUG ==="); -error_log($_SESSION['ss_LEVEL']); + // note → daily.php에서 처리됨 if ($note !== '') { $payload['d_pickupnote'] = $note; diff --git a/public_html/login_intranet.php b/public_html/login_intranet.php index 9f6486b..108de1c 100644 --- a/public_html/login_intranet.php +++ b/public_html/login_intranet.php @@ -1,7 +1,7 @@