diff --git a/wms/account-receivable-check.php b/wms/account-receivable-check.php index 727c015d..32b0aa04 100644 --- a/wms/account-receivable-check.php +++ b/wms/account-receivable-check.php @@ -2,33 +2,35 @@ include "./header.php"; $Bill = $_POST['Bill']; $Bill = json_decode($Bill, true); -$sql_received = "SELECT * from account_received where BillNo = '$Bill[0]' ORDER BY `pay_id` ASC"; -$pay_received = mysqli_query($link, $sql_received); -$had_received_amount = intval(0); -$had_invoice_amount=intval(0); -$status_summary = intval(0); -if (mysqli_num_rows($pay_received) > 0) { - foreach ($pay_received as $received) { - $had_received_amount += intval($received['received_amount']); - $had_invoice_amount += intval($received['invoice_amount']); - if(in_array(intval($received['status']),array(0,4,5,99))){ - $tem_status = intval(0); - }else{ - $tem_status = intval($received['status']); - } - if($status_summary < $tem_status){ - $status_summary = $tem_status; - } - } -} - -$unreceived_amount = intval($Bill[12]) - intval($had_received_amount); -$uninvoice_amount = intval($Bill[12]) - intval($had_invoice_amount); -$Bill[19] =$had_invoice_amount; -$Bill[20] =$had_received_amount; -$Bill[21] =$uninvoice_amount; -$Bill[22] =$unreceived_amount; -$Bill[23] =$status_summary; +print_r($Bill); + +// $sql_received = "SELECT * from account_received where BillNo = '$Bill[0]' ORDER BY `pay_id` ASC"; +// $pay_received = mysqli_query($link, $sql_received); +// $had_received_amount = intval(0); +// $had_invoice_amount=intval(0); +// $status_summary = intval(0); +// if (mysqli_num_rows($pay_received) > 0) { +// foreach ($pay_received as $received) { +// $had_received_amount += intval($received['received_amount']); +// $had_invoice_amount += intval($received['invoice_amount']); +// if(in_array(intval($received['status']),array(0,4,5,99))){ +// $tem_status = intval(0); +// }else{ +// $tem_status = intval($received['status']); +// } +// if($status_summary < $tem_status){ +// $status_summary = $tem_status; +// } +// } +// } + +// $unreceived_amount = intval($Bill[12]) - intval($had_received_amount); +// $uninvoice_amount = intval($Bill[12]) - intval($had_invoice_amount); +// $Bill[19] =$had_invoice_amount; +// $Bill[20] =$had_received_amount; +// $Bill[21] =$uninvoice_amount; +// $Bill[22] =$unreceived_amount; +// $Bill[23] =$status_summary; $data = json_encode($Bill); ?> + +
@@ -462,46 +331,38 @@ $data = json_encode($receivable_array); - --> + + --> - - + - + $value) { ?> - - - - - - - - - - - - + + + + + + + + + \ No newline at end of file diff --git a/wms/account-receivable.xlsx b/wms/account-receivable.xlsx index ff6ba785..8edcb4bd 100644 Binary files a/wms/account-receivable.xlsx and b/wms/account-receivable.xlsx differ
安裝款 試車款 官檢款交車款交車款尾款目前應收未開發票金額未收金額 作番狀態收款狀態 操作
催收"; - } else { - echo "法務件"; - } - ?> +