DBA Data[Home] [Help]

APPS.JA_ZZ_VALIDATE_INVOICE_GDF SQL Statements

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

Line: 19

    l_sql_stmt := 'SELECT '
                 || p_sequence_name
                 || '.nextval seq_number '
                 || 'FROM dual';
Line: 47

    SELECT last_number - 1
      FROM all_sequences
     WHERE sequence_name  = x_seq_name
       AND sequence_owner = x_seq_owner;
Line: 111

       SELECT
              src.auto_trx_numbering_flag      auto_trx_num_flag
            , src.global_attribute3            inv_word
            , src.global_attribute2            init_trx_num
            , src.global_attribute4            fin_trx_num
            , src.global_attribute5            last_trx_date
            , TO_NUMBER(src.global_attribute6) adv_days
         FROM ra_batch_sources src
        WHERE src.batch_source_id = x_batch_source_id;
Line: 153

       SELECT
              ctt.type inv_class
              -- R12 Changes : , ctt.global_attribute1 gui_type
              , NULL   gui_type
         FROM ra_cust_trx_types ctt
        WHERE ctt.cust_trx_type_id = p_cust_trx_type_id;
Line: 190

       SELECT src.global_attribute1
         FROM ra_batch_sources src
        WHERE src.batch_source_id = x_batch_source_id;
Line: 218

       SELECT src.global_attribute3
         FROM ra_batch_sources src
        WHERE src.batch_source_id = x_batch_source_id;
Line: 251

       SELECT decode(src.global_attribute1
                       , NULL
                       , x_batch_source_id
                       , src.global_attribute1)
         FROM ra_batch_sources src
        WHERE src.batch_source_id = x_batch_source_id;
Line: 287

    SELECT
           DECODE(x_ini_or_fin
                , 'INI'
                , src.global_attribute2
                , 'FIN'
                , src.global_attribute4
                , NULL)
      FROM
           ra_batch_sources src
     WHERE
           src.batch_source_id = x_batch_source_id;
Line: 326

       SELECT fnd_date.chardate_to_date(src.global_attribute5)
         FROM ra_batch_sources src
        WHERE src.batch_source_id = x_gui_source_id;
Line: 355

       SELECT src.global_attribute6
         FROM ra_batch_sources src
        WHERE src.batch_source_id = x_batch_source_id;
Line: 412

    SELECT 'SUCCESS'
      INTO l_dummy
      FROM jg_zz_ar_src_trx_ty st
     WHERE st.batch_source_id  = l_batch_source_id
       AND st.cust_trx_type_id = l_cust_trx_type_id
       AND st.enable_flag = 'Y';  -- Bug 1865837
Line: 438

          ar_invoice_utils.debug('-- Cannot insert the error record into ar_trx_errors.');
Line: 519

       ar_invoice_utils.debug('-- Cannot insert the error record into ar_trx_errors.');
Line: 575

          IF NOT update_last_trx_date(
                     l_batch_source_id
                   , l_trx_date
                   , l_created_from)
          THEN
            app_exception.raise_exception;
Line: 632

      ar_invoice_utils.debug('-- Cannot insert the error record into ar_trx_errors.');
Line: 668

    SELECT
           COUNT(DISTINCT tax.tax_rate_code)
      FROM
           ar_trx_lines_gt l,
           --
           -- Bug 4756219
           -- Changing reference to ar vat tax to zx_mco_rates
           zx_mco_rates       tax

     WHERE
           l.customer_trx_id = x_customer_trx_id
       AND l.vat_tax_id = tax.tax_rate_id;
Line: 684

    SELECT
           COUNT(DISTINCT tl.vat_tax_id)
      FROM
           ra_customer_trx_lines tl
     WHERE
           tl.customer_trx_id = x_customer_trx_id
       AND tl.line_type = 'TAX';                 -- Bug 2753541
Line: 742

      ar_invoice_utils.debug('-- Cannot insert the error record into ar_trx_errors.');
Line: 757

  FUNCTION  update_last_trx_date(
             p_batch_source_id IN NUMBER
           , p_last_trx_date   IN DATE
           , p_created_from    IN VARCHAR2) RETURN BOOLEAN IS

    CURSOR c_last_issued_date(
           x_batch_source_id NUMBER) IS
    SELECT global_attribute5
      FROM ra_batch_sources
     WHERE batch_source_id = x_batch_source_id
       FOR UPDATE OF global_attribute5 NOWAIT;
Line: 784

    UPDATE ra_batch_sources
       SET global_attribute5 = l_last_trx_date
     WHERE CURRENT OF c_last_issued_date;
