Dynamics GP Year-End Payroll Audit List for W-2



It's that wonderful time of year for payroll administrators, where you need to validate employee information prior to sending out your W-2 wage reports. 

The SQL script below can either be ran via SQL or inserted into SmartList Builder as a SQL statement and used to build a SmartList. 

It will return Employee and Employee Address Information.


Run the following Script against each company Database:  

select UPR00100.EMPLOYID ID, CASE INACTIVE WHEN 0 THEN 'ACTIVE' when 1 THEN 'INACTIVE' END AS STATUS, LASTDAYWORKED_I LASTDAY, EMPLCLAS CLASS, LASTNAME LAST_NAME, FRSTNAME FIRST_NAME, MIDLNAME MIDDLE, UPR00100.ADRSCODE ADDRESS_CODE, SOCSCNUM SOCIAL_SEC_NUM, CASE GENDER WHEN 1 THEN 'MALE' WHEN 2 THEN 'FEMALE' END AS GENDER, DEPRTMNT DEPARTMENT, DIVISIONCODE_I DIVISION, JOBTITLE TITLE, ADDRESS1, ADDRESS2, ADDRESS3, CITY, STATE, ZIPCODE from UPR00100 

left outer join UPR00102

on UPR00100.EMPLOYID=UPR00102.EMPLOYID and UPR00100.ADRSCODE=UPR00102.ADRSCODE

order by LASTNAME


No comments:

Post a Comment

Reversing a Closed Year in Dynamics GP

It's that time of year again.  The time where you need to close the year in Dynamics GP to roll forward balances but at the sam...