=== Nexu WooAdmin Billing Pro ===
Contributors: nexuvibedevgroup
Tags: woocommerce, invoice, billing, custom invoice, payment
Requires at least: 6.0
Tested up to: 6.8
Requires PHP: 7.4
Stable tag: 1.8.5
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Professional custom invoice and billing system for WooCommerce.

== Description ==

Nexu WooAdmin Billing Pro allows you to create custom invoices for your customers, manage partial payments, and provide a seamless payment experience.

**Key Features:**

* Create custom invoices with custom line items
* Add services not predefined in WooCommerce products
* Customer search with autocomplete
* Guest invoice access via secure links
* Partial payments and installments
* Automatic payment reminders
* Professional email templates
* My Account integration
* PDF invoice generation (RTL support)
* Tax class integration
* Invoice expiry dates
* Private and public notes
* Complete history tracking

**For Site Administrators:**

* Quick invoice creation (under 30 seconds)
* Intuitive modern UI
* Advanced search and filtering
* Bulk operations
* Role-based access control
* Customizable invoice number format

**For Customers:**

* View invoices in My Account
* One-click payment
* Download PDF invoices
* Track payment history

== Installation ==

1. Upload the plugin files to the `/wp-content/plugins/nexu-wooadmin-billing-pro` directory, or install the plugin through the WordPress plugins screen directly.
2. Activate the plugin through the 'Plugins' screen in WordPress.
3. Go to WOO Billing > Settings to configure the plugin.
4. Start creating invoices!

== Frequently Asked Questions ==

= Does this plugin require WooCommerce? =

Yes, WooCommerce 8.0 or higher is required.

= Can I customize the invoice number format? =

Yes, you can set a custom prefix, suffix, and format in the settings.

= Does it support RTL languages? =

Yes, the plugin fully supports RTL languages including Persian and Arabic.

== Changelog ==

= 1.8.5 =
* Improved: Invoice Details view modal completely redesigned with modern UI
* Added: Customer card with contact information and icons
* Added: Items table with proper styling and description display
* Added: Summary card with subtotal, discount, tax, total, paid, and balance due
* Added: Dates card showing created, due, and expiry dates
* Added: Payment Progress card for installment invoices with visual progress bar
* Added: Payment Schedule card showing all installments with status indicators
* Added: Visual indicators for paid, pending, and overdue installments
* Improved: Responsive layout with sidebar for summary and main area for details

= 1.8.4 =
* Fixed: Payment Schedule layout in PDF - converted div-based layout to table for mPDF compatibility
* Fixed: Progress bar and stats section rendering correctly in PDF

= 1.8.3 =
* Fixed: Payment Schedule section now starts on a new page in PDF to prevent overflow

= 1.8.2 =
* Added: Payment schedule section in PDF invoices for installment invoices
* Added: Progress bar showing payment progress percentage in PDF
* Added: Detailed installment table with status, due date, and paid date
* Added: Visual indicators for paid, pending, and overdue installments in PDF

= 1.8.1 =
* Fixed: Enable Partial Payments checkbox now saves correctly when unchecked
* Fixed: Boolean values in JavaScript properly converted to integers for PHP

= 1.8.0 =
* Added: Comprehensive installment display in customer My Account area
* Added: Payment progress bar in invoice list with percentage
* Added: Installment badge for installment invoices in list view
* Added: Payment Schedule section in invoice detail page
* Added: Individual "Pay Now" buttons for each installment
* Added: Visual indicators for paid, pending, and overdue installments
* Added: Progress card showing paid/remaining/total amounts
* Added: Installment count display (e.g., "2 of 4 installments")
* Improved: Invoice list table with better status badges
* Improved: Invoice detail page layout and styling
* Improved: Frontend CSS with modern gradient styling

= 1.7.9 =
* Fixed: My Account "invoices" endpoint not working (404 error)
* Added: Automatic rewrite rules flush on activation
* Added: Auto-detection and fix for missing endpoint in rewrite rules
* Improved: Endpoint registration during plugin activation

= 1.7.8 =
* Fixed: Currency symbol HTML entity display in all price fields (invoice form, totals, installments)
* Fixed: Search icon positioning in customer search field
* Changed: All .text() to .html() for price display elements

= 1.7.7 =
* Fixed: Search icon z-index in customer search field
* Fixed: Currency symbol HTML entity display issue in revenue statistics
* Improved: Customer search input field padding and positioning

= 1.7.6 =
* Added: Beautiful welcome page for first-time installation
* Added: Automatic redirect to welcome page on plugin activation
* Added: Feature showcase with animated mascot image
* Improved: User onboarding experience

= 1.7.5 =
* Fixed: Invoice product visibility in WooCommerce products list
* Fixed: Product filter dropdown now works correctly to show invoice system products
* Updated: Plugin URI changed to official product page
* Updated: Author name changed to NexuVibe Dev Group

= 1.7.4 =
* Added: Complete installment email notification system
* Added: Installment-specific payment reminders (separate from invoice reminders)
* Added: Installment payment confirmation email template
* Added: Payment progress tracking in emails (progress bar, percentage)
* Added: Get installments due in X days method in PaymentRepository
* Added: Mark installment as paid helper method
* Improved: ReminderJob now handles both invoices and installments separately
* Improved: Email templates show installment number and total count

= 1.7.3 =
* Added: Complete partial payment (installments) UI system
* Added: Payment schedule management with dynamic installment creation
* Added: Auto-split feature for equal installment distribution
* Added: Real-time installment totals tracking (Total, Assigned, Remaining)
* Added: Installment template for creating multiple payment schedules
* Fixed: Installment data now properly collected and saved
* Improved: Visual feedback for installment amount validation

= 1.7.2 =
* Improved: Currency formatting now fully syncs with WooCommerce settings
* Added: Proper support for currency symbol position (left, right, left_space, right_space)
* Added: Proper thousand and decimal separators from WooCommerce
* Fixed: Price formatting across all admin interfaces

= 1.7.1 =
* Added: PDF enable/disable toggle in settings
* Added: PDF download button in admin invoice actions
* Improved: PDF download with proper nonce verification

= 1.7.0 =
* Added: Comprehensive email notification system
* Added: Email notifications to customer on invoice creation (with pay now button)
* Added: Email notifications to customer on successful payment
* Added: Email notifications to admin on invoice creation
* Added: Email notifications to admin on payment received
* Added: Customizable email color scheme (primary, secondary, text, background colors)
* Added: Color presets for quick email branding (Blue, Purple, Green, Red, Orange, Teal)
* Added: Email preview functionality - preview all email templates in settings
* Added: Send test email feature to verify email configuration
* Added: Admin email toggle for each notification type
* Added: Customer email toggle for each notification type
* Improved: Email templates now use customizable gradient colors
* Improved: Professional and modern email template designs

= 1.6.2 =
* Fixed: Invoice action buttons (View, Edit, Delete) now work correctly
* Fixed: Created invoice-modal.php partial file for modals to work in invoices page
* Improved: Event delegation changed from tbody to document for reliability
* Added: preventDefault and stopPropagation to action button handlers

= 1.6.1 =
* Added: Custom filter dropdown "Invoice System Products" in Products admin page
* Added: Invoice system product now hidden from "All Products" list by default
* Added: Multiple deletion prevention hooks (delete, trash, capability check)
* Added: Prominent visual indicators (red row highlight, animated badge, emoji)
* Added: Custom admin styles for invoice product row
* Added: Removed delete/trash row actions for invoice product
* Added: Enhanced error messages with styled wp_die() screens
* Improved: Invoice product badge now has gradient style and animation
* Security: Invoice product cannot be bulk-selected or deleted in any way

= 1.6.0 =
* Security: Access Control tab now only visible to Administrators
* Security: Added administrator-only check for saving access control settings
* Security: Added wp_die() protection for direct access to Access Control page
* Improved: Permission matrix now supports horizontal scrolling for many roles (30+ roles)
* Improved: Matrix table has min-width to prevent crushing on smaller screens
* Fixed: Access Control tab capability changed from nwb_manage_settings to manage_options

