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); ?>