=== 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: 8.1
Stable tag: 1.0.6
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.

---

== 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.

== Shortcodes ==

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

== 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.



== Changelog ==

= 1.0.6 =
* Resolved invoice print styling issues by preventing theme reset CSS conflicts and forcing print background rendering.
* Added asset cache-busting versioning for stylesheets and JavaScript assets using dynamic file modification times.
* Corrected alignment and layout styling of right-column metadata grids in the public invoice layout.
* Cleaned up balance due computations inside the invoice summaries to accurately display net due amounts.
* Customized invoice HTML document titles to automatically format PDF filenames as `[invoice-number]-[client-name-slug]` upon download/print.
* Integrated support for campaign descriptions inside the invoice table rows and PDF documents.
* Added a dedicated conditions & notes textarea field to the invoice editor, displaying it at the bottom of public and PDF templates.

= 1.0.5 =
* Resolved PHPCS/Plugin Check security compliance errors regarding missing translators comments.
* Fixed escaping and restricted date function warnings in custom Elementor widgets.
* Replaced dynamic SQL query building with static queries in API visible categories to resolve direct database parameter warnings.

= 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.6 =
Resolved print layout stylesheet conflicts, dynamic resource version cache-busting, public layout alignment issues, balance due calculations, invoice title structure for browser PDF downloads, campaign descriptions in invoice rows, and custom invoice conditions & notes.

= 1.0.5 =
Compliance and security updates: resolved PHPCS and Plugin Check errors in translator comments, SQL query construction, and Elementor date rendering templates.

= 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.

