DBA Data[Home] [Help]

APPS.POR_TAX_PVT SQL Statements

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

Line: 42

	     SELECT hzps.location_id
             FROM hz_party_sites hzps
             WHERE hzps.party_site_id = ship_from_party_site_id;
Line: 52

   SELECT trx_line_dist_id,
          sum(decode(recoverable_flag, 'Y', rec_nrec_tax_amt_funcl_curr, 0)) as recov_tax,
          sum(decode(recoverable_flag, 'N', rec_nrec_tax_amt_funcl_curr, 0)) as non_recov_tax
   FROM ZX_REC_NREC_DIST_GT
   GROUP BY trx_line_dist_id;
Line: 73

  DELETE ZX_TRX_HEADERS_GT;
Line: 79

    l_log_msg := 'Deleted ZX_TRX_HEADERS_GT';
Line: 95

  INSERT INTO ZX_TRX_HEADERS_GT (internal_organization_id,
                                 icx_session_id,
                                 application_id,
                                 entity_code,
                                 event_class_code,
                                 event_type_code,
                                 trx_id,
                                 trx_date,
                                 ledger_id,
                                 legal_entity_id,
                                 rounding_bill_to_party_id,
                                 default_taxation_country,
                                 quote_flag,
                                 document_sub_type)
                          VALUES(p_tax_head_tbl(1).org_id,
                                 p_tax_head_tbl(1).icx_session_id,
                                 201,
                                 'REQUISITION',
                                 'REQUISITION',
                                 'REQ_CREATED',
                                 p_tax_head_tbl(1).trx_id,
                                 p_tax_head_tbl(1).trx_date,
                                 p_tax_head_tbl(1).ledger_id,
                                 l_legal_entity_id,
                                 p_tax_head_tbl(1).rndg_bill_to_party_id,
                                 p_tax_head_tbl(1).taxation_country,
                                 'Y',
                                 p_tax_head_tbl(1).doc_subtype);
Line: 128

    l_log_msg := 'Inserted into ZX_TRX_HEADERS_GT';
Line: 133

  DELETE ZX_TRANSACTION_LINES_GT;
Line: 139

    l_log_msg := 'Deleted from ZX_TRANSACTION_LINES_GT';
Line: 168

    INSERT INTO ZX_TRANSACTION_LINES_GT( application_id,
                                 entity_code,
                                 event_class_code,
                                 trx_id,
                                 trx_level_type,
                                 trx_line_id,
                                 line_class,
                                 line_level_action,
                                 trx_line_type,
                                 trx_line_date,
                                 trx_business_category,
                                 line_intended_use,
                                 user_defined_fisc_class,
                                 line_amt_includes_tax_flag,
                                 line_amt,
                                 trx_line_quantity,
                                 unit_price,
                                 product_id,
                                 product_fisc_classification,
                                 product_org_id,
                                 uom_code,
                                 product_type,
                                 product_code,
                                 product_category,
                                 ship_to_party_id,
                                 ship_from_party_id,
                                 bill_to_party_id,
                                 bill_from_party_id,
                                 ship_from_party_site_id,
                                 bill_from_party_site_id,
                                 ship_to_location_id,
				ship_from_location_id,
                                 bill_to_location_id,
                                 ship_third_pty_acct_id,
                                 ship_third_pty_acct_site_id,
                                 assessable_value,
                                 historical_flag,
                                 trx_line_currency_code,
                                 trx_line_currency_conv_date,
                                 trx_line_currency_conv_rate,
                                 trx_line_currency_conv_type,
                                 trx_line_mau,
                                 trx_line_precision,
                                 historical_tax_code_id,
                                 input_tax_classification_code,
                                 user_upd_det_factors_flag)
                          VALUES(201,
                                 'REQUISITION',
                                 'REQUISITION',
                                 p_tax_line_tbl(i).trx_id,
                                 'LINE',
                                 p_tax_line_tbl(i).trx_line_id,
                                 'INVOICE',
                                 'CREATE',
                                 'ITEM',
                                 p_tax_line_tbl(i).trx_line_date,
                                 p_tax_line_tbl(i).trx_business_cat,
                                 p_tax_line_tbl(i).line_intended_use,
                                 p_tax_line_tbl(i).user_fiscal_class,
                                 'N',
                                 p_tax_line_tbl(i).line_amt,
                                 p_tax_line_tbl(i).trx_line_quantity,
                                 p_tax_line_tbl(i).unit_price,
                                 p_tax_line_tbl(i).product_id,
                                 p_tax_line_tbl(i).prod_fiscal_class,
                                 p_tax_line_tbl(i).product_org_id,
                                 p_tax_line_tbl(i).uom_code,
                                 p_tax_line_tbl(i).product_type,
                                 p_tax_line_tbl(i).product_code,
                                 p_tax_line_tbl(i).product_category,
                                 p_tax_line_tbl(i).ship_to_party_id,
                                 p_tax_line_tbl(i).ship_from_party_id,
                                 p_tax_line_tbl(i).bill_to_party_id,
                                 p_tax_line_tbl(i).bill_from_party_id,
                                 p_tax_line_tbl(i).ship_from_party_site_id,
                                 p_tax_line_tbl(i).bill_from_party_site_id,
                                 p_tax_line_tbl(i).ship_to_location_id,
				 ship_from_location_id,
                                 p_tax_line_tbl(i).bill_to_location_id,
                                 p_tax_line_tbl(i).ship_third_pty_id,
                                 p_tax_line_tbl(i).ship_third_pty_site_id,
                                 p_tax_line_tbl(i).assessable_value,
                                 'N',
                                 p_tax_line_tbl(i).currency_code,
                                 p_tax_line_tbl(i).currency_date,
                                 p_tax_line_tbl(i).currency_rate,
                                 p_tax_line_tbl(i).currency_type,
                                 p_tax_line_tbl(i).currency_min_unit,
                                 p_tax_line_tbl(i).currency_precision,
                                 p_tax_line_tbl(i).historical_tax_id,
                                 p_tax_line_tbl(i).input_tax_class,
                                 p_tax_line_tbl(i).user_override_flag);
Line: 263

      l_log_msg := 'Inserted record into ZX_TRANSACTION_LINES_GT.';
Line: 276

  DELETE ZX_ITM_DISTRIBUTIONS_GT;
Line: 282

    l_log_msg := 'Deleted ZX_ITM_DISTRIBUTIONS_GT';
Line: 291

    INSERT INTO ZX_ITM_DISTRIBUTIONS_GT (application_id,
                                         entity_code,
                                         event_class_code,
                                         trx_id,
                                         trx_line_id,
                                         trx_level_type,
                                         trx_line_dist_id,
                                         dist_level_action,
                                         trx_line_dist_date,
                                         item_dist_number,
                                         dist_intended_use,
                                         task_id,
                                         award_id,
                                         project_id,
                                         expenditure_type,
                                         expenditure_organization_id,
                                         expenditure_item_date,
                                         trx_line_dist_amt,
                                         trx_line_dist_qty,
                                         trx_line_quantity,
                                         account_ccid,
                                         historical_flag,
                                         OVERRIDING_RECOVERY_RATE)
                                  VALUES(201,
                                         'REQUISITION',
                                         'REQUISITION',
                                         p_tax_dist_tbl(i).trx_id,
                                         p_tax_dist_tbl(i).trx_line_id,
                                         'LINE',
                                         p_tax_dist_tbl(i).trx_line_dist_id,
                                         'CREATE',
                                         p_tax_dist_tbl(i).trx_line_dist_date,
                                         p_tax_dist_tbl(i).item_dist_number,
                                         p_tax_dist_tbl(i).intended_use,
                                         p_tax_dist_tbl(i).task_id,
                                         p_tax_dist_tbl(i).award_id,
                                         p_tax_dist_tbl(i).project_id,
                                         p_tax_dist_tbl(i).expenditure_type,
                                         p_tax_dist_tbl(i).expenditure_org_id,
                                         p_tax_dist_tbl(i).expenditure_item_date,
                                         p_tax_dist_tbl(i).trx_line_dist_amt,
                                         p_tax_dist_tbl(i).trx_line_dist_quantity,
                                         p_tax_dist_tbl(i).trx_line_quantity,
                                         p_tax_dist_tbl(i).account_ccid,
                                         'N',
                                         p_tax_dist_tbl(i).recovery_rate_override);
Line: 340

      l_log_msg := 'Inserted record into ZX_ITM_DISTRIBUTIONS_GT. DistId=' || p_tax_dist_tbl(i).trx_line_dist_id;
Line: 518

	     SELECT hzps.location_id
             FROM hz_party_sites hzps
             WHERE hzps.party_site_id = ship_from_party_site_id;
Line: 527

  SELECT default_taxation_country,
	 document_sub_type
  FROM ZX_TRX_HEADERS_GT;
Line: 532

  SELECT TRX_LINE_ID,
         INPUT_TAX_CLASSIFICATION_CODE,
         TRX_BUSINESS_CATEGORY,
         PRODUCT_FISC_CLASSIFICATION,
         PRODUCT_TYPE,
         LINE_INTENDED_USE,
         USER_DEFINED_FISC_CLASS,
         ASSESSABLE_VALUE,
         PRODUCT_CATEGORY,
         USER_UPD_DET_FACTORS_FLAG
  FROM ZX_TRANSACTION_LINES_GT;
Line: 571

  DELETE ZX_TRX_HEADERS_GT;
Line: 576

  DELETE ZX_TRANSACTION_LINES_GT;
Line: 595

        l_log_msg := 'Inserting into ZX_TRX_HEADERS_GT';
Line: 600

      INSERT INTO ZX_TRX_HEADERS_GT (internal_organization_id,
                                     icx_session_id,
                                     application_id,
                                     entity_code,
                                     event_class_code,
                                     event_type_code,
                                     trx_id,
                                     trx_date,
                                     ledger_id,
                                     legal_entity_id,
                                     rounding_bill_to_party_id,
                                     default_taxation_country,
                                     quote_flag,
                                     document_sub_type)
                          VALUES(p_tax_head_tbl(1).org_id,
                                 p_tax_head_tbl(1).icx_session_id,
                                 201,
                                 'REQUISITION',
                                 'REQUISITION',
                                 'REQ_CREATED',
                                 p_tax_head_tbl(1).trx_id,
                                 p_tax_head_tbl(1).trx_date,
                                 p_tax_head_tbl(1).ledger_id,
                                 l_legal_entity_id,
                                 p_tax_head_tbl(1).rndg_bill_to_party_id,
                                 NULL,
                                 'Y',
                                 NULL);
Line: 633

      l_log_msg := 'Inserting into ZX_TRANSACTION_LINES_GT';
Line: 658

    INSERT INTO ZX_TRANSACTION_LINES_GT(application_id,
                                        entity_code,
                                        event_class_code,
                                        trx_id,
                                        trx_level_type,
                                        trx_line_id,
                                        line_class,
                                        line_level_action,
                                        trx_line_type,
                                        trx_line_date,
                                        trx_business_category,
                                        line_intended_use,
                                        user_defined_fisc_class,
                                        line_amt_includes_tax_flag,
                                        line_amt,
                                        trx_line_quantity,
                                        unit_price,
                                        product_id,
                                        product_fisc_classification,
                                        product_org_id,
                                        uom_code,
                                        product_type,
                                        product_code,
                                        product_category,
                                        ship_to_party_id,
                                        ship_from_party_id,
                                        bill_to_party_id,
                                        bill_from_party_id,
                                        ship_from_party_site_id,
                                        bill_from_party_site_id,
                                        ship_to_location_id,
					ship_from_location_id,
                                        bill_to_location_id,
                                        ship_third_pty_acct_id,
                                        ship_third_pty_acct_site_id,
                                        assessable_value,
                                        historical_flag,
                                        trx_line_currency_code,
                                        trx_line_currency_conv_date,
                                        trx_line_currency_conv_rate,
                                        trx_line_currency_conv_type,
                                        trx_line_mau,
                                        trx_line_precision,
                                        historical_tax_code_id,
                                        input_tax_classification_code,
                                        user_upd_det_factors_flag,
                                        DEFAULTING_ATTRIBUTE1)
                          VALUES(201,
                                 'REQUISITION',
                                 'REQUISITION',
                                 p_tax_line_tbl(i).trx_id,
                                 'LINE',
                                 p_tax_line_tbl(i).trx_line_id,
                                 'INVOICE',
                                 nvl(p_tax_line_tbl(i).tax_attribute_update_code, 'CREATE'),
                                 'ITEM',
                                 p_tax_line_tbl(i).trx_line_date,
                                 NULL,
                                 NULL,
                                 NULL,
                                 'N',
                                 p_tax_line_tbl(i).line_amt,
                                 p_tax_line_tbl(i).trx_line_quantity,
                                 p_tax_line_tbl(i).unit_price,
                                 p_tax_line_tbl(i).product_id,
                                 NULL,
                                 p_tax_line_tbl(i).product_org_id,
                                 p_tax_line_tbl(i).uom_code,
                                 NULL,
                                 p_tax_line_tbl(i).product_code,
                                 NULL,
                                 p_tax_line_tbl(i).ship_to_party_id,
                                 p_tax_line_tbl(i).ship_from_party_id,
                                 p_tax_line_tbl(i).bill_to_party_id,
                                 p_tax_line_tbl(i).bill_from_party_id,
                                 p_tax_line_tbl(i).ship_from_party_site_id,
                                 p_tax_line_tbl(i).bill_from_party_site_id,
                                 p_tax_line_tbl(i).ship_to_location_id,
				 ship_from_location_id,
                                 p_tax_line_tbl(i).bill_to_location_id,
                                 p_tax_line_tbl(i).ship_third_pty_id,
                                 p_tax_line_tbl(i).ship_third_pty_site_id,
                                 NULL,
                                 'N',
                                 p_tax_line_tbl(i).currency_code,
                                 p_tax_line_tbl(i).currency_date,
                                 p_tax_line_tbl(i).currency_rate,
                                 p_tax_line_tbl(i).currency_type,
                                 p_tax_line_tbl(i).currency_min_unit,
                                 p_tax_line_tbl(i).currency_precision,
                                 p_tax_line_tbl(i).historical_tax_id,
                                 NULL,
                                 NULL,
                                 p_tax_line_tbl(i).product_org_id);
