Hi good people,
I am putting together a report to accomplish the following:
When a PO is created, there are GL Distributions assigned to the line items. However, when they do the Receiving in PO module, the clerk overrides the original distribution and enters a different GL Account. I need to find those POs & Receipt numbers so I created the following:
SELECT
POP30310.PONUMBER [PO Number],
POP30310.POPRCTNM [Receipt Number],
POP30310.ITEMNMBR [Item Number],
POP30310.ITEMDESC [Description],
POP30310.UNITCOST [Unit Cost],
POP30310.EXTDCOST [Ext Cost],
GL00105.ACTNUMST [Receipt GL Account Number],
POP30310.LOCNCODE [Loc Code],
GL00105_1.ACTNUMST [PO GL Account]
FROM ((VTEST.dbo.POP10110 POP10110
INNER JOIN VTEST.dbo.POP30310 POP30310 ON POP10110.PONUMBER=POP30310.PONUMBER)
INNER JOIN VTEST.dbo.GL00105 GL00105_1 ON POP10110.INVINDX=GL00105_1.ACTINDX)
INNER JOIN VTEST.dbo.GL00105 GL00105 ON POP30310.INVINDX=GL00105.ACTINDX
The query runs but the lines are duplicated. I am looking for one line per one PO line item.
What am I doing wrong?
Thanks
Paul Chacko