AR_NET_REVENUE_AMOUNT

Details

  • Schema: FUSION

  • Object owner: AR

  • Object type: VIEW

Columns

Name

CUSTOMER_TRX_LINE_ID

CUSTOMER_TRX_ID

NET_AMOUNT

LINE_TYPE

GROSS_EXTENDED_AMOUNT

Query

SQL_Statement

SELECT orig_ctl.customer_trx_line_id /* customer_trx_line_id */ , orig_ctl.customer_trx_id , sum( decode(ct.complete_flag, 'N', null, ctl.extended_amount ) ) net_amount /* net_amount */ , orig_ctl.line_type, sum( decode(ct.complete_flag, 'N', null, ctl.gross_extended_amount ) ) gross_extended_amount /* gross_extended_amount */

FROM ra_customer_trx_lines ctl, ra_customer_trx ct, ra_customer_trx_lines orig_ctl WHERE ( ctl.customer_trx_line_id = orig_ctl.customer_trx_line_id OR ( ctl.previous_customer_trx_line_id = orig_ctl.customer_trx_line_id AND ctl.previous_customer_trx_line_id is NOT NULL ) ) and ctl.customer_trx_id = ct.customer_trx_id group by orig_ctl.customer_trx_line_id, orig_ctl.customer_trx_id, orig_ctl.line_type