Table openpetra_trunk.public.a_ledger
Basic information for each general ledger on the system. Also counters for ledger-specific variables (such as last receipt number).

Generated by
SchemaSpy
Legend: SourceForge.net
Primary key columns
Columns with indexes
Implied relationships
Excluded column relationships
< n > number of related tables
 
Column Type Size Nulls Auto Default Children Parents Comments
a_ledger_number_i int4 10 0
a_account.a_ledger_number_i a_account_fk1 R
a_account_property.a_ledger_number_i a_account_property_fk1 R
a_accounting_period.a_ledger_number_i a_accounting_period_fk1 R
a_accounting_system_parameter.a_ledger_number_i a_accounting_system_param_fk1 R
a_ap_document.a_ledger_number_i a_ap_document_fk1 R
a_ap_document_detail.a_ledger_number_i a_ap_document_detail_fk1 R
a_ap_document_payment.a_ledger_number_i a_ap_document_payment_fk1 R
a_ap_payment.a_ledger_number_i a_ap_payment_fk1 R
a_batch.a_ledger_number_i a_batch_fk1 R
a_cost_centre.a_ledger_number_i a_cost_centre_fk1 R
a_cost_centre_types.a_ledger_number_i a_cost_centre_types_fk1 R
a_ep_account.a_ledger_number_i a_ep_account_fk2 R
a_ep_document_payment.a_ledger_number_i a_ep_document_payment_fk1 R
a_ep_payment.a_ledger_number_i a_ep_payment_fk1 R
a_freeform_analysis.a_ledger_number_i a_freeform_analysis_fk1 R
a_gift_batch.a_ledger_number_i a_gift_batch_fk1 R
a_ledger_init_flag.a_ledger_number_i a_ledger_init_flag_fk1 R
a_motivation_detail_fee.a_ledger_number_i a_motivation_detail_fee_fk2 R
a_motivation_group.a_ledger_number_i a_motivation_group_fk1 R
a_previous_year_batch.a_ledger_number_i a_previous_year_batch_fk1 R
a_recurring_batch.a_ledger_number_i a_recurring_batch_fk1 R
a_recurring_gift_batch.a_ledger_number_i a_recurring_gift_batch_fk1 R
a_system_interface.a_ledger_number_i a_system_interface_fk1 R
a_tax_table.a_ledger_number_i a_tax_table_fk1 R
a_this_year_old_batch.a_ledger_number_i a_this_year_old_batch_fk1 R
a_valid_ledger_number.a_ledger_number_i a_valid_ledger_number_fk1 R
s_group_ledger.a_ledger_number_i s_group_ledger_fk2 R
This is used as a key field in most of the accounting system files .It is created from the first 4 digits of a partner key of type ledger.
a_ledger_name_c varchar 64  √  null This is the ledger name
a_ledger_status_l bool 1 true Defines if the ledger is in use
a_last_batch_number_i int4 10 0 This is the last batch number used within a ledger
a_last_recurring_batch_number_i int4 10 0
a_last_gift_number_i int4 10 0
a_last_ap_inv_number_i int4 10 0
a_last_header_r_number_i int4 10 0
a_last_po_number_i int4 10 0
a_last_so_number_i int4 10 0
a_max_gift_aid_amount_n numeric 24,10  √  0 This is a number of currency units
a_min_gift_aid_amount_n numeric 24,10  √  0 This is a number of currency units
a_number_of_gifts_to_display_i int4 10 0
a_tax_type_code_c varchar 16  √  null
a_tax_type.a_tax_type_code_c a_ledger_fk1 R
a_ilt_gl_account_code_c varchar 16  √  null The account for inter-ledger transfers.
a_profit_loss_gl_account_code_c varchar 16  √  null This identifies the account the financial transaction must be stored against
a_current_accounting_period_i int4 10 0 deprecated; not used at the moment; please use a_current_period_i
a_number_of_accounting_periods_i int4 10 0 This defines which accounting period is being used
a_country_code_c varchar 8  √  null
p_country.p_country_code_c a_ledger_fk2 R
This identifies a country. It uses the ISO 3166-1-alpha-2 code elements.
a_base_currency_c varchar 16  √  null
a_currency.a_currency_code_c a_ledger_fk3 R
This defines which currency is being used
a_transaction_account_flag_l bool 1 false Used to get a yes no response from the user
a_year_end_flag_l bool 1 false Used to get a yes no response from the user
a_forex_gains_losses_account_c varchar 16 This identifies the account the financial transaction must be stored against
a_system_interface_flag_l bool 1 false Used to get a yes no response from the user
a_suspense_account_flag_l bool 1 false Used to get a yes no response from the user
a_bank_accounts_flag_l bool 1 false Used to get a yes no response from the user
a_delete_ledger_flag_l bool 1 false Used to get a yes no response from the user
a_new_financial_year_flag_l bool 1 false Used to get a yes no response from the user
a_recalculate_gl_master_flag_l bool 1 false Used to get a yes no response from the user
a_installation_id_c varchar 16  √  null Defines which installation is running on this database
a_budget_control_flag_l bool 1  √  false
a_budget_data_retention_i int4 10  √  0
a_cost_of_sales_gl_account_c varchar 16  √  null
a_creditor_gl_account_code_c varchar 16  √  null
a_current_financial_year_i int4 10  √  0
a_current_period_i int4 10  √  0
a_date_cr_dr_balances_d date 13  √  null
a_debtor_gl_account_code_c varchar 16  √  null
a_fa_depreciation_gl_account_c varchar 16  √  null
a_fa_gl_account_code_c varchar 16  √  null
a_fa_pl_on_sale_gl_account_c varchar 16  √  null
a_fa_prov_for_depn_gl_account_c varchar 16  √  null
a_ilt_account_flag_l bool 1  √  false
a_last_ap_dn_number_i int4 10  √  0
a_last_po_ret_number_i int4 10  √  0
a_last_so_del_number_i int4 10  √  0
a_last_so_ret_number_i int4 10  √  0
a_last_special_gift_number_i int4 10  √  0
a_number_fwd_posting_periods_i int4 10  √  0
a_periods_per_financial_year_i int4 10  √  0 deprecated; not used at the moment; please use a_number_of_accounting_periods_i
a_discount_allowed_pct_n numeric 5,2  √  0
a_discount_received_pct_n numeric 5,2  √  0
a_po_accrual_gl_account_code_c varchar 16  √  null
a_provisional_year_end_flag_l bool 1  √  false This flag is set between the completion of the last month of the year and the year itself. In this state some activities are disabled and some others are enabled.
a_purchase_gl_account_code_c varchar 16  √  null
a_ret_earnings_gl_account_c varchar 16  √  null
a_sales_gl_account_code_c varchar 16  √  null
a_so_accrual_gl_account_code_c varchar 16  √  null
a_stock_accrual_gl_account_c varchar 16  √  null
a_stock_adj_gl_account_code_c varchar 16  √  null
a_stock_gl_account_code_c varchar 16  √  null
a_tax_excl_incl_l bool 1  √  true
a_tax_excl_incl_indicator_l bool 1  √  false
a_tax_input_gl_account_code_c varchar 16  √  null
a_tax_input_gl_cc_code_c varchar 16  √  null
a_tax_output_gl_account_code_c varchar 16  √  null
a_terms_of_payment_code_c varchar 16  √  null
a_last_po_rec_number_i int4 10  √  0
a_tax_gl_account_number_i int4 10  √  0
a_actuals_data_retention_i int4 10  √  11
p_partner_key_n numeric 10  √  0 Partner key which links the ledger to the partner type record where the type is a ledger.
a_calendar_mode_l bool 1  √  true
a_year_end_process_status_i int4 10  √  0 How far along is the year end process.
a_last_header_p_number_i int4 10 0 last used cashbook payment header number
a_ilt_processing_centre_l bool 1  √  false Is this ledger an ILT processing centre (ie, clearinghouse status)
a_last_gift_batch_number_i int4 10  √  0 The number of the last gift batch to be created.
a_intl_currency_c varchar 16  √  null
a_currency.a_currency_code_c a_ledger_fk4 R
This defines which currency to use as a second ('international') base currency.
a_last_rec_gift_batch_number_i int4 10  √  0 The number of the last gift batch to be created.
a_gift_data_retention_i int4 10  √  2 How many years to retain gift data.
a_recalculate_all_periods_l bool 1  √  false When recalculating the account report structure this indicates that all periods should be recalculated.
a_last_ich_number_i int4 10 0 identifes the Last used ICH process number
a_branch_processing_l bool 1  √  false THis defines whether or not the ledger ha made up of separate branches/departments that are self contained (should balance).
a_consolidation_ledger_l bool 1  √  false Indicates whether the ledger is just for storing consolidated accounts (rather than a 'real' ledger).
s_date_created_d date 13  √  ('now'::text)::date
s_created_by_c varchar 20  √  null
s_user.s_user_id_c a_ledger_fkcr R
s_date_modified_d date 13  √  null
s_modified_by_c varchar 20  √  null
s_user.s_user_id_c a_ledger_fkmd R
s_modification_id_c varchar 150  √  null

Table contained 3 rows at Do Nov 10 18:00 MEZ 2011

Indexes:
Column(s) Type Sort Constraint Name Anomalies
a_ledger_number_i Primary key Asc a_ledger_pk  
p_partner_key_n Must be unique Asc a_ledger_k20 This unique column is also nullable
a_ledger_number_i Performance Asc inx_a_ep_account_fk2_ref0  
a_tax_type_code_c Performance Asc inx_a_ledger_fk1_key2  
a_country_code_c Performance Asc inx_a_ledger_fk2_key3  
a_base_currency_c Performance Asc inx_a_ledger_fk3_key4  
a_intl_currency_c Performance Asc inx_a_ledger_fk4_key5  
s_created_by_c Performance Asc inx_a_ledger_fkcr_key6  
s_modified_by_c Performance Asc inx_a_ledger_fkmd_key7  
a_ledger_number_i Must be unique Asc inx_a_ledger_pk1  

Close relationships  within of separation: