=== Gsoft Labs Fleet Quote Manager ===
Contributors: gsoftlabs
Tags: quotes, forms, transport, logistics, fleet
Requires at least: 6.0
Tested up to: 7.0
Requires PHP: 7.4
Stable tag: 0.1.4
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Quote management for mobility and transport businesses. Capture requests, manage your pipeline, and publish quote forms.

Plugin homepage: [https://gsoftlabs.com/fleet-quote-manager](https://gsoftlabs.com/fleet-quote-manager)

== Description ==

Gsoft Labs Fleet Quote Manager helps transport and mobility companies collect quote requests, manage a structured quote pipeline, and publish quote forms on WordPress.


**Features**

* Setup wizard with industry templates for eight mobility verticals (trucking, logistics, vehicle rental, plant hire, passenger transport, moving, driver-assigned fleet, and other)
* Named quote forms, Gutenberg block, shortcodes, optional popup, and Elementor widget when Elementor is active
* Quote pipeline: intake, estimate, generate, send, accept/reject/revise, payments tracking, booking conversion
* Pricing helpers: fixed, per-km, per-hour, zone-based rates, location surcharges, and manual review when needed
* Optional map / distance values when configured on the request (manual or via the built-in Google Distance Matrix integration) — Google Distance Matrix is not required for core
* Secure customer quote links (token-based), native PDF quotations (Dompdf is bundled in the distribution)
* Email and dashboard notifications; outbound webhooks with optional HMAC signing
* Offline / instructions-based payment recording (bank transfer, mobile money, cash on delivery)

**Not included in free core (sold separately / coming soon)**

* Card payment gateways (Stripe, PayPal, and similar)
* WhatsApp delivery
* SMS gateway delivery

Card Payments, WhatsApp, and SMS are planned as separate addons — not shipped in free core. Core stores channel preferences and fires extension hooks so those addons can plug in later.

== External services ==

This plugin can optionally connect to the Google Distance Matrix API to calculate the driving distance between a pickup and drop-off address for quote pricing.

* This is optional and off by default. It only runs when a site administrator enters a Google Maps API key in the Setup Wizard and a customer submits a quote request with both a pickup and drop-off address.
* When triggered, the pickup and drop-off addresses entered by the customer are sent to Google's Distance Matrix endpoint (`https://maps.googleapis.com/maps/api/distancematrix/json`) to retrieve a distance value. The API key is stored server-side only and is never exposed in public forms or REST responses.
* If the integration is not configured, or the request fails, customers can still enter distance manually — the plugin never invents a distance.
* This service is provided by Google: [Google Maps Platform Terms of Service](https://cloud.google.com/maps-platform/terms) and [Google Privacy Policy](https://policies.google.com/privacy).

This plugin also supports optional outbound webhooks (free core feature, not a third-party service run by us). If a site administrator enables a webhook under Setup Wizard → Notifications, a JSON summary of quote events is sent to the URL they configure, with an optional HMAC signature. No data is sent anywhere unless an administrator explicitly enables and configures this.

== Development and third-party source code ==

This plugin bundles the following third-party libraries. No code is loaded from a remote server at runtime — everything below ships inside the plugin.

* **Chart.js 4.5.1** — used to render the admin dashboard charts, loaded only on the plugin's own admin screens. License: MIT. Human-readable source: [https://github.com/chartjs/Chart.js/tree/v4.5.1](https://github.com/chartjs/Chart.js/tree/v4.5.1). Project: [https://www.chartjs.org/](https://www.chartjs.org/).
* **Dompdf** and its dependencies (`masterminds/html5`, `sabberworm/php-css-parser`, `thecodingmachine/safe`) — used to generate PDF quotations server-side. Licenses and versions are documented in `composer.json` / `composer.lock`.

== Installation ==

1. Upload the plugin folder to `/wp-content/plugins/`, or install the zip via Plugins → Add New.
2. Activate **Gsoft Labs Fleet Quote Manager** through the Plugins menu. Native PDF quotations are bundled (no Composer step for end users).
3. Open **Fleet Quote Manager → Setup Wizard** and complete onboarding.
4. Publish a form with the Gutenberg block, `[gsoftlabs_fqm_form]`, `[gsoftlabs_fqm_button]`, or the Elementor widget.

== Frequently Asked Questions ==

= Does deactivating delete my data? =

No. Deactivation never deletes quotes, requests, forms, or settings. Only **deleting** the plugin can remove data, and only if you enable that option under **Fleet Quote Manager → Tools & Help**.

= What happens when I delete the plugin? =

By default, the plugin **keeps** custom tables and settings so you can reinstall safely. If you check **Delete all Fleet Quote Manager data when the plugin is deleted** on the Tools & Help screen, uninstall will remove `gsoftlabs_fqm_*` tables, options, related transients, and generated upload files.

= How do I show a quote form? =

Use the **Quote Form** block, shortcode `[gsoftlabs_fqm_form]` (optional `id` or `slug`), button shortcode `[gsoftlabs_fqm_button]`, or the Elementor **Fleet Quote Manager Form** widget.

= Do quote emails require a specific SMTP plugin? =

No. Emails use WordPress `wp_mail()`. For reliable delivery, configure any SMTP-compatible plugin (WP Mail SMTP, FluentSMTP, Post SMTP, Easy WP SMTP, etc.).

= Are card payments, WhatsApp, or SMS included? =

No. Free core supports payment instructions, offline recording, and staff confirmation. Card Payments, WhatsApp, and SMS are planned addons sold separately / coming soon.

= Is Google Maps required? =

No. Core works without Google Maps. Distance-based pricing uses distance values when present on a request; the optional Google Distance Matrix integration can be used when an administrator configures an API key (see "External services" above).

== Screenshots ==

1. Admin dashboard with request charts, status pipeline, and acceptance metrics.
2. Setup Wizard with industry templates and a guided teal onboarding flow.
3. Quote Forms editor for titles, shortcodes, industries, and field configuration.
4. Public multi-step quote request form (popup or embedded).
5. Admin request detail with customer info, workflow status, and quote actions.
6. Customer quote page with price breakdown and accept / reject / change options.

== Changelog ==

= 0.1.4 =
* Simplified the database schema now that the unique `gsoftlabs_fqm_` prefix is the baseline for all installs.
* Fixed an uninstall routine that referenced an incorrect option/transient name pattern, which could leave stray rows behind on full data removal.

= 0.1.3 =
* Standardized internal identifiers and database table names under the Gsoft Labs Fleet Quote Manager namespace.
* Improved database schema handling.
* Standardized plugin and block version numbers.
* Documented bundled third-party source code and licenses.

= 0.1.2 =
* Standardized internal code identifiers (PHP namespace, functions, constants, options, hooks, REST namespace, and script/style handles) under a unique namespace.
* Addon extension hooks renamed to match (see "Addon hooks" above and `ADDONS.md`).
* Added `composer.json` to the distribution package for transparency.
* Fixed an internal upload-folder naming mismatch that could leave a secondary `.htaccess` protection file unwritten (the primary protection on the actual PDF/upload storage folder was unaffected).

= 0.1.1 =
* Renamed the plugin to Gsoft Labs Fleet Quote Manager (display name, text domain, and user-facing labels) to avoid confusion with unrelated third-party products.
* Enqueued admin and front-end styles properly instead of printing raw `<style>` tags.
* Hardened sanitization of the visitor IP address used for request throttling.
* Removed the manual `load_plugin_textdomain()` call (unnecessary for WordPress.org-hosted plugins since WP 4.6).
* Documented the optional Google Distance Matrix integration and outbound webhooks under "External services".

= 0.1.0 =
* Initial public foundation: setup wizard, industries, quote pipeline, forms, shortcodes/block/Elementor, PDF quotes, webhooks, offline payments.
* WordPress.org packaging: uninstall.php with opt-in data removal, Tools & Help screen, readme headers aligned with plugin file.

== Upgrade Notice ==

= 0.1.4 =
Internal database schema simplified. No action needed on existing installs.

= 0.1.2 =
Internal code identifiers were renamed to a unique prefix. Existing quote/request data and settings are unaffected.

= 0.1.1 =
Plugin renamed to Gsoft Labs Fleet Quote Manager. No action needed; your data, settings, and shortcodes are unaffected.

= 0.1.0 =
First directory-ready release. After install, run the Setup Wizard. Data is kept on deactivate; opt in under Tools & Help only if you want data removed when deleting the plugin.
