=== Invoices with Paraşüt for WooCommerce ===
Contributors: catcodestudio
Tags: parasut, e-arsiv, e-fatura, invoice, turkey
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

Create Paraşüt sales invoices from WooCommerce orders, make them official as e-Arşiv or e-Fatura, and keep the PDF on the order.

== Description ==

For shops in Türkiye that keep their books in Paraşüt. From the order screen, one button finds or adds the buyer, creates the sales invoice, makes it official and brings the PDF back to the order.

This is an independent integration. Paraşüt is a trademark of its owner. This plugin is not affiliated with or endorsed by Paraşüt.

= What it does =

* Asks for the VKN or TCKN and tax office at checkout, on the classic checkout and on the Checkout block, and checks the number before the order is placed.
* Finds the buyer in Paraşüt by tax number, or adds a new contact. Consumers who gave no number are matched on e-mail and name.
* Adds each product to Paraşüt once, matched on the SKU, without stock tracking.
* Creates the sales invoice with the items, shipping and fees, in TRY, USD, EUR or GBP. Coupon discounts are included in the unit prices.
* Checks whether the buyer has an e-Fatura inbox: if so it issues an e-Fatura, otherwise an e-Arşiv with the internet sale and shipment details.
* Follows the background job at Paraşüt and shows the document number on the order.
* Downloads the PDF to your site, to a folder of its own under an unguessable name, because the link from Paraşüt works for one hour only.
* Stops before anything is created when an order does not add up: when the lines differ from the order total, when a line has 0% VAT without an exemption code, when the currency is not supported.
* Guards against issuing a document twice: if a connection drops halfway, Paraşüt is asked what exists before anything is sent again.
* Shows refusals in the words of Paraşüt, on the order and on the settings page.
* Shops that do not use WooCommerce taxes can set the VAT rate inside their prices.
* Works with High-Performance Order Storage.

Invoices of buyers abroad stay in Paraşüt for you to finish, because export invoices need customs details.

= Pro =

* Invoices created on their own at the statuses you choose, with retries, and a bulk action in the orders list.
* The PDF e-mailed to the buyer when it is ready, and a download link in the buyer's account.
* A return invoice (iade) as a draft in Paraşüt for each refund.
* Payments recorded on the invoice (tahsilat), with an account for each payment method.
* A carrier and its VKN for each shipping method.

= What you need =

* A Paraşüt account with API access. Paraşüt gives out the client id and client secret on request: write to destek@parasut.com.
* For official documents, e-Arşiv or e-Fatura activated on that account, with credits to spend.

= What it does not do =

* It gives no tax advice. Ask your accountant which rates, exemption codes and carrier details apply to you, and when you have to issue a document.
* Later changes to an order do not reach Paraşüt. Change the invoice there too.
* Orders with a negative line, such as a discount added as a fee, have to be invoiced in Paraşüt.

== External services ==

This plugin connects to the Paraşüt API (api.parasut.com), run by Paraşüt, to create invoices. Nothing is sent until the shop connects its own Paraşüt account, and after that only for orders a shop manager or a chosen automatic rule sends.

Sent: the client id, client secret, Paraşüt e-mail address and password when connecting (the password is not kept on the site); the buyer's name, company, billing address, e-mail address, phone number, tax number and tax office; the order number, date, items, prices, taxes, payment type and carrier. Received: contact, product and invoice records, the state of the background job, and a link to the PDF of the document, which is downloaded from the address Paraşüt gives.

Terms of use: https://www.parasut.com/kullanici-sozlesmesi
Privacy: https://www.parasut.com/kullanim-kilavuzu/veri-guvenligi-ve-gizliligi

The Pro build also contacts catcode.com.ua to check the licence and to look for new versions. Sent: the licence key, the address of the site and the plugin version; for a trial, also the e-mail address typed in. Terms: https://catcode.com.ua/terms/

== Frequently Asked Questions ==

= Does it work with the Checkout block? =

Yes. The tax fields are registered for both checkouts. On WooCommerce older than 8.9 the block has no way to add them, and on WooCommerce older than 9.9 the block shows them to buyers in every country. If another plugin already asks for the number, enter its meta key on the settings page and turn the fields off.

= What goes on the invoice of a consumer who gives no number? =

The number on the settings page, 11111111111 by default. The GİB e-Arşiv guide names it for final consumers who do not give a TCKN. Check with your accountant that it suits your shop.

= An order shows an error. What now? =

Read it on the order screen, fix what it names and press the button again. Nothing that already exists in Paraşüt is created a second time.

= Can I test it first? =

Paraşüt documents no test mode. Every official document is real and uses your credits. Turn off "Make invoices official" on the settings page to see the invoices without making them official.

== Changelog ==

= 1.0.0 =
* First release.
