[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: RFC: Changes in projects and departments to support other mappings
- Subject: Re: RFC: Changes in projects and departments to support other mappings
- From: Erik Huelsmann <..hidden..>
- Date: Sat, 3 Dec 2011 12:03:27 +0100
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.