=== PDF Invoices for WooCommerce ===
Contributors: catcodestudio
Tags: pdf invoice, invoice, packing slip, woocommerce, invoice import
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

PDF invoices and packing slips for WooCommerce, with a full import from Invoices for WooCommerce: numbers, settings and issued PDFs.

== Description ==

Your shop gets a numbered PDF invoice for every order, attached to the e-mails you choose, and a packing slip for the warehouse.

If you use Invoices for WooCommerce (woocommerce-pdf-invoices), this plugin takes over from it without a break in the numbering.

= Moving from Invoices for WooCommerce =

* **Numbering goes on.** The counter continues after your last invoice, in the same format, and you see the next number before anything happens.
* **Old invoices stay what they are.** Every issued invoice is imported with its printed number and date, and its PDF is copied as it is. Nothing is drawn again.
* **Settings come along:** company data, logo, colours, texts, footer, table columns, e-mails, date format.
* **No double numbers.** While the old plugin is active, or old invoices are not imported, this plugin issues nothing and says why. Run the import, deactivate the old plugin, open the import once more, and new invoices start.
* **Your data is safe.** The import changes nothing in the old plugin and can be repeated. If you want to go back, the old plugin still has everything.
* **Private PDF folder.** The old files are copied to a folder with a random name, which also holds on nginx, where .htaccess protection does not work. Deleting the originals is a separate button that removes only files identical to the copy.

Custom templates written for the old plugin are PHP tied to its PDF engine, so they are not run here. The import lists them. Your theme can hold your own template instead, see the FAQ.

= Invoices =

* Automatic on the WooCommerce e-mails you choose, or by hand from the order screen.
* Sequential numbers with a format: [number], [order-number], [order-date], [Y], [y], [m], [d], with prefix, suffix and yearly reset. Or WooCommerce order numbers.
* Two numbers can never collide: the counter is one atomic database step, and an order can only get one invoice, even when two e-mails go out at once.
* Two templates, Minimal and Micro, with your logo, colour, company data, terms and footer.
* Line items with SKU, tax rate and meta, discounts, shipping, fees, tax per rate, refunds. Prices with or without tax.
* Paid mark, customer notes, buyer's VAT number and purchase order number from common plugins.
* A4 or Letter.
* Customers download invoices of paid orders from My Account, through a permission check.
* Invoice number column in the orders list, and search by invoice number.
* A blind copy of invoice e-mails to one address, for your accountant or a mail-to-cloud service.
* Languages other than English are handled through translations, the document follows the language of the shop, whoever pressed the button.
* High-Performance Order Storage and block checkout are supported.

= Packing slips =

From the order screen: items, SKU and quantity, shipping and billing address, no prices.

// @pro-begin
= Pro =

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

* **Credit notes** for every refund, with their own numbers, attached to the refund e-mail.
* **Bulk actions** in the orders list: issue invoices, download invoices or packing slips as a ZIP.
* **Export for the accountant:** all documents of a period in a ZIP with a CSV register.
* **Payment due date** on the invoice and an automatic reminder for unpaid orders.
* **Any e-mail:** attach invoices to every WooCommerce e-mail, including those of other plugins.

// @pro-end
= Not tax advice =

The plugin prints the data your orders and settings contain. Your accountant decides what your invoices must show.

Invoices for WooCommerce and WooCommerce are names of their owners. This plugin is independent and not affiliated with or endorsed by them.

== Installation ==

1. Install and activate the plugin. WooCommerce must be active.
2. Go to WooCommerce, PDF invoices.
3. Coming from Invoices for WooCommerce: open the Import tab first.
4. Otherwise fill in your company on the Template tab and choose the e-mails on the General tab.

== Frequently Asked Questions ==

= Do my old invoice numbers change? =

No. Old invoices keep the number that was printed on them, and their PDF files are copied unchanged. New invoices continue after the highest number.

= What if the old plugin keeps running for a while? =

Nothing breaks. This plugin stays paused while the old one is active. Run the import again after deactivating it, and whatever the old plugin issued in between is picked up.

= My old invoices use the same number in two different years. Why? =

The old plugin looks only at the current year when it picks the next number, even with the yearly reset turned off. Those invoices are imported as they are. New numbers go on from the highest number of all years when the reset is off, so no number repeats again.

= Can I use my own template? =

Yes. Copy a file from the plugin's templates folder to a catcode-pdf-invoices folder in your theme, keeping the name: invoice-minimal.php, invoice-minimal.css, invoice-micro.php, invoice-micro.css, packing-slip.php, packing-slip.css, parts.php. Templates are HTML and CSS with a data array; the renderer has no network access and runs no scripts.

= Which alphabets work? =

Latin, Cyrillic and Greek, with the DejaVu Sans font inside the plugin. Chinese, Japanese, Korean, Arabic and Hebrew are not supported by that font.

= Where are the PDF files? =

In a folder with a random name inside uploads. Downloads go through a permission check, the customer sees only their own invoices.

= Does deleting an order delete the invoice? =

No. The document stays in the record so that its number is not issued again.

= What happens to a number when I delete an invoice? =

The latest number of a series is given back. A number in the middle stays unused, so your books show the gap.

= Do I need Invoices for WooCommerce to use this plugin? =

No. It works on its own, the import is only for shops moving over.

== Changelog ==

= 1.0.0 =
* First release: PDF invoices and packing slips, numbering, Minimal and Micro templates, import from Invoices for WooCommerce.
// @pro-begin
* Pro: credit notes, bulk actions, export with a register, payment due date and reminder, any e-mail, updates from catcode.com.ua.
// @pro-end

== Upgrade Notice ==

= 1.0.0 =
First release.
