=== ProposalPro AI ===
Contributors: codexistlabs
Tags: proposal, estimate, invoice, quotation, ai
Requires at least: 6.0
Tested up to: 6.6
Requires PHP: 8.0
Stable tag: 2.7.0
License: Proprietary — All Rights Reserved © Codexist Labs
License URI: https://codexist.co.za/plugins/proposalpro-ai/license

Generate professional estimates, invoices, and Scopes of Work with an AI agent — right from wp-admin, editable, priced automatically, and exportable to PDF.

== Description ==

ProposalPro AI turns a rough client brief into a fully itemised, on-brand estimate, invoice, or Scope of Work in seconds. Paste in notes from a client call or email, and the plugin calls an AI model (via OpenRouter) to produce a structured, editable document inside wp-admin. Edit it live, then export to PDF or open it in your email client.

**Free vs Pro**

Free covers making the document, and always will: generating estimates, invoices and Scopes of Work with AI, the live Qty x Unit Price pricing table with VAT and discounts, the document style toolbar, PDF export (including Download PDF on any saved document), saving and reopening documents, quote-to-invoice conversion, and import/export of your own data.

Every new install starts with a **14-day Agency trial** — every Pro feature unlocked, with nothing to enter and nothing to cancel. It runs once per site and simply ends; your documents, clients and settings all stay exactly where they are.

Pro adds the business around the document: the **Clients** CRM and per-client statements, **Send Quote** with online approve/decline/request-adjustments, the **payments** ledger and invoice status tracking, **automatic reminders**, and **Campaigns**.

Two things never depend on your licence: a quote link already emailed to a client keeps working, and campaign unsubscribe links keep working. The client never bought anything and should not be the one inconvenienced.

**Features**

