FLA_LEASE_PAYMENT_TAXES_INT_V
Details
-
Schema: FUSION
-
Object owner: FUN
-
Object type: VIEW
Columns
Name |
---|
LOAD_REQUEST_ID IMPORT_REQUEST_ID IMPORT_STATUS_CODE INTERFACE_LEASE_ID ORG_ID LEGAL_ENTITY_ID AMORTIZATION_START_DATE TRANSACTION_TYPE_CODE TRANSACTION_SUBTYPE_CODE TAX_SOURCE_OBJECT INTERFACE_PAYMENT_HEADER_ID PAYMENT_NUMBER OPTION_FLAG PAYMENT_TEMPLATE_ID ROU_ASSET_FLAG LIABILITY_FLAG PAY_AMEND_ACTION_TYPE_CODE APPLY_UPFRONT_TAX_FLAG PAYMENT_TAX_LINE_NUMBER TAX_AMEND_ACTION_TYPE_CODE TAX_RATE_CODE TAX_JURISDICTION_CODE TAX_REGIME_CODE TAX RECOVERY_TAX_RATE_CODE RECOVERY_TYPE_CODE TAX_DETERMINANTS_SOURCE_CODE TAX_RATE_ID RECOVERY_TAX_RATE_ID ATTRIBUTE_CATEGORY ATTRIBUTE_CHAR1 ATTRIBUTE_CHAR2 ATTRIBUTE_CHAR3 ATTRIBUTE_CHAR4 ATTRIBUTE_CHAR5 ATTRIBUTE_CHAR6 ATTRIBUTE_CHAR7 ATTRIBUTE_CHAR8 ATTRIBUTE_CHAR9 ATTRIBUTE_CHAR10 ATTRIBUTE_CHAR11 ATTRIBUTE_CHAR12 ATTRIBUTE_CHAR13 ATTRIBUTE_CHAR14 ATTRIBUTE_CHAR15 ATTRIBUTE_NUMBER1 ATTRIBUTE_NUMBER2 ATTRIBUTE_NUMBER3 ATTRIBUTE_NUMBER4 ATTRIBUTE_NUMBER5 ATTRIBUTE_DATE1 ATTRIBUTE_DATE2 ATTRIBUTE_DATE3 ATTRIBUTE_DATE4 ATTRIBUTE_DATE5 |
Query
SQL_Statement |
---|
SELECT li.load_request_id, li.import_request_id, li.import_status_code, li.interface_lease_id, li.org_id, NVL(la.legal_entity_id, li.legal_entity_id) legal_entity_id, li.amortization_start_date, li.transaction_type_code, li.transaction_subtype_code, 'PAYMENT' tax_source_object, phi.interface_payment_header_id, phi.payment_number, phi.option_flag, phi.payment_template_id, NVL(phi.rou_asset_flag, pt.rou_asset_flag) rou_asset_flag, NVL(phi.liability_flag, pt.liability_flag) liability_flag, NVL(phi.amend_action_type_code, 'NEW') pay_amend_action_type_code, phi.apply_upfront_tax_flag, pti.payment_tax_line_number, NVL(phi.amend_action_type_code, 'NEW') tax_amend_action_type_code, pti.tax_rate_code, pti.tax_jurisdiction_code, pti.tax_regime_code, pti.tax, pti.recovery_tax_rate_code, pti.recovery_type_code, NVL(pti.tax_determinants_source_code, tt.tax_determinants_source_code) tax_determinants_source_code, TO_NUMBER(NULL) tax_rate_id, TO_NUMBER(NULL) recovery_tax_rate_id, pti.attribute_category, pti.attribute_char1, pti.attribute_char2, pti.attribute_char3, pti.attribute_char4, pti.attribute_char5, pti.attribute_char6, pti.attribute_char7, pti.attribute_char8, pti.attribute_char9, pti.attribute_char10, pti.attribute_char11, pti.attribute_char12, pti.attribute_char13, pti.attribute_char14, pti.attribute_char15, pti.attribute_number1, pti.attribute_number2, pti.attribute_number3, pti.attribute_number4, pti.attribute_number5, pti.attribute_date1, pti.attribute_date2, pti.attribute_date3, pti.attribute_date4, pti.attribute_date5 FROM fla_leases_int li, fla_leases_all la, fla_payment_headers_int phi, fla_payment_taxes_int pti, fla_payment_templates_all pt, fla_payment_template_taxes tt WHERE li.lease_id = la.lease_id(+) AND li.load_request_id = phi.load_request_id AND li.interface_lease_id = phi.interface_lease_id AND phi.load_request_id = pti.load_request_id(+) AND phi.interface_payment_header_id = pti.interface_payment_header_id(+) AND phi.payment_template_id = pt.payment_template_id AND phi.payment_template_id = tt.payment_template_id(+) AND phi.apply_upfront_tax_flag = 'Y' AND phi.option_flag = 'N' AND NVL(phi.amend_action_type_code, 'NEW') = 'NEW' UNION ALL SELECT li.load_request_id, li.import_request_id, li.import_status_code, li.interface_lease_id, li.org_id, NVL(la.legal_entity_id, li.legal_entity_id) legal_entity_id, li.amortization_start_date, li.transaction_type_code, li.transaction_subtype_code, 'TEMPLATE' tax_source_object, phi.interface_payment_header_id, phi.payment_number, phi.option_flag, phi.payment_template_id, NVL(phi.rou_asset_flag, pt.rou_asset_flag) rou_asset_flag, NVL(phi.liability_flag, pt.liability_flag) liability_flag, NVL(phi.amend_action_type_code, 'NEW') pay_amend_action_type_code, CASE WHEN NVL(phi.rou_asset_flag, pt.rou_asset_flag) = 'Y' THEN pt.apply_upfront_tax_flag WHEN NVL(phi.liability_flag, pt.liability_flag) = 'Y' THEN pt.apply_upfront_tax_flag ELSE 'N' END apply_upfront_tax_flag, TO_CHAR(NULL) payment_tax_line_number, 'NEW' tax_amend_action_type_code, tt.tax_rate_code, tt.tax_jurisdiction_code, tt.tax_regime_code, tt.tax, tt.recovery_tax_rate_code, tt.recovery_type_code, tt.tax_determinants_source_code tax_determinants_source_code, TO_NUMBER(NULL) tax_rate_id, TO_NUMBER(NULL) recovery_tax_rate_id, tt.attribute_category, tt.attribute_char1, tt.attribute_char2, tt.attribute_char3, tt.attribute_char4, tt.attribute_char5, tt.attribute_char6, tt.attribute_char7, tt.attribute_char8, tt.attribute_char9, tt.attribute_char10, tt.attribute_char11, tt.attribute_char12, tt.attribute_char13, tt.attribute_char14, tt.attribute_char15, tt.attribute_number1, tt.attribute_number2, tt.attribute_number3, tt.attribute_number4, tt.attribute_number5, tt.attribute_date1, tt.attribute_date2, tt.attribute_date3, tt.attribute_date4, tt.attribute_date5 FROM fla_leases_int li, fla_leases_all la, fla_payment_headers_int phi, fla_payment_templates_all pt, fla_payment_template_taxes tt WHERE li.lease_id = la.lease_id(+) AND li.load_request_id = phi.load_request_id AND li.interface_lease_id = phi.interface_lease_id AND phi.payment_template_id = pt.payment_template_id AND phi.payment_template_id = tt.payment_template_id AND phi.apply_upfront_tax_flag IS NULL AND pt.apply_upfront_tax_flag = 'Y' AND phi.option_flag = 'N' AND NVL(phi.amend_action_type_code, 'NEW') = 'NEW' |