=== CatCode Accounting Sync with QuickFile for WooCommerce ===
Contributors: catcodestudio
Tags: quickfile, accounting, invoices, woocommerce, vat
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

Sends WooCommerce orders to QuickFile as sales invoices, with clients, UK VAT mapping, automatic retries and no duplicates.

== Description ==

Every order in your shop has to end up in your accounts. This plugin sends it to QuickFile when the order reaches a status you choose, and keeps trying when the connection is down.

QuickFile is a third-party product. This is an independent integration, not affiliated with or endorsed by QuickFile.

= What it does =

* Creates a sales invoice in QuickFile for each order, with products, shipping and fees.
* Finds or creates the client: by customer reference, then by e-mail address. Company name and VAT number come along, and the address of each order goes on its invoice.
* VAT: a WooCommerce rate goes to the QuickFile line VAT of the same percentage (20%, 5% or 0%), or to the one you choose. If there is no certain match, the order stops with a message instead of landing in the wrong place of your VAT return.
* Nominal codes for products, shipping and fees (sales codes 4000 to 4999).
* Prices go to QuickFile net of VAT with the VAT amount beside them, so the total in QuickFile is the total of the order. A total that does not match stops the order with both amounts.
* Works through a queue. Network and server errors are retried automatically for up to about two days. QuickFile allows 1000 calls a day per account and an order takes two to six, so a large backlog is spread over days and the queue waits by itself when the allowance is used up. Problems that need your attention stop with a clear message on the order and in the queue.
* No duplicates. A document exists once per reference in the queue, and before creating anything the plugin looks it up in QuickFile by the order reference in the purchase reference field, so a lost answer or a second status change does not create a second invoice.
* A box on the order, a bulk action on the orders list, and "Send again" in the queue.
* Works with High-Performance Order Storage and classic order storage.
* English (United Kingdom).
<!-- @pro-begin -->

= Pro =

Sold on [catcode.com.ua](https://catcode.com.ua/modules/quickfile-accounting-sync-woocommerce/) with a 7-day trial.

* Payments recorded on the invoice, with the transaction reference, a bank account and a QuickFile payment method per WooCommerce payment method. Cash on delivery counts as paid when the order is completed.
* Credit notes for refunds, per line or spread over the order's VAT rates for a refund entered as an amount. A refund of a paid invoice is a refund paid out of your bank account, a refund of an unpaid one reduces what is owed.
* Nominal codes per product category.
<!-- @pro-end -->

== Installation ==

1. Install and activate the plugin. WooCommerce has to be active.
2. In QuickFile open Account Settings, then 3rd Party Integrations. Note the account number and the API key, and use "Create a QuickFile App" to get an application ID. The app needs the methods for clients, invoices, payments, ledgers, banks and the account.
3. In WooCommerce > Accounting Sync, enter the account number, the application ID and the key, and save. The connection is tested.
4. Open the Mapping tab: choose the sales nominal codes and check the VAT rates.

== Frequently Asked Questions ==

= What happens to orders that existed before I installed the plugin? =

Nothing, until you send them: select them in the orders list and choose "Send to the bookkeeping".

= Does the plugin change prices or the checkout? =

No. It adds nothing to the shop front.

= Is this tax advice? =

No. You stay responsible for your bookkeeping and your VAT return. Check the mapping with your accountant.

= An order stopped with a VAT message. What now? =

Choose the VAT rate on the Mapping tab and click "Send again". The invoice is created once.

= My business is not registered for VAT. =

Choose "No tax rate" for lines without VAT on the Mapping tab, so the lines go out without a VAT rate.

== External services ==

This plugin connects to the QuickFile API (api.quickfile.co.uk) to create clients and sales invoices in your own QuickFile account. It only does so after you add your account number, application ID and API key.

When an order reaches a status you chose, or when you send it by hand, these data go to QuickFile: the customer's name, company, address, e-mail address, phone number and VAT number, and the order's reference, date, lines, amounts and VAT. The settings screens also read your account name and your sales nominal codes. The key itself is not sent: requests are signed with a hash of the account number, the key and a request number.

QuickFile [privacy policy](https://support.quickfile.co.uk/t/privacy-policy/18934).
<!-- @pro-begin -->

This build also sends payments and refunds to QuickFile, and it talks to catcode.com.ua to activate the key and to look for updates. It sends the key and the site address, nothing about orders or customers.
<!-- @pro-end -->

== Changelog ==

= 1.0.0 =
* First release.

== Upgrade Notice ==

= 1.0.0 =
First release.
