SELECT
_VPW.location AS QuickBooks_Item_AssetAccnt, 
_VPW.MFG_SKU AS Quickbooks_Item_CogsAccnt,
pins.Manufacturer, 
client_map.ProductCode, 
pins.Name, 
_VPW.TX
FROM products._VPW
JOIN products.pins
	ON _VPW.MFG_SKU = pins.PIN
JOIN products.client_map
	ON _VPW.MFG_SKU = client_map.PIN
WHERE _VPW.TX < 0
AND (client_map.Parent IS NULL OR client_map.Parent = '')
ORDER BY pins.Manufacturer, client_map.ProductCode