= 1.5.8 =
* Added: Comprehensive Access Control tab for role and permission management
* Added: Visual permission matrix with checkboxes for each role/capability combination
* Added: Role details view showing assigned permissions and user counts
* Added: Capability guide with detailed descriptions for each permission
* Added: Common permission scenarios (Sales Rep, Billing Manager, Accountant)
* Added: Quick action presets for Shop Manager, Editor, and View Only
* Added: AJAX handler for saving access control settings
* Added: Support for "own invoices only" permissions (nwb_view_own_invoices, nwb_edit_own_invoices)
* Improved: Deep permission system allowing fine-grained access control

= 1.5.7 =
* Changed: Overview tab moved to last position (after Settings)
* Changed: Overview tab icon changed to book-open
* Changed: Overview tab description to "Guide & Help"

= 1.5.6 =
* Fixed: Changed Persian text to English in Overview tab ("Custom Invoice" instead of "فاکتور سفارشی")

= 1.5.5 =
* Added: Comprehensive Overview & Guide tab with visual system flowchart
* Added: Interactive diagram showing how the billing system works
* Added: Features tab with all plugin capabilities listed
* Added: Quick Start guide with step-by-step instructions
* Added: FAQ section with common questions and answers
* Added: Shortcodes reference section
* Added: Key components explanation (database, WooCommerce integration, security)
* Improved: Navigation with new Overview tab in settings area

= 1.5.4 =
* Fixed: Settings tab content overflow issue - all tabs now display full height
* Fixed: Removed min-height restriction on tab content
* Fixed: Changed overflow from hidden to visible for proper content display
* Fixed: Removed duplicate product card from Invoice settings tab

= 1.5.3 =
* Added: Internal scrolling for settings tab panels to prevent overflow
* Added: Comprehensive variable product management section in Invoice settings tab
* Added: Product status display with variations count, visibility, and publish status
* Added: Detailed product information grid with badges
* Added: Recreate product button functionality with AJAX handler
* Improved: Settings tab panels now have proper scroll behavior with custom scrollbar
* Improved: Better product management UI with actionable buttons
* Fixed: Settings content overflow issue in tabbed interface

= 1.5.2 =
* Improved: Modern gradient-style action buttons with hover effects
* Improved: Action buttons now have professional tooltips
* Improved: Better visual feedback with hover animations
* Updated: Separated invoices page from settings (full-width layout without sidebar)

= 1.5.1 =
* Fixed: Customer search icon positioning
* Fixed: Customer search functionality
* Optimized: Reduced vendor folder size from 92MB to 19MB by removing unnecessary fonts
* Improved: Better customer search UI with loading indicator

= 1.5.0 =
* Updated: Completely redesigned invoice modal with modern tabbed interface
* Added: 4 tab layout (Customer, Items, Extras, Settings)
* Added: Modern card-based item management
* Added: Live total preview in modal header
* Added: Visual tab status indicators
* Improved: Fullscreen modal for better UX
* Improved: Modern customer search with dropdown

= 1.4.0 =
* Updated: Redesigned settings page with modern tabbed interface
* Added: 6 separate settings tabs (General, Invoice, Payment, Email, Company & PDF, Advanced)
* Improved: Clean card-based settings layout
* Added: Invoice number preview
* Added: Unsaved changes indicator

= 1.3.0 =
* Updated: Redesigned admin interface to match NexuVibe design system
* Updated: Author information and branding
* Improved: Indigo/Violet color theme with modern gradients

= 1.2.0 =
* Added: PDF invoice generation with RTL (Persian/Arabic) support
* Added: Download PDF button for customers in My Account and Guest view
* Added: Professional PDF template with company branding

= 1.1.0 =
* Added: Payment processing for My Account and Guest invoice views
* Fixed: WooCommerce cart availability check before adding items
* Fixed: Payment email notification after successful payment
* Improved: Guest invoice payment flow

= 1.0.0 =
* Initial release

== Upgrade Notice ==

= 1.2.0 =
Added PDF invoice generation with RTL language support.

= 1.0.0 =
Initial release.
