= view('components/print_header', [
'printTitle' => '재고 현황',
'printDate' => (string) ($baseDate ?? date('Y-m-d')),
'printExtraLines' => [
'기준일자: ' . (string) ($baseDate ?? date('Y-m-d')),
],
]) ?>
0, 'gugun' => 0, 'agency' => 0];
$agencyOptions = is_array($agencyOptions ?? null) ? $agencyOptions : [];
$subtotalByGroup = [];
foreach ($subtotals as $subtotal) {
$group = (string) ($subtotal['group'] ?? '');
if ($group !== '') {
$subtotalByGroup[$group] = $subtotal;
}
}
?>
| 품 목 구 분 | 봉투/스티커 종류 | 계 | 시군구 재고 | 대행소 재고 |
|---|---|---|---|---|
| = esc($group) ?> | = esc((string) ($row['name'] ?? '')) ?> | = number_format((int) ($row['total_qty'] ?? 0)) ?> | = number_format((int) ($row['gugun_qty'] ?? 0)) ?> | = number_format((int) ($row['agency_qty'] ?? 0)) ?> |
| 소계 | = number_format((int) ($s['total_qty'] ?? 0)) ?> | = number_format((int) ($s['gugun_qty'] ?? 0)) ?> | = number_format((int) ($s['agency_qty'] ?? 0)) ?> | |
| 조회 결과가 없습니다. | ||||
| 합계 | = number_format((int) ($grandTotals['total'] ?? 0)) ?> | = number_format((int) ($grandTotals['gugun'] ?? 0)) ?> | = number_format((int) ($grandTotals['agency'] ?? 0)) ?> | |
※ 기준일자까지 갱신된 재고를 집계합니다. 대행소 재고는 별도 재고 연계 전까지 0으로 표시됩니다.