Dynamics GP – Clicking “Submit” on VAT Return doesn’t open HMRC login window and No Obligations Error

I recently encountered a couple of issues with the new Making Tax Digital functionality in the latest version of Dynamics GP 2016.

The first issue was when clicking “Submit” on the Dynamics GP VAT Return window the HMRC login window wasn’t opening. The HMRC_Log_in window in question is a IE type window as shown below

The second issue was occurring when trying to bring through the Obligations when creating a new VAT Return. At the end of the process the message “No Obligations found for the year 2019” occurred.

**What was very strange is the second issue also opens the HMRC_Log_in window and during this process the window opened fine? The client then entered their credentials into the HRMC_Log_in window and authentication was also successful however it was the final bit of the process that involved bringing through the Obligations that was failing?

As the first issue seemed easier to trace I focused my efforts on resolving this one in the hope it would also resolve the second issue.

When troubleshooting the first thing I checked was to ensure GP had been configured as per Microsoft’s guidelines outlined in this KB https://docs.microsoft.com/en-us/dynamics-gp/financials/uk-tax-mtd and this all checked out fine.

The next thing was to ensure the process worked on my PC with the clients data. I therefore created a test environment on my PC and both processes all worked fine. I therefore suspected it was an environmental issue on the clients system.

Next I logged onto the clients system and performed a Process Monitor trace when clicking “Submit” and found the following issue

I was getting a NAME NOT FOUND for the file GPConnNet.dll in the local GP folder just before calls to the VAT100ElectronicSubmission.dll

I checked the local GP folder and the GPConnNet.dll file didn’t exist. I know this is a shared component so I looked in C:\Program Files (x86)\Common Files\Microsoft Shared\Dexerity\v2.0 and found the DLL

Therefore I simply copied the file from the shared folder above to the local GP folder and now clicking “Submit” opens the HMRC_Log_in window and the client can submit the VAT return electronically as per the new HMRC guidelines. I also checked if the Obligations part worked and now this all works fine as well.

Unfortunately I don’t know why GP wasn’t working as the DLL doesn’t exist in my local GP folder either, and mine still works, so I suspect another environmental issue is in play that I didn’t get to the bottom of.

If anyone has any suggestions on this it would be much appreciated.

Thanks for reading

Dynamics GP – You cannot receive against unauthorized purchase orders

I’ve seen this error message crop up a few times. It occurs when you try to receive a Purchase Order in Receiving Transactions Entry and you are presented with the message below even though “Purchase Order Approvals” hasn’t been activated in the “Purchase Order Enhancement” module

As mentioned in several articles online it can be caused because a budget hasn’t been assigned in the “Commitment Setup” window for the year of the Purchase Order you are trying to receive against. Therefore if you go into “Commitment Setup” and assign a budget to the relevant year the issue is resolved. However, on some occasions I’ve found missing records in the commitment table causing the issue. (perhaps because several Purchase Orders have been raised whilst the Commitment Setup was missing a budget for that year)

At first I tried running “Checklinks” on the Purchase Order Enhancements tables via “Microsoft Dynamics GP > Maintenance > Purchase Order Enhancements” however when this failed I’ve fixed the issue by manually inserting data into the commitment tables based on data in the Purchase Order line table.

Just in case anyone else encounters the same issue I thought I’d share the script I’ve used.

INSERT INTO cpo10110 
            (ponumber, 
             ord, 
             actindx, 
             reqdate, 
             vendorid, 
             approvl, 
             committed_amount, 
             polnesta, 
             qtycance, 
             unitcost, 
             postedsubtotal) 
SELECT pop.ponumber, 
       pop.ord, 
       pop.invindx, 
       pop.reqdate, 
       pop.vendorid, 
       '1', 
       pop.extdcost, 
       pop.polnesta, 
       pop.qtycance, 
       pop.unitcost, 
       0.00 
FROM   pop10110 pop 
       LEFT JOIN cpo10110 poe 
              ON pop.ponumber = poe.ponumber 
                 AND pop.ord = poe.ord 
WHERE  pop.polnesta IN ( 1, 2 ) 
       AND poe.ponumber IS NULL   

As you can see this SELECTs data from the Purchase Order Line table (POP10110) and inserts into the Commitment tables (CPO10110) where its missing from the Commitment table (CPO10110).

As with any script that updates data please ensure you have a good backup of your data prior to running this. I’d also recommend testing this in a TEST company as well before implementing in the LIVE or production company.

