AutoInvoice uses line ordering rules to determine how to order and number each line after your transactions have been grouped into invoices, debit memos and credit memos. You can specify a line ordering rule for each grouping rule. You might want to use line ordering rules to ensure that the highest invoice line amounts are listed first. In this case, define a line ordering rule where amount is your transaction attribute and descending is your order by type.
Receivables provides the following transaction attributes that you can use in your line ordering rules (from the table RA_INTERFACE_LINES_ALL):
ACCOUNTING_RULE_DURATION
ACCOUNTING_RULE_ID
ACCOUNTING_RULE_NAME
AMOUNT
ATTRIBUTE_CATEGORY
ATTRIBUTE1-15
FOB_POINT
INTERFACE_LINE_ATTRIBUTE1-15
INTERFACE_LINE_CONTEXT
ORIG_SYSTEM_SHIP_ADDRESS_ID
QUANTITY
QUANTITY_ORDERED
REASON_CODE
REASON_CODE_MEANING
REFERENCE_LINE_ATTRIBUTE1-15
REFERENCE_LINE_CONTEXT
REFERENCE_LINE_ID
SALES_ORDER
SALES_ORDER_DATE
SALES_ORDER_LINE
SALES_ORDER_SOURCE
SHIP_DATE_ACTUAL
SHIP_VIA
TAX_CODE
UNIT_SELLING_PRICE
UNIT_STANDARD_PRICE
UOM_CODE
UOM_NAME
WAYBILL_NUMBER