This script is part of the SQL Scripts for Microsoft Dynamics GP where I will be posting the scripts I wrote against Microsoft Dynamics GP over the 19 years before I stopped working with Dynamics GP.
This script returns a list of open Payables transactions with a current transaction amount not equal to 0.
/*
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).
*/
SELECT
VCHRNMBR AS 'Voucher Number'
,VENDORID AS 'Vendor ID'
,CASE
WHEN DOCTYPE = 1 THEN 'Invoice'
WHEN DOCTYPE = 2 THEN 'Finance Charge'
WHEN DOCTYPE = 3 THEN 'Misc Charge'
WHEN DOCTYPE = 4 THEN 'Return'
WHEN DOCTYPE = 5 THEN 'Credit Memo'
ELSE 'Payment'
END AS 'Document Type'
,DOCDATE AS 'Document Date'
,DOCNUMBR AS 'Document No'
,DOCAMNT AS 'Document Amnt'
,CURTRXAM AS 'Current Trx Amnt'
,DISCAMNT AS 'Discount Amnt'
,BACHNUMB AS 'Batch Number'
,TRXSORCE AS 'Trx Source'
,BCHSOURC AS 'Batch Source'
,DISCDATE AS 'Discount Date'
,DUEDATE AS 'Due Date'
,PORDNMBR AS 'PO Number'
,WROFAMNT AS 'Write Off Amnt'
,TRXDSCRN AS 'Trx Description'
,HOLD AS 'Hold Status'
,CHEKBKID AS 'Chequebook ID'
,DINVPDOF AS 'Paid Off Date'
,POSTEDDT AS 'Posted Date'
,PTDUSRID AS 'Posted User ID'
,MODIFDT AS 'Modified Date'
,MDFUSRID AS 'Modified User ID'
,PRCHAMNT AS 'Purchases Amnt'
,TRDISAMT AS 'Trade Discount Amnt'
,MSCCHAMT AS 'Misc Charge Amnt'
,FRTAMNT AS 'Freight Amnnt'
,TAXAMNT AS 'Tax Amount'
,TTLPYMTS AS 'Total Payments'
,PYMTRMID AS 'Payment Terms ID'
,SHIPMTHD AS 'Shipping Method'
,TAXSCHID AS 'Tax Schedule ID'
,PCHSCHID AS 'Purchasing Schedule ID'
,FRTSCHID AS 'Freight Schedule ID'
,MSCSCHID AS 'Misc Schedule ID'
,PSTGDATE AS 'Posting Date'
,DISAVTKN AS 'Discount Avail Taken'
,Tax_Date AS 'Tax Date'
,PRCHDATE AS 'Purchase Date'
FROM
PM20000 --PM Transaction OPEN File (PM20000)
WHERE
CURTRXAM <> 0
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.