
## 2026-08-15 — Stock Replenishment

- Final closure patch hides all admin-only Stock actions from salesmen, adds a compact dispatch metadata dialog, and keeps Laravel as the authorization authority.
- Laravel now restores saved preparation variance reasons/notes and stores Delivery Note Number, Driver, and Vehicle independently without changing stock rules.

- Added Stock Requests to salesman Dashboard and manager Command Center.
- Added Main/Clearance search, shared scanner, Draft/Submit, copy/PDF and six-quantity detail.
- Added receipt UI with Accepted Qty explicitly separate from Received Qty.
- Completed camera/gallery discrepancy evidence with authenticated previews and retry after a failed upload.
- Added protected prepared-shipment and dispatch-receipt evidence history.
- Added Warehouse Preparation and Receiving PDFs with immutable quantity snapshots, variance summaries, and explicit Received-versus-Accepted wording.
- Added compact `SKU : qty` copy, live SKU/piece summary, and manual shipment barcode/SKU verification.
- Fixed the circular theme collision on the extended New Request action discovered during SM X135G QA.
- Kept Save Draft visible above the Android keyboard instead of allowing the keyboard to hide the critical action.
- Added an explicitly marked, owner-scoped temporary QA dataset with two products, one approved On Account customer, private visibility, printable Code 39 labels, safe reset/cleanup previews and QA PDF marking.
- Fixed completed-receipt idempotency so replaying the same receipt UUID returns safely before status validation and never posts stock twice.

## Version 0.8.1 - Mobile Profile

### Added

- Flutter Profile page.
- Mobile logout button.
- Logout API call from Flutter.
- Secure local token deletion after logout.
- Mobile profile documentation.

## Version 0.8.3 - Flutter My Van

### Added

- My Van Flutter page.
- Real van stock loading from Laravel API.
- Search by SKU, barcode, name, and category.
- Dashboard My Van card now opens the My Van page.

## Version 0.8.5 - Flutter My Van Improvements

### Added

- Live search without pressing return.
- Product image support in My Van page.
- Dynamic van title from Laravel API.

### Fixed

- Product name visibility improved.
- Duplicate products fixed from Laravel API grouping.

## Version 0.8.7 - Flutter Status UI

### Changed

- Replaced "matched" text badge with a clean green check icon.
- Non-matched items now show a small warning icon.

## Version 0.8.8 - Product Details Page

### Added

- Product details page in Flutter.
- My Van items are now clickable.
- Product image, SKU, barcode, category, quantity, and price are shown.

## Version 0.8.9 - Barcode Scanner

### Added

- Barcode scanner screen in Flutter.
- Camera permission for iOS.
- Barcode lookup through Laravel API.
- Product details opens automatically after successful scan.

## Version 0.8.10 - Barcode Manual Entry

### Added

- Manual barcode entry in scanner page.
- Keyboard button in scanner app bar.
- My Van scanner icon now opens scanner page.

## Version 0.8.12 - Flutter Inventory Check

### Added

- Flutter Inventory Check page.
- Start and finish inventory check from mobile.
- Mark products correct/wrong/missing.
- Progress summary.

## Version 0.8.13 - Inventory Count Quantity Dialog

### Added

- Inventory check product count dialog.
- Expected quantity display.
- Counted quantity input.
- Auto correct/wrong status based on counted quantity.
- Missing button with counted qty 0.

### Changed

- Salesman no longer needs to guess the quantity.

## Version 0.8.14 - Inventory Scanner UI

### Added

- Scan button inside Inventory Check page.
- Inventory scanner supports camera and manual barcode entry.
- Scanned item opens count dialog with expected quantity.

### Fixed

- Dashboard card title overflow.
- Renamed Inventory Check card to Stock Check for better mobile display.

## Version 0.9.0 - Flutter Architecture Foundation

### Added

- Core config folder.
- Core theme folder.
- Shared reusable widgets.
- App colors.
- App theme.
- Flutter architecture documentation.

