# RELEASE NOTES - JUSTSALE POS v4.0
**Release Date:** May 12, 2026
**Version:** 4.0
**Previous Version:** 3.1.9

## 🚀 Overview
Version 4.0 marks a major milestone for JustSale POS, introducing comprehensive financial tracking and a completely revamped mobile administration experience. This release focuses on enterprise-grade auditing, business expense management, and an ultra-modern, fluid mobile UI designed for rapid operations.

---

## ✨ New Features & Enhancements

### 📱 Modern Mobile Administration UI
- **Unified Flush Design**: Upgraded all mobile modules (Inventory, Sales, Expenses, Purchases, Users) to an edge-to-edge list-group layout, maximizing data density and readability.
- **Fluid Swipe-to-Action**: Implemented high-performance, spring-like swipe gestures for quick actions across all lists, complete with auto-closing logic when interacting with other elements.
- **Mobile Goods Reception**: Fully ported the Goods Reception module to the mobile interface. Managers can now look up Purchase Orders, verify quantities, and assign batches or expiries directly from their smartphones via a seamless full-screen overlay.
- **Optimized Navigation**: Replaced the traditional, card-cluttered desktop port with a clean, icon-driven "More" menu and bottom-border-only search inputs for a premium mobile experience.

### 💰 Comprehensive Financial Suite
- **Expense Management**: Added a robust Business Expenses module with categorization, tracking, and filtering capabilities.
- **Expense Analytics**: Integrated expense tracking directly into the dashboard KPIs and trend charts to provide a true picture of net profitability.
- **Automated Audit Reports**: A professional-grade Audit Report generator that consolidates Sales, Purchases, and Expenses into a single unified ledger, exportable to PDF and MS Word.
- **Accounts Opinion Engine**: The system now automatically analyzes financial health and generates an actionable "Accounts Opinion" summary within the audit dashboard.

### 🛠️ Core System Optimizations
- **Data Integrity**: Hardened database queries to eliminate schema-related "Column not found" errors during complex reporting operations.
- **Robust Search Architecture**: Optimized data retrieval paths and updated core reporting APIs to handle larger, more complex operational datasets seamlessly.

---

## 💾 Database Changes

### New/Modified Tables
- **`expenses`**: Tracks day-to-day business expenditures linked to respective categories.
- **`expense_categories`**: Allows dynamic classification of expenses.
- **`salaries`** / **`salary_payments`**: Foundations for an integrated payroll tracking system.

### Migration Info
- For existing users upgrading from **3.1.9**, the familiar **`finish_update.php`** tool has been updated for v4.0.
- After uploading the new files, simply visit `your-domain/finish_update.php` to automatically migrate your database schema and version settings.
- This will ensure that the new `expenses` and `salaries` structures are created correctly.

---

## 📦 Developer & Distribution Notes
- **DIST4.0 Release Build**: The distribution package has been rigorously cleaned. Unnecessary migration scripts, development scratches, and standalone site portals have been pruned for a lighter, more secure footprint.
- **Fresh Baseline Database**: The `database.sql` has been regenerated to reflect the v4.0 schema natively, complete with necessary system roles, baseline categories, and clean initialization logic.

---
*Developed by Franklin BMC*
