Table a_ledger
Diagram AccountsPayable 
Description:
Basic information for each general ledger on the system. Also counters for ledger-specific variables (such as last receipt number).
PRIMARY KEY
a_ledger_number_i
integer default: 0 NOT NULL
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)
This is the ledger name
a_ledger_status_l
boolean default: '1' NOT NULL
Defines if the ledger is in use
a_last_batch_number_i
integer default: 0 NOT NULL
This is the last batch number used within a ledger
a_last_recurring_batch_number_i
integer default: 0 NOT NULL
a_last_gift_number_i
integer default: 0 NOT NULL
a_last_ap_inv_number_i
integer default: 0 NOT NULL
a_last_header_r_number_i
integer default: 0 NOT NULL
a_last_po_number_i
integer default: 0 NOT NULL
a_last_so_number_i
integer default: 0 NOT NULL
a_max_gift_aid_amount_n
numeric (24, 10) default: 0
This is a number of currency units
a_min_gift_aid_amount_n
numeric (24, 10) default: 0
This is a number of currency units
a_number_of_gifts_to_display_i
integer default: 0 NOT NULL
a_tax_type_code_c
varchar (16)
a_tax_type
a_ilt_gl_account_code_c
varchar (16)
The account for inter-ledger transfers.
a_profit_loss_gl_account_code_c
varchar (16)
This identifies the account the financial transaction must be stored against
a_number_of_accounting_periods_i
integer default: 0 NOT NULL
This defines which accounting period is being used
a_country_code_c
varchar (8)
This identifies a country. It uses the ISO 3166-1-alpha-2 code elements. p_country
a_base_currency_c
varchar (16)
This defines which currency is being used a_currency
a_transaction_account_flag_l
boolean default: '0' NOT NULL
Used to get a yes no response from the user
a_year_end_flag_l
boolean default: '0' NOT NULL
Used to get a yes no response from the user
a_forex_gains_losses_account_c
varchar (16) NOT NULL
The account for foreign exchange gains or losses
a_system_interface_flag_l
boolean default: '0' NOT NULL
Used to get a yes no response from the user
a_suspense_account_flag_l
boolean default: '0' NOT NULL
Used to get a yes no response from the user
a_bank_accounts_flag_l
boolean default: '0' NOT NULL
Used to get a yes no response from the user
a_delete_ledger_flag_l
boolean default: '0' NOT NULL
Used to get a yes no response from the user
a_new_financial_year_flag_l
boolean default: '0' NOT NULL
Used to get a yes no response from the user
a_recalculate_gl_master_flag_l
boolean default: '0' NOT NULL
Used to get a yes no response from the user
a_installation_id_c
varchar (16)
Defines which installation is running on this database
a_budget_control_flag_l
boolean default: '0'
a_budget_data_retention_i
integer default: 0
a_cost_of_sales_gl_account_c
varchar (16)
a_creditor_gl_account_code_c
varchar (16)
a_current_financial_year_i
integer default: 0
a_current_period_i
integer default: 0
a_date_cr_dr_balances_d
date
a_debtor_gl_account_code_c
varchar (16)
a_fa_depreciation_gl_account_c
varchar (16)
a_fa_gl_account_code_c
varchar (16)
a_fa_pl_on_sale_gl_account_c
varchar (16)
a_fa_prov_for_depn_gl_account_c
varchar (16)
a_ilt_account_flag_l
boolean default: '0'
a_last_ap_dn_number_i
integer default: 0
a_last_po_ret_number_i
integer default: 0
a_last_so_del_number_i
integer default: 0
a_last_so_ret_number_i
integer default: 0
a_last_special_gift_number_i
integer default: 0
a_number_fwd_posting_periods_i
integer default: 0
a_discount_allowed_pct_n
numeric (5, 2) default: 0
a_discount_received_pct_n
numeric (5, 2) default: 0
a_po_accrual_gl_account_code_c
varchar (16)
a_provisional_year_end_flag_l
boolean default: '0'
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)
a_ret_earnings_gl_account_c
varchar (16)
a_sales_gl_account_code_c
varchar (16)
a_so_accrual_gl_account_code_c
varchar (16)
a_stock_accrual_gl_account_c
varchar (16)
a_stock_adj_gl_account_code_c
varchar (16)
a_stock_gl_account_code_c
varchar (16)
a_tax_excl_incl_l
boolean default: '1'
a_tax_excl_incl_indicator_l
boolean default: '0'
a_tax_input_gl_account_code_c
varchar (16)
a_tax_input_gl_cc_code_c
varchar (16)
a_tax_output_gl_account_code_c
varchar (16)
a_terms_of_payment_code_c
varchar (16)
a_last_po_rec_number_i
integer default: 0
a_tax_gl_account_number_i
integer default: 0
a_actuals_data_retention_i
integer default: 11
p_partner_key_n
bigint default: 0
Partner key which links the ledger to the partner type record where the type is a ledger.
a_calendar_mode_l
boolean default: '1'
a_year_end_process_status_i
integer default: 0
How far along is the year end process.
a_last_header_p_number_i
integer default: 0 NOT NULL
last used cashbook payment header number
a_ilt_processing_centre_l
boolean default: '0'
Is this ledger an ILT processing centre (ie, clearinghouse status)
a_last_gift_batch_number_i
integer default: 0
The number of the last gift batch to be created.
a_intl_currency_c
varchar (16)
This defines which currency to use as a second ('international') base currency. a_currency
a_last_rec_gift_batch_number_i
integer default: 0
The number of the last gift batch to be created.
a_gift_data_retention_i
integer default: 2
How many years to retain gift data.
a_recalculate_all_periods_l
boolean default: '0'
When recalculating the account report structure this indicates that all periods should be recalculated.
a_last_ich_number_i
integer default: 0 NOT NULL
identifes the Last used ICH process number
a_consolidation_ledger_l
boolean default: '0'
Indicates whether the ledger is just for storing consolidated accounts (rather than a 'real' ledger).
s_date_created_d
date default: CURRENT_DATE
The date the record was created.
s_created_by_c
varchar (20)
User ID of who created this record. s_user
s_date_modified_d
date
The date the record was modified.
s_modified_by_c
varchar (20)
User ID of who last modified this record. s_user
s_modification_id_t
timestamp default: CURRENT_TIMESTAMP
This identifies the current version of the record.


FOREIGN KEY
a_ledger_fk1: a_tax_type_code_c => a_tax_type
a_ledger_fk2: a_country_code_c => p_country
a_ledger_fk3: a_base_currency_c => a_currency
a_ledger_fk4: a_intl_currency_c => a_currency
a_ledger_fkcr: s_created_by_c => s_user
a_ledger_fkmd: s_modified_by_c => s_user


REFERENCED BY
a_tax_table, a_ledger_init_flag, a_cost_centre_types,
a_cost_centre, a_budget_revision, a_accounting_period,
a_accounting_system_parameter, a_analysis_type, a_freeform_analysis,
a_motivation_group, a_recurring_batch, a_batch,
a_system_interface, a_account, a_account_property,
a_valid_ledger_number, a_ep_account, a_motivation_detail_fee,
a_recurring_gift_batch, a_gift_batch, a_ap_document,
a_ap_document_detail, a_ap_payment, a_ap_document_payment,
a_ep_payment, a_ep_document_payment, s_group_ledger