Friday, February 5, 2016

All Supplier Invoice amounts converted into USD

Select /*+ PARRALLEL(ai,16) */ invoice_num,invoice_amount,
 DECODE(ai.invoice_currency_code,
             'USD',
             ai.invoice_amount,
             NVL(gdr.conversion_rate, 1) * ai.invoice_amount) USD_Amnt
    from apps.ap_invoices_all       ai,
         apps.gl_daily_rates        gdr
   where  gdr.from_currency = ai.invoice_currency_code
     AND gdr.to_currency = 'USD'
     AND gdr.conversion_type = ai.exchange_rate_type
     and trunc(gdr.conversion_date) = trunc(ai.invoice_date)
     and =1
   

No comments:

Post a Comment

Item - Category Query

      SELECT      msi.segment1 AS Item_Code,       msi.DESCRIPTION AS Item_Desc,       mcs.CATEGORY_SET_NAME,       mck.CONCATENATED_SEGMEN...