Hi Chris, > I am looking at trying to create a generic system for mapping GL lines > to various ways of categorizing them. My current thinking is that we > can get additional flexibility out of abstracting and unifying the > department and project code. Additionally I have received a > requirement regarding Colombia that lines must be able to be attached > to customers or vendors. This could be implemented in the same basic > model. > > My thinking is something like: >
[ table design snipped ] > > What do people think about this approach? I think it's a good approach. However, lets say my business has a requirement for a specific line_category to be available on *every* line: a required value. How do we enforce that the value is posted? There's no way to ensure that at the time the GL line is inserted: you can't insert the category when the line doesn't exist yet... What I think would be great to take into account is that certain annotations/categories may not be required on every line, but that they might be required on every line on a specific account. To finish my comments: as dicussed on IRC, I'd say that the maintenance of the ref_key through triggers could be done through a foreign key to a table specifying all possible values for each category (optionally enhanced with 'valid from' and 'valid to' dates). That way, our triggers could stay simple enough. Bye, Erik. ------------------------------------------------------------------------------ All the data continuously generated in your IT infrastructure contains a definitive record of customers, application performance, security threats, fraudulent activity, and more. Splunk takes this data and makes sense of it. IT sense. And common sense. http://p.sf.net/sfu/splunk-novd2d _______________________________________________ Ledger-smb-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel
