query($check_table_sql); if ($check_stmh->rowCount() > 0) { // usage 테이블이 존재하는 경우 $out_sql = "SELECT usage_date, usage_qty, unit, usage_reason, remarks FROM {$DB}.usage WHERE prodcode = ? AND usage_date BETWEEN date(?) AND date(?) AND is_deleted IS NULL ORDER BY usage_date DESC"; $out_stmh = $pdo->prepare($out_sql); $out_stmh->bindValue(1, $prodcode, PDO::PARAM_STR); $out_stmh->bindValue(2, $fromdate, PDO::PARAM_STR); $out_stmh->bindValue(3, $todate, PDO::PARAM_STR); $out_stmh->execute(); $out_records = $out_stmh->fetchAll(PDO::FETCH_ASSOC); } // 입고 내역 조회 $in_stmh = $pdo->prepare($in_sql); $in_stmh->bindValue(1, $prodcode, PDO::PARAM_STR); $in_stmh->bindValue(2, $fromdate, PDO::PARAM_STR); $in_stmh->bindValue(3, $todate, PDO::PARAM_STR); $in_stmh->execute(); $in_records = $in_stmh->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e) { echo "오류: " . $e->getMessage(); exit; } ?>
품목코드: | 품목명: | 규격: | 비고:
입고 내역 (건)
0): ?>
로트번호 입고일 업체 수량 단위

입고 내역이 없습니다.

사용 내역 (건)
0): ?>
사용일 사용량 단위 사용사유 비고

사용 내역이 없습니다.
(사용량 테이블이 설정되지 않았거나 해당 기간에 사용 내역이 없습니다.)

재고 요약
총 입고량

총 사용량

현재 재고

조회기간
~