### Changed

- Main app now uses AppTheme.dark().
- API config now reads from AppConfig.

### Next

- Refactor My Van page to use shared widgets.
- Refactor Inventory Check page to use shared widgets.
- Add proper Product model.
- Add Orders module.

## Version 0.9.1 - My Van Refactor

### Changed

- Refactored My Van page to use shared widgets.
- My Van now uses AppCard.
- My Van now uses ProductPhoto.
- My Van now uses QtyBadge.
- My Van now uses StatusDot.
- My Van now uses AppSearchBox.

### Benefit

This makes the My Van page cleaner and prepares the UI system for Orders, Picking, and Box Items.

## Version 0.9.2 - Inventory Check UI Refactor

### Added

- InventoryStatusLabel shared widget.

### Changed

- Inventory Check item cards now use AppCard.
- Inventory Check status display now uses shared widget.

## Version 0.9.3 - Van Stock Model

### Added

- VanStockItem model.
- VanStockItemCard reusable widget.

### Changed

- My Van page now uses typed VanStockItem objects instead of raw Map data.

### Benefit

This makes the app safer, cleaner, and easier to extend for Orders, Picking, and Offline Sync.

<!-- SNYT_RETURNS_RMA_CHANGELOG_FLUTTER_V1_START -->
## 2026-08-08 — Returns / RMA + Dark SNYT UI

### Added

- Returns top-level mobile module.
- Customer Return / Resellable workflow.
- RMA / Defective workflow.
- Partial SKU search and barcode scanner.
- Optional return photos.
- Direct replacement from van stock.
- Mobile accountant review.
- RMA warehouse handover and confirmation.
- A4 handover printing.
- Customer profile Sales / Returns / Payments tabs.

### Changed

- App-wide visual foundation changed from light surfaces to approved dark SNYT navy/cyan UI.
- Chat moved from the bottom navigation to More so Returns can be a primary field-sales destination.
<!-- SNYT_RETURNS_RMA_CHANGELOG_FLUTTER_V1_END -->

<!-- SNYT_RMA_ANALYZE_FIX_V1 -->
## 2026-08-08 - Returns / RMA Analyzer Fix

- Fixed the Customer Details mixed Future result typing error introduced by Returns integration.
- Excluded internal `project_backups/` and future `releases/` source archives from Flutter analysis.
- Cleaned Returns/RMA deprecation and style lints.
- Removed obsolete private customer helper code that was no longer reachable after the new Customer Profile flow.


<!-- SNYT_RMA_ANALYZER_FINAL_CLEANUP_V1 -->
## 2026-08-08 - Returns / RMA Analyzer Final Cleanup

- Completed final Flutter analyzer cleanup for the Returns / RMA module.
- Wrapped the remaining handover screen guard conditions in explicit blocks.
- No functional workflow behavior was changed.

<!-- RETURNS_RMA_V1_ANALYZER_CLEAN_20260808 -->
## 2026-08-08 - Returns / RMA v1 Analyzer Cleanup

- Completed Flutter analyzer cleanup after the Returns / RMA v1 installation.
- Fixed remaining handover screen control-flow lint warnings.
- `flutter analyze` now passes cleanly.
- No Returns / RMA business behavior was changed by this cleanup.

## 2026-08-08 - Returns / RMA v1 QA Baseline

- Returns / RMA v1 Flutter integration completed.
- Final analyzer cleanup completed.
- `flutter analyze`: No issues found.
- `flutter test`: 9 tests passed.
- Returns module is ready for device and backend integration QA.
## 2026-08-09 — Returns Production Hardening

- Fixed the warehouse handover request contract so selected return item IDs are sent correctly.
- Added the mobile Opening RMA reclassification screen with sellable/RMA quantity visibility.
- Required a saved customer for normal return creation at the API boundary.
- Hardened accounting review against cross-return item IDs, incomplete settlements, and invoices belonging to another customer.
- Required an explicit, non-empty RMA item selection when preparing a handover.
- Revalidated Flutter with zero analyzer issues and all 9 tests passing.
## 2026-08-09 — Explicit Return Review Workflow

