=== ezy Quotation Builder ===
Contributors:      abssaiful
Tags:              quotation, quote builder, pdf quotation, client management, business quotation
Requires at least: 5.8
Tested up to:      7.1
Requires PHP:      7.4
Stable tag:        1.0.1
License:           GPLv2 or later
License URI:       https://www.gnu.org/licenses/gpl-2.0.html
Donate link:       https://ehut.tech/donate/

A modern and easy quotation builder – create, send and manage professional quotations with PDF attachments.

== Description ==

**ezy Quotation Builder** makes creating and sending professional quotations effortless. Build your client list, maintain a product/service catalogue, and fire off a branded PDF quotation by email in just a few clicks.

= Key Features =

* **Client Management** – Store unlimited clients with name, company, email, phone, address and notes. Quick-search autocomplete when creating quotations.
* **Product/Service Catalogue** – Maintain a product list with price and description for fast quotation building.
* **Smart Quotation Builder** – Select a client, add line items with quantity and unit price, and watch the totals update live. Supports discount, tax and service charge.
* **PDF Generation** – Every quotation is rendered as a professionally styled PDF using FPDF – no third-party SaaS required.
* **Automatic Email Delivery** – The moment you click *Create & Send*, the client receives a branded HTML email with the PDF attached.
* **Quotation Management** – List, filter, resend, mark as accepted/rejected, download or delete quotations from a clean admin table.
* **Flexible Settings** – Configure company branding, quotation prefix & numbering, validity period, terms & conditions, tax label & rate, service charge, discount toggle, currency, email sender details, CC/BCC and custom footer notes.
* **Status Tracking** – Track quotations through Draft, Sent, Accepted, Rejected and Expired states.

= Use Cases =

* Freelancers and consultants quoting for services
* Small businesses issuing sales quotations
* Agencies needing a simple quotation module for proposals

= Languages =

Ready for translation (`.pot` file included). All strings are wrapped in `__()` / `esc_html__()` with the `ezy-quotation-builder` text domain.

== Installation ==

**Automatic (recommended)**

1. Go to **Plugins → Add New** in your WordPress admin.
2. Search for **ezy Quotation Builder**.
3. Click **Install Now** then **Activate**.

**Manual**

1. Download the ZIP file.
2. Go to **Plugins → Add New → Upload Plugin**.
3. Upload the ZIP and click **Install Now**, then **Activate**.

**First-Time Setup**

1. Navigate to **ezy QB → Settings**.
2. Fill in your **Company Details** (name, logo, address, registration numbers).
3. Configure **Quotation Settings** (prefix, starting number, currency, validity period).
4. Set **Tax & Charges** (GST/VAT/SST rate, service charge, discount options).
5. Configure **Email Settings** (from name, from address, subject, body template).
6. Save, then add your clients and products — you're ready to quote!

== Frequently Asked Questions ==

= How are PDFs generated? =
PDFs are generated server-side using the FPDF library (bundled). No external service is required.

= What email service does the plugin use? =
It uses WordPress's built-in `wp_mail()` function, so it works with any SMTP plugin (e.g. WP Mail SMTP, FluentSMTP).

= Can I customise the quotation PDF design? =
The generator class is in `includes/class-ezyqb-pdf.php`. Developers can override this to suit their brand.

= Where are quotations stored? =
Quotations are stored in custom database tables created on activation. No post types are used, keeping your WordPress database clean.

= Can I resend a quotation? =
Yes. From **ezy QB → All Quotations**, click **Resend** on any quotation row to re-email the PDF to the client.

= What happens if I uninstall the plugin? =
The `uninstall.php` file removes all plugin options and database tables.

== Screenshots ==

1. **Dashboard** – Quick-glance stats: total quotations, accepted value, active clients and products.
2. **Settings – Company Details** – Enter your brand name, logo, address and registration numbers.
3. **Settings – Quotation Config** – Quotation prefix, numbering, currency and validity period.
4. **Settings – Tax & Charges** – Enable/disable tax, service charge and discount with custom labels and rates.
5. **Settings – Email Settings** – Sender name, address, subject, body template and CC/BCC.
6. **Clients List** – Searchable, paginated client table with inline edit and delete.
7. **Products List** – Product catalogue for quick line-item entry.
8. **Create Quotation** – Step-by-step builder: client autocomplete, dynamic line items, live totals.
9. **Quotations List** – Filter by status (Draft / Sent / Accepted / Rejected / Expired), search and actions.
10. **View Quotation** – Full quotation preview with download PDF, resend, accept/reject buttons.
11. **PDF Quotation** – Sample of the generated PDF sent to clients.

== Changelog ==

= 1.0.1 =
* Fixed: FPDF library loading simplified — bundled `EZYQB_FPDF` class is now loaded directly with no dependency on the global `FPDF` class, eliminating potential conflicts with other plugins.
* Fixed: Removed unnecessary `class EZYQB_FPDF extends FPDF {}` alias branch from the PDF loader.

= 1.0.0 =
* Initial release.
* Client management (add, edit, delete).
* Product catalog with autocomplete.
* Quotation builder with line items.
* PDF generation via FPDF.
* Email delivery with PDF attachment.
* Quotation statuses: Draft, Sent, Accepted, Rejected, Expired.
* Settings: Company info, Quotation config, Tax & charges, Email settings.
* Dashboard with stats overview.
* Download quotation PDF, resend quotation email, mark as accepted/rejected.
