Home » Posting Purchases to Xero

Posting Purchases to Xero


The goal here is to successfully post a purchase order to Xero.  Once you have completed this, all that should be left to do in Xero is to ‘Approve’ the invoice. Purchase Orders in Vinsight become draft accounts payable invoices in Xero

In this document:

Set Up Xero Ledger Codes

Generally Vinsight will purchases to Current Asset accounts by design, so you will need a range of suitable Current Asset accounts in Xero. If accounts are Inventory accounts in Xero, these are system controlled accounts and are not suitable for post purchases to from Vinsight.

Applying Ledger Codes to Stock Items

To post purchases, you need to set the Asset Ledger Codes in each Stock Item that you intend to purchase. If the item is not an inventory item, eg Freight, you could fill in an expense account to the Expense Ledger box, but if it is an inventory item, then leave the Expense box blank.  You can use the default codes set in Xero or you can create your own ledger codes.  For more information see Stock Items Ledger Codes.

Create  a Purchase Order

Create a Purchase Order in the usual way.   Ensure that you have included payment terms, currency, tax information and any other information that you will want to see on your Xero posting.

Finally click ‘Post’ to post the order to Xero.

By selecting the ‘Post’ option you can post your completed order from Vinsight directly into Xero.  Your accounting staff can then log into Xero to approve the order.

The goal is to post an order that is fully coded and only needs to be approved in Xero.  If you’re having to choose or correct ledger codes or tax rates in Xero then you should check and fix the configuration in Vinsight and then repost the order so you only need to approve it.

Stopping an order being posted to Xero

If you have an order or orders that you do not want sent or synced with Xero, you can mark these orders to be ignored, the image below is of Sales Orders, but this is the same process for Purchases too.
e.g: if the orders are from a time prior to when you used Xero.


The ‘Account’ in Xero is empty or incorrect:

  • Check that you have specified a asset ledger for the Stock Item.
  • If an account is specified, check that it exists in Xero and is the correct account type (e.g. Current Asset not Inventoy)
  • Check that you have only put the Code ( & not the Description) into the Stock Item.

Common Posting Errors and resolutions

“Organisation is not subscribed to currency XXX”.

Cause: Vinsight is multi-currency capable and you are trying to post an order in a currency that your Xero account does not support.

Resolution: either upgrade your Xero account to a multi-currency account or add the currency you are using to your Xero account: https://help.xero.com/nz/Currency-AddCurrency

“Account code must be specified”.

Cause: In Xero, orders that are in the draft state do not require an Account Code but approved orders do. The error implies you are posting to update an existing invoice that is in the approved state so does require an Account Code. There are a couple of possible causes with separate resolutions, but in both cases it implies you do not have the Account Codes correctly set on the Stock item


a) if Vinsight has posted this order to Xero, i.e. it looks like this:

then is implies you do not have the Account Codes correctly set on the Stock item, so simply update the stock items on the order to ensure they have an Asset Account Code set.

b) if Vinsight does not indicate that the order is posted, ie it looks like this:

then it implies that you have an unrelated order in Xero that was created manually but has the same order number. So the Vinsight order is colliding with an unrelated Xero order. See resolving order number collisions below.

Resolving order number collisions

Resolving the issue with the current order:
For Purchase Orders, Vinsight sends a composite order number that is the combination of the Vinsight Order Num and the Order Ref, so you can put a unique number into the Order Ref field to avoid a collision with the existing order in Xero.

Resolving the issue for future orders: going forward do not create manual orders in Xero that use the same numbering pattern as Vinsight. Vinsight posts order in the format INV-41, so if you want to create a non-inventory order directly in Xero, change your pattern to something like SI-41 which might stand for “Service Invoice 41”, also for Purchase Orders consider using a unique reference in the Order Ref field such as the suppliers invoice number.

“Invoice not of a valid state for modification”.

If you apply a payment in Xero to an order, then it cannot be modified. Potentially if necessary you could remove and redo the payment in Xero however, if Vinsight thinks the order has not been posted, this is a symptom of an unrelated order in with the same number having been created in Xero. See Resolving order number collisions above.

 “The Total for this document must be greater than or equal to zero”

You may have a line item on your order that has a negative price. You should be using a positive price with a negative quantity if you are trying to return or credit product.

“You cannot save this transaction using an inventory account type”

Xero inventory accounts are system controlled and cannot be posted to:

Instead you must create a “Current Asset” account and use that: