DBA Data[Home] [Help]

APPS.JAI_AP_MISC_PKG SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 23

select tax_name,
        tax_account_id,
        mod_cr_percentage,
        adhoc_flag,
        nvl(tax_rate, 0) tax_rate,
        tax_type
from  JAI_CMN_TAXES_ALL
where  tax_id = ln_tax_id;
Line: 35

select *
  from ap_invoice_distributions_all
 where invoice_id = ln_invoice_id
   and distribution_line_number = ln_dist_line_number;
Line: 43

select precision
from  fnd_currencies
where currency_code = lv_currency_code;
Line: 73

     Select invoice_currency_code
       into lv_inv_curr_code
       from ap_invoices_all
      where invoice_id = p_invoice_id;
Line: 104

   for Misc_loop in ( select *
                          from JAI_AP_MATCH_INV_TAXES
                         where invoice_id = p_invoice_id
         and parent_invoice_distribution_id = p_invoice_distribution_id
                      )
     loop


       fnd_file.put_line(FND_FILE.LOG,' inside loop -- 2 ' );
Line: 117

         for tax_loop in check_rec_tax (select tax_id
             from JAI_AP_MATCH_INV_TAXES
                 where invoice_id = misc_loop.invoice_id
              and distribution_line_number = misc_loop.distribution_line_number)
         loop

         Service and Education cess are recoverable taxes and
         IPV should not be calculated on these lines
      If  not (tax_loop.tax_type like '%EDUCATION_CESS') Then

       */

       Open get_misc_lines(misc_loop.distribution_line_number, misc_loop.invoice_id);
Line: 164

                 update ap_invoice_distributions_all
                    set invoice_price_variance = round(ln_tax_ipv,ln_inv_pre),
                         base_invoice_price_variance = round(ln_tax_bipv, ln_base_pre),
                         price_var_code_combination_id = P_price_var_ccid
                  where invoice_distribution_id = r_get_misc_lines.invoice_distribution_id;
Line: 179

                 update ap_invoice_distributions_all
                    set exchange_rate_variance = round(ln_tax_erv,ln_inv_pre),
                        rate_var_code_combination_id = P_rate_var_ccid
                  where invoice_distribution_id = r_get_misc_lines.invoice_distribution_id;
Line: 188

         /* update ipv and bipv to 0. no need to update Var CCID */

               update ap_invoice_distributions_all
                    set invoice_price_variance = 0,
                        base_invoice_price_variance = 0,
      exchange_rate_variance = 0
               where invoice_distribution_id = r_get_misc_lines.invoice_distribution_id;
Line: 252

      select NVL(SUM(tax_amount),-1)  -- 5763527, Added SUM as partially recoverable taxes will have two lines
      from JAI_AP_MATCH_INV_TAXES
      where invoice_id = p_invoice_id
      and   line_no = p_precedence_value ;
Line: 259

      select amount
      from ap_invoice_distributions_all
      where  invoice_distribution_id = p_parent_dist_id
      and invoice_id = p_invoice_id ;
Line: 287

      select Precedence_1 P_1,
             Precedence_2 P_2,
             Precedence_3 P_3,
             Precedence_4 P_4,
             Precedence_5 P_5,
             Precedence_6 P_6,
             Precedence_7 P_7,
             Precedence_8 P_8,
             Precedence_9 P_9,
             Precedence_10 P_10
     from JAI_PO_TAXES
     where line_location_id = p_line_location_id
     and tax_id = p_tax_id ;
Line: 302

      select Precedence_1 P_1,
             Precedence_2 P_2,
             Precedence_3 P_3,
             Precedence_4 P_4,
             Precedence_5 P_5,
             Precedence_6 P_6,
             Precedence_7 P_7,
             Precedence_8 P_8,
             Precedence_9 P_9,
             Precedence_10 P_10
     from JAI_RCV_LINE_TAXES
     where shipment_line_id IN
           ( select shipment_line_id
             from JAI_RCV_TRANSACTIONS
             where  transaction_id = p_transaction_id
           )
     and tax_id = p_tax_id ;