<ROOT>
 <APPS_INITIALIZE_DATA>
  <USER_NAME>ENGINATICS</USER_NAME>
  <RESPONSIBILITY_KEY>SYSTEM_ADMINISTRATOR</RESPONSIBILITY_KEY>
  <APPLICATION_SHORT_NAME>SYSADMIN</APPLICATION_SHORT_NAME>
 </APPS_INITIALIZE_DATA>
<REPORTS>
<!-- loader xml for Enginatics Blitz Report: ASO Quote Data Template -->
 <REPORTS_ROW>
  <GUID>82288223EEDF3869E053B46B63588994</GUID><ENABLED>Y</ENABLED>
  <SQL_TEXT>SELECT 
            DECODE(ASO_QUOTES.RESOURCE_ID, null, sales.name, sales1.name) sales_rep_name,
  aso_quotes.quote_name,
  aso_quotes.contract_id,
  aso_quotes.quote_number||decode(aso_quotes.quote_version,NULL,&apos;&apos;,&apos; - &apos;) ||   aso_quotes.quote_version      quote_name_version,
  to_char(aso_quotes.quote_expiration_date, nvl(FND_PROFILE.VALUE(&apos;ICX_DATE_FORMAT_MASK&apos;), &apos;DD-MON-RRRR&apos;))     quote_expiration_date,
  TO_NUMBER(TO_CHAR(aso_quotes.quote_expiration_date,&apos;J&apos;)) - TO_NUMBER(TO_CHAR(Sysdate,&apos;J&apos;)) duration,
  I_HEADER_CONTACT_PARTY.PARTY_NAME sold_to_contact_name,
  I_CUST_PARTIES.party_name customer_name,
  I_PHONE.PHONE_AREA_CODE || DECODE(I_PHONE.PHONE_AREA_CODE , NULL, &apos;&apos;,&apos; &apos; ) ||  I_PHONE.PHONE_NUMBER  full_phone_number,
  I_INVOICE_REL_PARTY.PARTY_NAME invoice_to_contact_name,
  I_ACCTS_INV_PARTY.PARTY_NAME invoice_to_cust_party_name,
  I_INVOICE_LOCATIONS.ADDRESS1 invoice_to_address1,
  I_INVOICE_LOCATIONS.ADDRESS2 invoice_to_address2,
  I_INVOICE_LOCATIONS.ADDRESS3 invoice_to_address3,
  I_INVOICE_LOCATIONS.ADDRESS4 invoice_to_address4,
  decode(I_INVOICE_LOCATIONS.city, null,&apos;&apos;,I_INVOICE_LOCATIONS.city || decode(I_INVOICE_LOCATIONS.county,null,&apos;&apos;,&apos;,&apos; || I_INVOICE_LOCATIONS.county)) invoice_to_city,
  I_INVOICE_LOCATIONS.state ||     decode(I_INVOICE_LOCATIONS.postal_code, null,&apos;&apos;,&apos; &apos;|| 
  I_INVOICE_LOCATIONS.postal_code   ||       decode(I_INVOICE_LOCATIONS.province,null,&apos;&apos;,&apos;,&apos; ||I_INVOICE_LOCATIONS.province ))  invoice_to_county,
  I_INVOICE_LOCATIONS.country invoice_to_country,
  aso_quotes.currency_code Currency_Code,
  (SELECT hzcp.email_address 
   FROM  hz_contact_points hzcp
   WHERE  aso_quotes.party_id = hzcp.owner_table_id
   AND   hzcp.contact_point_type = &apos;EMAIL&apos;
   AND    hzcp.owner_table_name = &apos;HZ_PARTIES&apos;
   AND    hzcp.primary_flag=&apos;Y&apos;
  ) Sales_Rep_Email,
  aso_quotes.quote_header_id quote_header_id,  
  oav.name||decode(oav.agreement_num,NULL,&apos;&apos;,&apos;,&apos;)||oav.agreement_num||decode(oav.agreement_num,NULL,&apos;&apos;,&apos;,&apos;)||oav.revision Agreement_name,
  oav.name||oav.agreement_num||oav.revision Agreement_check,
  to_char(oav.revision_date, nvl(FND_PROFILE.VALUE(&apos;ICX_DATE_FORMAT_MASK&apos;), &apos;DD-MON-RRRR&apos;)) revision_date,
  (select payment_term_name 
   FROM
   aso_payments_v
   WHERE 
    quote_line_id is null and
    quote_header_id = aso_quotes.quote_header_id) payment_terms,
    to_char(sysdate, nvl(FND_PROFILE.VALUE(&apos;ICX_DATE_FORMAT_MASK&apos;), &apos;DD-MON-RRRR&apos;)) curr_date,
    aso_quotes.total_list_price total_list_price,
    aso_quotes.total_adjusted_amount total_adjusted_amount,
    (aso_quotes.total_list_price + aso_quotes.total_adjusted_amount) total_net_price, 
    aso_quotes.total_shipping_charge charges_total, 
    aso_quotes.total_tax taxes_total, 
    aso_quotes.total_quote_price total_quote_price,
  (select cust_po_number 
   FROM
   aso_payments
   WHERE 
    quote_line_id is null and
    quote_header_id = aso_quotes.quote_header_id ) cust_po_number,   
  (select fct.name
   from fnd_currencies_tl fct
   where aso_quotes.currency_code = fct.currency_code
   and fct.language = userenv(&apos;lang&apos;)) Currency_Name,
  (select fcurr.symbol
   from fnd_currencies fcurr
   where aso_quotes.currency_code = fcurr.currency_code) Currency_Symbol,
   (Select meaning 
    From   oe_lookups
    Where  lookup_type = &apos;FREIGHT_TERMS&apos;
    And    lookup_code = (select aship.freight_terms_code
                              from aso_shipments aship
                              where aship.quote_header_id =  aso_quotes.quote_header_id
                              and aship.quote_line_id is null)) Freight_Terms, 
   (Select  fl.meaning
    From    fnd_lookup_values fl
    where   fl.lookup_type = &apos;SHIP_METHOD&apos;
    And     fl.lookup_code = (select aship.ship_method_code
                              from aso_shipments aship
                              where aship.quote_header_id =  aso_quotes.quote_header_id
                              and aship.quote_line_id is null)
    And     fl.language =  userenv(&apos;LANG&apos;)) shipping_method ,
aso_quotes.org_id ,
aso_quotes.quote_number ,
aso_quotes.Quote_version VersionNumber,
I_ACCTS.ACCOUNT_NUMBER CustomerNumber,
oav.agreement_num Agreement_Number,
aso_quotes.minisite_id minisite_id,
(select imt.msite_name from ibe_msites_tl imt where imt.msite_id = aso_quotes.minisite_id 
and imt.language = userenv(&apos;LANG&apos;)) msite_name,
(select asl.meaning from oe_lookups asl 
where asl.lookup_type = &apos;SHIPMENT_PRIORITY&apos;
 and  asl.lookup_code in  (select ash.shipment_priority_code from aso_shipments 
 ash where ash.quote_header_id = aso_quotes.quote_header_id and ash.quote_line_id is null)) shipment_priority_name,
(select OE_SYS_PARAMETERS.VALUE(&apos;INSTALLMENT_OPTIONS&apos;,aso_quotes.org_id) from dual) enable_pay_now,
 aso_quotes.attribute1 header_attribute1,
 aso_quotes.attribute2 header_attribute2,
 aso_quotes.attribute3 header_attribute3,
 aso_quotes.attribute4 header_attribute4, 
 aso_quotes.attribute5 header_attribute5,
 aso_quotes.attribute6 header_attribute6,
 aso_quotes.attribute7 header_attribute7,
 aso_quotes.attribute8 header_attribute8,
 aso_quotes.attribute9 header_attribute9,
 aso_quotes.attribute10 header_attribute10,
 aso_quotes.attribute11 header_attribute11,
 aso_quotes.attribute12 header_attribute12,
 aso_quotes.attribute13 header_attribute13,
 aso_quotes.attribute14 header_attribute14,
 aso_quotes.attribute15 header_attribute15,
 aso_quotes.attribute16 header_attribute16,
 aso_quotes.attribute17 header_attribute17,
 aso_quotes.attribute18 header_attribute18,
 aso_quotes.attribute19 header_attribute19,
 aso_quotes.attribute20 header_attribute20
from  
  hz_CONTACT_POINTS I_PHONE , 
  HZ_RELATIONSHIPS I_HEADER_CONTACT_REL, 
  HZ_PARTIES I_HEADER_CONTACT_PARTY, 
  ASO_QUOTE_HEADERS ASO_QUOTES, 
  HZ_RELATIONSHIPS I_INVOICE_REL, 
  HZ_PARTIES I_INVOICE_REL_PARTY,
  HZ_PARTY_sites I_INVOICE_PARTY_SITES, 
  HZ_LOCATIONS I_INVOICE_LOCATIONS, 
  HZ_PARTIES I_CUST_PARTIES, 
  HZ_CUST_ACCOUNTS I_ACCTS, 
  HZ_CUST_ACCOUNTS I_ACCTS_INV, 
  HZ_PARTIES I_ACCTS_INV_PARTY, 
  JTF_RS_SALESREPS_MO_V SALES, 
  JTF_RS_SALESREPS_MO_V  SALES1, 
  JTF_RS_RESOURCE_EXTNS_VL RES,
  FND_TERRITORIES_VL I_TERRITORIES,  
  oe_agreements_vl oav
  where
    ASO_QUOTES.PARTY_ID = I_HEADER_CONTACT_REL.PARTY_ID(+) 
    AND I_HEADER_CONTACT_REL.SUBJECT_ID = I_HEADER_CONTACT_PARTY.PARTY_ID(+) 
    AND I_HEADER_CONTACT_REL.SUBJECT_TYPE(+) = &apos;PERSON&apos; 
    AND I_HEADER_CONTACT_REL.SUBJECT_TABLE_NAME(+) = &apos;HZ_PARTIES&apos; 
    and i_header_contact_rel.object_id(+) = aso_quotes.cust_party_id
    AND ASO_QUOTES .INVOICE_TO_PARTY_SITE_ID = I_INVOICE_PARTY_SITES.PARTY_SITE_ID (+) 
    AND I_INVOICE_PARTY_SITES.LOCATION_ID = I_INVOICE_LOCATIONS.LOCATION_ID(+) 
    AND I_INVOICE_LOCATIONS.country = I_TERRITORIES.territory_code(+) 
    AND ASO_QUOTES.INVOICE_TO_PARTY_ID = I_INVOICE_REL.PARTY_ID(+) 
    AND I_INVOICE_REL.SUBJECT_ID = I_INVOICE_REL_PARTY.PARTY_ID(+) 
    AND I_INVOICE_REL.SUBJECT_TYPE(+) = &apos;PERSON&apos; 
    AND I_INVOICE_REL.SUBJECT_TABLE_NAME(+) = &apos;HZ_PARTIES&apos; 
    AND i_invoice_rel.object_id (+) = aso_quotes.invoice_to_cust_party_id 
    AND ASO_QUOTES.ORG_ID = SALES.ORG_ID(+) 
    AND ASO_QUOTES.EMPLOYEE_PERSON_ID = SALES.PERSON_ID (+) 
    AND ASO_QUOTES.ORG_ID = SALES1.ORG_ID  (+)
    AND ASO_QUOTES.RESOURCE_ID = SALES1.RESOURCE_ID  (+)
    AND sales1.resource_id = res.resource_id
    AND ASO_QUOTES.CUST_ACCOUNT_ID =I_ACCTS.CUST_ACCOUNT_ID(+) 
    AND ASO_QUOTES.CUST_PARTY_ID = I_CUST_PARTIES.PARTY_ID 
    AND ASO_QUOTES.INVOICE_TO_CUST_ACCOUNT_ID = I_ACCTS_INV.CUST_ACCOUNT_ID(+) 
    AND ASO_QUOTES.INVOICE_TO_CUST_PARTY_ID = I_ACCTS_INV_PARTY.PARTY_ID(+) 
    AND aso_quotes.phone_id = i_phone.contact_point_Id(+)
    AND oav.agreement_id(+) = aso_quotes.contract_id 
    AND aso_quotes.quote_header_id = :DocumentId
</SQL_TEXT>
  <XDO_APPLICATION_SHORT_NAME>ASO</XDO_APPLICATION_SHORT_NAME>
  <XDO_DATA_SOURCE_CODE>ASOPD</XDO_DATA_SOURCE_CODE>
  <REPORT_TRANSLATIONS>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>AR</LANGUAGE>
    <REPORT_NAME>ASO قالب بيانات التسعير</REPORT_NAME>
    <DESCRIPTION>Application: تسجيل بيانات الطلب
Source: 
Short Name: ASOPD
DB package: </DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>D</LANGUAGE>
    <REPORT_NAME>ASO Datenvorlage Angebot</REPORT_NAME>
    <DESCRIPTION>Application: Oracle Order Capture
Source: 
Short Name: ASOPD
DB package: </DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>F</LANGUAGE>
    <REPORT_NAME>ASO Modèle de données de devis</REPORT_NAME>
    <DESCRIPTION>Application: Order Capture
Source: 
Short Name: ASOPD
DB package: </DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>US</LANGUAGE>
    <REPORT_NAME>ASO Quote Data Template</REPORT_NAME>
    <DESCRIPTION>Application: Order Capture
Source: 
Short Name: ASOPD
DB package: </DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
   <REPORT_TRANSLATIONS_ROW>
    <LANGUAGE>ZHS</LANGUAGE>
    <REPORT_NAME>ASO 报价数据模板</REPORT_NAME>
    <DESCRIPTION>Application: 订单收集
Source: 
Short Name: ASOPD
DB package: </DESCRIPTION>
   </REPORT_TRANSLATIONS_ROW>
  </REPORT_TRANSLATIONS>
  <CATEGORY_ASSIGNMENTS>
   <CATEGORY_ASSIGNMENTS_ROW>
    <CATEGORY>BI Publisher</CATEGORY>
   </CATEGORY_ASSIGNMENTS_ROW>
  </CATEGORY_ASSIGNMENTS>
  <ANCHORS>
   <ANCHORS_ROW>
    <ANCHOR>:documentid</ANCHOR>
   </ANCHORS_ROW>
  </ANCHORS>
  <PARAMETERS>
  </PARAMETERS>
  <TEMPLATES>
  </TEMPLATES>
  <DEFAULT_TEMPLATES>
  </DEFAULT_TEMPLATES>
  <UPLOAD_COLUMNS>
  </UPLOAD_COLUMNS>
  <UPLOAD_PARAMETERS>
  </UPLOAD_PARAMETERS>
  <UPLOAD_SQLS>
  </UPLOAD_SQLS>
 </REPORTS_ROW>
</REPORTS>
</ROOT>
