5) { sleep(1); header("Location:" . $WebSite . "login/login_form.php"); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/load_header.php'; $title_message = '채권추심'; ?> <?=$title_message?> 0 OR CAST(REPLACE(total_receivable, ',', '') AS UNSIGNED) > 0 OR CAST(REPLACE(total_receivable, ',', '') AS UNSIGNED) > 0) AND CAST(REPLACE(total_receivable, ',', '') AS SIGNED) > 0 AND checkbond ='채권추심' " ; // SQL 쿼리 작성 $orderby = " order by update_day desc, regist_day desc, num desc "; $andPhrase= " and " . $common . $orderby ; $wherePhrase= " where " . $common . $orderby ; $sql = "SELECT * FROM $DB.$tablename " . $wherePhrase; if (!empty($search)) { $sql = "SELECT * FROM $DB.$tablename where searchtag LIKE '%$search%' " . $andPhrase ; } if ($find!=='all' && $search) { $sql = "SELECT * FROM $DB.$tablename WHERE $find LIKE '%$search%' " . $andPhrase ; } try { $stmh = $pdo->query($sql); $total_row = $stmh->rowCount(); // 총 행 수 계산 } catch (PDOException $Exception) { print "오류: " . $Exception->getMessage(); } // print '$work_status_radio' . $work_status_radio; // print '$sql' . $sql; // 숫자에 콤마를 추가하는 함수 function formatNumberWithCommas($number) { return number_format($number); } ?>
     
건       기간  
기간 설정
  ~    
 
 
fetch(PDO::FETCH_ASSOC)) { include '_row.php'; // 콤마 제거 후 숫자로 변환 $decided_estimate = isset($row['decided_estimate']) ? str_replace(',', '', $row['decided_estimate']) : 0; $issued_receivable = isset($row['issued_receivable']) ? str_replace(',', '', $row['issued_receivable']) : 0; $issued_amount = isset($row['issued_amount']) ? str_replace(',', '', $row['issued_amount']) : 0; $total_receivable = isset($row['total_receivable']) ? str_replace(',', '', $row['total_receivable']) : 0; $total_deposit = isset($row['total_deposit']) ? str_replace(',', '', $row['total_deposit']) : 0; // 합계 변수에 더하기 $totalOverallEstimate += $decided_estimate; $totalOverallBill += $issued_amount; $totalOverallDeposit += $total_deposit; $totalOverallIssuedReceivable += $issued_receivable; $totalOverallReceivable += $total_receivable; // 포맷된 결과 출력 $decided_estimateFormatted = number_format($decided_estimate); $issued_amountFormatted = number_format($issued_amount); $issued_receivableFormatted = number_format($issued_receivable); $total_depositFormatted = number_format($total_deposit); $total_receivableFormatted = number_format($total_receivable); $checkstep_str = ""; $promiseday = $promiseday == '0000-00-00' || empty($promiseday) ? '' : $promiseday; // accountnote를 20글자까지만 자르고 넘는 경우 '...' 추가 $displayAccountNote = mb_strlen($accountnote) > 30 ? mb_substr($accountnote, 0, 30) . '...' : $accountnote; // $workStatus에 대한 뱃지 클래스를 먼저 처리 switch ($workStatus) { case '착공전': $badge_class_work = 'badge bg-dark'; break; case '시공중': $badge_class_work = 'badge bg-primary'; break; case '시공완료': $badge_class_work = 'badge bg-danger'; break; default: $badge_class_work = 'badge bg-secondary'; break; } // $cableworkStatus에 대한 뱃지 클래스를 처리 switch ($cableworkStatus) { case '결선중': $badge_class_cable = 'badge bg-success'; break; case '결선완료': $badge_class_cable = 'badge bg-danger'; break; default: $badge_class_cable = 'badge bg-secondary'; break; } $displayworkplacename = mb_strlen($workplacename) > 20 ? mb_substr($workplacename, 0, 20) . '...' : $workplacename; echo ""; $start_num--; } ?>
번호 최근수정 현장명 발주처 담당자 연락처 시공 결선 견적 발행합계 입금합계 발행 미수금 총 미수금
입금약속일
회계 메모
{$start_num} {$update_day} {$displayworkplacename} {$secondord} {$secondordman} {$secondordmantel} " . htmlspecialchars($workStatus) . " " . htmlspecialchars($cableworkStatus) . " {$decided_estimateFormatted} {$issued_amountFormatted} {$total_depositFormatted} {$issued_receivableFormatted} {$total_receivableFormatted} {$promiseday} " . htmlspecialchars($displayAccountNote) . "
합계