• 更新客户信息


    DECLARE
       CURSOR cur_h IS
          SELECT h.*
            FROM ar_customers h
           WHERE h.customer_name  /*'—XD';*/
                 LIKE '%—XD';
    
       p_customer_rec  cux_ar_cust_accounts_v%ROWTYPE;
       l_return_status VARCHAR2(30);
       l_msg_count     NUMBER;
       l_msg_data      VARCHAR2(3000);
       l_party_id      NUMBER;
       l_name          VARCHAR2(3000);
       /*FROM CUX_AR_CUSTOMERS_BILL_ALL*/
    
    BEGIN
    
       FOR rec_h IN cur_h LOOP
       
          SELECT REPLACE(rec_h.customer_name, '—', '-') INTO l_name FROM dual;
       
          p_customer_rec.party_name := l_name; -- 客户名称
          /*p_customer_rec.party_number:=;
          p_customer_rec.tax_reference:=; -- 纳税登记编号
          p_customer_rec.account_number:=; --客户账号
               -- l_cust_account_rec.customer_type       := 'R'; --p_customer_rec.; -- 账户类型:'R' 外部
          p_customer_rec.customer_class_code:=; -- 账户分类: 'FWDW' 服务单位
          p_customer_rec.sales_channel_code:=; -- 销售渠道*/
          -- l_cust_account_rec.created_by_module       := c_created_by_module;
          -- l_cust_account_rec.tax_header_level_flag   := rec.tax_header_level_flag; ----add by Jake.Yu@2012-11-29---
          -- l_cust_account_rec.tax_rounding_rule       := rec.tax_rounding_rule; ----add by Jake.Yu@2012-11-29---
       
          p_customer_rec.cust_account_id := rec_h.customer_id;
       
          SELECT l.party_id
            INTO l_party_id
            FROM hz_cust_accounts l
           WHERE l.cust_account_id = rec_h.customer_id;
       
          p_customer_rec.party_id := l_party_id;
          /* p_customer_rec.category_code :=; -- 客户类别
          p_customer_rec.related_party :=; -- 关联方标识
          p_customer_rec.party_number:=;*/
       
          cux_ar_customer_infor_pkg.sys_update_customer(p_customer_rec  => p_customer_rec,
                                                        x_return_status => l_return_status,
                                                        x_msg_count     => l_msg_count,
                                                        x_msg_data      => l_msg_data);
       
       END LOOP; --FOR rec_h IN cur_h LOOP
    
    END;
    
    /*SELECT * FROM HZ_PARTIES;
    */
    /*SELECT *FROM CUX_AR_CUSTOMERS_BILL_ALL;
    
    SELECT * FROM CUX_AR_CUST_ACCOUNTS_ALL;
    */
    
    /*SELECT * FROM AR_CUSTOMERS l WHERE l.CUSTOMER_NAME = '乌—XD';*/
    

  • 相关阅读:
    Google官方教程之Selling In-app Products
    In-app Billing 概述
    Android SDK和ADT无法更新的解决办法
    在NGUI中高效优化UIScrollView之UIWrapContent的简介以及使用
    cocos2d-x 3.1 编译脚本android-build.py
    Storm---DirectGroup(直接分组)
    Lucene Spatial构建地理空间索引
    Log4j2日志配置
    Guava缓存使用
    Maven 多套环境配置
  • 原文地址:https://www.cnblogs.com/wanghang/p/6299053.html
Copyright © 2020-2023  润新知