How to manage invoice generation

The invoice related to the order can be generated automatically or manually by administrator, depending on the configuration in the plugin settings dashboard in YITH > PDF Invoice.

Automatic creation

  • Generate invoices: choose whether to generate invoices automatically or manually.
  • Generate packing slip: decide if you want to generate the packing slip automatically or manually.
  • If you choose the Automatic invoice option, you’ll be able to choose when it has to be generated in the option below, and pick one from:
    • When the order is created
    • When the order goes to Processing status
    • When order turns into Completed status
  • Date to show in the invoice: you can choose which date showing in the invoice and pick one from:
    • Date of order created
    • Date of order Completed
    • Date of invoice generated
  • How to show the generated document: finally you can choose also whether to download the file once it is generated or to open it in your browser.

Manual generation

To generate an invoice manually, click on the specific button you’ll find in “WooCommerce -> Orders” or in the order detail page.

Orders page

Order detail page

Automatic generation

If you choose to generate invoices automatically, the document will be created at the moment of your choice, when:

  • order is created
  • order acquires the “processing” status
  • order acquires the “completed” status

Bulk generation

Use the option to generate or regenerate the packing slip and/or invoice.

bulk generate

 

Save invoice

Invoices are saved by default in the “Invoices” folder, which is to be found in the folder “wp-content -> uploads->ywpi-pdf-invoice” of your WordPress installation.
In case you wanted to set a customised path for saving, you can use [year], [month] e [day] as placeholders on “Invoice folder format” option, so that your saved invoices are sorted by year, month and day, according to the date it has been generated.

Invoice folder format

An example: if you write Invoices/[year]/[month], an invoice generated on “17/02/2016” will be save in the path “invoices/2016/02”.

Invoice folder

Dropbox

The plugin gives the administrator the possibility to automatically backup all generated PDF documents on Dropbox. Backup is immediate.

Following we analyse each individual step for saving process to work correctly.

Send documents to Dropbox

At first you have to access your account, or create one in case you do not have any.
Then, click on “Login to Dropbox” and the page where entering your data will be displayed.

Login to Dropbox

Now, you have to allow data save on your Dropbox. All documents generated will be saved in the folder “Apps” in your Dropbox archive. Save settings will follow the same rules as computer save, as explained here.

Dropbox Code

Now, you will be shown a code that has to be entered into the input box of the option “Enable Dropbox Backup” to complete synchronisation.

The code has to be entered within a minute since its generation. Contrary, it will not have any effect and the code will have to be generated anew.

Dropbox Code in plugin

In case the code is correctly validated, the Dropbox account synchronised with the plugin for invoice save will be shown.

Login executed

An example of Dropbox save.

Dropbox example

How to manage invoice numeration

Invoice numeration is sequential and begins from the value specified in “Next invoice number” field of “Documents” section of plugin settings dashboard.

Next invoice number

The value specified in the image automatically increases and shows next invoice number that will be generated.
If you change the value and save new settings, the first new invoice will no longer follow previous numeration, but it will begin from the new specified value.

You can add a prefix and/or a suffix to invoice number by changing invoice name format in“Invoice number format” field.

Prefix and suffix

Enable “Reset on 1st January” field if you want to rest numeration and to restart its cycle at the beginning of the new calendar year.

How to generate a packing slip document

To enable the generation of the packing slip document, check “Enable packing slip” option.

Enable packing slip

The document can only be generated manually by the site administrator, through the specific button in “WooCommerce -> Orders” or in the order detail page.

Orders page

Order detail page

Packing slip document

How to generate a pro-forma document

User can download the “Pro-Forma” document from “My Account -> Orders” page, only if “Enable pro-forma” field of settings dashboard is active.

Enable Pro-Forma

Download Pro-Forma

The pro forma invoice will be automatically generated by the system and it is not an official document. So, the button for creating a pro forma invoice will be visible only in front end for your customers in order to avoid any possible confusion with docuemtn managing for the administrator.

Following you find an example of pro forma invoice. It differs from a normal invoice for not having an invoice number and for the text “Pro forma Invoice” on top of the document.

