‎2020 Mar 10 5:03 PM
I am trying to insert an Invoice but getting the error: "10000156 - Posting Date deviates from the defined range. To complete the operation, define the posting period to match the entered Posting Date."
The Invoice parameters are;
OINV.CardCode = "00123706" 'This BP exists.
OINV.DocDate = "03.10.20" ‘Format=mm.dd.yy ?
OINV.DocDueDate = "03.10.20"
OINV.TrackingNumber = "5118309" 'This allows me to find the Invoice later.
OINV.DocType = 1 '1=The transaction is based on services
OINV.Lines.AccountCode = "5104029" '=GL Account
OINV.Lines.ItemDescription = "The Course name"
OINV.Lines.Quantity = 1
OINV.Lines.Currency = "GBP"
OINV.Lines.VatGroup = "OT1"
OINV.Lines.Price = 100
There is a posting period listed in [Administration > System Initialisation > Posting Periods] with parameters that seem like they should work although they look like they have been altered for testing purposes;
Period Code="FY17/18-12"
Posting date from:01.09.18 to 30.09.25
Due date from:01.10.17 to 30.09.25
Document date from:01.09.18 to 30.09.25
Period status=Unlocked
Have you any idea what I need to do to successfully insert the invoice?
Thanks, Mal.