Well look at the way COGSGLPostings work and SalesGLPostings. There is an intermediary table that takes a combination of stock category and stageid and the GL Postings are retrieved based on the combination - there needs to be defaults set up in a similar way.
Phil Daintree
webERP Admin
Logic Works Ltd
http://www.logicworks.co.nz