Its also a good idea to just run the SELECT portion of the script in the first instance and see if it highlights the PO you are trying to receive against. If it does you can always investigate further, for example ensuring lines aren’t cancelled or checking if there definitely is a budget setup for the year of the purchase order. You also need to ensure the line item has a valid account number.

You can also adapt the script and change the WHERE clause so it just includes the POs you know to have the problem.

I hope this comes in handy for someone else in the future.

Thanks for reading

Dynamics NAV \ Business Central – “The Posting Date is not within your range of allowed posting dates” when posting a Purchase Invoice

Introduction

You receive the message “The Posting Date is not within your range of allowed posting dates” when trying to post a Purchase Invoice in Business Central.

According to the user setup the “Posting Date” of the document I’m posting is within the allowed posting range so why won’t the system allow me to post it?

Background – Value Entries

To provide a little more detail I’m trying to post a Purchase Invoice that I’ve matched to a Posted Purchase Receipt and I’ve increased the Unit Cost on the Purchase Invoice as the price has changed since the goods were received. I’ve also sold the items on a Sales Invoice before I’ve tried posting the Purchase Invoice.

Therefore, if we look at the value entries of this item prior to attempting to post the Purchase Invoice they are as follows

We have a value entry for the Posted Purchase Receipt showing a date of 12/05/2017 and a “Cost Amount (Expected)” of £10.00 (this the amount I used when posting the Purchase Receipt)

We also have a value entry for the Sales Invoice showing a Posting date of 25/05/2017 and a “Cost Amount (Expected)” of £10.00.

Details of the Purchase Invoice

The Purchase Invoice I’m posting is dated 01/06/2017 and I’ve amended the Unit Cost from the original £10.00 that pulled through from the Posted Purchase Receipt to £12.00


Now when I try and post this transaction, I receive the message

Therefore, just to confirm the Posting Date of the Purchase Invoice is within my allowed posting dates below is a screen shot of the User Setup window showing my Allow Posting Dates

The dates are also within the General Ledger allowed posting dates as shown below

Therefore, at first glance its not apparent why the system isn’t allowing me to post this document? The Purchase Invoice posting date is 01/06/17 and this is within my range of allowed posting dates?

The Issue – Automatic Cost Adjustment and Adjust Cost Item Entries

When posting the Purchase Invoice, the system has detected that the cost has changed from the Posted Purchase Receipt, and as this has been sold on a Sales Invoice, the cost of goods sold need adjusting.

The system therefore tries to post an adjustment using the Posting Date of the entry its adjusting (in this case the Sale Entry on the 25/05/17), which is in May, and as this falls outside of my posting range I receive the error “The Posting Date is not within your range of allowed Posting Dates”.

** Please note there is a complex method for selecting the Posting Date if the Posting Date of the entry being adjusted also fell outside of the “Allowed Posting Dates” of the General Ledger and also if “Inventory Periods” are being used. More information on this can be found in this Microsoft document https://docs.microsoft.com/en-us/previous-versions/dynamicsnav-2016/dn948192(v=nav.90)

** Its also worth noting I’m getting this message when posting the Purchase Invoice because the option “Automatic Cost Adjustment” is set to “Always” in Inventory Setup. This means the system checks for cost adjustments when you post the transaction. If this wasn’t set to “Always”, then depending on its setting its possible the document would post however when the “Adjust Cost Item Entries” batch job was subsequently run the error would occur.

See below for my Inventory Setup

Solution

There are two possible solutions to my issue here. The first is to change my “Allowed Posting Dates” in the “User Setup” to 25/05/2017 through to 30/06/2017. This will then include the posting date of the entry that will be adjusted.

Alternatively, I could change the “Allowed Posting Dates” in the General Ledger Setup to 01/06/2017 through to 30/06/2017. Then, as per the article I linked to, the system would use the date of 01/06/2017 for the adjustment entries, (i.e. the first open date in the General Ledger Setup) which does fall in my allowed periods to post to.

Therefore I’ll change my “Allowed Posting Dates” in the User Setup as per below

And now when I post the Purchase Invoice this is succecssful

If I now view the Value Entries you can see the adjustment entry created with a Posting Date of 25/05/17.

Conclusion

Although this is a simple example it shows why you may encounter this error when it seems the postings date configuration on the User Setup should allow a document to post.

Thanks for reading