RA_CUSTOMER_TRX_LINES_ALL

RA_CUSTOMER_TRX_LINES_ALL记录了发票、借项凭证、贷项凭证和承诺行的信息。例如,一张发票可能有一条产品A的行,另一条产品B的行。每行都需要一个记录。交易类型由对应的RA_CUSTOMER_TEX_ALL记录区分。此外,除创建时不与特定发票/发票行关联的账户贷方外,贷项凭证需要在PREVIOUS_CUSTOMER_TRX_LINE_ID中有值。此表的主键是CUSTOMER_TRX_LINE_ID,并且对于每个属于完整交易(RA_CUSTOMER_TRX.COMPLETE_FLAG='Y')的行,RA_CUST_TRX_LINE_GL_DIST表中必须至少有一行记录,即使对于不可记账的交易。

     RA_CUSTOMER_TRX_LINES_ALL stores information about invoice,debit memo,credit memo,and commitment lines.For example,an invoice can have one line for Product A another line for Product B.You need one row for each line.

     Invoice,debit memo,credit memo,and commitment lines are distinguished by the transaction type of the corresponding

     RA_CUSTOMER_TEX_ALL record. Also,credit memo are required to have a value in PREVIOUS_CUSTOMER_TRX_LINE_ID,except on account credits which are not related to specific invoices/invoice lines at creation time, will not have values in this column.

     QUANTITY_ORDERED stores the amount of product ordered.

     QUANTITY_INVOICED stores the amount of Product invoiced. For invoices enter through the window, QUANTITY_ORDERED and QUANTITY_INVOICED must be the same. For invoices imported through AutoInvoice,QUANTITY_ORDERED and QUANTITY_INVOICED can be different.

      If you enter a credit memo,QUANTITY_CREDITED stores the amount of product credited.

      UOM_CODE stores the unit of measure code as defined in MTL_UNITS_OF_MEASURE.

      UNIT_STARDARD_PRICE stores the list price per unit for this transaction line.UNIT_SELLING_PRICE stores the selling price per unit for this transaction line.For transaction imported through AutoInvoice,UNIT_STARDARD_PRICE and UNIT_SELLING_PRICE can be different.

      DESCRIPTION,TAXING_RULE,QUANTITY_ORDERED,UNIT_STANDARD_PRICE,UOM_CODE,and UNIT_SELLING_PRICE are required event though they are null allowed.

     

      LINE_TYPE differentiates between the different types of line that are stored in this table.LINE points to regular invoice lines that normally refer to an item.TAX singifies that this is a tax line. The column LINK_TO_CUST_TRX_LINE_ID references another row in this table that is the invoice line associated with the row of type TAX.FREIGHT works the same way as TAX  but there you can have at most one FREIGHT type line per invoice line of type LINE. You can also have one line of type FREIGHT that has a null LINK_TO_CUST_TRX_LINE_ID(and this referred to as header level freight). CHARGES works just like the LINE type. A line_type of 'CB' is created for a Chargeback line.

 

     The primary key for this tbale is CUSTOMER_TRX_LINE_ID.

 

     For every row in this table that belongs to a complete transaction (where RA_CUSTOMER_TRX.COMLETE_FLAG='Y'),there must be at least one row in the table RA_CUST_TRX_LINE_GL_DIST (which stores accounting information),even for non-postable transactions.

     

### ArrayList 的使用方法和特性 #### 存储性能 ArrayList 是基于动态数组实现的列表[^2]。在底层,它使用一个数组来存储元素,并在需要时自动扩容。这种设计使得 ArrayList 在进行按索引访问时性能非常高,但在插入和删除操作上可能表现不如链表。 #### 特性 1. **动态扩容**:ArrayList 在添加新元素时,如果当前数组已满,它会创建一个更大的数组(通常是原大小的 1.5 倍),然后将原数组的元素复制到新数组中。这种机制虽然避免了频繁的扩容,但在进行大批量元素添加时,扩容操作可能导致性能下降。 2. **随机访问**:由于底层使用数组存储,ArrayList 支持通过索引直接访问元素,时间复杂度为 O(1),因此非常适合频繁的随机读取操作。 3. **顺序存储**:ArrayList 中元素的存储是连续的数组位置,任何中间位置的插入或删除操作都需要移动元素,因此插入或删除操作的时间复杂度为 O(n)[^2]。 #### 使用场景 ArrayList 非常适合需要频繁随机访问元素的场景,而不适合频繁进行插入和删除操作的场景。 #### 示例用法 以下是一个简单的 ArrayList 使用示例: ```java import java.util.ArrayList; public class ArrayListExample { public static void main(String[] args) { // 创建一个ArrayList ArrayList<String> list = new ArrayList<>(); // 添加元素 list.add("Apple"); list.add("Banana"); list.add("Cherry"); // 访问元素 System.out.println("Element at index 1: " + list.get(1)); // 插入元素 list.add(1, "Apricot"); System.out.println("List after insertion: " + list); // 删除元素 list.remove(2); System.out.println("List after deletion: " + list); // 检查元素是否存在 boolean containsBanana = list.contains("Banana"); System.out.println("List contains 'Banana': " + containsBanana); } } ``` #### 性能分析 - **查找操作**:通过索引访问的时间复杂度为 O(1),因为可以直接定位数组中的位置。 - **插入/删除操作**:在末尾添加元素的时间复杂度为 O(1),但在中间或头部插入/删除元素时,时间复杂度为 O(n),因为需要移动数组中的元素。 - **扩容开销**:当数组容量不够时,ArrayList 需要进行扩容操作,扩容的时间复杂度为 O(n),因为所有元素需要被复制到新的数组中。 #### 线程安全 ArrayList 不是线程安全的。如果需要线程安全的列表,可以使用 Vector 或者使用 Collections.synchronizedList 方法来包装 ArrayList。 ###
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值