=== Manfi Expense Tracker ===
Contributors: nisan92
Tags: expense tracker, bookkeeping, invoicing, budget management, accounting
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 8.1
Stable tag: 1.2.0
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.
* **Real-Time Google Sheets Integration**: Automated live CSV feed streams via `=IMPORTDATA()` and background Webhook pushes.
* **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.2.0 =
* Optimized build packaging to exclude WordPress.org screenshot assets and development files, shrinking distribution zip size by 95% and fixing plugin update timeouts.
* Added standard .distignore file to streamline production package builds.
* Added 1-click option to remove or re-apply auto-calculated late fee adjustments in the Invoice Builder with dynamic state indicators.
* Added quick "Clear Adjustment" button in the Invoice Adjustment card to easily reset all adjustment fields.
* Fixed currency symbol display on Daily Rate invoices so converted settlement cards (Paid Amount, Due Amount, Recorded Payments) properly render in BDT (৳) instead of USD ($).
* Fixed Previous Due note in Payment Information to accurately display the native currency of the linked previous invoice.
* Added cloneable Services Offered repeater in Vendor Profile Management with persistent storage and REST API support.
* Added per-invoice toggle to show/hide Vendor Services Offered on public web invoices and PDF exports with quick-insert category chips in Invoice Builder.
* Redesigned Vendor Create / Edit page into an intuitive, responsive grid (2-column company & tagline header, 3-column contact grid, 2-column details, and partner logos grid).
* Modernized Payment Methods & Accounts display into a compact single-row grid supporting all mobile gateways (bKash, Nagad, etc.) and commercial bank accounts.
* Converted Invoice Line Item descriptions and Service Description fields to multi-line textareas with safe HTML tags and automatic line break rendering.
* Widened Invoice line item description column to 58% for enhanced readability of project scopes and deliverables.
* Renamed Terms & Conditions section to Notes and conditionally hid the block completely when no late fee or custom note is active.
* Automatically hid payment instruction lines on invoices when no payment accounts are selected.
* Automatically cleaned up overdue fee adjustments when unlinking or deselecting previous invoices.

= 1.1.9 =
* Added 1-click option to remove or re-apply auto-calculated late fee adjustments in the Invoice Builder with dynamic state indicators.
* Added quick "Clear Adjustment" button in the Invoice Adjustment card to easily reset all adjustment fields.
* Fixed currency symbol display on Daily Rate invoices so converted settlement cards (Paid Amount, Due Amount, Recorded Payments) properly render in BDT (৳) instead of USD ($).
* Fixed Previous Due note in Payment Information to accurately display the native currency of the linked previous invoice.
* Added cloneable Services Offered repeater in Vendor Profile Management with persistent storage and REST API support.
* Added per-invoice toggle to show/hide Vendor Services Offered on public web invoices and PDF exports with quick-insert category chips in Invoice Builder.
* Redesigned Vendor Create / Edit page into an intuitive, responsive grid (2-column company & tagline header, 3-column contact grid, 2-column details, and partner logos grid).
* Modernized Payment Methods & Accounts display into a compact single-row grid supporting all mobile gateways (bKash, Nagad, etc.) and commercial bank accounts.
* Converted Invoice Line Item descriptions and Service Description fields to multi-line textareas with safe HTML tags and automatic line break rendering.
* Widened Invoice line item description column to 58% for enhanced readability of project scopes and deliverables.
* Renamed Terms & Conditions section to Notes and conditionally hid the block completely when no late fee or custom note is active.
* Automatically hid payment instruction lines on invoices when no payment accounts are selected.
* Automatically cleaned up overdue fee adjustments when unlinking or deselecting previous invoices.

= 1.1.8 =
* Added configurable Overdue Late Due Fee settings (percentage or flat rate, default 5%) and per-invoice "Overdue Due Fee (%)" input field.
* Added automatic overdue invoice detection in Payment Tracking with 1-click late fee calculation and balance adjustment tracking.
* Added dedicated Terms & Conditions section on public invoice web view and PDF exports detailing payment due dates, overdue fee terms, and invoice reference policy.
* Fixed invoice line item adjustment table row formatting to accurately output exact currency amount matching notes and totals sidebar.
* Added bidirectional USD/BDT adjustment amount conversion based on active exchange rates in Invoice Builder.


== Upgrade Notice ==

= 1.2.0 =
Reduces download size by 95% to fix update timeouts. Adds 1-click late fee removal & adjustment clearing, fixes Daily Rate currency settlement, adds Vendor Services repeater, responsive vendor profiles, and HTML invoice descriptions.




