Edit Report:Items with Multiple Purchdata records
Menu Anchors
'customers', 'orders', 'sales', 'payables', 'warehouse', 'dispatching', 'receivables', 'payables-dash', 'inventory', 'purchases', 'generallendger', 'users',-- Items with Multiple Purchdata records
-- data for Excel to remove duplicates
-- No Drill Downs
SELECT
s.stockid,
s.description,
s.controlled,
s.categoryid,
s.barcode AS `Barcode`,
s.lineid,
s.mbflag,
s.units,
s.longdescription,
s.actualcost,
s.lastcost,
s.materialcost,
s.labourcost,
s.overheadcost,
s.lowestlevel,
s.discontinued,
s.controlled,
s.eoq,
s.volume,
s.grossweight,
s.lastcostupdate,
count(p.stockid) as `purchdatarec`
FROM
stockmaster s
INNER JOIN purchdata p ON s.stockid = p.stockid
WHERE
p.stockid is NOT NULL and s.discontinued = 0
Group BY p.stockid
Order By p.stockid