=== Zoventic Invoices ===
Contributors: zoventic
Tags: invoice, invoicing, estimates, PayPal, CRM
Requires at least: 6.0
Tested up to: 7.1
Requires PHP: 8.0
Stable tag: 1.0.2
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Professional Invoicing, Quote Estimates, Online Payments, and Client Management for WordPress. Send PDFs and get paid faster.

== Description ==
**Zoventic Invoices** is an invoicing and billing solution for freelancers, agencies, consultants, and business owners to manage billing directly within WordPress.

Create **Invoices**, send **Quote Estimates**, record online **PayPal Payments**, track client accounts, and generate clean **PDF Documents** with custom branding.

---

### 🚀 Key Features

#### 🧾 Professional Invoicing
* **Custom Document Titles & Prefixes**: Brand invoices with custom titles (e.g., *Tax Invoice*, *Service Billing*) and prefixes (`INV-2026-001`).
* **PDF Generation**: Generate PDF invoices with your business logo and details.
* **Line Items & Automated Math**: Add custom items, quantities, unit prices, tax rates, and discount percentage or fixed amounts.
* **Email Engine**: Send invoice notifications with PDF attachments directly to clients with resend capabilities.

#### 📜 Quotations & Estimates
* **Create & Send Quotes**: Pitch project scope and pricing with estimates.
* **1-Click Estimate Approval**: Change estimate statuses from Draft to Sent, Approved, or Declined.
* **Instant Conversion to Invoice**: Convert approved estimates directly into official invoices in one click without re-typing data.

#### 💳 Online & Offline Payments
* **PayPal Integration**: Record and track PayPal payments manually. Mark invoices as paid when clients pay via PayPal outside of WordPress.
* **Manual / Bank Wire Payments**: Record offline cash, check, or bank wire payments with full audit history.
* **Automatic Status Transitions**: Invoices automatically transition to **Paid** when full payment is recorded.

#### 👥 Built-in Client Management
* **Client Directory**: Manage client contacts, billing addresses, tax IDs, and default currencies.
* **Account Tiers**: Categorize clients by account types (*Standard*, *Enterprise*, *VIP*).
* **Search & Filtering**: Filter clients, invoices, and estimates by name, company, date, or document title.

#### 📊 Real-Time Dashboard & Analytics
* **Revenue Tracking**: Monitor total revenue, pending balances, and paid amounts at a glance.
* **Quote Approval Rate**: Track proposal conversion rates.

---

### 🌟 Features & Benefits
* **Self-Hosted WordPress Integration**: Manage all billing directly on your own WordPress site.
* **Clean Architecture**: Designed for performance, data integrity, and privacy.
* **Privacy & Security**: All client data and invoice records stay stored on your own server.

== Third-Party Services ==

Zoventic Invoices integrates with **PayPal** for payment processing. When you record or track PayPal transactions, your configured PayPal API keys are used to communicate directly with PayPal's API servers. No data is transmitted to PayPal except when explicitly initiated by the site administrator during PayPal API configuration or transaction processing.

* **PayPal**: https://paypal.com
* **PayPal Privacy Policy**: https://paypal.com/privacy
* **PayPal Terms of Service**: https://paypal.com/legal

== Third-Party Libraries ==

All libraries run entirely on your server and do not connect to external services.

* **mPDF** — PDF invoice generation
  * License: GPL-2.0-or-later
  * Source: https://github.com/mpdf/mpdf
* **psr/log** — PSR-3 logger interface (used by mPDF)
  * License: MIT
  * Source: https://github.com/php-fig/log
* **myclabs/deep-copy** — Object deep cloning (used by mPDF)
  * License: MIT
  * Source: https://github.com/myclabs/DeepCopy
* **setasign/fpdi** — PDF template import (used by mPDF)
  * License: MIT
  * Source: https://github.com/Setasign/FPDI
* **paragonie/random_compat** — `random_bytes` polyfill (used by mPDF)
  * License: MIT
  * Source: https://github.com/paragonie/random_compat

