• 更新客户信息


    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';*/
    

  • 相关阅读:
    POJ 3253 Fence Repair
    POJ 2431 Expedition
    NYOJ 269 VF
    NYOJ 456 邮票分你一半
    划分数问题 DP
    HDU 1253 胜利大逃亡
    NYOJ 294 Bot Trust
    NYOJ 36 最长公共子序列
    HDU 1555 How many days?
    01背包 (大数据)
  • 原文地址:https://www.cnblogs.com/wanghang/p/6299053.html
Copyright © 2020-2023  润新知