This 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 will update the Accrued Purchases distribution on history receipts from Posting Account Master (SY01100) table. I think this script was created as a client created a new accrual account for purchase orders to split the value out of manual accruals and needed the distributions updated so invoices would post to the new account for the existing receipts.
/*
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).
*/
UPDATE
['Purchasing Distribution Work']
SET
ACTINDX = ['Posting Account Master'].ACTINDX
FROM
POP30390 AS ['Purchasing Distribution Work'] --Purchasing Distribution History (POP30390)
INNER JOIN
POP30300 AS ['Purchasing Receipt History'] --Purchasing Receipt History (POP30300)
ON
['Purchasing Receipt History'].POPRCTNM = ['Purchasing Distribution Work'].POPRCTNM
INNER JOIN
SY01100 AS ['Posting Account Master'] --Posting Account Master (SY01100)
ON
['Posting Account Master'].SERIES = 4
AND
['Posting Account Master'].PTGACDSC = 'Accrued Purchases'
WHERE
['Purchasing Receipt History'].POPTYPE = 1
AND
['Purchasing Distribution Work'].DISTTYPE = 9
Click to show/hide the SQL Scripts for Microsoft Dynamics GP Series Index
What should we write about next?
If there is a topic which fits the typical ones of this site, which you would like to see me write about, please use the form, below, to submit your idea.
Looking for support or consultancy with Microsoft Dynamics GP?
I no longer work with Microsoft Dynamics GP, but the last company I worked for was ISC Software in the UK; if you’re looking for support or consultancy services with Microsoft Dynamics GP you can contact them here.
Hi
I am using dynamics 2015, do we have a way to update a batch of transactions as paid or hist using sql scripts.
we use a third party application to make payments. We have an export from them in csv. I need to updated all these paid transactions as paid.
Please let me know your insights.
Hi pawan,
There are too many tables which would need to be updated, deleted and inserted for me to recommend using scripts to do an update for payments using SQL scripts.
Your best options would be a payment import using something like SmartConnect or AP Payment & Apply Import from Precipio (Steve Endow).
Your other option would be a macro to insert the payment, but you would then need to manually apply it to the invoices.