Skip to content

feat(inventory360): introduce Inventory & Purchasing 360 services, controllers, SQL and admin UI - #240

Merged
devmnsoft merged 1 commit into
mainfrom
codex/implementar-modulo-estoque-compras-360
Sep 4, 2026
Merged

devmnsoft merged 1 commit into
mainfrom
codex/implementar-modulo-estoque-compras-360

Conversation

@devmnsoft

Copy link
Copy Markdown
Owner

Motivation

  • Provide a full append-only Inventory & Purchasing 360 surface to close the product→purchase→receiving→movement→CMV loop with proper origin, idempotency and tenant/branch scoping.
  • Replace ad-hoc legacy stock patterns (stock on product, non-idempotent receipts, implicit replenishment) with explicit services, DB modelling and guarded operations.

Description

  • Added backend services and DTOs in Backend/Presentation/BarberSync.Api/Services/Inventory360/Inventory360Services.cs implementing product management, service-input recipes, stock movements (receive/consume/reserve/reverse), purchase orders/receiving/returns, inventory counts/adjustments, replenishment and costing (COGS/exports).
  • Exposed authenticated API controllers in Backend/Presentation/BarberSync.Api/Controllers/Inventory360Controllers.cs and a mobile contract in Backend/Presentation/BarberSync.Api/Controllers/MobileInventory360Controller.cs covering the requested routes and permissions, and registered services in Program.cs.
  • Added idempotent SQL modeling and safe ALTERs in ScriptsSQL/script_completo.sql and readiness fixtures in ScriptsSQL/production_readiness_seed.sql for inventory products, supplies, suppliers, batches, balances, movements, purchases, receivings, transfers, counts, replenishment and audit events (append-only, indexes and idempotency keys).
  • Created Admin UI scaffolding under Web/BarberSync.AdminWeb/Views/Inventory360, controller Web/BarberSync.AdminWeb/Controllers/Inventory360Controller.cs, client JS/CSS assets wwwroot/js/inventory360.js and wwwroot/css/inventory360.css, and added mobile API helpers in MobileApp/src/services/api.js.
  • Updated documentation and contracts: docs/INVENTORY360_WORKFLOW.md, docs/API_ROUTE_CONTRACTS.md, docs/SOURCE_CODE_AUDIT_REPORT.md and others to describe the workflow, integrations and non‑fabrication rules.
  • Extended static validators to forbid fabricated stock/purchase/COGS, binary floating money and visible technical ID inputs for Inventory360 in scripts/validate-source-integrity.* and scripts/validate-ui-contracts.*.

Testing

  • Ran the readiness & validation pipeline including ./scripts/validate-readiness-contracts.sh, ./scripts/validate-ui-contracts.sh and ./scripts/validate-source-integrity.sh and received success markers EVIDENCE:UI_CONTRACTS_STATIC:PASS and EVIDENCE:SOURCE_INTEGRITY_STATIC:PASS.
  • JavaScript static checks (node --check) and the Mobile/Totem smoke tests succeeded, with npm test --prefix MobileApp, npm test --prefix Totem, and npm run build --prefix Totem passing.
  • The readiness gate checks and custom static checks executed and reported OK for the new Inventory360 contracts and validators.
  • Not executed in this environment: dotnet build (not available in container) and psql operations (psql not available), so runtime DB migrations/seed application and full .NET build on this host were not performed.

Codex Task

@devmnsoft
devmnsoft merged commit d89834e into main Sep 4, 2026
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant