사이트·관리자 봉투 물류 기능(수불·통계·레포트·재고·발주)과 DB·메뉴·E2E를 운영 반영한다.
통계 분석(전년대비·월별·계절별), 수급계획·LOT 수불, 지정판매소·실사·메뉴 링크 등을 포함한다. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -252,4 +252,39 @@ class MenuModel extends Model
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 재고 관리 하위 메뉴는 "재고 현황", "실사 선별 조회"만 유지.
|
||||
*/
|
||||
public function pruneInventoryManagementMenus(int $mtIdx, int $lgIdx): void
|
||||
{
|
||||
if ($mtIdx <= 0 || $lgIdx <= 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
$parentRows = $this->where('mt_idx', $mtIdx)
|
||||
->where('lg_idx', $lgIdx)
|
||||
->where('mm_pidx', 0)
|
||||
->groupStart()
|
||||
->where('mm_name', '재고 관리')
|
||||
->orWhere('mm_name', '재고관리')
|
||||
->groupEnd()
|
||||
->findAll();
|
||||
if ($parentRows === []) {
|
||||
return;
|
||||
}
|
||||
$parentIds = array_values(array_filter(array_map(
|
||||
static fn ($row): int => (int) ($row->mm_idx ?? 0),
|
||||
$parentRows
|
||||
)));
|
||||
if ($parentIds === []) {
|
||||
return;
|
||||
}
|
||||
|
||||
$this->where('mt_idx', $mtIdx)
|
||||
->where('lg_idx', $lgIdx)
|
||||
->whereIn('mm_pidx', $parentIds)
|
||||
->whereNotIn('mm_link', ['bag/inventory', 'bag/inventory/inspection-select'])
|
||||
->delete();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user