Line: 794

  END update_last_trx_date;
Line: 822

    UPDATE ar_trx_header_gt
       SET global_attribute1 = l_gui_type
     WHERE trx_header_id =
           (select trx_header_id
            from ar_trx_lines_gt
            where trx_line_id = l_trx_line_id);
Line: 848

  FUNCTION insert_interface_errors(
    p_customer_trx_id IN NUMBER,
    p_msg_name        IN VARCHAR2,
    p_invalid_value   IN VARCHAR2,
    p_validation_name IN VARCHAR2
  )
  RETURN BOOLEAN IS
    CURSOR interface_line IS
      SELECT header.trx_header_id,
             lines.trx_line_id
      FROM ar_trx_header_gt  header,
           ar_trx_lines_gt   lines
      WHERE lines.customer_trx_id = p_customer_trx_id
        AND lines.trx_header_id = header.trx_header_id;
Line: 863

    cannot_insert_error EXCEPTION;
Line: 880

        raise cannot_insert_error;
Line: 888

    WHEN cannot_insert_error THEN
      IF pg_debug = 'Y' THEN
        ar_invoice_utils.debug('-- Found exception in ja_th_invoice_create.' ||
                           p_validation_name);
Line: 892

        ar_invoice_utils.debug('-- Cannot insert the error record into ' ||
                           'ar_trx_errors.');
Line: 900

                           'ja_th_invoice_create.insert_interface_errors.');
Line: 906

  END insert_interface_errors;
Line: 938

        IF insert_interface_errors(
             p_customer_trx_id,
             'JA_TH_AR_INVALID_TRX_DATE',
             fnd_date.date_to_chardate(p_trx_date),
             'validate_trx_date') THEN
          return(0);
Line: 983

      SELECT count(l.customer_trx_line_id)
      INTO n
      FROM ra_customer_trx_lines l,
           -- Bug 4756219
           -- Changing reference to ar vat tax to zx_mco_rates
           zx_mco_rates  v,
           zx_accounts   a
      WHERE l.customer_trx_id = p_customer_trx_id
      AND v.tax_rate_id = l.vat_tax_id
      AND v.tax_rate_id = a.tax_account_entity_id
      AND a.tax_account_entity_code = 'RATES'
      AND a.interim_tax_ccid is NULL;
Line: 996

      SELECT count(l.customer_trx_line_id)
      INTO n
      FROM ar_trx_lines_gt l,
           -- Bug 4756219
           -- Changing reference to ar vat tax to zx_mco_rates
           zx_mco_rates  v,
           zx_accounts   a
      WHERE l.customer_trx_id = p_customer_trx_id
      AND v.tax_rate_id = l.vat_tax_id
      AND (v.tax_class = 'O' OR v.tax_class IS NULL)
      AND v.active_flag='Y'
      AND v.effective_from <= sysdate
      AND (v.effective_to >= sysdate OR v.effective_to is NULL)
      AND v.tax_rate_id = a.tax_account_entity_id
      AND  a.tax_account_entity_code = 'RATES'
      AND  a.interim_tax_ccid is NULL;
Line: 1019

        IF insert_interface_errors(
             p_customer_trx_id,
             'JA_TH_AR_INVALID_TAX_CODE',
             NULL,
             'validate_tax_code') THEN
          return(0);
Line: 1050

  FUNCTION update_last_issued_date(
    p_customer_trx_id  IN NUMBER,
    p_cust_trx_type_id IN NUMBER,
    p_trx_date         IN DATE,
    p_created_from     IN VARCHAR2
  )
  RETURN NUMBER IS

    CURSOR last_issued_date IS
      SELECT global_attribute2
      FROM ra_cust_trx_types
      WHERE cust_trx_type_id = p_cust_trx_type_id
      FOR UPDATE OF global_attribute2 NOWAIT;
Line: 1082

      UPDATE ra_cust_trx_types
      SET global_attribute2 = fnd_date.date_to_canonical(p_trx_date)
      WHERE CURRENT OF last_issued_date;
Line: 1094

            SELECT name
            INTO trx_type_name
            FROM ra_cust_trx_types
            WHERE cust_trx_type_id = p_cust_trx_type_id;
Line: 1103

          IF insert_interface_errors(
               p_customer_trx_id,
               'JA_TH_AR_LAST_ISSD_DT_LOCKED',
               fnd_date.date_to_chardate(p_trx_date),
               'update_last_issued_date') THEN
            return(0);
Line: 1128

                             'ja_th_invoice_create.update_last_issued_date.');
Line: 1136

  END update_last_issued_date;