=== Fakturovo for WooCommerce ===
Contributors: webbaker, martinstrycek
Tags: invoice, faktura, woocommerce, fakturovo, accounting
Requires at least: 6.4
Tested up to: 7.0
Requires PHP: 8.2
Stable tag: 1.0.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Create Fakturovo invoices, proforma invoices and credit notes from WooCommerce orders. Automatically or by hand.

== Description ==

Fakturovo for WooCommerce connects your store to the Fakturovo invoicing service (https://www.fakturovo.sk). It turns WooCommerce orders into Fakturovo documents: invoices, proforma invoices and credit notes. Either automatically when an order reaches a chosen status, or manually from the order edit screen.

Features:

* Automatic document creation per payment method and order status.
* Manual creation, download and retry from a meta box on the order screen.
* Per-document number series selection. 
* Document logo, style, color and language overrides.
* Customisable item description with product placeholders: [SKU], [SHORT_DESCR], [VARIATION], [ATTRIBUTES], [NON_VARIATIONS_ATTRIBUTES], [ATTRIBUTE:name], [CATEGORY] and [WEIGHT].
* Notes below items, variable symbol and delivery-date rules.
* Currency → bank account and gateway → payment-method mapping.
* Business customer identifiers (IČO, DIČ, IČ DPH) on documents collected by the built-in checkout fields or read automatically from a supported plugin. A valid IČ DPH lets Fakturovo apply reverse charge for foreign business orders.
* Optional document download link on the thank-you page, order e-mails and the customer account, with a cash-on-delivery e-mail exclusion.
* Activity log of every request and response for troubleshooting.

== Supported plugins ==

Fakturovo reads the customer's business identifiers (IČO, DIČ, IČ DPH) from the following plugins automatically when one is active. No configuration or field changes are needed, and the built-in checkout fields stay off so nothing is duplicated:

* Kybernaut IČ DIČ
* WPify Woo (IČ/DIČ module)

If none of these is active, enable the built-in fields on the Checkout fields tab to collect the identifiers yourself.

== External service ==

This plugin sends data to Fakturovo, a third-party invoicing service, in order to create and manage documents. It is required for the plugin to function.

* Service: Fakturovo https://www.fakturovo.sk
* Terms of use: https://www.fakturovo.sk/vseobecne-obchodne-podmienky/
* API endpoint: https://api.fakturovo.sk/api/public/v1
* When data is sent: when an order reaches a configured status, when you create or retry a document from the order screen, and when you verify the connection or load bank accounts / number series in the settings.
* What is sent: your Fakturovo API key (for authentication), and per order: order number, totals, currency, line items (name, description, SKU, quantity, price, VAT rate), shipping and fees, and the billing customer details (name/company, e-mail, phone, address, country, and where available the business identifiers IČO, DIČ and IČ DPH).

When the optional "Validate EU VAT number" or "VAT exemption" feature is enabled, the customer's VAT number and country are additionally sent to the European Commission's VIES service (https://ec.europa.eu/taxation_customs/vies/, terms: https://viesapi.eu/terms/) to verify the number. If VIES is unavailable, the check is skipped so checkout is not blocked. This only applies to the plugin's own checkout fields; when a supported third-party plugin is active it performs its own validation.

== Installation ==

1. Upload the plugin to the `/wp-content/plugins/` directory, or install it through the WordPress plugins screen.
2. Activate the plugin (WooCommerce must be installed and active).
3. Go to WooCommerce → Fakturovo, enter your Fakturovo API key and verify the connection.
4. Configure document, payment and creation settings on the remaining tabs.

== Frequently Asked Questions ==

= Does the plugin store documents locally? =

No. Documents are created and stored in Fakturovo. The plugin stores only references (document id, number and the public document URL) on the order.

= Is the data removed when I uninstall? =

Only if you enable "Delete all data on uninstall" in the General settings, and even then only the plugin settings and the activity log are removed. Document references stored on your orders (invoice id, number and URL) and any collected business identifiers are always kept, so an accidental uninstall never erases invoice data from your orders.

== Screenshots ==

1. General plugin settings and API connection.
2. Business fields in checkout - IČO, DIČ, IČ DPH.
3. Proforma invoice settings.
4. Invoice settings.
5. Credit note settings.
6. Payment methods and bank accounts pairing.
7. Activity log with details (request/response).

== Changelog ==

= 1.0.1 =
* Stripe active payment methods fix in plugin payments pairing selection.

= 1.0.0 =
* Initial release.
