query($sql); // 검색조건에 맞는글 stmh $total_row = $stmh->rowCount(); ?> <?= $title_message ?>
카드번호:
카드사:
사용자:
조회기간: ~
총 건수:
fetch(PDO::FETCH_ASSOC)) { include $_SERVER['DOCUMENT_ROOT'] .'/eworks/_row.php'; // expense_data JSON 파싱 $expense_data = json_decode($expense_data ?? '[]', true); $items = []; $notes = []; $total_amount = 0; if (is_array($expense_data)) { foreach ($expense_data as $expense) { if (!empty($expense['expense_item'])) { $items[] = $expense['expense_item']; } if (!empty($expense['expense_note'])) { $notes[] = $expense['expense_note']; } if (!empty($expense['expense_amount'])) { $total_amount += intval(str_replace(',', '', $expense['expense_amount'])); } } } // 적요와 비고를 콤마로 구분된 문자열로 변환 $items_str = implode(', ', $items); $notes_str = implode(', ', $notes); echo ''; ?>
번호 작성일 지출요청일 결재일 기안자 적요 금액 비고 결재완료
getMessage(); } ?>