* Three dedicated document screens — **New Invoice**, **New Estimate**, and **Generate SOW** — each opening straight into the right kind of document.
* AI requests are proxied through your own site — your OpenRouter API key never reaches the browser.
* Fully editable output (click any field to change it before exporting), with a live pricing table: enter a **Qty** and a **Unit Price Incl.** and the line total, that line's VAT, the Subtotal, the VAT total, and the Grand Total all recalculate as you type — along with the document-level VAT rate and a discount (percentage or flat amount), plus an "Add Line Item" button.
* **Client picker** on every document screen: choose a saved client and their name, company, email, phone, address, and VAT number fill the document automatically — and the AI is told who it's writing for, so a generated document is correctly addressed first time.
* **Document Style toolbar**: set the font, text size, and colour for the whole document, or select any passage and restyle just that (bold, italic, underline, colour, size, alignment). The styling is saved with the document and carries through to the PDF and to what the client sees online.
* "Refine with AI" chat panel: describe a change in plain English ("apply a 10% discount", "change payment terms to 30 days") and the AI applies just that change to the live document, on both the Quotation and Scope of Work screens.
* Save any quote, invoice, or Scope of Work to **My Documents** — search, filter by type and status, and reopen a saved document to keep editing it.
* **Download PDF** on every row of My Documents: export a saved quote, invoice, or Scope of Work as a PDF without reopening it, printed exactly as it was last saved.
* Generate an invoice directly, not just via conversion: use the **New Invoice** screen with AI, or click "Start Blank Invoice" there to fill one in yourself with no AI call at all.
* Convert a saved quote to an invoice in one click (keeps its line items, links back to the original quote, and starts a fresh invoice reference).
* Invoice status tracking (Draft, Pending, Paid, and an automatically-derived Overdue), changed directly from a dropdown on each invoice row, with a payments ledger — record part-payments and an invoice is marked Paid automatically once it's settled in full.
* A Due / Expiry column on My Documents, and automatic one-time reminder emails 3 days out: a follow-up to the client for a quote awaiting response, or a payment reminder for an unpaid invoice.
* Dashboard stat cards showing total amount outstanding (with an overdue count) and total amount received.
* **Clients** CRM screen: add/edit/archive/delete clients, search and filter (including by tag), jump straight to a client's saved documents, and generate a per-client account statement (PDF) of their invoices and payment status.
* A **logo on each client record**, picked from your Media Library. Account statements then show your logo and the client's, so a statement reads as being from you to them.
* **Campaigns** screen: build a mailing list segment from your clients (by status and/or tag — only subscribed clients are ever included), compose and send a campaign email, and review a permanent per-recipient send log. Every email automatically includes an unsubscribe link.
* **Send Quote**: email a saved quote to the client with a secure link to view it online and Approve, Decline, or Request Adjustments — you're notified by email the instant they respond, and the decision (plus any comment) shows on the Documents screen. Reset a quote back to "Sent" at any time to let the client respond again.
* One-click PDF export and "Email Client" action.
* Configurable company branding (name, email, phone, address, logo, signatory), plus VAT number, company registration number, default VAT rate, and banking details for invoices.
* Configurable currency, accent colours, and AI system prompt.
* Branded wp-admin menu icon, plus the full-colour ProposalPro AI icon shipped in `assets/images/` (SVG, and PNG at 128px and 256px) for plugin listings.
* Dismissible onboarding notice with a quick-start guide.
* Built-in Help screen with usage instructions and support contact.
* **Import / Export** screen: import an export file from AI Quote Generator 1.13+ (this plugin's previous name) or from ProposalPro AI itself, and export your own clients and documents as a single JSON file. The importer skips anything already here rather than duplicating it, so importing twice — or importing after the automatic upgrade migration has already run — is safe.
* Clean uninstall routine (opt-in data removal).

== Installation ==

**Upgrading from AI Quote Generator 1.x?** Deactivate that plugin FIRST, then install and activate this one — WordPress treats the new folder as a separate plugin, and with both active the old one will recreate its (now empty) tables after this plugin has migrated your data across. Your clients, documents, invoices, payments, campaigns, and settings are migrated automatically on first load. Once you have confirmed everything is present, delete the old plugin. Note that wp-admin bookmarks change: the screens now live under `admin.php?page=proposalpro-ai…`. Quote links and campaign unsubscribe links already emailed to clients keep working.

1. Upload the plugin folder to `/wp-content/plugins/` or install the zip via Plugins → Add New → Upload Plugin.
2. Activate the plugin through the 'Plugins' menu in WordPress.
3. Go to **ProposalPro → Settings** and enter your OpenRouter API key, the AI model(s) to use, and your company name and email address. The plugin ships with no company details of its own, and will not generate a document until at least the name and email are filled in — a document carries your branding, so there is nothing sensible to assume here.
4. Adjust branding, currency, and accent colours to match your business.
5. Go to **ProposalPro → New Estimate** (or **New Invoice**) to create your first document.

== Frequently Asked Questions ==

= Is my API key safe? =

Yes. The key is stored in the WordPress options table and is only ever used server-side when your site calls OpenRouter. It is never sent to, or exposed in, the browser.

= Does this plugin add anything to my public-facing site? =

No shortcodes or pages are registered, and there is no admin-facing change to your theme. The plugin does generate two kinds of unguessable, single-purpose front-end links that work without a login: the campaign unsubscribe link, and the "view this quote online" link sent by Send Quote. Neither exposes anything beyond the one record the link points to.

= I am moving to a DIFFERENT site. How do I bring my data? =

The automatic migration only helps when both plugins are on the same site. For a different site, update AI Quote Generator to 1.13 or later on the old site, use its Export Data screen, then upload that file on this plugin's Import / Export screen. Clients and documents already present are skipped rather than duplicated, so it is safe to run even if some data is already here.

= I upgraded from AI Quote Generator. Where did my data go? =

Nowhere — it was renamed along with everything else. The six database tables were renamed from `wp_celabs_aiqg_*` to `wp_celabs_ppai_*` and your settings were copied to the new option names, automatically, the first time this plugin loaded. Your old settings are deliberately left in place as well, so the 1.x plugin still finds them if you ever reactivate it to check something; both sets are removed if you uninstall with "Remove data on uninstall" enabled.

= What happens to my settings if I delete the plugin? =

By default your settings are kept in case you reinstall. If you want them removed on uninstall, tick "Remove data on uninstall" under Settings first.

== Changelog ==

See CHANGELOG.md included in the plugin folder.

== Support ==

support@codexist.co.za — https://codexist.co.za
