'1', 'start_date' => $startDate, 'end_date' => $endDate, 'agg_mode' => $aggMode, 'bag_code' => $bagCode, 'bag_kind' => $bagKind, 'sa_idx' => $saIdx > 0 ? (string) $saIdx : '', ], static fn ($v) => $v !== null && $v !== ''); $excelUrl = $queried ? base_url('bag/flow/export') . '?' . http_build_query($exportParams) : ''; $fmt = static fn ($n): string => number_format((int) $n); $printExtraLines = []; if ($queried) { $aggLabel = $aggMode === 'daily' ? '일자별' : '기간별'; $printExtraLines[] = '조회기간: ' . $startDate . ' ~ ' . $endDate . ' (' . $aggLabel . ')'; } $tipPage = "조회 기간 동안 봉투 품목별 입고·출고·잔량을 집계하는 수불표입니다.\n" . "· 집계방식: 일자별(날짜마다) / 기간별(기간 합계)\n" . "· 전일재고: 조회 시작일 전날 기준 재고(입고·반품·기타 − 출고 누적)\n" . "· 입고: 입고·반품·기타 / 출고: 판매·일반·무료불출·반품·기타\n" . "· 대행소 선택 시 판매 열만 해당 대행소 소속 판매소 기준\n" . "조회 후 표·엑셀·인쇄에 반영됩니다."; ?>
| 일자 | 품목 | 전일재고전일 | 입고 | 출고 | 잔량 | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 입고 | 반품 | 기타 | 입고계입계 | 판매 | 일반불출일반 | 무료불출무료 | 반품 | 기타 | 출고계출계 | |||||
| = esc((string) ($row['date'] ?? '')) ?> | = esc((string) ($row['item_name'] ?? '')) ?> | = $fmt($row['prev_stock'] ?? 0) ?> | = $fmt($row['recv_in'] ?? 0) ?> | = $fmt($row['recv_return'] ?? 0) ?> | = $fmt($row['recv_misc'] ?? 0) ?> | = $fmt($row['recv_total'] ?? 0) ?> | = $fmt($row['out_sale'] ?? 0) ?> | = $fmt($row['out_issue_gen'] ?? 0) ?> | = $fmt($row['out_issue_free'] ?? 0) ?> | = $fmt($row['out_return'] ?? 0) ?> | = $fmt($row['out_misc'] ?? 0) ?> | = $fmt($row['out_total'] ?? 0) ?> | = $fmt($row['balance'] ?? 0) ?> | |
| 조회 결과가 없습니다. | ||||||||||||||