diff --git a/wms/account-receivable-new-index.php b/wms/account-receivable-new-index.php index 59fc1f88..85b6554b 100644 --- a/wms/account-receivable-new-index.php +++ b/wms/account-receivable-new-index.php @@ -305,7 +305,7 @@ foreach ($query_wip as $wip) { $arrayData[$wip['contractno']]['facility_status'] .= $wip['facilityno'] . " (" . $wip['real_arrival_date'] . "貨抵工地) ; "; } elseif ($wip['real_contract_arrival_date'] != NULL && $wip['real_contract_arrival_date'] !== '1970-01-01' && $wip['delivery_date'] !== '1970-01-11' && !empty($wip['real_contract_arrival_date'])) { $arrayData[$wip['contractno']]['facility'][$wip['facilityno']]['status'] = $wip['real_contract_arrival_date'] . "預計出貨"; - $arrayData[$wip['contractno']]['facility_status'] .= $wip['facilityno'] . " (" . $wip['real_contract_arrival_date'] . "預計出貨) ; "; + $arrayData[$wip['contractno']]['facility_status'] .= $wip['facilityno'] . " (" .date('Y-m-d',strtotime($wip['real_contract_arrival_date'])) . "預計出貨) ; "; } elseif ($wip['estimated_shipping_date'] != NULL && $wip['estimated_shipping_date'] !== '1970-01-01' && $wip['delivery_date'] !== '1970-01-11' && !empty($wip['estimated_shipping_date'])) { $arrayData[$wip['contractno']]['facility'][$wip['facilityno']]['status'] = $wip['estimated_shipping_date'] . "預計出港"; $arrayData[$wip['contractno']]['facility_status'] .= $wip['facilityno'] . " (" . $wip['estimated_shipping_date'] . "預計出港) ; "; @@ -761,7 +761,7 @@ $excel_contract_boga_array = array(); $excel_contract_noboga_array = array(); $excel_facility_array = array(); -foreach ($arrayData as $key => $value) { +foreach ($arrayData as $key => &$value) { $excel_contract_array[$key] = array_fill(0, 76, ''); $excel_contract_array[$key][0] = (isset($value['BillNo']) && !is_null($value['BillNo'])) ? $value['BillNo'] : ''; @@ -781,6 +781,7 @@ foreach ($arrayData as $key => $value) { $excel_contract_array[$key][14] = (isset($value['receivable_budget']) && !is_null($value['receivable_budget'])) ? $value['receivable_budget'] : 0; $excel_contract_array[$key][15] = (isset($value['invoice_budget']) && !is_null($value['invoice_budget'])) ? number_format(round($value['invoice_budget'])) : '0'; $excel_contract_array[$key][16] = (isset($value['received_budget']) && !is_null($value['received_budget'])) ? $value['received_budget'] : 0; + $value['collect_budget'] = ($excel_contract_array[$key][14] - $excel_contract_array[$key][16]) > 0 ? $excel_contract_array[$key][14] - $excel_contract_array[$key][16] : 0; $excel_contract_array[$key][17] = number_format(round($excel_contract_array[$key][14] - $excel_contract_array[$key][16])); $excel_contract_array[$key][18] = (isset($value['collect_month']) && !is_null($value['collect_month'])) ? number_format(round($value['collect_month'])) : '0'; $excel_contract_array[$key][19] = (isset($value['facility_num']) && !is_null($value['facility_num'])) ? number_format(round($value['facility_num'])) : '0'; @@ -1110,6 +1111,7 @@ $noboga_data = json_encode($excel_contract_noboga_array); +
合約號 | -部門 | -主管 | -營業員 | -客戶 | - -作番狀態 | -合約-設備金額 | -合約-安裝金額 | -合約總金額 | -合約目前應收 | -已開發票金額 | -已收金額金額 | -催收金額金額 | -催收次數 | -作番數量 | +合約號 | +部門 | +主管 | +營業員 | +客戶 | + +作番狀態 | +合約 設備金額 |
+ 合約 安裝金額 |
+ 合約 總金額 |
+ 合約 目前應收 |
+ 合約 已開票金額 |
+ 合約 已收金額 |
+ 合約 催收金額 |
+ 合約 催收次數 |
+ 作番數量 | 訂金 名稱 |
訂金 合約金額 |
@@ -1235,22 +1276,22 @@ include "./footer.php";
$value) {
?>
-
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
= $key ?> | -= $value['DeptId'] . " " . $value['DeptName'] ?> |
- = $value['ManagerId'] . " " . $value['ManagerName'] ?> |
- = $value['PersonId'] . " " . $value['PersonName'] ?> |
- = $value['CustomerId'] . " " . $value['CustomerName'] ?> |
-
- = $value['facility_status'] ?> | +||||||||||||||||||||||||||
= $key ?> | += $value['DeptId'] . " " . $value['DeptName'] ?> |
+ = $value['ManagerId'] . " " . $value['ManagerName'] ?> |
+ = $value['PersonId'] . " " . $value['PersonName'] ?> |
+ = $value['CustomerId'] . " " . $value['CustomerName'] ?> |
+
+ = $value['facility_status'] ?> | = number_format(round($value['A40001'])) ?> | = number_format(round($value['A40008'])) ?> | = number_format(round($value['total_budget'])) ?> | = number_format(round($value['receivable_budget'])) ?> | = number_format(round($value['invoice_budget'])) ?> | = number_format(round($value['received_budget'])) ?> | -= number_format(round($value['collect_budget'])) ?> | -= $value['collect_month'] ?> | += number_format(round($value['collect_budget'])) ?> | += $value['collect_month'] ?> | = $value['facility_num'] ?> | = $excel_contract_array[$key][21] ?> | @@ -1327,6 +1368,92 @@ include "./footer.php";