it would be tempting to add a column in the core_nom_accounts table to indicate whether the account was restricted or not (or is a bank account). But, that goes against my normalization rules because you only need to reference reserved records, not all of them.
So i am going to create a new table that contains 2 fields, 1 to reference the unique id of the nominal account and 1 to indicate its function.
CREATE TABLE core_nom_reserved(id SMALLINT UNSIGNED, reserveType VARCHAR(2), PRIMARY KEY(id, reserveType))
Now really i should make reserveType a foreign key to another table but i cant be bothered. its a very simple reference that doesn't need much explanation. I will use codes like SL for Sales Ledger, PL for Purchase Ledger, VS for VAT Sales, VP for VAT Purchases, VC for VAT Control and BA for Bank Account (can be more than one).
No comments:
Post a Comment