Xero error: 'The document date cannot be before the period lock date'


Latest update: - Lucia Palozzi

Problem

Posting to Xero returns the error 'Bad request. A validation exception occurred - The document date cannot be before the period lock date, currently set at [DATE]. The document date cannot be before the end of year lock date, currently set at [DATE]'

Setup

  • Vend for Mac or PC
  • Xero integration

Cause

The date on the register closure/sale/stock order is before the lock date that is set in Xero. 

Solution

  1. In Xero, click Accounting
  2. Click Advanced
  3. Click Financial Settings
  4. Change the lock dates so that these dates are after the date of the items you are trying to post to Xero
  5. Click Save
  6. In Vend, click the red Xero icon to post the items to Xero