=== Polish Invoice Sync for WooCommerce ===
Contributors: catcodestudio
Tags: faktura, fakturownia, infakt, invoice, woocommerce
Requires at least: 6.2
Tested up to: 7.1
Requires PHP: 7.4
Stable tag: 1.0.0
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html

Issue invoices for WooCommerce orders in Fakturownia or inFakt, keep the PDF with the order and collect the buyer's NIP at checkout.

== Description ==

Polish shops usually keep their invoices in an online invoicing service, not in WooCommerce. This plugin connects the two: open an order, press one button, and the invoice is created in your service with the right buyer, lines, VAT rates and payment. The number and the PDF stay with the order.

* **Fakturownia and inFakt** in one plugin. Choose the service and paste the API key.
* **One button on the order screen.** The document carries the products, shipping and fees, with the VAT rate of each line.
* **No double invoices.** An order gets one document of a kind, even after two clicks at once or a lost connection.
* **Buyer data from the order.** Companies with the NIP or an EU VAT number, private customers by name.
* **NIP field at checkout**, classic and block, with the checksum verified. A NIP collected by another plugin can be used instead.
* **PDF for you and your customer.** Download it from the order, and let customers download it from their account. The file goes through your site, so the API key stays private.
* **Payment methods** mapped to the service, paid orders marked as paid.
* **Readable errors.** When the service refuses a document, the order shows why, and "Try again" repeats it.
* **VAT exempt sellers:** lines without tax go out as zw, np or 0%, with the legal basis.
* High-Performance Order Storage supported.
// @pro-begin
* Polish translation included.
// @pro-end

// @pro-begin
= Pro =

The Pro version is sold on [catcode.com.ua](https://catcode.com.ua/modules/polish-invoice-sync-woocommerce/), with a 7-day trial:

* **Automatic documents** when an order reaches the status you choose, with repeats when the service is down.
* **Proformas and receipts** in Fakturownia.
* **Correction invoices** for refunds in Fakturownia and inFakt.
* **KSeF:** sending through your service, with the KSeF number and status on the order.
* **E-mail** with the document to the customer, from your service.
* **Bulk issue** from the orders list.
* **Paid status** carried over when an order is paid later.
* **wFirma** as a third service: VAT invoices, PDF and e-mail. Corrections and KSeF stay in wFirma. wFirma is a trademark of its owner; this is an independent integration.

// @pro-end
= Not tax advice =

The plugin sends the data your orders and settings contain. Your accountant decides which rates and exemptions apply.

The names Fakturownia, inFakt and WooCommerce belong to their owners. This is an independent integration, not affiliated with or endorsed by them.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. Go to WooCommerce, Invoice settings.
3. Choose the service, enter the API key and save.
4. Press "Test the connection".
5. Open an order and press "Issue document".

== Frequently Asked Questions ==

= Where do I find the Fakturownia token? =

In Fakturownia: Settings, Account settings, Integration, API authorization code. The account address is the part before .fakturownia.pl.

= Where do I find the inFakt key? =

In inFakt: Settings, Other options, API. Give the key the invoices read and write scopes.

= Fakturownia refuses the document because of the seller =

The account has no company data yet. Fill it in under Settings in Fakturownia.

= inFakt refuses a bank transfer order =

inFakt needs the bank account on transfer invoices. Add and confirm it in inFakt, then enter it in the plugin settings.

= Foreign VAT rates =

Fakturownia accepts them as they are. On inFakt, a regular invoice has Polish rates only, so such an order shows a message and is issued in inFakt.

= An order already has a refund =

The plugin does not issue a first invoice for a refunded order, so the document never shows amounts you did not intend. Issue it in your service.

= Does it send invoices to KSeF? =

// @pro-begin
Yes, in Pro, through your invoicing service, where KSeF must be connected.
// @pro-end
The free version does not send to KSeF by itself. Your service can do it: Fakturownia and inFakt both have their own KSeF settings.

== External services ==

The plugin talks only to the service you choose in the settings.

= Fakturownia =

Used to create invoices and download their PDF. When you issue a document, the plugin sends the buyer's name, address, e-mail, phone and tax number, the order lines, prices and VAT rates, the payment method and dates, and your API token, to your own account address on fakturownia.pl. Nothing is sent before you connect the account and issue a document.

Terms: https://fakturownia.pl/regulamin
Privacy: https://fakturownia.pl/polityka-prywatnosci

= inFakt =

Used to create invoices and download their PDF. When you issue a document, the plugin sends the buyer's name, address and tax number, the order lines, prices and VAT rates, the payment method and dates, with your API key, to api.infakt.pl (or api.sandbox-infakt.pl when the test environment is on). Nothing is sent before you enter the key and issue a document.

Terms: https://www.infakt.pl/regulamin/
Privacy: https://www.infakt.pl/polityka-prywatnosci/

// @pro-begin
= wFirma =

Used by Pro when you choose it: invoices, PDF and e-mail, sent to api2.wfirma.pl after you authorize the plugin with wFirma.

Terms: https://pomoc.wfirma.pl/-regulamin-swiadczenia-uslug
Privacy: https://pomoc.wfirma.pl/-polityka-prywatnosci

= CatCode =

The Pro version connects to catcode.com.ua for the licence and new versions.

Terms: https://catcode.com.ua/terms/

// @pro-end
== Changelog ==

= 1.0.0 =
* First release.
