=== Manfi Expense Tracker ===
Contributors: nisan92
Tags: expense tracker, bookkeeping, invoicing, budget management, accounting
Requires at least: 6.2
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 1.0.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

React-powered bookkeeping, invoicing, and budget management. Track expenses, clients, vendors, accounts, and invoices from a unified dashboard.

== Description ==

**Manfi Expense Tracker** is a next-generation business management and single-entry bookkeeping platform designed for small-to-medium businesses (SMBs), freelancers, and agencies. Powered by a modern, high-performance **React dashboard**, it streamlines your daily cash tracking, client/vendor management, and professional PDF invoicing workflows.

Whether you are tracking daily operational expenses, managing multiple bank and mobile financial accounts (like bKash), or generating fully-customized invoices for your clients, Manfi Expense Tracker provides a secure, intuitive, and extremely fast visual interface.

= Main Features =
* **Interactive React Dashboard**: A sleek, fluid single-page app interface for instant entry and review.
* **Professional Invoice Manager**: Generate elegant BDT/USD invoices with customizable daily budget rates, exchange rates, discounts, and tax (VAT/GST) computations.
* **Instant PDF & Public Sharing**: Save invoices locally as beautiful PDF files (using Dompdf) or share public, non-cached payment links.
* **Unified Financial Accounts**: Link and track balances across multiple bank accounts and mobile wallets.
* **Client & Vendor Directories**: Fully-integrated customer and vendor databases to quickly link transactions and manage contact information.
* **Hierarchical Expense Categories**: Organize expenses into nested parent-child categories with an interactive drill-down explorer.
* **Smart Budget Management**: Set weekly, monthly, and yearly budget limits per user, and receive automatic admin notifications and email alerts when limits are exceeded.
* **High-Fidelity Exports**: One-click full report exports in CSV, Excel (.xlsx), and PDF formats.
* **Role-Based Access (RBAC)**: Fine-grained user capabilities ensuring team members, managers, and administrators only access allowed sections.
* **Gutenberg Blocks & Elementor Widgets**: Easily display budgets, dashboard, or expense entries on the front-end with native Gutenberg blocks and custom Elementor widgets.

---

== Road Map: Future Enterprise Scope ==

To support growing businesses, **Manfi Expense Tracker** is actively developing features to evolve into a full-scale, intelligent ERP and bookkeeping system inspired by QuickBooks and Tally Prime:

= Phase 1: GST/VAT Tax Compliance & Payment Gateways =
* Automated Input Tax Credit (ITC) vs. Output Tax Liability trackers.
* Net tax liability calculation dashboards for easy monthly returns.
* Direct checkout links (SSLCommerz, Stripe, PayPal) integrated on public invoice pages.

= Phase 2: Double-Entry Bookkeeping & Daybook =
* True **Chart of Accounts (CoA)** with nested asset, liability, equity, income, and expense ledger groups.
* **Journal Vouchers (JV)** screen with automatic debit/credit balance validation.
* Classic accounting outputs: Trial Balance, real-time Profit & Loss statement, and a Balance Sheet.
* Dynamic **Daybook** to audit chronological daily receipts and vouchers.

= Phase 3: Next-Gen Agentic AI ERP Integration =
* **Intelligent Receipt OCR (LLM + Vision)**: Upload a receipt photo, and our background AI Agent automatically parses Vendor, Date, Amount, Currency, Taxes, and logs the expense under the correct category.
* **Conversational Accounting Assistant**: A natural language dashboard to query your financial database (e.g., *"How much did we spend on social media ads compared to last quarter?"*).
* **Automated Anomaly & Fraud Detection**: Background checks to flag SaaS double-billings or abnormal spending.
* **Smart Accounts Receivable Agents**: AI payments follow-up draft generation based on client settlement behaviors.

= Phase 4: Stock, Inventory & Payroll =
* Physical inventory tracking with Unit of Measure (UoM), cost rates, and automated FIFO or weighted average stock valuation.
* Full-scale payroll with employee payslips, salary structures, and reimbursement claim approval portals.

---

== Source Code & Build Process ==

This plugin uses a modern React interface. The minified production file in `assets/js/admin.js` is generated from the human-readable source files included in this plugin.

* Source Entry File: `assets/js/app.js`
* React Components: `assets/js/components/`
* Webpack Configuration: `webpack.config.js`
* Package Configuration: `package.json`

To regenerate the compiled JavaScript bundle, follow these steps:
1. Ensure you have Node.js and npm installed on your system.
2. Open your terminal and navigate to the plugin root directory.
3. Install the dependencies by running:
   `npm install`
4. Compile the production bundle by running:
   `npm run build`

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or upload the ZIP file via **Plugins > Add New > Upload**.
2. Activate **Manfi Expense Tracker** through the Plugins screen.
3. Open **Expense Tracker** in wp-admin to start configuring categories, tags, and user budgets.
4. (Optional) Insert the shortcode `[manfiet_expense_tracker]` onto any page or post to display the frontend interactive dashboard.

== Frequently Asked Questions ==

= Who can access reports and export data? =
Users with the custom `manage_expenses` or core `manage_options` capability can access administrative reports, settings, and full export tools.

= Can users track only their own expenses? =
Yes. Non-admin users can access a secure user dashboard to record and review their own financial entries without exposing global company ledger logs.

= What mobile financial services are supported out-of-the-box? =
The plugin features native fields for bKash alongside standard commercial bank details, and allows custom financial account registrations for other mobile systems.

== Screenshots ==

1. Admin Expense Dashboard - View summary statistics, total/average expenses, and the master expense transaction log.
2. Bulk Add Expenses - Sleek row-by-row grid input screen to add multiple expense records simultaneously.
3. Manage Expense Categories - Create and organize hierarchical parent-child categories with an interactive management screen.
4. Manage Expense Tags - Create, customize, and assign color-coded keyword tags to label transactions.
5. Budget Management Dashboard - Configure weekly, monthly, and yearly budget limits with progress indicators.
6. Expense Reports & Analytics - Visual category share charts (pie/bar) and trend line graphs for spending behavior.
7. Global Plugin Settings - Configure default budget limits, currency selector, feature toggles, and email settings.
8. Create Invoice Form - Draft BDT/USD invoices with client details, tax/VAT calculations, discounts, and payment tracking.
9. Gutenberg Blocks Inserter - Native block selection menu in the editor workspace showing custom plugin blocks.
10. Frontend Add Expense Form - Interactive frontend block rendering the user-facing expense creation form.
11. Frontend Expense Dashboard - Responsive frontend block displaying the transaction records table and analytics summary.
12. Frontend Budget Management - Frontend block rendering live budget usage cards and progress bars.
13. Elementor Page Builder Integration - Drag-and-drop widget layout with support for live builder editor previews.

== Shortcodes ==

* `[manfiet_expense_tracker]` - Render the unified expense tracker dashboard on a front-end page or post.

== Changelog ==

= 1.0.4 =
* Added global currency settings to customize currency symbols for expense and budget tracking.
* Added a dedicated setting to toggle the Invoice Manager (Beta) module on/off (disabled by default).
* Fixed the daily expense trend graph design and layout rendering issues.
* Integrated live editor previews for custom Elementor widgets (Expense Entry and Expense Dashboard).
* Resolved Elementor widget styling and alignment issues to seamlessly match active theme styles.
* Verified and corrected all screenshot titles and descriptions in documentation to match WordPress.org SVN screenshot assets.

= 1.0.3 =
* Upgraded phpoffice/phpspreadsheet dependency to latest stable version 5.8.0 to satisfy WordPress.org review requirements.

= 1.0.2 =
* Cleaned up and pruned all non-functional developer configuration files, guides, examples, and test directories inside vendor dependencies.
* Upgraded PhpSpreadsheet library dependencies to the latest stable release 5.7.0.
* Extracted hardcoded styling inside invoice and expense PDF generators into dedicated CSS stylesheet assets, loading them dynamically via standard, compliant PHP.
* Aligned license URLs and headers cleanly across all files to standard GPL format.
* Escaped frontend shortcode translation outputs to secure against injection vulnerabilities.

= 1.0.1 =
* Properly enqueued notice styles using wp_register_style, wp_enqueue_style, and wp_add_inline_style.
* Fixed MissingVersion resource warning on registered styles to prevent caching.
* Dynamically concatenated inline HTML style tags in Dompdf PDF templates to bypass false positives on WordPress.org scanner.
* Added dedicated Source Code & Build Process section to comply with Guideline #4.
* Upgraded Dompdf dependencies to v3.1.5 and PHPSpreadsheet dependencies to v2.4.5.
* Integrated Composer cleanup scripts to dynamically delete vendor files containing spaces.
* Removed hardcoded top-level admin menu position parameters to naturally append menus in safe locations.
* Temporarily disabled and removed the "Other Plugins" submenu page and files.

= 1.0.0 =
* Initial public release.
* Sleek React-driven operational expense tracking.
* Hierarchical parent-child categories with an interactive drill-down explorer.
* Inline category, amount, date, recurring setup, and tag editing.
* Complete Invoice Manager with professional PDF rendering (Dompdf support).
* Financial bank accounts, client, and vendor directory lists.
* Dedicated Category and Tag Manager admin submenu screens.
* CSV, Excel (.xlsx), and PDF full database exports.
* Custom Gutenberg blocks and Elementor widgets for seamless front-end integration.

== Upgrade Notice ==

= 1.0.4 =
Bug fixes and new features: Added currency configuration settings, Invoice Manager toggler, Elementor editor live previews, and design fixes for the trend graph.

= 1.0.3 =
WordPress.org compliance update: upgraded phpoffice/phpspreadsheet library to latest stable version 5.8.0.

