1099 Year End Edit – SQL View for Dynamics GP

There are many ways to look at 1099 data – here is my recent pass at looking at the actual 1099 Period Detail Table as well as having the 1099 Type and Box information.

Apply this to your company database and bring into SmartLists.

CREATE view [dbo].[TEN99_Audit_List]
as

SELECT A.VENDORID Vendor_ID,
 B.VENDNAME Vendor_Name,
 B.VNDCHKNM Vendor_Check_Name,
 B.VNDCLSID Class_ID,
 case B.VENDSTTS
 when 1 then 'Active'
 when 2 then 'Inactive'
 when 3 then 'Temporary'
 end Vendor_Status,
 case A.TEN99TYPE
 when 1 then 'Not a 1099 Vendor'
 when 2 then 'Dividend'
 when 3 then 'Interest'
 when 4 then 'Miscellaneous'
 end Type,
 case --Set 1099 Box Number Values
 when A.TEN99TYPE = 1 then 'Not a 1099 Vendor' 
 when A.TEN99BOXNUMBER = 0 then 'Not a 1099 Vendor'
 --1099 Type Dividend Box Numbers
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 1 then '1a Ordinary Dividends'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 2 then '1b Qualified Dividends'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 3 then '2a Capital Gain Dist.'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 4 then '2b Unrecap. 1250 Gain'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 5 then '2c Section 1202 Gain'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 6 then '2d 28% Rate Gain'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 7 then '3 Nontaxable Dist.'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 8 then '4 Federal Tax Withheld'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 9 then '5 Investment Expense'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 10 then '6 Foreign Tax Paid'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 11 then '8 Cash'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 12 then '9 Noncash'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 13 then '10 Exempt Interest Dividend'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 14 then '11 Specified Private Activity'
 when A.TEN99TYPE = 2 and A.TEN99BOXNUMBER = 15 then '14 State Tax Withheld'
 --1099 Type Interest Box Numbers
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 1 then '1 Interest'
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 2 then '2 Early Withdrawal'
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 3 then '3 U.S. Savings Bond Int.'
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 4 then '4 Federal Tax Withheld'
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 5 then '5 Investment Expense'
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 6 then '6 Foreign Tax Paid'
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 7 then '8 Tax-Exempt Interest'
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 8 then '9 Private Activity Bond Int.'
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 9 then '10 Market Discount'
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 10 then '11 Bond Premium'
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 11 then '12 Bond premium on Treasury obligations'
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 12 then '13 Bond premium on Tax-exempt bond' 
 when A.TEN99TYPE = 3 and A.TEN99BOXNUMBER = 13 then '17 State Tax Withheld'
 --1099 Type Miscellaneous Box Numbers
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 1 then '1 - Rents'
 When A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 2 then '2 - Royalties'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 3 then '3 - Other Income'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 4 then '4 - Federal Tax Withheld'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 5 then '5 - Fishing Boat Proceeds'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 6 then '6 - Medical Payments'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 7 then '7 - Nonemployee Compensation'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 8 then '8 - Substitue Payments'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 9 then '10 – Crop Insurance'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 10 then '13 – Golden Parachute'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 11 then '14 – Attorney Proceeds'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 12 then '15a – Section 409A Deferrals'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 13 then '15b – Section 409A Income'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 14 then '16 - State Tax Withheld'
 when A.TEN99TYPE = 4 and A.TEN99BOXNUMBER = 15 then '18 - State Income'
 end [1099_Box_Number],
 
 B.TXRGNNUM Tax_Registration_Number,
 B.PYMTRMID Payment_Terms_ID,
 A.YEAR1 [Year],
 sum(A.TEN99AMNT) Amount_Paid_1099,
 B.ADDRESS1 Address_1,
 B.ADDRESS2 Address_2,
 B.ADDRESS3 Address_3,
 B.CITY City,
 B.[STATE] [State],
 B.ZIPCODE Zip_Code,
 B.COUNTRY Country,
 B.TXIDNMBR Tax_ID
 
FROM PM00204 A
 
INNER JOIN PM00200 B ON A.VENDORID = B.VENDORID
 
 
GROUP BY A.VENDORID, B.VENDNAME, B.VNDCLSID,
 B.VENDSTTS, A.TEN99TYPE, B.PYMTRMID, A.YEAR1, B.ADDRESS1, B.ADDRESS2,
 B.ADDRESS3, B.CITY, B.[STATE], B.ZIPCODE, B.COUNTRY, B.TXIDNMBR, B.VNDCHKNM, B.TXRGNNUM, A.TEN99BOXNUMBER


GO
grant select on [TEN99_Audit_List] TO DYNGRP

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.