Pro-Forma example

Actions on order documents

Each generated document can be viewed, removed and regenerated at any time. To apply an action on the invoice/packing slip/proforma, go to the order detail page and click on the specific button(s) on the right side.

order actions

How to generate a credit note

The credit notes can be generated when an order refund is granted.

In order to generate the credit notes enable the “Enable credit notes” entry in “PDF Invoice -> General”.

Enable credit note

Now you can generate a credit note for each applied refund directly from the order.

Order detail page

After the credit order is created, the customer will be able to see and download it from his orders page on his account.

credit note

How to customize document filename format

All generated documents as; invoices, pro-forma, packing slip or credit notes, are saved with a default name provided by the plugin. However, it can be easily changed by going to the “Documents” section of settings dashboard.

Documents settings

Use the following data as placeholders to set the file format:

  • [number]: document invoice number
  • [prefix]: invoice number prefix, if any
  • [suffix]: invoice number prefix, if any
  • [year]: year of document generation, 4-figure format
  • [month]: month of document generation, 2-figure format
  • [order_number]: order number

Attention, the [number] placeholder is necessary for Invoice filename format and [order_number] is necessary for Pro-Forms invoice and Shipping List Document. If not specified, they will be queued to the corresponding text.

How to enable SSN/VAT fields

“SSN number” and “VAT Number” fields of settings dashboard allow to add the same fields right inside the form of shop checkout.

VAT/SSN Number

Checkout form

Values of VAT/SSN fields can be inserted in pdf documents generated by the plugin, as explained in this page of documentation.

How to customize template settings

If you want to change the pdf document content generated by the plugin, go to “Template” tab of settings dashboard.

Template settings

This tab is divided into sections.

Company information

Company information settings are the first part:

Template - company info

Here you can enter Company name, logo, additional details and choose whether to show them or not by selecting the related checkboxes.

You can also print customer’s details related to the invoice or the packing slip using the placeholders provided (read here for more details).

Invoice and pro-forma – template settings

In the second section, you can control other settings that should appear in the invoice and in the pro-forma invoice.

Here you can enter different notes and footer for the invoice and the pro-forma invoice and check those sections and columns that have to be visible.

To show the total amount of the invoice, discount included, you can enable the option “Show order subtotal inclusive of order discount”.
Whereas the amount of the discount can be shown by enabling “Show the order discount in the invoice summary amounts”.

Order total

The same applies to information related to products inserted in the order and shown in the table of the document. In “Visible columns” field you can choose to show or remove the following information for each product:

  • image
  • SKU
  • description
  • product variation
  • quantity
  • regular price
  • on-sale price
  • tax

Visible columns

Credit note – template settings

In the following section, you can set up the credit note template settings, including notes, footer, a dedicated text about the refund, the products that have been refunded and enable dynamic visible sections and columns, as shown below:

credit-note template settings

Packing slip – template settings

Here you can edit notes, footer, and visible sections and columns, included weight and dimensions, as shown below:

Packing-slip-template-settings

Colours

Finally, in the last section, you can set up the colours of all your documents: header and font, data section and total section.

Document-colours-2

This is an example:

sample-invoice-colours

How to insert new user details in documents

Right inside documents, you can insert any of the information related to user.
Use the postmeta metakeys as placeholders within double curly brackets, for example {{_shipping_first_name}} to show the order shipping first name.

Customer details

