This table provides a list of valid ledger accounts.
Source romber_ledger_accounts_tbl.sql
create table romber_financial.ledger_accounts ( financial_transaction_element_type_id romber_financial.transaction_element_type_id not null, item_category_id romber_item.category_id not null, ledger_account_code romber_base.generic_code not null, ledger_account_id romber_financial.ledger_account_id not null default nextval ( 'romber_base.generic_id_seq' ), ledger_account_name romber_base.generic_name not null, parent_ledger_account_id romber_financial.ledger_account_id not null, subledger_type_id romber_financial.subledger_type_id not null );
Source romber_ledger_accounts_pk.sql
alter table romber_financial.ledger_accounts add constraint romber_ledger_accounts_pk primary key ( ledger_account_id );
Source romber_ledger_accounts_uk1.sql
alter table romber_financial.ledger_accounts add constraint romber_ledger_accounts_uk1 unique ( ledger_account_code );
Source romber_ledger_accounts_fk1.sql
alter table romber_financial.ledger_accounts add constraint romber_ledger_accounts_fk1 foreign key ( ledger_account_id ) references romber_meta.objects ( meta_object_id );
Source romber_ledger_accounts_fk2.sql
alter table romber_financial.ledger_accounts add constraint romber_ledger_accounts_fk2 foreign key ( parent_ledger_account_id ) references romber_financial.ledger_accounts ( ledger_account_id );
Source romber_ledger_accounts_fk3.sql
alter table romber_financial.ledger_accounts add constraint romber_ledger_accounts_fk3 foreign key ( subledger_type_id ) references romber_financial.subledger_types ( subledger_type_id );
Source romber_ledger_accounts_fk4.sql
alter table romber_financial.ledger_accounts add constraint romber_ledger_accounts_fk4 foreign key ( item_category_id ) references romber_item.categories ( item_category_id );
Source romber_ledger_accounts_fk5.sql
alter table romber_financial.ledger_accounts add constraint romber_ledger_accounts_fk5 foreign key ( financial_transaction_element_type_id ) references romber_financial.transaction_element_types ( financial_transaction_element_type_id );
Source romber_ledger_accounts_load.sql
insert into romber_financial.ledger_accounts ( financial_transaction_element_type_id, item_category_id, ledger_account_code, ledger_account_id, ledger_account_name, parent_ledger_account_id, subledger_type_id ) values ( 0, 0, '', 0, '', 0, 0 );