- Returns now follow Draft → Pending Accountant → Approved or Rejected.
- Drafts remain editable until explicit submission; submitted returns are frozen for salesman editing.
- Rejection requires and displays an accountant reason. Rejected RMA retains physical RMA stock and movement history.
- Resellable stock becomes sellable only on approval and duplicate approval is idempotent.
## 2026-08-09 — Dedicated RMA Stock

- Added a read-only RMA Stock screen inside Returns with search, summary totals, product balances, and handover navigation.
- Added parsing tests for in-van, prepared, ready, and in-transit quantities.
- Hardened Laravel approve/reject authorization so salesmen receive HTTP 403 at the controller boundary.
## 2026-08-09 — Returns / RMA automated validation

- Added comprehensive isolated Laravel coverage for the 21 Returns/RMA scenarios, financial settlements, movement records, ownership, and stock invariants.
- Fixed Opening RMA initialization using an undefined variable.
- Fixed handover preparation attempting to persist the computed `handover_remaining_qty` attribute as a database column.
- Added Flutter lifecycle, rejection reason, and direct-replacement availability parsing tests.

## 2026-08-09 — Android runtime repair and release builder

- Restored the missing Kotlin `MainActivity` under the stable `xyz.snyt.vanapp` package using Flutter embedding v2.
- Confirmed the application launches on the SM X135G, restores its session, loads Dashboard, and opens Returns, Customers, and Catalog without a current fatal exception.
- Added `tool/release.sh` with patch/minor/major/build version modes, mandatory baseline validation, rollback-safe versioning, timestamped source snapshots, signed APK verification, unsigned IPA packaging, checksums, release metadata, and preserved logs.
- Preserved Android package ID and iOS bundle ID as `xyz.snyt.vanapp`.

## 2026-08-09 — SNYT Enterprise UI v1 foundation

- Added centralized Flutter spacing, radius, typography, and semantic status tokens alongside the existing enterprise palette/theme.
- Consolidated reusable cards, metrics, status badges, headers, buttons, search, loading, empty, and error states.
- Migrated Splash, Login, phone/tablet application shell, salesman and manager Dashboards, and More/Profile only.
- Added responsive tablet navigation rail while preserving phone bottom navigation.
- Verified on SM X135G with session restore, Dashboard, navigation, and Returns; no current Flutter runtime exception.
- `flutter analyze`: no issues; `flutter test`: 15 passed, including the phone-sized foundation check.

## 2026-08-09 — Enterprise UI foundation polish

- Reduced excess vertical space in responsive Flutter Dashboard quick-action cards without fixed card heights.
- Improved Returns filter-chip density, edge padding, and horizontal scrolling without changing filtering logic.
- Corrected Laravel Dashboard quick-link hierarchy so context, action title, and arrow never collide.

## 2026-08-09 — Full Flutter visual QA and consistency fixes

- Completed a physical SM X135G visual pass through the complete reachable salesman workflow without changing business behavior.
- Fixed unreadable dark-on-dark prices in catalog product cards.
- Repaired the shared card Material/ink composition to remove ListTile background/ink framework assertions and preserve interaction feedback.
- Replaced the legacy plain boxes empty message with the standard enterprise empty state.
- Harmonized conversation avatars plus manager-team and smart-import semantic accents with the dark SNYT palette.
- Captured representative after screenshots under `docs/screenshots/full-flutter-qa/`.
- `flutter analyze`: no issues; `flutter test`: 15 passed, including the phone-sized foundation check.

## 2026-08-09 — SNYT Enterprise UI v1 cross-platform consistency completed