Following the complete list of placeholders that you can use:

  • {{_customer_user}}
  • {{_order_key}}
  • {{_order_currency}}
  • {{_billing_first_name}}
  • {{_billing_last_name}}
  • {{_billing_company}}
  • {{_billing_address_1}}
  • {{_billing_address_2}}
  • {{_billing_city}}
  • {{_billing_state}}
  • {{_billing_postcode}}
  • {{_billing_country}}
  • {{_billing_email}}
  • {{_billing_phone}}
  • {{_shipping_first_name}}
  • {{_shipping_last_name}}
  • {{_shipping_company}}
  • {{_shipping_address_1}}
  • {{_shipping_address_2}}
  • {{_shipping_city}}
  • {{_shipping_state}}
  • {{_shipping_postcode}}
  • {{_shipping_country}}
  • {{_completed_date}}
  • {{_paid_date}}
  • {{_edit_lock}}
  • {{_edit_last}}
  • {{_cart_discount}}
  • {{_cart_discount_tax}}
  • {{_order_shipping}}
  • {{_order_shipping_tax}}
  • {{_order_tax}}
  • {{_order_total}}
  • {{_payment_method}}
  • {{_payment_method_title}}
  • {{_transaction_id}}
  • {{_customer_ip_address}}
  • {{_customer_user_agent}}
  • {{_created_via}}
  • {{_order_version}}
  • {{_prices_include_tax}}
  • {{_date_completed}}
  • {{_date_paid}}
  • {{_payment_tokens}}
  • {{_billing_address_index}}
  • {{_shipping_address_index}}
  • {{_recorded_sales}}
  • {{_recorded_coupon_usage_count}}{{_customer_user}}
  • {{_order_key}}
  • {{_order_currency}}
  • {{_billing_first_name}}
  • {{_billing_last_name}}
  • {{_billing_company}}
  • {{_billing_address_1}}
  • {{_billing_address_2}}
  • {{_billing_city}}
  • {{_billing_state}}
  • {{_billing_postcode}}
  • {{_billing_country}}
  • {{_billing_email}}
  • {{_billing_phone}}
  • {{_shipping_first_name}}
  • {{_shipping_last_name}}
  • {{_shipping_company}}
  • {{_shipping_address_1}}
  • {{_shipping_address_2}}
  • {{_shipping_city}}
  • {{_shipping_state}}
  • {{_shipping_postcode}}
  • {{_shipping_country}}
  • {{_completed_date}}
  • {{_paid_date}}
  • {{_edit_lock}}
  • {{_edit_last}}
  • {{_cart_discount}}
  • {{_cart_discount_tax}}
  • {{_order_shipping}}
  • {{_order_shipping_tax}}
  • {{_order_tax}}
  • {{_order_total}}
  • {{_payment_method}}
  • {{_payment_method_title}}
  • {{_transaction_id}}
  • {{_customer_ip_address}}
  • {{_customer_user_agent}}
  • {{_created_via}}
  • {{_order_version}}
  • {{_prices_include_tax}}
  • {{_date_completed}}
  • {{_date_paid}}
  • {{_payment_tokens}}
  • {{_billing_address_index}}
  • {{_shipping_address_index}}
  • {{_recorded_sales}}
  • {{_recorded_coupon_usage_count}}

How to overwrite documents templates

All the templates used by the plugin are available in the templates path templates -> yith-pdf-invoice.

To overwrite each document template is essential to repeat the specific files in your theme “woocommerce” folder (in case it is not included, you must create it).

Copy and paste files in your theme “woocommerce” folder, by including them in the “yith-pdf-invoice” folder.

Copy files

Please note. Plugin updates will be ignored in your site for the files you have overwritten.

If you made changes and you need to check them, enable “Preview mode” option.

Preview mode

When option is active, you can generate your invoices and check the final result of your changes without any increase of invoice counter.
If provided, the automatic generation system of invoices will be disabled and any generated invoice will be hidden to user.

Electronic Invoicing for Italian companies

Since 1st January 2019, the Italian government requires a specific standard for all the companies that sell goods online. All of them are required to issue an electronic invoice for each order and to provide the Italian Agenzia delle Entrate with all invoices in a specific format.

This plugin includes a section that has been specifically developed to give Italian companies an easy tool to generate this required file, together with the PDF file.

If your company is based in Italy and if you sell online, you will be required an .xml file for every order placed in your online shop.

This plugin will help you do that the right way and without much trouble.

Go to the plugin settings at YITH > PDF Invoice > Settings > Generating Documents and enable the option called Abilita la fatturazione elettronica (clienti italiani)

generazione documenti

