Invoices, Packing Slips, Shipping Labels

The vendor invoices & packing module allows each of your vendors to have their own invoices, with their logo, shop name, address, and any other relevant info, as well as print packing slips and shipping labels.

This module requires that you also use one of the following free plugins:

Vendor Invoice Settings

Once the invoice module is enabled, and an invoices plugin is active, each vendor will find a dedicated "Invoicing" panel in their vendor dashboard.

Invoicing Panel in the Vendor Dashboard

Here the vendor can enter:

  • Store Name to be displayed on invoices
  • Store Address to be displayed on invoices
  • Store Logo
  • Custom Info (can be anything from VAT nr to any other relevant company data).

The store logo select button opens up an image uploader. Each vendor has access to only their own private library of images.

This info is shown directly on the PDF invoices that are generated:

1. Using PDF Invoice & Packing Slips by WP Overnight

Customers Invoice Download

Customers can download invoices by going to My Account -> Orders. Here they will find an "Invoice" button.

Invoices for Composite order and for Vendor order

In the case of Composite orders (orders from multiple vendors), there are separate invoices for each vendor, as well as an overall invoice for the entire order.

Vendors Invoice Download

Vendors can also download invoices, by going to Orders in their dashboard, and clicking on "Manage Order". There in the order details panel, the vendor can find 2 buttons: one that downloads a PDF invoice, and another that downloads a PDF packing slip.

In case packing slips are not relevant to your site and you'd like the disabled, you can do this by adding the following code snippet to the site:

add_filter('marketking_enable_packing_slip_invoices_vendors', function($val){
    return false;
}, 10, 1);

Other things to note

The admin can also configure details for the admin's own store invoices, or for composite orders. This is achieved in the settings panel in WooCommerce -> PDF Invoices.

Importantly, please note that once an invoice has been generated, it is not changed when settings are changed. So changing invoice settings does not affect already generated invoices. If you'd like for this to happen, you need to enable "test mode" in WooCommerce -> PDF Invoices.

2. Using PDF Invoices plugin by WebToffee

For customers to be able to download invoices in My Account, you must enable the following settings:

Customers can then download invoices as follows in My Account:

Vendors can also download invoices, packing slips, shipping labels, etc:

Important settings:

For vendors to be able to generate invoices, you would usually need to enable 'Processing' here, so that invoices are generated automatically when the order is placed:

Other Information

MarketKing has been tested with the free versions of the above plugins, but not with the Premium versions. They will likely work in the same way, however, please note that we DO NOT guarantee every single feature and option of these plugins / premium versions will be compatible.

Commission Invoices (New!)

We have now added a 'commission invoice' option, so that each vendor can invoice the marketplace for their commission. This feature currently only works with the WP Overnight integration.

For this to work, commission invoices must be enabled in MarketKing -> Settings -> Invoices. Vendors will then see this 'commission invoice' button in their vendor dashboard.

A similar button is also available on the admin side:

By default these invoices do not include VAT. If you would like them to include VAT, you can use this PHP code snippet:

add_filter('marketking_commission_invoice_have_vat', function($have_vat, $vendor_id){
	$have_vat = true;
	return $have_vat;
}, 10, 2);
add_filter('marketking_commission_invoice_vat_rate', function($vat_percentage, $vendor_id){
	$vat_percentage = 16;
	return $vat_percentage;
}, 10, 2);

The snippet can also set a VAT rate to be used on the invoice. The $vendor_id variable can be used to set it differently for each vendor.

Sequential Invoice Numbers

You may want to enable invoice numbers and have those be sequential. You can do it as follows with the PDF invoice & packing slips plugin:

In the invoice plugin's settings, enable the display of the invoice number as follows:

Then you can add this PHP code snippet to your site:

add_filter('woocommerce_invoice_number', function($nr, $order_id){
    $vendor_id = marketking()->get_order_vendor($order_id);
    $vendor_orders = get_posts( array( 'post_type' => 'shop_order','post_status'=>'any','numberposts' => -1, 'author'   => $user_id, 'fields' =>'ids', 'order' => 'ASC') );
    $order_number = 1;
    foreach ($vendor_orders as $vendor_order){
        if ($vendor_order == $order_id){
    return $order_number;
}, 10, 2);

The above code will set a sequential invoice number for each vendor, starting at 1

So each vendor would get 1, 2, 3, for their own orders.

If you would like, you can further modify that to add a prefix, suffix, vendor ID, etc.

For example you could write it as:

return 'V'.$vendor_id.'O'.$order_number;

This will result in invoice numbers with a structure such as V4O15 (vendor 4 order 15).

You can make other changes as well. You can change 

$order_number = 1;


$order_number = 100;

This will make order numbers start at 100 for each vendor, and go to 101, 102, 103, etc.

Powered by BetterDocs