== Installation ==

1. Upload the `zoventic-invoices` folder to `/wp-content/plugins/`
2. Activate the plugin through the **Plugins** menu in WordPress
3. Start creating invoices and managing clients from the **Zoventic Invoices** menu in the sidebar

**Minimum Requirements:**

* WordPress 6.0 or higher
* PHP 8.0 or higher
* PHP extension: `bcmath` (for monetary precision)
* PHP extension: `mbstring` (for PDF generation)
* MySQL 5.7 / MariaDB 10.2 or higher

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

No. Zoventic Invoices is a fully standalone plugin. It does not depend on WooCommerce or any other plugin.

= Is there a premium version? =

Yes. Zoventic Invoices Pro is a paid add-on with subscriptions, reports, tax management, dunning, and a client portal.

= What payment gateways are supported? =

PayPal is supported in the free version for recording and tracking payments. The Pro add-on may include additional gateway integrations.

= Are there limits on invoices, estimates, or clients? =

No. Create unlimited invoices, estimates, and clients.

= Does it support multi-currency? =

You can set a default currency for your business. Individual invoice currencies can be configured per invoice.

= Is the PDF generation included for free? =

Yes. PDF generation using the Clean Sheet template is included in the free plugin, powered by mPDF.

= Where is data stored? =

All data is stored in your WordPress database (11 custom tables with the `wp_zinv_` prefix). Nothing is sent to external servers except when using PayPal for payment processing.

= Is the plugin translation-ready? =

The plugin uses the standard WordPress i18n functions and is ready for translation via translate.wordpress.org.

= What PHP extensions are required? =

The `bcmath` extension is required for monetary arithmetic. The `mbstring` extension is required for PDF generation. Both are available in most managed WordPress hosts.

== Screenshots ==

1. PDF Invoice Document — Professional PDF template with company branding, structured line items, taxes, discounts, terms, and custom watermark
2. Dashboard — Financial overview with real-time revenue KPIs, approval rates, monthly growth chart, and recent activity feed
3. Invoice Builder — Interactive line items editor with client contact card, tax and discount controls, and real-time live PDF preview
4. Client Directory — Comprehensive client management with lifetime value (LTV) tracking, account tier badges, filters, and CSV import/export
5. Payment History — Transaction history ledger with payment method indicators, settlement status pills, and revenue overview
6. Plugin Settings — General configuration with company profile, custom logo uploader, tax ID/VAT, and currency preferences

== Privacy ==

Zoventic Invoices stores the following data exclusively in your WordPress database. Nothing is sent to external servers except when explicitly using the PayPal payment integration.

* **Client records** — Name, email, phone, address, and notes entered by the administrator.
* **Invoice and payment records** — All billing data entered by the administrator.
* **Activity log** — Records of administrative actions including the IP address of the logged-in administrator performing each action. IP addresses are stored for audit purposes only and are not shared externally.

To comply with privacy regulations (e.g. GDPR), site administrators are responsible for obtaining appropriate consent from their clients before entering their personal data into the plugin.

For data erasure requests, all Zoventic Invoices data can be permanently removed by deleting the plugin via the WordPress admin, which will drop all plugin database tables and options.

== Changelog ==

= 1.0.2 =
* Feature: Added native PDF watermark engine with support for PAID, DRAFT, OVERDUE, VOID, SAMPLE, and custom text watermarks, with automatic PDF cache invalidation on settings changes.
* Enhancement: Added real-time unsaved changes detection and dynamic visual highlight on the Save Draft button in the Invoice Builder.
* Enhancement: Redesigned high-fidelity template preview illustrations in Settings and Template Picker matching exact PDF layout geometries.
* Enhancement: Upgraded client details card in Invoice and Estimate builders to display complete structured contact information, website URL, and tax exemption status.
* Fix: Fixed Settings page Discard button visibility and disabled state contrast.

= 1.0.1 =
* Fix: Fixed client dropdown WordPress user mapping and client directory subscriptions tab.

= 1.0.0 =
* Initial release