# LEDGER — ISS-2026-9105 follow-up: over-issue approvals UI + production settings

**Date:** 2026-07-17 · Branch hazemdev2 both repos · client-requested (4 items, owner approved execution).

## The 4 client items
1. Over-issue approval in a SEPARATE central screen (not buried in the issue dialog).
2. A button/entry in the المخازن (inventory) area to reach + approve.
3. Approved over-issue appears in إذن الصرف (stock-issue) for the warehouse keeper.
4. Enable warehouse-keeper-approves-first (`production.material_issue_requires_approval`) — needs a production SETTINGS screen (none exists today); tell the user where the setting is.

## WPs
| WP | Scope | Repo | Depends | Status |
|----|-------|------|---------|--------|
| WP-A | ✅ 4380ddf85 (13 tests) · BE: global list endpoint `GET production/over-issue-requests` (all pending across orders, company-scoped) + resource + approve/reject usable globally. Permission production.orders.approve_over_issue. | BE | — | ⬜ |
| WP-B | ✅ ba04c0765 (central screen + Inventory nav, ng build green) · FE: central "Over-issue approvals" screen (list all pending + approve/reject) + nav entry in the Inventory/Warehouses area (items 1+2). | FE | WP-A | ⬜ |
| WP-C | ✅ (production-settings screen + factory nav, ng build green) · FE: Production settings screen (mirror sales-settings pattern) exposing production.material_issue_requires_approval + production.over_issue_requires_approval toggles via core settings API; nav entry. (item 4) | FE | — | ⬜ |
| WP-D | ✅ VERIFIED (no code): IssueMaterials always creates DRAFT InventoryIssue reference_type=production_order; with material_issue_requires_approval ON it waits as draft إذن صرف shown in أذون الصرف with order number (9103 WP3). Enabling the setting (WP-C) resolves item 3. — orig: Verify/surface: when 9103 warehouse-approval ON + over-issue approved, the material issue shows as a draft إذن صرف (stock-issue) with an over-issue marker (item 3). Mostly verification + a small link/label. | BE+FE | WP-A,WP-C | ⬜ |

## Facts (recon)
- Over-issue endpoints today PER-ORDER only: production/orders/{order}/over-issue-requests [create/index/approve/reject] (routes api.php:117-120). Need a global index.
- Settings API: GET /core/settings, GET /core/settings/definitions, PUT /core/settings/bulk. FE pattern: features/sales/settings (SalesSettingsService.getSettings/updateSettings).
- Setting keys: production.material_issue_requires_approval (9103 keeper approval, default false), production.over_issue_requires_approval (9105, default true).
- FE over-issue UI currently in production-orders.component (overIssueRequests signal, per-order).

## Serialization
WP-A (BE) ‖ WP-C (FE) parallel. WP-B (FE) after WP-C (both FE). WP-D last. One writer per repo.

## Note
Update ISS-2026-9105 ticket (verification) when all done — owner reminder. All on hazemdev2, no main/deploy-to-client.
