=== DokumentenPilot - Delivery Notes, Quotes & Credit Notes for WooCommerce ===
Contributors: lernmitki, moduldeck
Tags: delivery-note, woocommerce, packing-slip, credit-note, quote
Requires at least: 6.0
Tested up to: 6.9
Requires PHP: 8.0
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
WC requires at least: 8.0
WC tested up to: 9.5

Delivery notes, quotes, credit notes, proforma invoices and packing slips for WooCommerce. Partial deliveries supported.

== Description ==

DokumentenPilot generates all common business documents directly from your WooCommerce orders. It supports partial deliveries, a full B2B quote workflow, and legally compliant credit notes – all from a single interface.

= Five Document Types =

* **Delivery Notes** – Including partial delivery notes: select which items and quantities are shipped per parcel, and DokumentenPilot tracks the delivery status automatically
* **Quotes / Estimates** – Create quotes, generate a PDF, send it to the customer, and convert it to a WooCommerce order with one click
* **Credit Notes** – §14 UStG-compliant with negative amounts and invoice reference
* **Proforma Invoices** – For customs and advance payments
* **Packing Slips** – Warehouse-optimized with large font, checkboxes and order number in large print

= Partial Delivery Notes =

When you ship an order in multiple parcels, you can create a separate delivery note for each shipment. Select which items in which quantities are shipped – DokumentenPilot tracks what has already been delivered.

= B2B Quote Workflow =

1. Create a quote in the admin area (add products from the catalogue or enter line items manually)
2. Generate a PDF and send it to the customer by email
3. On acceptance: convert to a WooCommerce order with one click
4. All further documents (delivery note, packing slip) are generated automatically

= Highlights =

* **Partial delivery notes** – Per-shipment PDFs with position-accurate tracking
* **Quote → Order** – Full B2B workflow: create → send PDF → convert with one click
* **Legally compliant credit notes** – §14 UStG, with negative amounts and invoice reference
* **RechnungsPilot integration** – Shares company data, logo and colour automatically
* **Automatic generation** – Triggered by order status changes or refunds
* **PDF email attachments** – Automatically attached to WooCommerce emails
* **Customer download** – Available in the "My Account" area
* **ZIP export** – All documents with SHA-256 integrity log
* **HPOS compatible** – Supports WooCommerce High Performance Order Storage
* **Small business mode** – §19 UStG (Kleinunternehmer)
* **Made in Germany** – Built for the DACH market

= Technical Details =

* PDF engine: dompdf
* Thread-safe document numbers (race condition safe)
* SHA-256 hashes for integrity verification
* Security: nonce verification, capability checks, path traversal protection

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/` directory or install it through the WordPress plugin installer
2. Activate the plugin through the "Plugins" menu in WordPress
3. The setup wizard starts automatically – follow it to configure your company data
4. Done! Documents will be generated automatically from now on.

= RechnungsPilot Integration =

If RechnungsPilot is installed, DokumentenPilot automatically uses:
* Company data (name, address, tax numbers)
* Logo and primary colour
* Small business (Kleinunternehmer) setting
* Invoice number reference in credit notes

== Frequently Asked Questions ==

= Do I need RechnungsPilot? =

No. DokumentenPilot works completely standalone. If RechnungsPilot is installed, company data is shared automatically – this saves you entering it twice.

= What are partial delivery notes? =

When shipping an order in multiple parcels, you can create a separate delivery note per shipment. You select which items in which quantities are being shipped – DokumentenPilot automatically tracks the delivery status.

= How does quote conversion work? =

You create a quote in the admin area, add items (from the WooCommerce product catalogue or manually), generate a PDF and send it to the customer. When the customer accepts, you convert the quote to a WooCommerce order with one click.

= Is the plugin GoBD compliant? =

DokumentenPilot uses gapless document numbers and calculates SHA-256 hashes for all PDFs. The audit log can be exported. GoBD-compliant invoicing is handled by RechnungsPilot.

= Does it work with HPOS? =

Yes, DokumentenPilot is fully compatible with WooCommerce High Performance Order Storage.

== External Services ==

This plugin does not connect to any external services. All document generation (PDF rendering via dompdf) is performed locally on your server. No data is sent to third-party services.

== Screenshots ==

1. **Dashboard** – All documents at a glance, filterable by type: delivery notes, quotes, credit notes
2. **Partial delivery note** – Select items and quantities, create a separate PDF per shipment
3. **Quote editor** – Add items from the WooCommerce catalogue, generate PDF, convert to order with one click
4. **Credit note PDF** – Professional German-market layout with negative amounts and invoice reference
5. **Settings** – Number format per document type, automation, email attachments
6. **Setup Wizard** – Configured in 2–3 steps (automatically detects RechnungsPilot)
7. **WooCommerce integration** – Create and manage all documents directly in the order view

== Changelog ==

= 1.0.0 =
* Initial release
* 5 document types: delivery note, credit note, proforma, quote, packing slip
* Partial delivery notes with position-accurate tracking
* Quote system with full lifecycle and one-click conversion
* Legally compliant credit notes (§14 UStG)
* Proforma invoices for customs and advance payments
* Warehouse-optimised packing slips with checkboxes and large order number
* Automatic generation on order status change
* PDF attachment to WooCommerce emails
* Customer download in "My Account"
* ZIP export with SHA-256 audit log
* RechnungsPilot integration (company data, colour, logo)
* Setup Wizard (2 or 3 steps)
* HPOS compatibility
* Small business regulation (§19 UStG)

== Upgrade Notice ==

= 1.0.0 =
Initial release. Install and complete the Setup Wizard.
