CMF_FISCAL_DOC_LOC_INFO_V
Details
-
Schema: FUSION
-
Object owner: CMF
-
Object type: VIEW
Columns
Name |
---|
DOCUMENT_HEADER_ID DOCUMENT_NUMBER FISCAL_PROC_OPTIONS_ID ISSUER_TYPE ISSUER_TAX_ID ISSUER_TAXPAYER_ID ISSUER_FORM_TAX_NUMBER ISSUER_PARTY_ID ISSUER_PARTY_NAME ISSUER_PARTY_SITE_ID ISSUER_PARTY_SITE_NAME ISSUER_LOCATION_ID RECEIVER_TYPE RECEIVER_TAX_ID RECEIVER_TAXPAYER_ID RECEIVER_FORM_TAX_NUMBER RECEIVER_PARTY_ID RECEIVER_PARTY_NAME RECEIVER_PARTY_SITE_ID RECEIVER_PARTY_SITE_NAME RECEIVER_LOCATION_ID SHIPFROM_TYPE SHIPFROM_TAX_ID SHIPFROM_TAXPAYER_ID SHIPFROM_FORM_TAX_NUMBER SHIPFROM_PARTY_ID SHIPFROM_PARTY_NAME SHIPFROM_PARTY_SITE_ID SHIPFROM_PARTY_SITE_NAME SHIPFROM_LOCATION_ID SHIPTO_TYPE SHIPTO_TAX_ID SHIPTO_TAXPAYER_ID SHIPTO_FORM_TAX_NUMBER SHIPTO_PARTY_ID SHIPTO_PARTY_NAME SHIPTO_PARTY_SITE_ID SHIPTO_PARTY_SITE_NAME SHIPTO_LOCATION_ID SHIPTO_VENDOR_ID SHIPTO_VENDOR_SITE_ID |
Query
SQL_Statement |
---|
select fdh.document_header_id ,fdh.document_number ,fdh.fiscal_proc_options_id ,fdp.issuer_type ,decode(fdp.issuer_type,'SUPPLIER',issuer.party_taxpayer_idntfs_id,'CUSTOMER',issuer.party_taxpayer_idntfs_id,'LE',leissuer.registration_id) issuer_tax_id ,decode(fdp.issuer_type,'SUPPLIER',issuer.taxpayer_id,'CUSTOMER',issuer.taxpayer_id,'LE',leissuer.taxpayer_id) issuer_taxpayer_id ,decode(fdp.issuer_type,'SUPPLIER',issuer.formatted_taxpayer_number,'CUSTOMER',issuer.formatted_taxpayer_number,'LE',leissuer.formatted_taxpayer_number) issuer_form_tax_number ,decode(fdp.issuer_type,'SUPPLIER',issuer.party_id,'CUSTOMER',issuer.party_id,'LE',leissuer.legal_entity_id) issuer_party_id ,decode(fdp.issuer_type,'SUPPLIER',issuer.party_name,'CUSTOMER',issuer.party_name,'LE',leissuer.legal_entity_name) issuer_party_name ,decode(fdp.issuer_type,'SUPPLIER',issuer.party_site_id,'CUSTOMER',issuer.party_site_id,'LE',leissuer.establishment_id) issuer_party_site_id ,decode(fdp.issuer_type,'SUPPLIER',issuer.party_site_name,'CUSTOMER',issuer.party_site_name,'LE',leissuer.establishment_name) issuer_party_site_name ,decode(fdp.issuer_type,'SUPPLIER',issuer.location_id,'CUSTOMER',issuer.location_id,'LE',leissuer.location_id) issuer_location_id ,fdp.receiver_type ,decode(fdp.receiver_type,'SUPPLIER',receiver.party_taxpayer_idntfs_id,'CUSTOMER',receiver.party_taxpayer_idntfs_id,'LE',lereceiver.registration_id) receiver_tax_id ,decode(fdp.receiver_type,'SUPPLIER',receiver.taxpayer_id,'CUSTOMER',receiver.taxpayer_id,'LE',lereceiver.taxpayer_id) receiver_taxpayer_id ,decode(fdp.receiver_type,'SUPPLIER',receiver.formatted_taxpayer_number,'CUSTOMER',receiver.formatted_taxpayer_number,'LE',lereceiver.formatted_taxpayer_number) receiver_form_tax_number ,decode(fdp.receiver_type,'SUPPLIER',receiver.party_id,'CUSTOMER',receiver.party_id,'LE',lereceiver.legal_entity_id) receiver_party_id ,decode(fdp.receiver_type,'SUPPLIER',receiver.party_name,'CUSTOMER',receiver.party_name,'LE',lereceiver.legal_entity_name) receiver_party_name ,decode(fdp.receiver_type,'SUPPLIER',receiver.party_site_id,'CUSTOMER',receiver.party_site_id,'LE',lereceiver.establishment_id) receiver_party_site_id ,decode(fdp.receiver_type,'SUPPLIER',receiver.party_site_name,'CUSTOMER',receiver.party_site_name,'LE',lereceiver.establishment_name) receiver_party_site_name ,decode(fdp.receiver_type,'SUPPLIER',receiver.location_id,'CUSTOMER',receiver.location_id,'LE',lereceiver.location_id) receiver_location_id ,fdp.ship_from_type shipfrom_type ,decode(fdp.ship_from_type,'SUPPLIER',shipfrom.party_taxpayer_idntfs_id,'CUSTOMER',shipfrom.party_taxpayer_idntfs_id,'LE',leshipfrom.registration_id) shipfrom_tax_id ,decode(fdp.ship_from_type,'SUPPLIER',shipfrom.taxpayer_id,'CUSTOMER',shipfrom.taxpayer_id,'LE',leshipfrom.taxpayer_id) shipfrom_taxpayer_id ,decode(fdp.ship_from_type,'SUPPLIER',shipfrom.formatted_taxpayer_number,'CUSTOMER',shipfrom.formatted_taxpayer_number,'LE',leshipfrom.formatted_taxpayer_number) shipfrom_form_tax_number ,decode(fdp.ship_from_type,'SUPPLIER',shipfrom.party_id,'CUSTOMER',shipfrom.party_id,'LE',leshipfrom.legal_entity_id) shipfrom_party_id ,decode(fdp.ship_from_type,'SUPPLIER',shipfrom.party_name,'CUSTOMER',shipfrom.party_name,'LE',leshipfrom.legal_entity_name) shipfrom_party_name ,decode(fdp.ship_from_type,'SUPPLIER',shipfrom.party_site_id,'CUSTOMER',shipfrom.party_site_id,'LE',leshipfrom.establishment_id) shipfrom_party_site_id ,decode(fdp.ship_from_type,'SUPPLIER',shipfrom.party_site_name,'CUSTOMER',shipfrom.party_site_name,'LE',leshipfrom.establishment_name) shipfrom_party_site_name ,decode(fdp.ship_from_type,'SUPPLIER',shipfrom.location_id,'CUSTOMER',shipfrom.location_id,'LE',leshipfrom.location_id) shipfrom_location_id ,fdp.ship_to_type shipto_type ,decode(fdp.ship_to_type,'SUPPLIER',shipto.party_taxpayer_idntfs_id,'CUSTOMER',shipto.party_taxpayer_idntfs_id,'LE',leshipto.registration_id) shipto_tax_id ,decode(fdp.ship_to_type,'SUPPLIER',shipto.taxpayer_id,'CUSTOMER',shipto.taxpayer_id,'LE',leshipto.taxpayer_id) shipto_taxpayer_id ,decode(fdp.ship_to_type,'SUPPLIER',shipto.formatted_taxpayer_number,'CUSTOMER',shipto.formatted_taxpayer_number,'LE',leshipto.formatted_taxpayer_number) shipto_form_tax_number ,decode(fdp.ship_to_type,'SUPPLIER',shipto.party_id,'CUSTOMER',shipto.party_id,'LE',leshipto.legal_entity_id) shipto_party_id ,decode(fdp.ship_to_type,'SUPPLIER',shipto.party_name,'CUSTOMER',shipto.party_name,'LE',leshipto.legal_entity_name) shipto_party_name ,decode(fdp.ship_to_type,'SUPPLIER',shipto.party_site_id,'CUSTOMER',shipto.party_site_id,'LE',leshipto.establishment_id) shipto_party_site_id ,decode(fdp.ship_to_type,'SUPPLIER',shipto.party_site_name,'CUSTOMER',shipto.party_site_name,'LE',leshipto.establishment_name) shipto_party_site_name ,decode(fdp.ship_to_type,'SUPPLIER',shipto.location_id,'CUSTOMER',shipto.location_id,'LE',leshipto.location_id) shipto_location_id ,null shipto_vendor_id ,null shipto_vendor_site_id from CMF_PARTY_TAXPAYER_BR_INFO_V issuer ,cmf_lelru_taxpayer_info_v leissuer ,CMF_PARTY_TAXPAYER_BR_INFO_V receiver ,cmf_lelru_taxpayer_info_v lereceiver ,CMF_PARTY_TAXPAYER_BR_INFO_V shipfrom ,cmf_lelru_taxpayer_info_v leshipfrom ,CMF_PARTY_TAXPAYER_BR_INFO_V shipto ,cmf_lelru_taxpayer_info_v leshipto ,cmf_fiscal_proc_options fdp ,cmf_fiscal_doc_headers fdh where issuer.party_taxpayer_idntfs_id(+) = fdh.issuer_tax_id and leissuer.registration_id(+) = fdh.issuer_tax_id and receiver.party_taxpayer_idntfs_id(+) = fdh.receiver_tax_id and lereceiver.registration_id(+) = fdh.receiver_tax_id and shipfrom.party_taxpayer_idntfs_id(+) = fdh.shipfrom_tax_id and leshipfrom.registration_id(+) = fdh.shipfrom_tax_id and shipto.party_taxpayer_idntfs_id(+) = fdh.shipto_tax_id and leshipto.registration_id(+) = fdh.shipto_tax_id and fdp.fiscal_proc_options_id = fdh.fiscal_proc_options_id |