SQL Scripts for Microsoft Dynamics GP: Script to Set Transactions as Included on VAT Daybook Return

Microsoft Dynamics GPThis script is part of the SQL Scripts for Microsoft Dynamics GP where I will be posted the scripts I wrote against Microsoft Dynamics GP over the 19 years before I stopped working with Dynamics GP.

This script can be used when implementing the VAT Daybook; if the implementation is on an existing system then you need to flag already procesed transactions as included on a return.

This can be done through the system by running VAT returns, but if Dynamics GP has been in use for a while then this could mean a large number of transactions.

The below script can be used to select transactions and stamp them as included on a VAT return so they are not picked up and submitted to HMRC again.

/*
Created by Ian Grieve of azurecurve | Ramblings of an IT Professional (http://www.azurecurve.co.uk) This code is licensed under the Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International (CC BY-NC-SA 4.0 Int). */
DECLARE @Tax_Return_ID VARCHAR(20) = 'Y2022Q4' DECLARE @YEAR VARCHAR(4) = 2022 DECLARE @START_MONTH VARCHAR(2) = 10 DECLARE @END_MONTH VARCHAR(2) = 12 UPDATE TX30000 --Tax History (TX30000) SET Tax_Return_ID = @Tax_Return_ID ,Included_On_Return = 1 WHERE YEAR(DOCDATE) = @YEAR AND MONTH(docdate) BETWEEN @START_MONTH AND @END_MONTH

Click to show/hide the SQL Scripts for Microsoft Dynamics GP Series Index

In Microsoft Dynamics 365 Business Central (Financial), how do I… Understand the Chart of Accounts

Microsoft Dynamics 365 Business CentralThis post is part of the In Microsoft Dynamics 365 Business Central (Financial), how do I… series and of the wider In Microsoft Dynamics 365 Business Central, how do I… series which I am posting as I familiarise myself with Microsoft Dynamics 365 Business Central.

Each ERP system hand;es the chart of accounts in slightly different ways. Coming from an Microsoft Dynamics GP background I am used to the accounts being multi-segment and containing cost centres as well as the general ledger account. So for example, if I had an account for the North region IT department for purchasing of office supplies, I might have an account with a structure of N-300-61400.

Dynamics BC does not work in the same way as this. In Dynamics BC you would have an account of 61400 in the chart of accounts and then the cost centres of Region and Department would be managed as dimensions. The accounts are created through the G/L Account Page.

When you design the chart of accounts in Dynamics BC, you also create headings and totals through the G/L Account Page and can assign categories and subcategories which are used in financial reporting.

When creating the accounts, they need to be numbered in the order in which they should be included in the chart of accounts list, which is important for the totaling of sections for financial reporting.

Below is an example from the top of the Cronus USA, Inc sample company:

Chart of Accounts list

As you can see, 10000 is a heading, 10001 is the beginning of a total section and has 10990 as the end total; the value in the Totaling column shows that rows 10001 to 10990 inclusive are included in the total (which it is technically possible to amend the cells included in an End-Total it should not be done as there is an indenting function which will override any changes).

You can also create specific Total rows where you manually specify what should be added together, which is useful for creating a row like Net Income.

Over the next few posts in this series, I’m going to take a look at the process for creating new accounts as well as some of the other data used by them, such as account categories and subcategories, and will then take a look into dimensions.

In Microsoft Dynamics 365 Business Central, how do I…

In Microsoft Dynamics 365 Business Central (Financial), how do I…