Line: 903

PROCEDURE delete_all_tax_attr (p_org_id         IN  NUMBER,
                               p_trx_id         IN  NUMBER,
                               x_return_status  OUT NOCOPY VARCHAR2,
                               x_msg_data       OUT NOCOPY VARCHAR2,
                               x_msg_count      OUT NOCOPY NUMBER) IS

PRAGMA AUTONOMOUS_TRANSACTION;
Line: 918

  l_procedure_name       CONSTANT VARCHAR2(30) := 'delete_all_tax_lines';
Line: 941

   l_transaction_rec.event_type_code := 'REQ_DELETED';
Line: 948

     l_log_msg := 'ZX global_document_update(+)';
Line: 953

   zx_api_pub.global_document_update(p_api_version => 1.0,
                                     p_init_msg_list => null,
                                     p_commit => null,
                                     p_validation_level => null,
                                     x_return_status => l_return_status,
                                     x_msg_count => l_msg_count,
                                     x_msg_data => l_msg_data,
	                             p_transaction_rec => l_transaction_rec);
Line: 966

     l_log_msg := 'ZX global_document_update returned status=' || l_return_status;
Line: 968

     l_log_msg := 'ZX global_document_update(-)';
Line: 992

      'Exception at POR_TAX_PVT.delete_all_tax_attr():'
        || ' SQLERRM= ' || SQLERRM || ' Error= ' || x_msg_data
        || ' Progress= ' || l_progress || '; ROLLBACK Complete.');
Line: 996

END delete_all_tax_attr;
Line: 1001

PROCEDURE insert_line_det_attr (p_tax_info_tbl  IN  POR_INSERT_TAX_OBJ_TBL_TYPE,
                                x_return_status OUT NOCOPY VARCHAR2,
                                x_msg_data      OUT NOCOPY VARCHAR2,
                                x_msg_count     OUT NOCOPY NUMBER ) IS

PRAGMA AUTONOMOUS_TRANSACTION;
Line: 1023

	     SELECT hzps.location_id
             FROM hz_party_sites hzps
             WHERE hzps.party_site_id = ship_from_party_site_id;
Line: 1028

  l_procedure_name       CONSTANT VARCHAR2(30) := 'insert_line_det_attr';
Line: 1062

   l_transaction_rec.event_type_code := 'REQ_DELETED';
Line: 1069

     l_log_msg := 'ZX global_document_update(+)';
Line: 1074

   zx_api_pub.global_document_update(p_api_version => 1.0,
                                     p_init_msg_list => null,
                                     p_commit => null,
                                     p_validation_level => null,
                                     x_return_status => l_return_status,
                                     x_msg_count => l_msg_count,
                                     x_msg_data => l_msg_data,
	                             p_transaction_rec => l_transaction_rec);
Line: 1087

     l_log_msg := 'ZX global_document_update returned status=' || l_return_status;
Line: 1089

     l_log_msg := 'ZX global_document_update(-)';
Line: 1244

               l_log_msg := 'Inserted record into ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl for trx_line_id=' || p_tax_info_tbl(1).trx_line_id;
Line: 1264

     l_log_msg := 'ZX insert_line_det_factors(+)';
Line: 1269

   zx_api_pub.insert_line_det_factors(p_api_version => 1.0,
                                      p_init_msg_list => null,
                                      p_commit => null,
                                      p_validation_level => null,
                                      x_return_status => l_return_status,
                                      x_msg_count => l_msg_count,
                                      x_msg_data => l_msg_data);
Line: 1281

     l_log_msg := 'ZX insert_line_det_factors returned status=' || l_return_status;
Line: 1283

     l_log_msg := 'ZX insert_line_det_factors(-)';
Line: 1307

      'Exception at POR_TAX_PVT.insert_line_det_attr():'
        || ' SQLERRM= ' || SQLERRM || ' Error= ' || x_msg_data
        || ' Progress= ' || l_progress || '; ROLLBACK Complete.');
Line: 1310

END insert_line_det_attr;
Line: 1411

      l_log_msg := 'Inserted record into ZX_GLOBAL_STRUCTURES_PKG.trx_line_dist_tbl';
Line: 1426

  zx_api_pub.copy_insert_line_det_factors(p_api_version => 1.0,
                                          p_init_msg_list => null,
                                          p_commit => null,
                                          p_validation_level => null,
                                          x_return_status => l_return_status,
                                          x_msg_count => l_msg_count,
                                          x_msg_data => l_msg_data);