- Compared Flutter and Laravel tokens, dashboards, products, customers, orders, Returns/RMA, forms, and system states side-by-side.
- Standardized visible status semantics without changing any status values or workflow behavior.
- Corrected Flutter order badges so Draft is neutral, Submitted is amber, Confirmed is cyan, Delivered is green, Cancelled is red, and Quoted remains purple.
- Reused the shared Flutter status mapper for Return financial/operational states and warehouse handovers.
- Added a focused semantic status test; `flutter analyze` reports no issues and all 16 tests pass.
- Stored the final compact comparison set under `docs/screenshots/cross-platform-consistency/`.
## 2026-08-09

- Added SNYT Enterprise customer onboarding and status UI.
- Added private document upload, territory choices, duplicate warnings and approval-aware customer selection.
- Added Cash/On Account checkout and server-authoritative pricing snapshots.
## 2026-08-09 — Customer onboarding and invoice QA

- Completed the 35-scenario Customer + Cash/On Account validation matrix in the isolated Laravel environment and on the connected Android tablet.
- Focused Customer/Pricing and Returns/RMA suites passed; Flutter analysis and all Flutter tests passed.
- Recorded partially covered and manual camera/GPS/keyboard/PDF checks explicitly; no production code, data, or release artifact was changed.
## 2026-08-09 — Customer + Pricing QA hardening

- Added nine Laravel Customer QA tests with 90 assertions and expanded mixed Cash PDF render assertions.
- Added Flutter conditional onboarding and customer status/location parsing tests.
- Fixed VAT submission to require TRN for VAT-registered customers.
- Fixed Customer Onboarding Stepper overflow by using a responsive vertical layout below 1200 px.
- Fixed invoice line totals so the Cash discount is not subtracted twice from the already-net line value.
- Final QA matrix: 28 PASS, 7 PARTIAL, 0 FAIL; no release artifacts built.

## 2026-08-09 — Security Cheque completion

- Completed dated/undated Security Cheque metadata for On Account customer applications.
- Added server-authoritative conditional validation and private admin document viewing.
- Updated the responsive Flutter onboarding section with upload/camera controls and conditional date entry.
- Customer/Pricing: 25 tests / 160 assertions passed; Returns/RMA regression: 11 / 77 passed.
- Full Laravel suite: 76 passed / 401 assertions; only the known unrelated `PriceImportWorkflowTest` fake-PDF failure remains.
- Flutter analysis passed and all 20 Flutter tests passed; no release artifacts were built.

## 2026-08-09 — Customer onboarding workflow completion

- Added the dedicated Customer Applications admin queue and complete onboarding/document review surface.
- Enforced manager-only review actions and explicit final Cash/On Account approval terms.
- Made Flutter drafts resumable from Laravel with save-state feedback and current document markers.
- Removed stale credit/cheque values when an application explicitly switches to Cash.
- Customer/Pricing: 29 tests / 193 assertions; Returns/RMA: 11 / 77; Flutter: 20 passed with no analyzer issues.
- Full Laravel suite: 80 passed / 434 assertions; the known unrelated `PriceImportWorkflowTest` failure remains.

## 2026-08-11 — Opening RMA runtime repair and barcode selection

- Fixed the production 500 error caused by undefined `$existing` during mobile validation.
- Replaced the temporary Customer Return representation with an atomic direct Sellable-to-RMA audit.
- Added idempotent operation IDs, balanced movements, shared stable scanner/manual entry, fresh balances, quantity controls and confirmation preview.
- Opening RMA: 6 tests / 37 assertions; Returns/RMA: 22 / 144; Flutter: 21 passed.
- Full Laravel suite: 86 passed / 472 assertions; only the known unrelated PriceImport fake-PDF failure remains.
## 2026-08-16 — Invoice / Checkout Stabilization

- Standardized checkout on stable master product IDs.
- Added server preflight and affected-SKU errors.
- Removed unsafe catalog-entry ID fallback and raw `Exception:` checkout messages.
## 2026-08-16 — Stock Receipts v1

- Added the warehouse STR PDF upload, review, optional request linking, repeated scanning, resumable counting, variance review, and confirmation UI.
- Preserved Laravel as stock authority and added receipt-line calculation tests.
