Table a_ap_document_detail
Diagram AccountsPayable 
Description:
An invoice or credit note consists out of several items, or details. This table contains all these details.
PRIMARY KEY
a_ap_document_id_i
integer NOT NULL
Reference to the document a_ap_document
a_detail_number_i
integer NOT NULL
A unique number for this detail for its document.

a_ledger_number_i
integer NOT NULL
Reference to the ledger a_ledger, a_cost_centre, a_account
a_detail_approved_l
boolean default: '0' NOT NULL
Indicates if this detail has been approved or not.
a_cost_centre_code_c
varchar (24)
Reference to the cost centre to use for this detail. a_cost_centre
a_account_code_c
varchar (16)
Reference to the account to use for this detail a_account
a_item_ref_c
varchar (100)
Some other reference to the item.
a_narrative_c
varchar (200)
A narrative about what this is.
a_amount_n
numeric (24, 10)
The amount of money this detail is worth.
a_approval_date_d
date
The date when this detail was approved.
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_ap_document_detail_fk1: a_ledger_number_i => a_ledger
a_ap_document_detail_fk2: a_ap_document_id_i => a_ap_document
a_ap_document_detail_fk3: a_ledger_number_i;a_cost_centre_code_c => a_cost_centre
a_ap_document_detail_fk4: a_ledger_number_i;a_account_code_c => a_account
a_ap_document_detail_fkcr: s_created_by_c => s_user
a_ap_document_detail_fkmd: s_modified_by_c => s_user


REFERENCED BY
a_ap_anal_attrib