Then, save the changes. After that, you’ll see a new tab next to the others in the plugin settings called Fatturazione elettronica. Here you can enter your company details, so as they will appear in the .xml file.

Impostazioni generali

The first section is about the file name format, which is made out of 5 characters, two letter and three numbers.

Impostazioni-generali

Soggetto o azienda trasmittente

Next you find a section where you can enter all your details.

Soggetto-o-azienda-trasmittente

  • Codice fiscale azienda
  • Partita IVA azienda
  • Regime Fiscale
  • Esigibilità IVA
  • Nome registrato azienda
  • Indirizzo
  • CAP
  • Città dell’azienda
  • Provincia azienda

Impostazioni Checkout

In the last section, you can configure checkout options:

Impostazioni-checkout

  • Etichetta Codice Destinatario
  • Etichetta PEC Destinatario
  • Messaggio Codice Destinatario/PEC obbligatori: here you can enter a custom message to show whenever the receiver ID or the PEC email address is required.
  • Messaggio Partita IVA obbligatoria: here you can enter a custom message to show whenever the VAT number is required.
  • Messaggio Codice Fiscale obbligatorio: here you can enter a custom message to show whenever the Fiscal Code (SSN) is required.

Checkout page on customer side

Whenever your customers are on the checkout page, they will be asked to fill their details.

The plugin updates the checkout fields dynamically based on what the customer selects in the field Company Name: this way, whether the customer is a private entity or a company, they will be asked to fill only the right information. Following you can see how it’s updated:

  1. Italian company:

    • Company VAT number is required
    • One between Codice destinatario and PEC email address is required
      Italian companies
  2. Company from other countries:

    • Company VAT number is required (the extra fields will not show up)
  3. Italian private subject:

    • Codice fiscale is required (the extra fields will not show up)
  4. Private customer from other countries:

    • SSN number is optional

Download the .xml file

Now, if you have configured all the other settings for the generation of automatic invoices, whenever a new invoice is generated also the .xml file will be generated. You can see it on the right side, in the box Invoice status.

Click on XML button to download the file.

Generate .xml file

Please, note: if you can’t see the .xml button in the order details, make sure the option for the preview (YITH > PDF Invoice > Preview Mode) is disabled, because the .xml file cannot be generated out of a preview.

YITH WooCommerce Checkout Manager

YITH WooCommerce Checkout Manager is a plugin that allows you to customize the checkout fields by adding, removing or editing any of them. You can take advantage of many types of fields.

The combination with YITH WooCommerce PDF Invoice allows you to also edit the fields (VAT and SSN) that the PDF invoice plugin adds to the checkout.

Just make sure you have enabled and activated both plugins to make the integration work. No other action from your side is required.

To read more about the settings of YITH Checkout Manager, please, refer to the official plugin documentation.

How to use the plugin in combination with YITH WooCommerce Multi Vendor

YITH WooCommerce PDF Invoice and Shipping List can be integrated with the premium version of YITH WooCommerce Multi Vendor.
Integration provides for site administrator to enable the separeted management of invoices for vendors.

The option must be enabled in “Add-ons” section of Multi Vendor settings dashboard.

Enable PDF Invoice for vendors

When the plugin is used in combination with YITH WooCommerce Multi Vendor, the automatic generation of invoices will be disabled.

The only way to create a new document, invoice or shipping document, is manually through the specific buttons you find in “WooCommerce -> Orders” or in order detail page.

User side, documents can be downloaded in “My Account -> Orders”. Administrator and/or vendor related to the order must generate the document to allow user to have access to it.

A different document is provided for each vendor in relation to products they own.

Documents generated by vendors

YITH WooCommerce Product Bundles

With YITH WooCommerce Product Bundles you can create bundles with the combination of some products of your shop. You can assign an ad-hoc price to the bundle or a price given by the sum of the single elements contained in the bundle itself.

The integration between these two plugins will give you the ability to show the bundles in the invoice.

example pdf bundle

In order to make the plugins work together, you will only have to activate them both. For further detailed settings on the product bundles, you can check the documentation here.