From f3a581888e5d301a766a96ece04e3b3d8b5027ec Mon Sep 17 00:00:00 2001 From: Ellin Date: Wed, 6 Dec 2023 19:08:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=87=89=E6=94=B6=E5=B8=B3=E6=AC=BE(=E6=96=B0?= =?UTF-8?q?=E6=A2=AF);=20rib01-check=E4=BF=AE=E6=92=A4=E5=9B=9E=E6=8C=89?= =?UTF-8?q?=E9=88=95bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .vscode/launch.json | 48 ++++++++ wms/account-receivable-check.php | 70 +++++++++--- wms/account-receivable-index.php | 86 +++++++++++---- wms/account-receivable-received-create.php | 121 ++++++++++++++++++++- wms/account-receivable-received-edit.php | 121 +++++++++++++++++++++ wms/account-receivable-received-submit.php | 84 ++++++++++++++ wms/rib01-check.php | 2 +- 7 files changed, 495 insertions(+), 37 deletions(-) create mode 100644 .vscode/launch.json create mode 100644 wms/account-receivable-received-edit.php create mode 100644 wms/account-receivable-received-submit.php diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 00000000..9dc6b4df --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,48 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Listen for Xdebug", + "type": "php", + "request": "launch", + "port": 9003 + }, + { + "name": "Launch currently open script", + "type": "php", + "request": "launch", + "program": "${file}", + "cwd": "${fileDirname}", + "port": 0, + "runtimeArgs": [ + "-dxdebug.start_with_request=yes" + ], + "env": { + "XDEBUG_MODE": "debug,develop", + "XDEBUG_CONFIG": "client_port=${port}" + } + }, + { + "name": "Launch Built-in web server", + "type": "php", + "request": "launch", + "runtimeArgs": [ + "-dxdebug.mode=debug", + "-dxdebug.start_with_request=yes", + "-S", + "localhost:0" + ], + "program": "", + "cwd": "${workspaceRoot}", + "port": 9003, + "serverReadyAction": { + "pattern": "Development Server \\(http://localhost:([0-9]+)\\) started", + "uriFormat": "http://localhost:%s", + "action": "openExternally" + } + } + ] +} \ No newline at end of file diff --git a/wms/account-receivable-check.php b/wms/account-receivable-check.php index 24bc868c..1e373b52 100644 --- a/wms/account-receivable-check.php +++ b/wms/account-receivable-check.php @@ -3,7 +3,7 @@ include "./header.php"; //企業名稱 統一編號 聯絡地址 $Bill = $_POST['Bill']; $Bill = json_decode($Bill, true); -$sql_received = "SELECT * from account_received where BillNo = '$Bill[0]'"; +$sql_received = "SELECT * from account_received where BillNo = '$Bill[0]' ORDER BY `pay_id` ASC"; $pay_received = mysqli_query($link, $sql_received); $had_received = 0; if (mysqli_num_rows($pay_received) == 0) { @@ -11,8 +11,8 @@ if (mysqli_num_rows($pay_received) == 0) { $had_received += $received['received_amount']; } } -// echo $Bill[2]; - +$unreceived = $Bill[12] - $had_received; +$data = json_encode($Bill); ?>