5) { sleep(1); header("Location:" . $WebSite . "login/login_form.php"); exit; } include $_SERVER['DOCUMENT_ROOT'] . '/load_header.php'; $title_message = '재고 관리대장'; // 품질담당자 및 관리자인 경우 권한 부여 $QCadmin = 0 ; if($user_name=='이세희' || $user_name=='개발자' || $user_name=='함신옥' || $user_name=='노완호' ) $QCadmin = 1 ; ?> <?=$title_message?> 0 " . $order; } else { $sql = "SELECT i.prodcode, MAX(i.item_name) as item_name, MAX(i.specification) as specification, MAX(i.unit) as unit, MAX(i.material_no) as material_no, MAX(i.manufacturer) as manufacturer, MAX(i.remarks) as remarks, MAX(i.purchase_price_excl_vat) as purchase_price_excl_vat, MAX(i.weight_kg) as weight_kg, SUM(CASE WHEN i.is_deleted IS NULL THEN CAST(REPLACE(i.received_qty, ',', '') AS DECIMAL(10,2)) ELSE 0 END) as total_in, 0 as total_out, SUM(CASE WHEN i.is_deleted IS NULL THEN CAST(REPLACE(i.received_qty, ',', '') AS DECIMAL(10,2)) ELSE 0 END) as current_stock FROM {$DB}.{$tablename} i WHERE i.inspection_date BETWEEN date('$fromdate') AND date('$Transtodate') AND i.is_deleted IS NULL GROUP BY i.prodcode HAVING current_stock > 0 " . $order; } try { $stmh = $pdo->query($sql); $total_row = $stmh->rowCount(); ?>
'; print '
'; } else { print '
'; print '
'; } ?>
    
품목코드별 재고 현황 (현재는 입고량 기준, 사용량 테이블 연동 시 자동 계산)
    ~    
 
 
fetch(PDO::FETCH_ASSOC)) { $specification_clean = preg_replace('/\s+/', ' ', $row['specification']); // 연속된 공백을 하나의 공백으로 변경 $remarks_clean = preg_replace('/\s+/', ' ', $row['remarks']); // 연속된 공백을 하나의 공백으로 변경 ?> getMessage(); } ?>
번호 품목코드 품목명 규격 단위 입고량 사용량 재고 자재번호 제조사 비고 매입가
(VAT별도)
중량(KG)