P2-15~18, P5-04~11, CT-05~06 웹 미구현 기능 전체 구현

P2-15: 지정판매소 다조건 조회 (이름/구군/상태 필터)
P2-17: 지정판매소 지도 표시 (Kakao Maps)
P2-18: 지정판매소 현황 (연도별 신규/취소 통계)
P5-04: 년 판매 현황 (월별 피벗 테이블)
P5-05: 지정판매소별 판매현황 (판매소별 수량/금액)
P5-06: 홈택스 세금계산서 엑셀 내보내기
P5-08: 반품/파기 현황 (기간별 조회)
P5-10: LOT 수불 조회 (LOT 번호 검색)
P5-11: 기타 입출고 (등록 + 재고 연동)
CT-05: CRUD 로깅 (activity_log 테이블 + audit_helper)
CT-06: 대시보드 실 데이터 (발주/판매/재고/불출 통계)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
javamon1174
2026-03-26 16:50:28 +09:00
parent 704141a1f0
commit 1e8bf1eeeb
20 changed files with 1216 additions and 14 deletions

View File

@@ -131,7 +131,7 @@ class BagSale extends BaseController
$db = \Config\Database::connect();
$db->transStart();
$this->saleModel->insert([
$saleData = [
'bs_lg_idx' => $lgIdx,
'bs_ds_idx' => $dsIdx,
'bs_ds_name' => $shop ? $shop->ds_name : '',
@@ -143,7 +143,13 @@ class BagSale extends BaseController
'bs_amount' => $unitPrice * abs($actualQty),
'bs_type' => $type,
'bs_regdate' => date('Y-m-d H:i:s'),
]);
];
$this->saleModel->insert($saleData);
$bsIdx = (int) $this->saleModel->getInsertID();
// CT-05: 감사 로그
helper('audit');
audit_log('create', 'bag_sale', $bsIdx, null, array_merge($saleData, ['bs_idx' => $bsIdx]));
// 재고 감산(판매) / 가산(반품)
model(BagInventoryModel::class)->adjustQty($lgIdx, $bagCode, $detail ? $detail->cd_name : '', -$actualQty);